summaryrefslogtreecommitdiffstats
path: root/contrib/ntp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp')
-rw-r--r--contrib/ntp/COPYRIGHT176
-rw-r--r--contrib/ntp/ChangeLog23989
-rw-r--r--contrib/ntp/ChangeLog-4.1.06152
-rw-r--r--contrib/ntp/INSTALL178
-rw-r--r--contrib/ntp/Makefile.am143
-rw-r--r--contrib/ntp/Makefile.in712
-rw-r--r--contrib/ntp/NEWS154
-rw-r--r--contrib/ntp/NOTES.y2kfixes107
-rw-r--r--contrib/ntp/README148
-rw-r--r--contrib/ntp/README.bk63
-rw-r--r--contrib/ntp/README.cvs56
-rw-r--r--contrib/ntp/README.des16
-rw-r--r--contrib/ntp/README.hackers28
-rw-r--r--contrib/ntp/README.patches39
-rw-r--r--contrib/ntp/README.refclocks50
-rw-r--r--contrib/ntp/README.rsa103
-rw-r--r--contrib/ntp/README.versions35
-rw-r--r--contrib/ntp/TODO124
-rw-r--r--contrib/ntp/WHERE-TO-START41
-rw-r--r--contrib/ntp/acconfig.h1
-rw-r--r--contrib/ntp/acinclude.m437
-rw-r--r--contrib/ntp/aclocal.m41048
-rw-r--r--contrib/ntp/adjtimed/Makefile.am8
-rw-r--r--contrib/ntp/adjtimed/Makefile.in445
-rw-r--r--contrib/ntp/adjtimed/README22
-rw-r--r--contrib/ntp/adjtimed/adjtimed.c491
-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/build88
-rw-r--r--contrib/ntp/clockstuff/Makefile.am16
-rw-r--r--contrib/ntp/clockstuff/Makefile.in446
-rw-r--r--contrib/ntp/clockstuff/README31
-rw-r--r--contrib/ntp/clockstuff/chutest.c816
-rw-r--r--contrib/ntp/clockstuff/clktest.c529
-rw-r--r--contrib/ntp/clockstuff/propdelay.c544
-rwxr-xr-xcontrib/ntp/compile99
-rw-r--r--contrib/ntp/conf/README13
-rw-r--r--contrib/ntp/conf/baldwin.conf10
-rw-r--r--contrib/ntp/conf/beauregard.conf23
-rw-r--r--contrib/ntp/conf/dewey.conf42
-rw-r--r--contrib/ntp/conf/grundoon.conf36
-rw-r--r--contrib/ntp/conf/malarky.conf24
-rw-r--r--contrib/ntp/conf/pogo.conf44
-rw-r--r--contrib/ntp/conf/rackety.conf56
-rwxr-xr-xcontrib/ntp/config.guess1407
-rw-r--r--contrib/ntp/config.h.in1129
-rwxr-xr-xcontrib/ntp/config.sub1504
-rwxr-xr-xcontrib/ntp/configure24769
-rw-r--r--contrib/ntp/configure.in3707
-rwxr-xr-xcontrib/ntp/depcomp472
-rw-r--r--contrib/ntp/dot.emacs18
-rw-r--r--contrib/ntp/excludes1
-rwxr-xr-xcontrib/ntp/flock-build53
-rw-r--r--contrib/ntp/html/Oncore-SHMEM.htm257
-rw-r--r--contrib/ntp/html/accopt.htm210
-rw-r--r--contrib/ntp/html/accopt.html70
-rw-r--r--contrib/ntp/html/assoc.htm89
-rw-r--r--contrib/ntp/html/assoc.html58
-rw-r--r--contrib/ntp/html/audio.htm187
-rw-r--r--contrib/ntp/html/audio.html55
-rw-r--r--contrib/ntp/html/authopt.htm415
-rw-r--r--contrib/ntp/html/authopt.html144
-rw-r--r--contrib/ntp/html/biblio.htm106
-rw-r--r--contrib/ntp/html/build.htm239
-rw-r--r--contrib/ntp/html/build.html83
-rw-r--r--contrib/ntp/html/clockopt.htm76
-rw-r--r--contrib/ntp/html/clockopt.html67
-rw-r--r--contrib/ntp/html/config.htm188
-rw-r--r--contrib/ntp/html/config.html168
-rw-r--r--contrib/ntp/html/confopt.htm257
-rw-r--r--contrib/ntp/html/confopt.html88
-rw-r--r--contrib/ntp/html/copyright.htm142
-rw-r--r--contrib/ntp/html/copyright.html95
-rw-r--r--contrib/ntp/html/debug.htm477
-rw-r--r--contrib/ntp/html/debug.html171
-rw-r--r--contrib/ntp/html/driver1.htm157
-rw-r--r--contrib/ntp/html/driver10.htm114
-rw-r--r--contrib/ntp/html/driver11.htm150
-rw-r--r--contrib/ntp/html/driver12.htm98
-rw-r--r--contrib/ntp/html/driver16.htm43
-rw-r--r--contrib/ntp/html/driver18.htm235
-rw-r--r--contrib/ntp/html/driver19.htm124
-rw-r--r--contrib/ntp/html/driver2.htm137
-rw-r--r--contrib/ntp/html/driver20.htm161
-rw-r--r--contrib/ntp/html/driver22.htm159
-rw-r--r--contrib/ntp/html/driver23.htm178
-rw-r--r--contrib/ntp/html/driver24.htm85
-rw-r--r--contrib/ntp/html/driver26.htm109
-rw-r--r--contrib/ntp/html/driver27.htm634
-rw-r--r--contrib/ntp/html/driver28.htm133
-rw-r--r--contrib/ntp/html/driver29.htm1254
-rw-r--r--contrib/ntp/html/driver3.htm131
-rw-r--r--contrib/ntp/html/driver30.htm190
-rw-r--r--contrib/ntp/html/driver32.htm42
-rw-r--r--contrib/ntp/html/driver33.htm38
-rw-r--r--contrib/ntp/html/driver34.htm96
-rw-r--r--contrib/ntp/html/driver35.htm80
-rw-r--r--contrib/ntp/html/driver36.htm930
-rw-r--r--contrib/ntp/html/driver37.htm75
-rw-r--r--contrib/ntp/html/driver38.htm191
-rw-r--r--contrib/ntp/html/driver39.htm162
-rw-r--r--contrib/ntp/html/driver4.htm126
-rw-r--r--contrib/ntp/html/driver40.htm141
-rw-r--r--contrib/ntp/html/driver42.htm41
-rw-r--r--contrib/ntp/html/driver42.html39
-rw-r--r--contrib/ntp/html/driver43.htm109
-rwxr-xr-xcontrib/ntp/html/driver44.htm131
-rw-r--r--contrib/ntp/html/driver5.htm159
-rw-r--r--contrib/ntp/html/driver6.htm271
-rw-r--r--contrib/ntp/html/driver7.htm657
-rw-r--r--contrib/ntp/html/driver8.htm353
-rw-r--r--contrib/ntp/html/driver9.htm129
-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.gifbin983 -> 0 bytes
-rw-r--r--contrib/ntp/html/drivers/icons/mail2.gifbin287 -> 0 bytes
-rw-r--r--contrib/ntp/html/drivers/oncore-shmem.html158
-rw-r--r--contrib/ntp/html/exec.htm393
-rw-r--r--contrib/ntp/html/extern.htm108
-rw-r--r--contrib/ntp/html/extern.html32
-rw-r--r--contrib/ntp/html/gadget.htm48
-rw-r--r--contrib/ntp/html/genkeys.htm181
-rw-r--r--contrib/ntp/html/hints.htm32
-rw-r--r--contrib/ntp/html/hints.html23
-rw-r--r--contrib/ntp/html/hints/a-ux195
-rw-r--r--contrib/ntp/html/hints/aix76
-rw-r--r--contrib/ntp/html/hints/bsdi65
-rw-r--r--contrib/ntp/html/hints/changes13
-rw-r--r--contrib/ntp/html/hints/decosf140
-rw-r--r--contrib/ntp/html/hints/decosf254
-rw-r--r--contrib/ntp/html/hints/freebsd15
-rw-r--r--contrib/ntp/html/hints/hpux158
-rw-r--r--contrib/ntp/html/hints/linux5
-rw-r--r--contrib/ntp/html/hints/mpeix50
-rw-r--r--contrib/ntp/html/hints/netbsd37
-rw-r--r--contrib/ntp/html/hints/notes-xntp-v3119
-rw-r--r--contrib/ntp/html/hints/parse105
-rw-r--r--contrib/ntp/html/hints/refclocks35
-rw-r--r--contrib/ntp/html/hints/rs600056
-rw-r--r--contrib/ntp/html/hints/sco.htm39
-rw-r--r--contrib/ntp/html/hints/sco.html24
-rw-r--r--contrib/ntp/html/hints/sgi74
-rw-r--r--contrib/ntp/html/hints/solaris-dosynctodr.html321
-rw-r--r--contrib/ntp/html/hints/solaris.html144
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.402311836
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.409584974
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.S99ntpd21
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.patchfreq85
-rw-r--r--contrib/ntp/html/hints/sun415
-rw-r--r--contrib/ntp/html/hints/svr4-dell8
-rw-r--r--contrib/ntp/html/hints/svr4_package33
-rw-r--r--contrib/ntp/html/hints/todo4
-rw-r--r--contrib/ntp/html/hints/vxworks.htm153
-rw-r--r--contrib/ntp/html/hints/vxworks.html82
-rw-r--r--contrib/ntp/html/hints/winnt.htm334
-rw-r--r--contrib/ntp/html/hints/winnt.html259
-rw-r--r--contrib/ntp/html/howto.htm320
-rw-r--r--contrib/ntp/html/howto.html108
-rw-r--r--contrib/ntp/html/htmlprimer.htm1198
-rw-r--r--contrib/ntp/html/icons/home.gifbin983 -> 0 bytes
-rw-r--r--contrib/ntp/html/icons/mail2.gifbin287 -> 0 bytes
-rw-r--r--contrib/ntp/html/index.htm261
-rw-r--r--contrib/ntp/html/index.html101
-rw-r--r--contrib/ntp/html/kern.htm122
-rw-r--r--contrib/ntp/html/kern.html33
-rw-r--r--contrib/ntp/html/kernpps.htm24
-rw-r--r--contrib/ntp/html/keygen.html112
-rw-r--r--contrib/ntp/html/ldisc.htm89
-rw-r--r--contrib/ntp/html/ldisc.html46
-rw-r--r--contrib/ntp/html/leap.htm250
-rw-r--r--contrib/ntp/html/manyopt.html69
-rw-r--r--contrib/ntp/html/measure.htm17
-rw-r--r--contrib/ntp/html/measure.html22
-rw-r--r--contrib/ntp/html/miscopt.htm279
-rw-r--r--contrib/ntp/html/miscopt.html93
-rw-r--r--contrib/ntp/html/monopt.htm255
-rw-r--r--contrib/ntp/html/monopt.html123
-rw-r--r--contrib/ntp/html/msyslog.html125
-rw-r--r--contrib/ntp/html/mx4200data.htm443
-rw-r--r--contrib/ntp/html/mx4200data.html1073
-rw-r--r--contrib/ntp/html/notes.htm1547
-rw-r--r--contrib/ntp/html/notes.html279
-rw-r--r--contrib/ntp/html/ntpd.htm457
-rw-r--r--contrib/ntp/html/ntpd.html184
-rw-r--r--contrib/ntp/html/ntpdate.htm186
-rw-r--r--contrib/ntp/html/ntpdate.html69
-rw-r--r--contrib/ntp/html/ntpdc.htm573
-rw-r--r--contrib/ntp/html/ntpdc.html158
-rw-r--r--contrib/ntp/html/ntpdsim.html72
-rw-r--r--contrib/ntp/html/ntpq.htm658
-rw-r--r--contrib/ntp/html/ntpq.html262
-rw-r--r--contrib/ntp/html/ntptime.htm80
-rw-r--r--contrib/ntp/html/ntptime.html47
-rw-r--r--contrib/ntp/html/ntptrace.htm91
-rw-r--r--contrib/ntp/html/ntptrace.html48
-rw-r--r--contrib/ntp/html/parsedata.htm407
-rw-r--r--contrib/ntp/html/parsedata.html336
-rw-r--r--contrib/ntp/html/parsenew.htm237
-rw-r--r--contrib/ntp/html/parsenew.html195
-rw-r--r--contrib/ntp/html/patches.htm42
-rw-r--r--contrib/ntp/html/patches.html36
-rw-r--r--contrib/ntp/html/porting.htm84
-rw-r--r--contrib/ntp/html/porting.html40
-rw-r--r--contrib/ntp/html/pps.htm106
-rw-r--r--contrib/ntp/html/pps.html40
-rw-r--r--contrib/ntp/html/prefer.htm93
-rw-r--r--contrib/ntp/html/prefer.html71
-rw-r--r--contrib/ntp/html/qth.htm76
-rw-r--r--contrib/ntp/html/quick.htm100
-rw-r--r--contrib/ntp/html/quick.html30
-rw-r--r--contrib/ntp/html/rdebug.htm25
-rw-r--r--contrib/ntp/html/rdebug.html31
-rw-r--r--contrib/ntp/html/refclock.htm202
-rw-r--r--contrib/ntp/html/refclock.html103
-rw-r--r--contrib/ntp/html/release.htm290
-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.htm105
-rw-r--r--contrib/ntp/html/tickadj.html48
-rw-r--r--contrib/ntp/include/Makefile.am58
-rw-r--r--contrib/ntp/include/Makefile.in501
-rw-r--r--contrib/ntp/include/README4
-rw-r--r--contrib/ntp/include/adjtime.h69
-rw-r--r--contrib/ntp/include/ascii.h61
-rw-r--r--contrib/ntp/include/audio.h14
-rw-r--r--contrib/ntp/include/binio.h41
-rw-r--r--contrib/ntp/include/global.h54
-rw-r--r--contrib/ntp/include/gps.h53
-rw-r--r--contrib/ntp/include/hopf6039.h144
-rwxr-xr-xcontrib/ntp/include/icom.h87
-rw-r--r--contrib/ntp/include/ieee754io.h43
-rw-r--r--contrib/ntp/include/iosignal.h23
-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.h519
-rw-r--r--contrib/ntp/include/mbg_gps166.h538
-rw-r--r--contrib/ntp/include/md5.h51
-rw-r--r--contrib/ntp/include/mx4200.h40
-rw-r--r--contrib/ntp/include/ntif.h98
-rw-r--r--contrib/ntp/include/ntp.h874
-rw-r--r--contrib/ntp/include/ntp_calendar.h112
-rw-r--r--contrib/ntp/include/ntp_cmdargs.h4
-rw-r--r--contrib/ntp/include/ntp_config.h178
-rw-r--r--contrib/ntp/include/ntp_control.h283
-rw-r--r--contrib/ntp/include/ntp_crypto.h166
-rw-r--r--contrib/ntp/include/ntp_datum.h30
-rw-r--r--contrib/ntp/include/ntp_filegen.h51
-rw-r--r--contrib/ntp/include/ntp_fp.h376
-rw-r--r--contrib/ntp/include/ntp_if.h27
-rw-r--r--contrib/ntp/include/ntp_io.h50
-rw-r--r--contrib/ntp/include/ntp_machine.h596
-rw-r--r--contrib/ntp/include/ntp_malloc.h19
-rw-r--r--contrib/ntp/include/ntp_md5.h9
-rw-r--r--contrib/ntp/include/ntp_proto.h10
-rw-r--r--contrib/ntp/include/ntp_refclock.h267
-rw-r--r--contrib/ntp/include/ntp_request.h884
-rw-r--r--contrib/ntp/include/ntp_rfc2553.h254
-rw-r--r--contrib/ntp/include/ntp_select.h35
-rw-r--r--contrib/ntp/include/ntp_sprintf.h13
-rw-r--r--contrib/ntp/include/ntp_stdlib.h158
-rw-r--r--contrib/ntp/include/ntp_string.h48
-rw-r--r--contrib/ntp/include/ntp_syscall.h55
-rw-r--r--contrib/ntp/include/ntp_syslog.h70
-rw-r--r--contrib/ntp/include/ntp_tty.h68
-rw-r--r--contrib/ntp/include/ntp_types.h73
-rw-r--r--contrib/ntp/include/ntp_unixtime.h141
-rw-r--r--contrib/ntp/include/ntpd.h435
-rw-r--r--contrib/ntp/include/ntpsim.h93
-rw-r--r--contrib/ntp/include/parse.h391
-rw-r--r--contrib/ntp/include/parse_conf.h54
-rw-r--r--contrib/ntp/include/recvbuff.h113
-rw-r--r--contrib/ntp/include/rsa_md5.h51
-rw-r--r--contrib/ntp/include/trimble.h125
-rwxr-xr-xcontrib/ntp/install-sh294
-rw-r--r--contrib/ntp/kernel/Makefile.am5
-rw-r--r--contrib/ntp/kernel/Makefile.in445
-rw-r--r--contrib/ntp/kernel/README200
-rw-r--r--contrib/ntp/kernel/chuinit.c76
-rw-r--r--contrib/ntp/kernel/clkinit.c76
-rw-r--r--contrib/ntp/kernel/sys/Makefile.am8
-rw-r--r--contrib/ntp/kernel/sys/Makefile.in355
-rw-r--r--contrib/ntp/kernel/sys/README11
-rw-r--r--contrib/ntp/kernel/sys/bsd_audioirig.h101
-rw-r--r--contrib/ntp/kernel/sys/chudefs.h22
-rw-r--r--contrib/ntp/kernel/sys/clkdefs.h38
-rw-r--r--contrib/ntp/kernel/sys/i8253.h48
-rw-r--r--contrib/ntp/kernel/sys/parsestreams.h109
-rw-r--r--contrib/ntp/kernel/sys/pcl720.h95
-rw-r--r--contrib/ntp/kernel/sys/ppsclock.h64
-rw-r--r--contrib/ntp/kernel/sys/timex.h309
-rw-r--r--contrib/ntp/kernel/sys/tpro.h34
-rw-r--r--contrib/ntp/kernel/sys/tt560_api.h489
-rw-r--r--contrib/ntp/kernel/tty_chu.c276
-rw-r--r--contrib/ntp/kernel/tty_chu_STREAMS.c603
-rw-r--r--contrib/ntp/kernel/tty_clk.c317
-rw-r--r--contrib/ntp/kernel/tty_clk_STREAMS.c266
-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.am35
-rw-r--r--contrib/ntp/libntp/Makefile.in1212
-rw-r--r--contrib/ntp/libntp/README5
-rw-r--r--contrib/ntp/libntp/a_md5encrypt.c104
-rw-r--r--contrib/ntp/libntp/adjtime.c323
-rw-r--r--contrib/ntp/libntp/adjtimex.c15
-rw-r--r--contrib/ntp/libntp/atoint.c50
-rw-r--r--contrib/ntp/libntp/atolfp.c118
-rw-r--r--contrib/ntp/libntp/atouint.c35
-rw-r--r--contrib/ntp/libntp/audio.c481
-rw-r--r--contrib/ntp/libntp/authencrypt.c97
-rw-r--r--contrib/ntp/libntp/authkeys.c488
-rw-r--r--contrib/ntp/libntp/authparity.c66
-rw-r--r--contrib/ntp/libntp/authreadkeys.c162
-rw-r--r--contrib/ntp/libntp/authusekey.c47
-rw-r--r--contrib/ntp/libntp/binio.c128
-rw-r--r--contrib/ntp/libntp/buftvtots.c106
-rw-r--r--contrib/ntp/libntp/caljulian.c115
-rw-r--r--contrib/ntp/libntp/calleapwhen.c59
-rw-r--r--contrib/ntp/libntp/caltontp.c42
-rw-r--r--contrib/ntp/libntp/calyearstart.c22
-rw-r--r--contrib/ntp/libntp/clocktime.c132
-rw-r--r--contrib/ntp/libntp/clocktypes.c118
-rw-r--r--contrib/ntp/libntp/decodenetnum.c40
-rw-r--r--contrib/ntp/libntp/dofptoa.c118
-rw-r--r--contrib/ntp/libntp/dolfptoa.c162
-rw-r--r--contrib/ntp/libntp/emalloc.c48
-rw-r--r--contrib/ntp/libntp/findconfig.c72
-rw-r--r--contrib/ntp/libntp/fptoa.c25
-rw-r--r--contrib/ntp/libntp/fptoms.c24
-rw-r--r--contrib/ntp/libntp/getopt.c107
-rw-r--r--contrib/ntp/libntp/gpstolfp.c41
-rw-r--r--contrib/ntp/libntp/hextoint.c39
-rw-r--r--contrib/ntp/libntp/hextolfp.c67
-rw-r--r--contrib/ntp/libntp/humandate.c63
-rw-r--r--contrib/ntp/libntp/icom.c324
-rw-r--r--contrib/ntp/libntp/ieee754io.c575
-rw-r--r--contrib/ntp/libntp/inttoa.c20
-rw-r--r--contrib/ntp/libntp/iosignal.c544
-rw-r--r--contrib/ntp/libntp/lib_strbuf.c23
-rw-r--r--contrib/ntp/libntp/lib_strbuf.h27
-rw-r--r--contrib/ntp/libntp/log.c161
-rw-r--r--contrib/ntp/libntp/log.h21
-rw-r--r--contrib/ntp/libntp/machines.c525
-rw-r--r--contrib/ntp/libntp/md5c.c354
-rw-r--r--contrib/ntp/libntp/memmove.c140
-rw-r--r--contrib/ntp/libntp/mfp_mul.c140
-rw-r--r--contrib/ntp/libntp/mfptoa.c23
-rw-r--r--contrib/ntp/libntp/mfptoms.c23
-rw-r--r--contrib/ntp/libntp/mktime.c306
-rw-r--r--contrib/ntp/libntp/modetoa.c34
-rw-r--r--contrib/ntp/libntp/mstolfp.c100
-rw-r--r--contrib/ntp/libntp/msutotsf.c35
-rw-r--r--contrib/ntp/libntp/msyslog.c207
-rw-r--r--contrib/ntp/libntp/netof.c48
-rw-r--r--contrib/ntp/libntp/ntp_rfc2553.c331
-rw-r--r--contrib/ntp/libntp/numtoa.c24
-rw-r--r--contrib/ntp/libntp/numtohost.c39
-rw-r--r--contrib/ntp/libntp/octtoint.c35
-rw-r--r--contrib/ntp/libntp/prettydate.c68
-rw-r--r--contrib/ntp/libntp/random.c482
-rw-r--r--contrib/ntp/libntp/ranny.c82
-rw-r--r--contrib/ntp/libntp/recvbuff.c259
-rw-r--r--contrib/ntp/libntp/refnumtoa.c36
-rw-r--r--contrib/ntp/libntp/snprintf.c62
-rw-r--r--contrib/ntp/libntp/socktoa.c48
-rw-r--r--contrib/ntp/libntp/socktohost.c32
-rw-r--r--contrib/ntp/libntp/statestr.c303
-rw-r--r--contrib/ntp/libntp/strdup.c28
-rw-r--r--contrib/ntp/libntp/strerror.c48
-rw-r--r--contrib/ntp/libntp/strstr.c52
-rw-r--r--contrib/ntp/libntp/syssignal.c133
-rw-r--r--contrib/ntp/libntp/systime.c521
-rw-r--r--contrib/ntp/libntp/systime_s.c2
-rw-r--r--contrib/ntp/libntp/tsftomsu.c38
-rw-r--r--contrib/ntp/libntp/tstotv.c135
-rw-r--r--contrib/ntp/libntp/tvtoa.c39
-rw-r--r--contrib/ntp/libntp/tvtots.c159
-rw-r--r--contrib/ntp/libntp/uglydate.c48
-rw-r--r--contrib/ntp/libntp/uinttoa.c20
-rw-r--r--contrib/ntp/libntp/utvtoa.c26
-rw-r--r--contrib/ntp/libntp/ymd2yd.c37
-rw-r--r--contrib/ntp/libparse/Makefile.am147
-rw-r--r--contrib/ntp/libparse/Makefile.in682
-rw-r--r--contrib/ntp/libparse/README96
-rw-r--r--contrib/ntp/libparse/clk_computime.c193
-rw-r--r--contrib/ntp/libparse/clk_dcf7000.c188
-rw-r--r--contrib/ntp/libparse/clk_hopf6021.c280
-rw-r--r--contrib/ntp/libparse/clk_meinberg.c747
-rw-r--r--contrib/ntp/libparse/clk_rawdcf.c615
-rw-r--r--contrib/ntp/libparse/clk_rcc8000.c195
-rw-r--r--contrib/ntp/libparse/clk_schmid.c231
-rw-r--r--contrib/ntp/libparse/clk_trimtaip.c189
-rw-r--r--contrib/ntp/libparse/clk_trimtsip.c421
-rw-r--r--contrib/ntp/libparse/clk_varitext.c236
-rw-r--r--contrib/ntp/libparse/clk_wharton.c181
-rw-r--r--contrib/ntp/libparse/data_mbg.c490
-rw-r--r--contrib/ntp/libparse/info_trimble.c94
-rw-r--r--contrib/ntp/libparse/mkinfo_rcmd.sed8
-rw-r--r--contrib/ntp/libparse/mkinfo_scmd.sed16
-rw-r--r--contrib/ntp/libparse/parse.c917
-rw-r--r--contrib/ntp/libparse/parse_conf.c149
-rw-r--r--contrib/ntp/libparse/parsesolaris.c1173
-rw-r--r--contrib/ntp/libparse/parsestreams.c1338
-rw-r--r--contrib/ntp/libparse/trim_info.c35
-rw-r--r--contrib/ntp/librsaref/Makefile.am63
-rw-r--r--contrib/ntp/librsaref/Makefile.in403
-rwxr-xr-xcontrib/ntp/missing336
-rwxr-xr-xcontrib/ntp/mkinstalldirs111
-rwxr-xr-xcontrib/ntp/ntp_update69
-rw-r--r--contrib/ntp/ntpd/Makefile.am60
-rw-r--r--contrib/ntp/ntpd/Makefile.in960
-rw-r--r--contrib/ntp/ntpd/check_y2k.c627
-rw-r--r--contrib/ntp/ntpd/cmd_args.c418
-rw-r--r--contrib/ntp/ntpd/jupiter.h255
-rw-r--r--contrib/ntp/ntpd/map_vme.c135
-rw-r--r--contrib/ntp/ntpd/ntp_config.c2371
-rw-r--r--contrib/ntp/ntpd/ntp_control.c2928
-rw-r--r--contrib/ntp/ntpd/ntp_crypto.c4031
-rw-r--r--contrib/ntp/ntpd/ntp_filegen.c547
-rw-r--r--contrib/ntp/ntpd/ntp_intres.c1065
-rw-r--r--contrib/ntp/ntpd/ntp_io.c2257
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c1000
-rw-r--r--contrib/ntp/ntpd/ntp_monitor.c335
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c880
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c3208
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c1129
-rw-r--r--contrib/ntp/ntpd/ntp_request.c2756
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c586
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c377
-rw-r--r--contrib/ntp/ntpd/ntp_util.c797
-rw-r--r--contrib/ntp/ntpd/ntpd.c1274
-rw-r--r--contrib/ntp/ntpd/ntpsim.c368
-rw-r--r--contrib/ntp/ntpd/refclock_acts.c984
-rw-r--r--contrib/ntp/ntpd/refclock_arbiter.c429
-rw-r--r--contrib/ntp/ntpd/refclock_arc.c1529
-rw-r--r--contrib/ntp/ntpd/refclock_as2201.c388
-rw-r--r--contrib/ntp/ntpd/refclock_atom.c504
-rw-r--r--contrib/ntp/ntpd/refclock_bancomm.c433
-rw-r--r--contrib/ntp/ntpd/refclock_chronolog.c341
-rw-r--r--contrib/ntp/ntpd/refclock_chu.c1687
-rw-r--r--contrib/ntp/ntpd/refclock_conf.c331
-rw-r--r--contrib/ntp/ntpd/refclock_datum.c869
-rw-r--r--contrib/ntp/ntpd/refclock_dumbclock.c385
-rw-r--r--contrib/ntp/ntpd/refclock_fg.c348
-rw-r--r--contrib/ntp/ntpd/refclock_gpsvme.c622
-rw-r--r--contrib/ntp/ntpd/refclock_heath.c421
-rw-r--r--contrib/ntp/ntpd/refclock_hopfpci.c273
-rw-r--r--contrib/ntp/ntpd/refclock_hopfser.c378
-rw-r--r--contrib/ntp/ntpd/refclock_hpgps.c604
-rw-r--r--contrib/ntp/ntpd/refclock_irig.c1049
-rw-r--r--contrib/ntp/ntpd/refclock_jjy.c710
-rw-r--r--contrib/ntp/ntpd/refclock_jupiter.c1140
-rw-r--r--contrib/ntp/ntpd/refclock_leitch.c620
-rw-r--r--contrib/ntp/ntpd/refclock_local.c264
-rw-r--r--contrib/ntp/ntpd/refclock_msfees.c1455
-rw-r--r--contrib/ntp/ntpd/refclock_mx4200.c1654
-rw-r--r--contrib/ntp/ntpd/refclock_neoclock4x.c1068
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c723
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c3723
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c954
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.h168
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c5386
-rw-r--r--contrib/ntp/ntpd/refclock_pcf.c224
-rw-r--r--contrib/ntp/ntpd/refclock_pst.c321
-rw-r--r--contrib/ntp/ntpd/refclock_ptbacts.c16
-rw-r--r--contrib/ntp/ntpd/refclock_ripencc.c4870
-rw-r--r--contrib/ntp/ntpd/refclock_shm.c305
-rw-r--r--contrib/ntp/ntpd/refclock_tpro.c216
-rw-r--r--contrib/ntp/ntpd/refclock_trak.c359
-rw-r--r--contrib/ntp/ntpd/refclock_true.c873
-rw-r--r--contrib/ntp/ntpd/refclock_tt560.c274
-rw-r--r--contrib/ntp/ntpd/refclock_ulink.c497
-rw-r--r--contrib/ntp/ntpd/refclock_usno.c674
-rw-r--r--contrib/ntp/ntpd/refclock_wwv.c2859
-rw-r--r--contrib/ntp/ntpd/refclock_wwvb.c441
-rw-r--r--contrib/ntp/ntpd/refclock_zyfer.c346
-rw-r--r--contrib/ntp/ntpdate/Makefile.am22
-rw-r--r--contrib/ntp/ntpdate/Makefile.in481
-rw-r--r--contrib/ntp/ntpdate/README7
-rw-r--r--contrib/ntp/ntpdate/ntpdate.c2225
-rw-r--r--contrib/ntp/ntpdate/ntpdate.h104
-rw-r--r--contrib/ntp/ntpdate/ntptime_config.c552
-rw-r--r--contrib/ntp/ntpdate/ntptimeset.c2171
-rw-r--r--contrib/ntp/ntpdc/Makefile.am45
-rw-r--r--contrib/ntp/ntpdc/Makefile.in508
-rw-r--r--contrib/ntp/ntpdc/README6
-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.c1894
-rw-r--r--contrib/ntp/ntpdc/ntpdc.h64
-rw-r--r--contrib/ntp/ntpdc/ntpdc_ops.c3012
-rw-r--r--contrib/ntp/ntpq/Makefile.am21
-rw-r--r--contrib/ntp/ntpq/Makefile.in463
-rw-r--r--contrib/ntp/ntpq/README6
-rw-r--r--contrib/ntp/ntpq/ntpq.c3228
-rw-r--r--contrib/ntp/ntpq/ntpq.h90
-rw-r--r--contrib/ntp/ntpq/ntpq_ops.c1734
-rw-r--r--contrib/ntp/ntptrace/Makefile.am19
-rw-r--r--contrib/ntp/ntptrace/Makefile.in369
-rw-r--r--contrib/ntp/ntptrace/README7
-rw-r--r--contrib/ntp/ntptrace/ntptrace.c802
-rw-r--r--contrib/ntp/ntptrace/ntptrace.h36
-rw-r--r--contrib/ntp/parseutil/Makefile.am13
-rw-r--r--contrib/ntp/parseutil/Makefile.in441
-rw-r--r--contrib/ntp/parseutil/README16
-rw-r--r--contrib/ntp/parseutil/dcfd.c1852
-rw-r--r--contrib/ntp/parseutil/testdcf.c493
-rwxr-xr-xcontrib/ntp/readme.y2kfixesbin8192 -> 0 bytes
-rw-r--r--contrib/ntp/results.y2kfixes76
-rw-r--r--contrib/ntp/scripts/Makefile.am4
-rw-r--r--contrib/ntp/scripts/Makefile.in345
-rw-r--r--contrib/ntp/scripts/README43
-rw-r--r--contrib/ntp/scripts/calc_tickadj.in38
-rw-r--r--contrib/ntp/scripts/checktime.in79
-rw-r--r--contrib/ntp/scripts/fixautomakedepsmagic28
-rw-r--r--contrib/ntp/scripts/freq_adj.in97
-rwxr-xr-xcontrib/ntp/scripts/hpadjtime.sh18
-rw-r--r--contrib/ntp/scripts/mkver.in43
-rw-r--r--contrib/ntp/scripts/monitoring/README158
-rw-r--r--contrib/ntp/scripts/monitoring/loopwatch.config.SAMPLE89
-rw-r--r--contrib/ntp/scripts/monitoring/lr.pl151
-rw-r--r--contrib/ntp/scripts/monitoring/ntp.pl479
-rw-r--r--contrib/ntp/scripts/monitoring/ntploopstat458
-rw-r--r--contrib/ntp/scripts/monitoring/ntploopwatch1667
-rw-r--r--contrib/ntp/scripts/monitoring/ntptrap463
-rw-r--r--contrib/ntp/scripts/monitoring/timelocal.pl77
-rwxr-xr-xcontrib/ntp/scripts/ntp-close8
-rwxr-xr-xcontrib/ntp/scripts/ntp-groper95
-rwxr-xr-xcontrib/ntp/scripts/ntp-restart10
-rwxr-xr-xcontrib/ntp/scripts/ntp-status45
-rw-r--r--contrib/ntp/scripts/ntp-wait.in42
-rw-r--r--contrib/ntp/scripts/ntpsweep.in301
-rwxr-xr-xcontrib/ntp/scripts/ntptrace.in60
-rw-r--r--contrib/ntp/scripts/ntpver.in7
-rw-r--r--contrib/ntp/scripts/plot_summary.in337
-rw-r--r--contrib/ntp/scripts/rc1/postinstall2
-rw-r--r--contrib/ntp/scripts/rc1/preinstall6
-rw-r--r--contrib/ntp/scripts/rc1/preremove4
-rw-r--r--contrib/ntp/scripts/rc1/prototype19
-rw-r--r--contrib/ntp/scripts/rc1/xntp29
-rw-r--r--contrib/ntp/scripts/rc2/local.ntpd64
-rw-r--r--contrib/ntp/scripts/stats/README39
-rw-r--r--contrib/ntp/scripts/stats/README.stats246
-rw-r--r--contrib/ntp/scripts/stats/README.timecodes149
-rwxr-xr-xcontrib/ntp/scripts/stats/clock.awk431
-rwxr-xr-xcontrib/ntp/scripts/stats/dupe.awk8
-rwxr-xr-xcontrib/ntp/scripts/stats/ensemble.S5
-rwxr-xr-xcontrib/ntp/scripts/stats/ensemble.awk17
-rwxr-xr-xcontrib/ntp/scripts/stats/etf.S15
-rwxr-xr-xcontrib/ntp/scripts/stats/etf.awk19
-rwxr-xr-xcontrib/ntp/scripts/stats/itf.S5
-rwxr-xr-xcontrib/ntp/scripts/stats/itf.awk19
-rwxr-xr-xcontrib/ntp/scripts/stats/loop.S7
-rwxr-xr-xcontrib/ntp/scripts/stats/loop.awk45
-rwxr-xr-xcontrib/ntp/scripts/stats/loop_summary2
-rwxr-xr-xcontrib/ntp/scripts/stats/peer.awk68
-rwxr-xr-xcontrib/ntp/scripts/stats/psummary.awk82
-rwxr-xr-xcontrib/ntp/scripts/stats/summary.sh88
-rwxr-xr-xcontrib/ntp/scripts/stats/tdata.S5
-rwxr-xr-xcontrib/ntp/scripts/stats/tdata.awk45
-rw-r--r--contrib/ntp/scripts/summary.in373
-rw-r--r--contrib/ntp/scripts/support/README73
-rw-r--r--contrib/ntp/scripts/support/bin/monl213
-rw-r--r--contrib/ntp/scripts/support/bin/mvstats23
-rw-r--r--contrib/ntp/scripts/support/conf/hp300.hp3000
-rw-r--r--contrib/ntp/scripts/support/conf/hp700.hp7000
-rw-r--r--contrib/ntp/scripts/support/conf/hp700.hp700.faui470
-rw-r--r--contrib/ntp/scripts/support/conf/hp800.hp8000
-rw-r--r--contrib/ntp/scripts/support/conf/ntp.conf3
-rw-r--r--contrib/ntp/scripts/support/conf/sun3.sun30
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4.faui010
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4.faui100
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4.faui450
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4c0
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4c.Lucifer0
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4m0
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4m.faui420
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4m.faui45m0
-rw-r--r--contrib/ntp/scripts/support/conf/tickconf19
-rw-r--r--contrib/ntp/scripts/support/etc/cron18
-rw-r--r--contrib/ntp/scripts/support/etc/crontab8
-rw-r--r--contrib/ntp/scripts/support/etc/install67
-rw-r--r--contrib/ntp/scripts/support/etc/rc198
-rw-r--r--contrib/ntp/scripts/support/etc/setup72
-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/stamp-h.in1
-rw-r--r--contrib/ntp/util/Makefile.am19
-rw-r--r--contrib/ntp/util/Makefile.in623
-rw-r--r--contrib/ntp/util/README37
-rw-r--r--contrib/ntp/util/ansi2knr.136
-rw-r--r--contrib/ntp/util/ansi2knr.c739
-rw-r--r--contrib/ntp/util/audio-pcm.c154
-rw-r--r--contrib/ntp/util/byteorder.c56
-rw-r--r--contrib/ntp/util/hist.c106
-rw-r--r--contrib/ntp/util/jitter.c71
-rw-r--r--contrib/ntp/util/kern.c225
-rw-r--r--contrib/ntp/util/longsize.c11
-rw-r--r--contrib/ntp/util/ntp-genkeys.c1048
-rw-r--r--contrib/ntp/util/ntp-keygen.c1998
-rw-r--r--contrib/ntp/util/ntptime.c440
-rw-r--r--contrib/ntp/util/pps-api.c100
-rw-r--r--contrib/ntp/util/precision.c171
-rw-r--r--contrib/ntp/util/sht.c185
-rw-r--r--contrib/ntp/util/testrs6000.c55
-rw-r--r--contrib/ntp/util/tickadj.c902
-rw-r--r--contrib/ntp/util/timetrim.c116
-rw-r--r--contrib/ntp/version1
724 files changed, 0 insertions, 271109 deletions
diff --git a/contrib/ntp/COPYRIGHT b/contrib/ntp/COPYRIGHT
deleted file mode 100644
index 1b5dc7f..0000000
--- a/contrib/ntp/COPYRIGHT
+++ /dev/null
@@ -1,176 +0,0 @@
-This file is automatically generated from html/copyright.html
-
- Copyright Notice
-
- 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-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 "as is" without express or implied *
-* warranty. *
-* *
-***********************************************************************
-
- 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 <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]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.
- 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
- 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
- 13. [14]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
- clock driver, NT adj. residuals, integrated Greg's Winnt port.
- 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
- 16. [17]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
- NTP Version 2 as specified in RFC-1119
- 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
- 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)
- 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
- 25. [28]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
- modifications, HPUX modifications
- 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
- 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
- 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
- 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
- 38. [42]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
- monitoring/trap scripts, statistics file handling
- 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
- 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
- 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
- 46. [50]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
- makeover, various other bits (see the ChangeLog)
- 47. [51]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 48. [52]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
- support
- 49. [53]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
- driver
- 50. [54]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
- TrueTime clock driver
- 51. [55]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
- validated HTML documents according to the HTML DTD
- _________________________________________________________________
-
-References
-
- 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
deleted file mode 100644
index 5b96fad..0000000
--- a/contrib/ntp/ChangeLog
+++ /dev/null
@@ -1,23989 +0,0 @@
-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
-
- configure.in
- 1.219.4.1 02/02/26 22:44:33 stenn@whimsy.udel.edu +1 -1
- ntp-4.1.1
-
- NEWS
- 1.31.1.7 02/02/26 22:44:32 stenn@whimsy.udel.edu +1 -0
- Update the NEWS file.
-
-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.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.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.
-
-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
-
- 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.43.1.2 02/02/18 23:27:08 stenn@whimsy.udel.edu +1 -3
- ntp_adjtime() call cleanup.
- From John Hay.
-
-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.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.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
-
- util/ntp-genkeys.c
- 1.56.1.4 02/01/22 18:16:08 stenn@whimsy.udel.edu +0 -1
- Lint.
-
- ntpd/ntp_intres.c
- 1.17.1.3 02/01/22 18:16:08 stenn@whimsy.udel.edu +1 -1
- Lint.
-
-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.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.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.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.6.1.1 02/01/17 16:02:36 stenn@whimsy.udel.edu +2 -0
- Lint.
-
- ntpd/refclock_jjy.c
- 1.2.2.1 02/01/17 16:02:36 stenn@whimsy.udel.edu +1 -4
- Lint.
-
-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.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
-
- configure.in
- 1.219.3.12 02/01/12 23:36:12 stenn@whimsy.udel.edu +1 -1
- 4.1.0b-rc3
-
-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.31.1.6 02/01/10 20:43:25 stenn@whimsy.udel.edu +5 -0
- Update the NEWS file.
-
-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.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.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.23.2.5 02/01/04 04:03:25 stenn@whimsy.udel.edu +0 -7
- Lose some implementation debug output.
-
-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...
-
- 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.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.
-
- 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.
-
-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
-
- 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.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.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.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.683.4.61 02/01/02 22:26:22 stenn@whimsy.udel.edu +2 -0
- Boring documentation cleanup.
-
- README.versions
- 1.2 02/01/02 22:26:22 stenn@whimsy.udel.edu +1 -1
- Bit-o-cleanup...
-
- 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.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.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.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.
-
- 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.12.1.13 01/12/19 15:57:07 stenn@whimsy.udel.edu +1 -0
- Distribute README.versions .
-
-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
-
- configure.in
- 1.219.3.9 01/12/18 19:27:28 stenn@whimsy.udel.edu +1 -1
- 4.1.0b-rc2
-
-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.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.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.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.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
- NTP code since the xntp3 days.
-
- The symptom:
- If a radio clock is connected via the serial port using the parse driver
- (driver 8) then there are lots of messages in the syslog saying:
- > 31 Oct 09:13:42 ntpd[6708]: input_handler: handler_count is 2!
- > 31 Oct 09:13:42 ntpd[6708]: input_handler: handler_count is 2!
-
- This has been observed under AIX 4.3.2 and Solaris 8, and the patch
- works in both cases. This effect is very obvious if a radio clock is
- connected via a serial interface, and a SIGIO signal is raised whenever
- a character has been received. It's a common problem, however, but the
- probability that a signal is raised again while the handler for the
- previous signal is still executing is much less if there
- are only signals if network packets are received.
-
- The fix:
- The patch below is used to take care that the SIGIO signal is not
- unintentionally unblocked inside the sigio_handler() if the handler
- executes a piece of code that is bracketed by BLOCKIO()/UNBLOCKIO()
- calls.
-
- From: Martin Burnicki <martin.burnicki@meinberg.de>
-
- libntp/iosignal.c
- 1.9 01/12/14 02:43:08 stenn@whimsy.udel.edu +72 -39
- 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
- NTP code since the xntp3 days.
-
- The symptom:
- If a radio clock is connected via the serial port using the parse driver
- (driver 8) then there are lots of messages in the syslog saying:
- > 31 Oct 09:13:42 ntpd[6708]: input_handler: handler_count is 2!
- > 31 Oct 09:13:42 ntpd[6708]: input_handler: handler_count is 2!
-
- This has been observed under AIX 4.3.2 and Solaris 8, and the patch
- works in both cases. This effect is very obvious if a radio clock is
- connected via a serial interface, and a SIGIO signal is raised whenever
- a character has been received. It's a common problem, however, but the
- probability that a signal is raised again while the handler for the
- previous signal is still executing is much less if there
- are only signals if network packets are received.
-
- The fix:
- The patch below is used to take care that the SIGIO signal is not
- unintentionally unblocked inside the sigio_handler() if the handler
- executes a piece of code that is bracketed by BLOCKIO()/UNBLOCKIO()
- calls.
-
- From: Martin Burnicki <martin.burnicki@meinberg.de>
-
-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.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.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>
-
- ntpd/refclock_oncore.c
- 1.38 01/12/10 22:02:23 stenn@whimsy.udel.edu +1 -1
- Properly check the pps_device variable.
- From: "David G. Andersen" <dga@lcs.mit.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.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>
-
- 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.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.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.
-
-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
-
- 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.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.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
- 1.1 01/11/24 23:30:48 stenn@whimsy.udel.edu +141 -0
-
- html/driver40.htm
- 1.0 01/11/24 23:30:48 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/html/driver40.htm
-
-ChangeSet
- 1.683.4.47 01/11/23 23:23:23 stenn@whimsy.udel.edu +2 -0
- 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.31.1.5 01/11/23 23:23:22 stenn@whimsy.udel.edu +7 -0
- Update the NEWS file.
-
-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.
-
- 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.
-
- 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.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.
-
- 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.
-
-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.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.18.2.4 01/11/16 23:35:25 stenn@whimsy.udel.edu +2 -1
- ntp_resolver.c is currently unused.
-
-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.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.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.12.1.11 01/11/09 23:29:50 stenn@whimsy.udel.edu +3 -4
- Improve the version file generation code.
-
-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.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.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.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.
-
- BitKeeper/deleted/.del-version~aeecada457249d0c
- 1.2 01/11/08 16:34:27 stenn@whimsy.udel.edu +1 -1
- Delete: version
-
-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.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
-
- scripts/mkver.in
- 1.9 01/11/08 03:06:16 stenn@whimsy.udel.edu +5 -0
- If
-
- 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.
-
- 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.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.
-
- 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.
-
- 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.
-
- 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
-
- 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.2.1.1 01/11/04 04:34:24 stenn@whimsy.udel.edu +0 -0
- Delete: BitKeeper/triggers/00-list
-
-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/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/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.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.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
- 1.6 01/11/02 16:56:25 stenn@whimsy.udel.edu +0 -1
- Remove the trigger.touch file. No longer needed.
- We should look at some of the other touch files, too.
-
-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.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.
-
- 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.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.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/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/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.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.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.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.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.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.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.
-
-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.683.4.24 01/11/02 02:49:46 stenn@whimsy.udel.edu +1 -0
- More trigger manager work
-
- BitKeeper/triggers/triggerd
- 1.11 01/11/02 02:49:46 stenn@whimsy.udel.edu +3 -2
- Don't reset the count at each new tag; somebody might use a tag more
- than once.
-
-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
- 1.4 01/11/02 02:36:34 stenn@whimsy.udel.edu +1 -1
- Try enabling the paranoid check.
-
- BitKeeper/etc/ignore
- 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.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.683.4.21 01/11/02 00:27:34 stenn@whimsy.udel.edu +1 -0
- More trigger manager work.
-
- BitKeeper/triggers/triggerd
- 1.9 01/11/02 00:27:33 stenn@whimsy.udel.edu +6 -3
- Better logging.
- Fix some typos.
-
-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/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
- to re-exec ourselves.
-
- When we process the triggers.cfg file, first remove the old triggers.
- Validate the trigger classes.
- Process each script for each tag, installing them so that they are
- executed in the correct order.
-
- 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.683.4.18 01/10/24 04:42:37 stenn@whimsy.udel.edu +2 -0
- Recover the 2mirror script.
-
- BitKeeper/triggers/2mirrors
- 1.1 01/10/24 04:14:04 stenn@whimsy.udel.edu +40 -0
-
- BitKeeper/triggers/2mirrors
- 1.0 01/10/24 04:14:04 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/2mirrors
-
- BitKeeper/triggers/triggerd
- 1.7 01/10/24 03:54:25 stenn@whimsy.udel.edu +1 -4
- Quiet some debug stuff.
-
- BitKeeper/triggers/triggerd
- 1.6 01/10/24 03:43:12 stenn@whimsy.udel.edu +3 -2
- Run the right script. Sigh.
-
- BitKeeper/triggers/triggerd
- 1.5 01/10/24 03:33:59 stenn@whimsy.udel.edu +2 -0
- triggerd hacking
-
- BitKeeper/triggers/triggerd
- 1.4 01/10/24 03:07:10 stenn@whimsy.udel.edu +2 -1
- Disable the re-exec; it seems to be hosing us.
-
- BitKeeper/triggers/triggerd
- 1.3 01/10/24 02:46:31 stenn@whimsy.udel.edu +2 -1
- Use the right ball. Actually get the script if it isn't checked
- out and actually run it.
-
- BitKeeper/triggers/triggerd
- 1.2 01/10/24 01:59:12 stenn@whimsy.udel.edu +1 -0
- Play ball - actually run the intended trigger script.
-
-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.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.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.683.4.16 01/10/24 01:32:31 stenn@whimsy.udel.edu +14 -0
- New ChagneLog processing.
- New trigger scripts.
-
- BitKeeper/triggers/triggert
- 1.1 01/10/24 01:32:30 stenn@whimsy.udel.edu +14 -0
-
- BitKeeper/triggers/triggerd
- 1.1 01/10/24 01:32:30 stenn@whimsy.udel.edu +54 -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/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/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.README
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +53 -0
-
- BitKeeper/triggers/paranoid
- 1.1 01/10/24 01:32:29 stenn@whimsy.udel.edu +80 -0
-
- 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/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.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/paranoid
- 1.0 01/10/24 01:32:29 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/paranoid
-
- 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/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.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.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.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.1.1.2 01/10/20 12:07:50 wink@iris1.saville.com +1 -0
- Logging to logging@openlogging.org accepted
-
- 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
-
- 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.
-
- 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.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.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.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.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.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.219.3.6 01/10/09 02:04:09 stenn@whimsy.udel.edu +1 -1
- Check for clock_gettime().
-
-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
- 1.2 01/10/08 21:18:40 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/print.c
- 1.2 01/10/08 21:18:40 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/page.c
- 1.5 01/10/08 21:18:40 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/libefence.3
- 1.2 01/10/08 21:18:40 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/README
- 1.2 01/10/08 21:18:40 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/Makefile.am
- 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
-
- util/testrs6000.c
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- util/sht.c
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/eftest.c
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/efence.h
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/efence.c
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/Makefile-
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/COPYING
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ElectricFence/CHANGES
- 1.2 01/10/08 21:18:39 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- util/precision.c
- 1.3 01/10/08 21:18:38 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- util/README
- 1.3 01/10/08 21:18:38 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
- Turn on EOLN_NATIVE flag
-
- 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/kern.c
- 1.3 01/10/08 21:18:37 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
- Turn on EOLN_NATIVE flag
-
- util/Makefile.am
- 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
-
- util/ansi2knr.1
- 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
-
- scripts/support/etc/rc
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/etc/install
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/etc/cron
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/etc/crontab
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/xntp
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/rc1/prototype
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/rc1/preremove
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/rc1/preinstall
- 1.2 01/10/08 21:18:36 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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
-
- scripts/support/conf/sun4.sun4c
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/conf/sun4.sun4c.Lucifer
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/conf/sun4.sun4.faui45
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/conf/sun4.sun4.faui10
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/conf/sun4.sun4.faui01
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/support/conf/sun3.sun3
- 1.2 01/10/08 21:18:35 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
- Turn on EOLN_NATIVE flag
-
- 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/hp700.hp700
- 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
- 1.2 01/10/08 21:18:35 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/bin/mvstats
- 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
- 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/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
-
- scripts/stats/peer.awk
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/loop_summary
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/loop.awk
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/loop.S
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/itf.awk
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/itf.S
- 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
-
- scripts/stats/README.timecodes
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/README.stats
- 1.2 01/10/08 21:18:34 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/etf.awk
- 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/ensemble.S
- 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/dupe.awk
- 1.2 01/10/08 21:18:33 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/stats/clock.awk
- 1.2 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
- Turn on EOLN_NATIVE flag
-
- scripts/monitoring/ntptrap
- 1.2 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/README
- 1.3 01/10/08 21:18:33 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/plot_summary.in
- 1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntpver.in
- 1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntpsweep.in
- 1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntp-wait.in
- 1.5 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
-
- scripts/monitoring/ntp.pl
- 1.3 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/monitoring/lr.pl
- 1.3 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/monitoring/loopwatch.config.SAMPLE
- 1.2 01/10/08 21:18:32 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntp-status
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntp-restart
- 1.3 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntp-groper
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/ntp-close
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/mkver.in
- 1.8 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/hpadjtime.sh
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/freq_adj.in
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/fixautomakedepsmagic
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/checktime.in
- 1.2 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/Makefile.am
- 1.9 01/10/08 21:18:31 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/calc_tickadj.in
- 1.2 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- scripts/README
- 1.8 01/10/08 21:18:30 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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/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/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/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/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/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/unistd.h
- 1.2 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/signal.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
- 1.3 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/sys/ioctl.h
- 1.4 01/10/08 21:18:29 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ports/winnt/instsrv/instsrv.c
- 1.5 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
-
- ports/winnt/include/syslog.h
- 1.3 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
- 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/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/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/clockstuff.h
- 1.4 01/10/08 21:18:28 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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/util_clockstuff.c
- 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
- 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/log.h
- 1.3 01/10/08 21:18:27 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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
-
- ports/winnt/ntpd/nt_clockstuff.c
- 1.10 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ports/winnt/ntpd/hopf_PCI_io.c
- 1.2 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
-
- parseutil/README
- 1.2 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- parseutil/Makefile.am
- 1.4 01/10/08 21:18:26 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- parseutil/dcfd.c
- 1.8 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntptrace/ntptrace.h
- 1.2 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntptrace/ntptrace.c
- 1.15 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntptrace/README
- 1.3 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntptrace/Makefile.am
- 1.3 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpq/ntpq_ops.c
- 1.11 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpq/README
- 1.3 01/10/08 21:18:25 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpq/ntpq.h
- 1.2 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpq/ntpq.c
- 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.4.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdc/ntpdc_ops.c
- 1.11 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdc/ntpdc.h
- 1.2 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdc/ntpdc.c
- 1.8.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdc/README
- 1.3 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdc/Makefile.am
- 1.3.1.1 01/10/08 21:18:24 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdate/ntptimeset.c
- 1.11 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdate/ntptime_config.c
- 1.5 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdate/ntpdate.h
- 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.23.1.2 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdate/Makefile.am
- 1.5.1.1 01/10/08 21:18:23 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpdate/README
- 1.3 01/10/08 21:18:22 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_wwvb.c
- 1.10 01/10/08 21:18:22 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_usno.c
- 1.6 01/10/08 21:18:22 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_ulink.c
- 1.11 01/10/08 21:18:22 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_jjy.c
- 1.2 01/10/08 21:18:22 stenn@whimsy.udel.edu +0 -0
-
- ntpd/refclock_wwv.c
- 1.26 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_true.c
- 1.7 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_trak.c
- 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
-
- ntpd/refclock_ptbacts.c
- 1.2 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
-
- ntpd/refclock_palisade.h
- 1.6 01/10/08 21:18:21 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_palisade.c
- 1.9 01/10/08 21:18:20 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_oncore.c
- 1.37 01/10/08 21:18:20 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_nmea.c
- 1.16 01/10/08 21:18:20 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_mx4200.c
- 1.15 01/10/08 21:18:20 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_pst.c
- 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
-
- ntpd/refclock_local.c
- 1.6 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_leitch.c
- 1.5 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_jupiter.c
- 1.8 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
-
- ntpd/refclock_hpgps.c
- 1.5 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_hopfser.c
- 1.3 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_hopfpci.c
- 1.3 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_heath.c
- 1.9 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_gpsvme.c
- 1.5 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_dumbclock.c
- 1.5 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_datum.c
- 1.7 01/10/08 21:18:19 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_fg.c
- 1.7 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_conf.c
- 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
- 1.21 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_chronolog.c
- 1.5 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_bancomm.c
- 1.7 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_atom.c
- 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
- 1.7 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_arc.c
- 1.8 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_arbiter.c
- 1.5 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/refclock_acts.c
- 1.8 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/ntp_util.c
- 1.14.2.1 01/10/08 21:18:18 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.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.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.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.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.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.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.53.1.1 01/10/08 21:18:17 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/ntpd.c
- 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.17.1.2 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/ntp_filegen.c
- 1.6 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/ntp_crypto.c
- 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.50.3.1 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/map_vme.c
- 1.4 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/jupiter.h
- 1.2 01/10/08 21:18:16 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ntpd/Makefile.am
- 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.20.2.2 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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
- 1.2 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/parsestreams.c
- 1.4 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/parsesolaris.c
- 1.4 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/parse_conf.c
- 1.7 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/parse.c
- 1.8 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/mkinfo_scmd.sed
- 1.2 01/10/08 21:18:15 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/mkinfo_rcmd.sed
- 1.2 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/info_trimble.c
- 1.2 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/data_mbg.c
- 1.3 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_wharton.c
- 1.4 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_varitext.c
- 1.5 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_trimtsip.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_trimtaip.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_schmid.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_rcc8000.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_rawdcf.c
- 1.8 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_meinberg.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_hopf6021.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_dcf7000.c
- 1.6 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/Makefile.am
- 1.7 01/10/08 21:18:14 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/clk_computime.c
- 1.6 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libparse/README
- 1.2 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/ymd2yd.c
- 1.3 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/utvtoa.c
- 1.3 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/uinttoa.c
- 1.2 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/uglydate.c
- 1.3 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/tvtots.c
- 1.2 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/tvtoa.c
- 1.3 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/tstotv.c
- 1.2 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/tsftomsu.c
- 1.2 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/systime.c
- 1.18 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/syssignal.c
- 1.8 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/strerror.c
- 1.2 01/10/08 21:18:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/strdup.c
- 1.4 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/statestr.c
- 1.2.1.1 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/snprintf.c
- 1.5 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/refnumtoa.c
- 1.1.1.1 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/recvbuff.c
- 1.8 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/ranny.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/random.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/prettydate.c
- 1.3 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/numtohost.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/numtoa.c
- 1.2 01/10/08 21:18:12 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/netof.c
- 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/msutotsf.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/mstolfp.c
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/modetoa.c
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/mktime.c
- 1.3 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/mfptoms.c
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/mfptoa.c
- 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
- Turn on EOLN_NATIVE flag
-
- libntp/memmove.c
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/md5c.c
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/machines.c
- 1.11 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/log.h
- 1.2 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/log.c
- 1.2 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
- 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/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/Makefile.am
- 1.11.2.1 01/10/08 21:18:11 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/inttoa.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/hextolfp.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/hextoint.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/gpstolfp.c
- 1.5 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/getopt.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/fptoms.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/fptoa.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/findconfig.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/emalloc.c
- 1.5 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/dolfptoa.c
- 1.2 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
-
- libntp/decodenetnum.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/calyearstart.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/calleapwhen.c
- 1.2 01/10/08 21:18:10 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/caltontp.c
- 1.2 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/caljulian.c
- 1.3 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/buftvtots.c
- 1.3 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/binio.c
- 1.2 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/authusekey.c
- 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.3.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/authparity.c
- 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.6.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/authencrypt.c
- 1.4.1.1 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/audio.c
- 1.7 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/atouint.c
- 1.2 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/atolfp.c
- 1.2 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/atoint.c
- 1.2 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/adjtimex.c
- 1.2 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/adjtime.c
- 1.3 01/10/08 21:18:09 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- libntp/a_md5encrypt.c
- 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
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/tty_clk.c
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/tty_chu_STREAMS.c
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/tty_chu.c
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/tpro.h
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/timex.h
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/ppsclock.h
- 1.3 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/pcl720.h
- 1.3 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/parsestreams.h
- 1.3 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/i8253.h
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/clkdefs.h
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/chudefs.h
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/bsd_audioirig.h
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/README
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/sys/Makefile.am
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/Makefile.am
- 1.2 01/10/08 21:18:08 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/clkinit.c
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/chuinit.c
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- kernel/README
- 1.2 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.1.1.1 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/parse_conf.h
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/parse.h
- 1.4 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
-
- include/ntp_types.h
- 1.4 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
-
- include/ntp_syscall.h
- 1.5 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_string.h
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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_select.h
- 1.2 01/10/08 21:18:07 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/README
- 1.2 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
- Turn on EOLN_NATIVE flag
-
- include/ntp_refclock.h
- 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
- 1.4 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_malloc.h
- 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_machine.h
- 1.7.1.2 01/10/08 21:18:06 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_if.h
- 1.3 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/ntp_fp.h
- 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/ntp_datum.h
- 1.2 01/10/08 21:18:06 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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/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/ntp_cmdargs.h
- 1.2 01/10/08 21:18:06 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
- Turn on EOLN_NATIVE flag
-
- 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/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
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/mx4200.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/md5.h
- 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
-
- include/icom.h
- 1.4 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/hopf6039.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/gps.h
- 1.2 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/global.h
- 1.3 01/10/08 21:18:05 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- include/binio.h
- 1.2 01/10/08 21:18:05 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
- Turn on EOLN_NATIVE flag
-
- include/ascii.h
- 1.2 01/10/08 21:18:05 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
- 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
-
- 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/malarky.conf
- 1.1.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- conf/grundoon.conf
- 1.2.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- conf/dewey.conf
- 1.1.1.1 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- conf/beauregard.conf
- 1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- conf/baldwin.conf
- 1.3 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- conf/README
- 1.3.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
- Turn on EOLN_NATIVE flag
-
- clockstuff/clktest.c
- 1.2 01/10/08 21:18:04 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- clockstuff/chutest.c
- 1.2 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
- Turn on EOLN_NATIVE flag
-
- clockstuff/Makefile.am
- 1.3 01/10/08 21:18:04 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
- Turn on EOLN_NATIVE flag
-
- 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/todo
- 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
- Turn on EOLN_NATIVE flag
-
- html/hints/svr4-dell
- 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/hints/sun4
- 1.2 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/solaris.xtra.S99ntpd
- 1.3 01/10/08 21:18:03 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/solaris.xtra.4023118
- 1.2 01/10/08 21:18:03 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
- Turn on EOLN_NATIVE flag
-
- 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/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/rs6000
- 1.2 01/10/08 21:18:02 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
- Turn on EOLN_NATIVE flag
-
- html/hints/parse
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/linux
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/hints/hpux
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/hints/freebsd
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/hints/decosf2
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/hints/decosf1
- 1.2 01/10/08 21:18:02 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.5.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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.4.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/qth.htm
- 1.1.1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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.1.1.1 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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/hints/a-ux
- 1.2 01/10/08 21:18:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/prefer.htm
- 1.4.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/ntpq.htm
- 1.6.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/ntpdate.htm
- 1.5.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/notes.htm
- 1.5.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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.3.1.1 01/10/08 21:18:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.1.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/ldisc.htm
- 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.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.3.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.3.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/extern.htm
- 1.4.1.1 01/10/08 21:17:59 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/driver8.htm
- 1.3.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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/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.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver4.htm
- 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.1.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver38.htm
- 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.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver36.htm
- 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.4.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver34.htm
- 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.3.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver3.htm
- 1.2.1.1 01/10/08 21:17:58 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.6.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver29.htm
- 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.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.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.3.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver22.htm
- 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.4.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver2.htm
- 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.2.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver18.htm
- 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.1.1.1 01/10/08 21:17:57 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver1.htm
- 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.2.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/driver11.htm
- 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.2.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/debug.htm
- 1.5.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.14.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/config.htm
- 1.4.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/clockopt.htm
- 1.8 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/build.htm
- 1.6.1.1 01/10/08 21:17:56 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.11.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/audio.htm
- 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.6.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- html/accopt.htm
- 1.7.1.1 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- adjtimed/adjtimed.c
- 1.4 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
-
- adjtimed/Makefile.am
- 1.2 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
-
- BitKeeper/triggers/post-commit.changelog
- 1.5 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
-
- BitKeeper/triggers/00-list
- 1.2 01/10/08 21:17:55 stenn@whimsy.udel.edu +0 -0
-
- results.y2kfixes
- 1.5 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
-
- ntp_update
- 1.6.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
-
- WHERE-TO-START
- 1.5 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
- 1.14.1.4 01/10/08 21:17:54 stenn@whimsy.udel.edu +0 -0
-
- 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
-
- README.des
- 1.6.1.4 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
-
- NEWS
- 1.31.1.4 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
-
- BitKeeper/triggers/notify
- 1.2 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
-
- BitKeeper/etc/ignore
- 1.1.2.2 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
-
- install-sh
- 1.5 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
-
- 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
-
- depcomp
- 1.6 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
-
- 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
-
- config.guess
- 1.10 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
-
- acconfig.h
- 1.23.3.5 01/10/08 21:17:53 stenn@whimsy.udel.edu +0 -0
-
- README.bk
- 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.3.1.4 01/10/08 21:17:52 stenn@whimsy.udel.edu +0 -0
-
- Makefile.am
- 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
-
- results.y2kfixes
- 1.4 01/10/08 02:09:51 stenn@whimsy.udel.edu +0 -0
-
- readme.y2kfixes
- 1.4 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
-
- 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
-
- flock-build
- 1.22 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
-
- 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
-
- 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
-
- TODO
- 1.5 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
-
- README.rsa
- 1.3.1.3 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
-
- 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
-
- NEWS
- 1.31.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
-
- config.sub
- 1.9 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.16.1.3 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
-
- acinclude.m4
- 1.3.1.3 01/10/08 02:09:50 stenn@whimsy.udel.edu +0 -0
-
- README.bk
- 1.1.1.11 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.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
-
- readme.y2kfixes
- 1.3 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.14.1.2 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
-
- 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
-
- 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
-
- missing
- 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
-
- flock-build
- 1.21 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
-
- depcomp
- 1.4 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
- configure.in
- 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
-
- config.guess
- 1.8 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
- build
- 1.16.1.2 01/10/08 01:57:13 stenn@whimsy.udel.edu +0 -0
-
- acconfig.h
- 1.23.3.3 01/10/08 01:57:13 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.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
- Turn on EOLN_NATIVE flag
-
- WHERE-TO-START
- 1.2 01/10/08 01:57:02 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
- Turn on EOLN_NATIVE flag
-
- ntp_update
- 1.6.1.1 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
- Turn on EOLN_NATIVE flag
-
- missing
- 1.4 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
- Turn on EOLN_NATIVE flag
-
- configure.in
- 1.219.3.2 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
- Turn on EOLN_NATIVE flag
-
- 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.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
-
- 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.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
-
- NEWS
- 1.31.1.1 01/10/08 01:57:01 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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
-
- excludes
- 1.2 01/10/08 01:57:00 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
- Turn on EOLN_NATIVE flag
-
- 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
-
- build
- 1.16.1.1 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.23.3.2 01/10/08 01:57:00 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- 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.683.4.8 01/10/08 01:55:18 stenn@whimsy.udel.edu +1 -0
- Re-import the JJY patch.
-
- html/qth.htm
- 1.1.1.1 01/10/08 01:55:17 stenn@whimsy.udel.edu +12 -0
- JJY entries.
-
- 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.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.683.4.5 01/10/06 13:50:26 stenn@whimsy.udel.edu +3 -0
- Trigger cleanup and debug.
-
- BitKeeper/triggers/post-commit.changelog
- 1.2 01/10/06 13:50:25 stenn@whimsy.udel.edu +1 -0
- Add a delay to the changelog (cvs-all email) trigger so maybe I'll
- be able to see it happen...
-
- BitKeeper/deleted/.del-changelog~bafcae117d0e1606
- 1.2 01/10/06 12:58:27 stenn@whimsy.udel.edu +0 -0
- Delete: BitKeeper/triggers/changelog
-
- BitKeeper/deleted/.del-2mirrors~baf8ef547d0494ae
- 1.3 01/10/06 12:57:43 stenn@whimsy.udel.edu +0 -0
- Delete: BitKeeper/triggers/2mirrors
-
-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.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
- 1.2 01/10/06 04:16:36 stenn@whimsy.udel.edu +2 -2
- Don't show the "starting 2mirrors trigger" message unless we're
- on a host that actually runs it.
-
-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
-
- BitKeeper/triggers/notify
- 1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +81 -0
-
- BitKeeper/triggers/changelog
- 1.1 01/10/06 03:34:36 stenn@whimsy.udel.edu +61 -0
-
- BitKeeper/triggers/pre-apply.paranoid
- 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.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
- 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/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/changelog
- 1.0 01/10/06 03:34:36 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/triggers/changelog
-
- 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.1.2.1 01/10/06 03:34:35 stenn@whimsy.udel.edu +25 -5
- Recover the changes to the ignore file.
-
-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.219.3.1 01/10/06 03:09:53 stenn@whimsy.udel.edu +0 -0
- Auto merged
-
- acconfig.h
- 1.23.3.1 01/10/06 03:09:52 stenn@whimsy.udel.edu +0 -0
- Auto merged
-
- README.bk
- 1.1.1.8 01/10/06 03:09:52 stenn@whimsy.udel.edu +0 -8
- Auto merged
-
-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
-
- 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/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.37.3.1 01/10/06 02:02:57 stenn@whimsy.udel.edu +1 -0
- Re-import the JJY driver patch.
-
- 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.
-
- 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.
-
- 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.13.1.1 01/10/06 02:02:56 stenn@whimsy.udel.edu +8 -4
- Re-import the JJY driver patch.
-
- 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.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.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.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.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>
-
- html/hints/mpeix
- 1.1 01/09/20 02:15:14 stenn@whimsy.udel.edu +50 -0
-
- util/ntp-genkeys.c
- 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().
-
- ntptrace/ntptrace.c
- 1.14 01/09/20 02:15:14 stenn@whimsy.udel.edu +8 -2
- #include guarding
-
- ntpdate/ntptimeset.c
- 1.10 01/09/20 02:15:14 stenn@whimsy.udel.edu +6 -1
- #include cleanup and guarding
-
- ntpdate/ntpdate.c
- 1.23.1.1 01/09/20 02:15:14 stenn@whimsy.udel.edu +6 -1
- #include guarding
-
- 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
- MPE doesn't have the concept of "root".
-
- 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.11.1.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +1 -0
- #include cleanup
-
- 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/ntp_io.c
- 1.20.2.1 01/09/20 02:15:13 stenn@whimsy.udel.edu +8 -4
- #include guarding
- Clean up the default local loopback test
-
- 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.50.2.1 01/09/20 02:15:12 stenn@whimsy.udel.edu +2 -0
- header #include cleanup/guarding
-
- 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
- MPE portability stuff - wrappers for bind(), fcntl(), setitimer(),
- gettimeofday(), and settimeofday().
-
- libntp/adjtime.c
- 1.2 01/09/20 02:15:12 stenn@whimsy.udel.edu +97 -0
- adjtime() implementation for MPE/iX
-
- include/ntp_machine.h
- 1.7.1.1 01/09/20 02:15:12 stenn@whimsy.udel.edu +42 -0
- MPE portability stuff
-
- configure.in
- 1.219.1.3 01/09/20 02:15:12 stenn@whimsy.udel.edu +56 -6
- Various portability and MPE/iX porting patches.
-
- 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.683.2.8 01/09/19 20:27:23 stenn@whimsy.udel.edu +1 -0
- README.bk improvements
-
- README.bk
- 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.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.12.1.2 01/09/19 01:40:46 stenn@whimsy.udel.edu +16 -13
- More cruft cleanup.
-
-ChangeSet
- 1.683.2.6 01/09/19 01:26:24 stenn@whimsy.udel.edu +1 -0
- Fix a typo.
-
- README.bk
- 1.1.1.6 01/09/19 01:26:24 stenn@whimsy.udel.edu +1 -1
- Typo.
-
-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.1.1.5 01/09/19 00:21:06 stenn@whimsy.udel.edu +5 -4
- Clean it up even more.
-
-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.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.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.1.1.4 01/09/16 00:25:28 stenn@whimsy.udel.edu +1 -1
- autoreconf updates
-
-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/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/instsrv/Instsrv.dsp
- 1.4 01/09/16 00:07:14 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
- Turn on EOLN_NATIVE flag
-
- ports/winnt/ntpq/ntpq.dsp
- 1.6 01/09/16 00:07:13 stenn@whimsy.udel.edu +0 -0
- Turn on EOLN_NATIVE flag
-
- ports/winnt/ntpdc/ntpdc.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
- 1.6 01/09/16 00:07:13 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
- Turn on EOLN_NATIVE flag
-
-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.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.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.1.1.4 01/09/13 01:38:23 stenn@whimsy.udel.edu +2 -0
- added config.h.in stamp-h.in
-
-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.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
-
- 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.1.1.2 01/09/08 20:23:01 stenn@whimsy.udel.edu +14 -1
- Document the mirrors at www.ntp.org.
-
-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.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.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.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.683.1.11 01/09/06 03:36:29 stenn@whimsy.udel.edu +1 -0
- Ignore ~ backup files.
-
- BitKeeper/etc/ignore
- 1.1.1.3 01/09/06 03:36:28 stenn@whimsy.udel.edu +1 -0
- Ignore ~ backup files.
-
-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
-
- ntpdate/ntpdate.c
- 1.23 01/09/06 03:26:07 stenn@whimsy.udel.edu +1 -1
- From: Hubert Feyrer <hubert@feyrer.de>
- Subject: [ntp:bugs] "-u" missing from ntpdate usage statement
-
-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.1.1.2 01/09/06 02:28:36 stenn@whimsy.udel.edu +1 -1
- Use checkout:EDIT instead of checkout:edit.
-
-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.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
-
- 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.
-
- clockstuff/Makefile.am
- 1.2 01/08/27 03:49:00 stenn@whimsy.udel.edu +2 -2
- Portability improvements found by automake 1.5
-
- 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.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:
- Delete: ElectricFence/Makefile.in
- .del-Makefile.in~bd702e17:
- Delete: scripts/Makefile.in
- .del-Makefile.in~3aed0663~12:
- Delete: parseutil/Makefile.in
- .del-Makefile.in~3aed0663~13:
- Delete: util/Makefile.in
- .del-Makefile.in~3aed0663~14:
- Delete: Makefile.in
- .del-Makefile.in~3aed0663~10:
- Delete: ntpq/Makefile.in
- .del-Makefile.in~3aed0663~11:
- Delete: ntptrace/Makefile.in
- .del-Makefile.in~3aed0663~6:
- Delete: libparse/Makefile.in
- .del-Makefile.in~3aed0663~7:
- Delete: ntpd/Makefile.in
- .del-Makefile.in~3aed0663~8:
- Delete: ntpdate/Makefile.in
- .del-Makefile.in~3aed0663~9:
- Delete: ntpdc/Makefile.in
- .del-Makefile.in~3aed0663:
- Delete: adjtimed/Makefile.in
- .del-Makefile.in~3aed0663~1:
- Delete: clockstuff/Makefile.in
- .del-Makefile.in~3aed0663~4:
- Delete: kernel/Makefile.in
- .del-Makefile.in~3aed0663~5:
- Delete: libntp/Makefile.in
- .del-Makefile.in~3aed0663~2:
- Delete: include/Makefile.in
- .del-Makefile.in~3aed0663~3:
- Delete: kernel/sys/Makefile.in
- .del-Makefile.in~e832209e:
- Delete: librsaref/Makefile.in
- .del-COPYRIGHT~3aed0663:
- Delete: COPYRIGHT
- .del-configure~3aed0663:
- Delete: configure
-
- BitKeeper/deleted/.del-aclocal.m4~3aed0663
- 1.86.1.2 01/08/27 02:37:31 stenn@whimsy.udel.edu +217 -160
- Delete: aclocal.m4
-
- 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~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~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~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: ntpdc/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~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~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: ntpq/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~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~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~1
- 1.22 01/08/27 02:35:18 stenn@whimsy.udel.edu +78 -89
- Delete: clockstuff/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-configure~3aed0663
- 1.224.1.1 01/08/27 02:35:16 stenn@whimsy.udel.edu +1959 -2108
- Delete: configure
-
- 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>
-
- ntpq/ntpq.c
- 1.16 01/08/26 03:06:34 stenn@whimsy.udel.edu +30 -14
- Readline support.
-
-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.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
-
- 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.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.
-
- Makefile.am
- 1.12 01/08/23 03:46:21 stenn@whimsy.udel.edu +1 -0
- Clean out SCCS subdirs when making a distribution.
-
- 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
- 1.31 01/08/16 02:47:34 stenn@whimsy.udel.edu +1 -0
- Add a "marker" to the file so we can easily segregate stable from
- development changes in the NEWS file.
-
-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.683.1.1 01/08/16 01:05:37 stenn@whimsy.udel.edu +2 -0
- Enable auto-checkout.
-
- BitKeeper/etc/logging_ok
- 1.1 01/08/16 01:05:33 stenn@whimsy.udel.edu +1 -0
-
- BitKeeper/etc/logging_ok
- 1.0 01/08/16 01:05:33 stenn@whimsy.udel.edu +0 -0
- BitKeeper file /backroom/ntp-stable/BitKeeper/etc/logging_ok
-
- BitKeeper/etc/config
- 1.1.1.1 01/08/16 01:05:21 stenn@whimsy.udel.edu +2 -0
- Dave and I want auto-checkout.
-
-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
-
- configure.in
- 1.219 01/08/01 23:01:12 stenn@whimsy.udel.edu +1 -1
- * configure.in: 4.1.0
-
- configure
- 1.224 01/08/01 23:01:10 stenn@whimsy.udel.edu +1 -1
- * 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
deleted file mode 100644
index b748b80..0000000
--- a/contrib/ntp/ChangeLog-4.1.0
+++ /dev/null
@@ -1,6152 +0,0 @@
-2001-08-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.1.0
-
-2001-07-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c (oncore_start): Set pps_enable=1, just
- like the atom driver does.
- From: reg@dwf.com
-
- * ntpd/refclock_nmea.c (nmea_ppsapi): Set pps_enable=1, just like
- the atom driver does.
- From: Scott Allendorf <sca@newton.physics.uiowa.edu>
-
- * ntpd/ntp_config.c (getconfig): CONF_CLOCK_PANIC was using the
- wrong config flag.
- From: <justin_forrester@hp.com>
-
-2001-07-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99m-rc3
-
-2001-07-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntp_update: COPYRIGHT needs a touch.
- From: Mike Stump <mrs@kithrup.com>
-
-2001-07-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/config.htm: Major cleanup.
- From: Martin Janzen <janzen@pixelmetrix.com>
-
- * configure.in (rt library check): Don't look for -lrt under
- Linux. Under glibc-2.1.2 and -2.2.2 (at least), the POSIX-
- compatibility real-time library does strange things with threads
- as other processes and we're getting lots of complaints about it.
- Reported by: Juha Sarlin <juha@c3l.com>
-
-2001-06-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver35.htm: Update email address.
-
-2001-06-25 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c (oncore_msg_BaEaHa): Fix wrong offset for
- rsm.bad_almanac
- From: Reynir Siik <reynir@royal.net>
-
-2001-06-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99m-rc2
-
-2001-06-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c:
- * include/ntp_config.h: includefile config keyword support
- From: Dean Gibson <timekeeper@tcp-udp.net>
-
-2001-06-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99m-rc1b
-
- * ntpd/refclock_true.c (true_debug): Bump some buffer sizes to
- reduce/eliminate chance of buffer overflow. Use snprintf()
- instead of sprintf(). Do a better job of opening the debug file.
- * ntpd/ntp_control.c (ctl_getitem): Count overflow packets as bad
- and return a BADFMT.
- * ntpd/ntp_config.c (save_resolve): call fdopen() with the correct
- mode.
- From: Bela Lubkin <belal@sco.com>
-
-2001-06-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp.h (RES_ALLFLAGS): Add RES_DEMOBILIZE.
- From: Dean Gibson <timekeeper@tcp-udp.net>
-
- * configure.in: 4.0.99m-rc1a
-
-2001-06-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_refclock.c (refclock_open): Add O_NOCTTY to the open()
- flags when opening a serial port.
- Reported by: joseph lang <tcnojl1@earthlink.net>
-
-2001-05-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/notes.htm: Typo fix.
- From: John Stone <johns@ks.uiuc.edu>
-
- * configure.in: 4.0.99m-rc1
-
- * html/monopt.htm: Typo fix.
- * html/confopt.htm: Cruft removal.
- From: John Stone <johns@ks.uiuc.edu>
-
-2001-05-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * README.cvs: More updates and cleanup.
-
- * ntpd/ntp_loopfilter.c (loop_config):
- Check against STA_NANO instead of (NTP_API > 3) to catch kernels
- that were rolled while the spec was evolving.
- From: John.Hay@icomtek.csir.co.za
-
- * README.cvs: Note that we want to check out NTP into a clean
- subdir.
- Reported by jrd@cc.usu.edu (Joe Doupnik)
-
-2001-05-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k40
-
- * include/ntp_refclock.h: Median Filter (SAMPLE - macro) - change
- to use most recent MAXSTAGE entries when the filter overflows (ie
- driver poking say once per second with poll > MAXSTAGE) rather
- than blocking after MAXSTAGE entries (turf oldest rather than turf
- most recent).
- From: John Woolner <vk1et@tpg.com.au>
-
- * ntpd/refclock_true.c:
- a. Don't cream pp->a_lastcode when we get a <cr><lf> pair
- b. Fix up pp->leap handling to work correctly
- c. clear CEVNT_BADTIME etc warnings when we get good clock
- CEVNT_NOMINAL.
- From: John Woolner <vk1et@tpg.com.au>
-
- * kernel/sys/pcl720.h:
- Add support for the XL clock to refclock_true.c
- From: Paul A Vixie <vixie@mfnx.net>
-
- * ntpd/ntp_loopfilter.c (local_clock): One more attempt at
- "improving" the panic message.
-
-2001-05-26 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_func_ctty_for_f_setown): BSDI3 needs a ctty
- for F_SETOWN, too.
- From: Paul A Vixie <vixie@mfnx.net>
-
-2001-05-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/ntpd.htm: Typo.
- From: John Stone <johns@ks.uiuc.edu>
-
-2001-05-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k39
-
- * ntpd/ntp_loopfilter.c (local_clock): huffpuff cleanup/improvements.
- (huffpuff): Cleanup/improvements.
- (loop_config): huffpuff initialization cleanup/improvements.
- From: Dave Mills, Terje, Mark, and John?
-
-2001-05-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/release.htm:
- * html/ntpd.htm:
- * html/miscopt.htm:
- From: Dave Mills: Updates.
-
-2001-05-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k38
-
- * ntpd/ntp_proto.c (clock_filter): Huff-n-Puff and Popcorn
- improvements.
- * ntpd/ntp_loopfilter.c (local_clock): Debug cleanup
- From: Dave Mills.
-
- * include/ntp_syscall.h (ntp_gettime): Updated patch from Ulrich.
- My original attempt was not backwards compatible.
-
-2001-05-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_syscall.h (ntp_gettime): Fill in the tai member.
- From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-
- * configure.in: 4.0.99k37
-
- * ntpd/ntp_proto.c (clock_filter): Lose "off", xtemp and ytemp,
- and some obsoleted calculations. Set the peer->offset and
- peer->delay from the filter stages.
-
- * ntpd/ntp_loopfilter.c: Comment/document improvements.
- (local_clock): correct the offset by one-half the difference
- between the sample delay and minimum delay. Lose "mu" from the
- debug message.
- From: Dave Mills.
-
-2001-05-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k36
-
- * ntpd/ntp_loopfilter.c: Huff-n-puff cleanup
- From: Dave Mills.
-
-2001-05-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k35
-
- * ntpd/refclock_atom.c (atom_ppsapi): set pps_enable=1 if
- enb_hardpps.
- * ntpd/ntp_timer.c: huffpuff support.
- (init_timer): huffpuff support.
- (timer): huffpuff support.
- * ntpd/ntp_proto.c (init_proto): Initialize pps_enable to 0, not 1.
- * ntpd/ntp_loopfilter.c (CLOCK_HUFFPUFF): Added.
- Add huff-n-puff filter variables.
- (local_clock): Lose "pps sync enabled" log noise.
- (huffpuff): Added.
- (loop_config): LOOP_MINPOLL and LOOP_ALLAN were missing the
- trailing break; add LOOP_HUFFPUFF.
- * ntpd/ntp_config.c: tinker huffpuff added.
- (getconfig): CONF_CLOCK_HUFFPUFF support.
- * include/ntpd.h: huffpuff() declaration.
- * include/ntp_config.h (CONF_CLOCK_HUFFPUFF): Added.
- * include/ntp.h (HUFFPUFF): Added.
- (LOOP_HUFFPUFF): Added.
- From: Dave Mills.
-
-2001-05-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver20.htm: Reality check.
- * ntpd/refclock_nmea.c: Comment cleanup
- From: John Woolner <vk1et@tpg.com.au>
-
- * html/release.htm: Cleanup (at least).
- * html/refclock.htm: Cleanup (at least).
- * html/kern.htm: Cleanup (at least).
- * html/index.htm: Cleanup (at least).
- * html/extern.htm: Cleanup (at least).
- * html/driver1.htm: Cleanup (at least).
- * html/debug.htm: Cleanp (at least).
- * html/accopt.htm: KoD documentation update.
- From: Dave Mills.
-
- * configure.in: 4.0.99k34
-
- * ntpd/ntp_util.c (record_loop_stats): values are now passed in.
- * ntpd/ntp_loopfilter.c (local_clock): pass the values to
- record_loop_stats().
- * include/ntpd.h: Pass the parameters in to record_loop_stats().
- With the discipline loop opened (disable ntp) the local clock
- updates were not being sent to loopstats. That now is.
- From: Dave Mills.
-
-2001-05-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k33
-
- * ntpd/ntp_proto.c (receive): Validate the source port. Lose
- NTPv1 support.
- * ntpd/ntp_loopfilter.c (local_clock): Sanity check sys_poll
- earlier instead of later.
- From: Dave Mills.
-
- * ntpd/refclock_oncore.c (oncore_msg_any): We don't always have
- GETTIMEOFDAY().
-
-2001-05-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_shm.c (shm_poll): Apply JAN_1970 correction after
- calling TVTOTS(), just like everybody else does.
- From: David Malone <dwmalone@maths.tcd.ie>
-
- * ntpd/refclock_ulink.c: fixed 33x quality flag, added more
- debugging stuff, updated 33x time code explanation.
- From: s.l.smith (via j.c.lang).
-
-2001-05-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k32
-
- * ntpd/ntp_loopfilter.c: rstclock now takes a 3rd argument, the
- last offset.
- (init_loopfilter): Use it.
- (local_clock): Use it. Clean up the code.
- (loop_config): Use it.
- (rstclock): Implement it. Clean up the code.
- From Dave Mills.
-
-2001-05-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k31
-
- * ntpdc/ntpdc_ops.c (sysstats): That's 'bad packet format'
- (instead of '... length'), and 'packets rejected' (instead of
- 'limitation rejects'.
- * ntpd/ntp_proto.c (receive): PUBKEY fixes. Move KoD stuff to
- process_packet().
- (process_packet): Move KoD stuff here...
- (peer_clear): Unspec the stratum, too.
- (clock_filter): Don't update peer->epoch here. Fix the filter
- test when checking the epoch.
- (fast_xmit): Send back STRATUM_UNSPEC on a KoD packet.
- (init_proto): Initialize sys_jitter.
-
- * ntpd/ntp_loopfilter.c: rstclock() takes 2 parameters now.
- (init_loopfilter): Use it...
- (local_clock): Ditto, and change the "mu" calculation. Improve
- the jitter test in S_SYNC. Use peer->epoch (not current_time) to
- update the last_time. Update debug info.
- (rstclock): 2nd arg - the epoch to use. Use it.
- (loop_config): update call to rstclock.
- From: Dave Mills.
-
-2001-05-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ports/winnt/ntpd/ntpd.dsp: Add cmd_args.c
- From: Wink Saville <wink@saville.com>
-
-2001-04-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpq/ntpq.c (tstflags): 11 now.
- From: John Cochran <jdc@fiawol.org>
-
- * ntpd/ntp_proto.c (receive): KoD updates. Improve the comments.
- Lose the AM_PROCPKT restrictions test.
- (peer_xmit): Check/report on no encryption key in packet.
- (fast_xmit): Use peer_xmit's new packet length check code.
- From Dave Mills.
-
-2001-04-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k30
-
-2001-04-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpdc/ntpdc_ops.c: Added "kod", lost "demobilize".
- * ntpd/ntp_config.c: Added "kod" keyword. Lose "demobilize" keyword.
- * html/release.htm: Updated.
- * html/accopt.htm: Updated.
- From: Dave Mills.
-
- * ntpq/ntpq.c: Reorder and add some TEST flag bits.
- * ntpd/ntp_proto.c (transmit): Also bail if access denied.
- (receive): Lose RES_DEMOBILIZE and (some?) RES_DONTSERVE and
- RES_LIMITIED stuff. Update Kiss-Of-Death (KoD) docs.
- Call fast_xmit with new 3rd parameter (restrict_mask).
- Before checking for an authentic packet, check the restrict_mask
- for RES_{DONTSERVE,LIMITED,NOPEER}.
- Check restrictions in AM_PROCPKT case.
- (peer_clear): Don't lose the stratum if the peer->flags don't
- indicate FLAG_REFCLOCK.
- (fast_xmit): Take restrict mask as a new argument, and handle
- KoD. Reorder some code.
- From: Dave Mills.
-
-2001-04-26 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpdc/ntpdc_ops.c: restrict/unrestrict support for version and
- demobilize. Implement demobilze.
- * ntpd/ntp_proto.c (receive): Improve version testing, including
- RES_DEMOBILIZE support.
- (fast_xmit): Patches to kiss-of-death packet.
- * ntpd/ntp_loopfilter.c (local_clock): S_SYNC case now also checks
- abs(clock_offset) against CLOCK_PGATE*sys_jitter.
- * ntpd/ntp_config.c: CONF_RES_DEMOBILIZE/demobilize support.
- * include/ntp_config.h (CONF_RES_DEMOBILIZE): Added.
- * include/ntp.h (RES_DEMOBILIZE): Added.
- From Dave Mills.
-
-2001-04-25 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/accopt.htm: Document the "version" parameter
- From Dave Mills.
-
- * ntpd/ntp_proto.c (fast_xmit): Implement DENY mode.
- From Dave Mills.
-
- * ntpd/ntp_config.c: Add the "allan" tinker variable.
- From: Juha Sarlin <juha@c3l.tyreso.se>
-
- * ntpd/refclock_hopfpci.c (hopfpci_start): Lose the "correct_any"
- stuff - it's both obsolete and wrong.
-
- * ntpd/ntp_proto.c (receive): Keep track of packet versions.
- Implement RES_LIMITED.
- * include/ntp_config.h (CONF_RES_LIMITED):
- * include/ntp.h (RES_LIMITED): Leave the bits in the original
- order.
- From Dave Mills.
-
- * util/timetrim.c:
- * util/Makefile.am:
- * ntpdc/ntpdc_ops.c:
- * ntpd/refclock_nmea.c:
- * libntp/snprintf.c:
- * configure.in:
- * configure:
- * config.h.in:
- * aclocal.m4:
- * acconfig.h:
- Lint cleanup from: Marc Brett <mbrett@rgs0.london.waii.com>
-
- * ntpd/ntp_config.c: Add "version" support.
- (getconfig): version support.
- * include/ntp_config.h (CONF_RES_VERSION): Added.
- * include/ntp.h (RES_VERSION): Added.
- From: Dave Mills.
-
- * include/ntp_machine.h (ifreq): WinNT cleanup
-
-2001-04-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k29
-
- * html/miscopt.htm: Document the "allan" tinker variable.
- * ntpd/ntp_proto.c (clock_filter): Update comments. Lose etemp;
- we now use allan_xpt for this.
- * ntpd/ntp_loopfilter.c: Added allan_xpt as a tinker variable.
- Reorganize variables and improve comments.
- (local_clock): Improve comments, use (new) allan_xpt instead of
- CLOCK_ALLAN. Fix test in S_SYNC state. Update debug info.
- (rstclock): No longer force allan_xpt to CVLOCK_ALLAN in S_FREQ,
- S_SYNC, or default case.
- (loop_config): Document dangerous tinker variables, and add
- LOOP_ALLAN to the list.
- * include/ntp_config.h (CONF_CLOCK_ALLAN): Added.
- * include/ntp.h (LOOP_ALLAN): Added.
- Allan intercept fixes from Dave Mills.
-
- * scripts/mkver.in: Use the C locale so the dates come out in a
- consistent format.
- From: ASANO Naoyuki <n_asano@imjp.co.jp>
-
- * build: Run "config.status" before the "make" because it probably
- saves time and trouble. Probably...
-
- * flock-build: Try building sequentially.
-
-2001-04-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_make_tickadj): Fix it right...
-
- * util/ntp-genkeys.c: extern config_netinfo, too.
-
- * util/hist.c:
- * ntptrace/ntptrace.c:
- * ntpq/ntpq.c:
- * ntpdc/ntpdc.c:
- * ntpdate/ntptimeset.c:
- * ntpdate/ntpdate.c:
- * ntpd/refclock_parse.c:
- * ntpd/refclock_msfees.c:
- * ntpd/refclock_jupiter.c:
- * ntpd/ntp_refclock.c:
- * ntpd/ntp_io.c:
- * libparse/clk_wharton.c:
- * libparse/clk_varitext.c:
- * libparse/clk_trimtaip.c:
- * libparse/clk_schmid.c:
- * libparse/clk_rcc8000.c:
- * libparse/clk_rawdcf.c:
- * libparse/clk_meinberg.c:
- * libparse/clk_hopf6021.c:
- * libparse/clk_dcf7000.c:
- * libparse/clk_computime.c:
- Lint. From: Simon Burge <simonb@wasabisystems.com>
-
-2001-04-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_nmea.c (nmea_receive): Fixes.
- From: John Woolner <vk1et@tpg.com.au>
-
- * util/ntp-genkeys.c: Declare check_netinfo, don't define it.
- From: Jack Bryans <jbryans@csulb.edu>
-
- * configure.in (RSASRCS): rsaref2 needs digit.h (I thought I fixed
- this already).
-
- * configure.in (CFLAGS): Disable -Wconversion, enable
- -Wmissing-prototypes, and allow for -Werror.
- From: Simon Burge <simonb@wasabisystems.com>
-
- * util/ntp-genkeys.c (main): Reset the standard mask so the
- symlinks are created with the standard mask.
-
- * configure.in: 4.0.99k28
-
- * ntpd/ntpd.c (ntpdmain): Use mode_t for umask value.
-
- * util/ntp-genkeys.c: Create files with the right umask.
-
- * util/ntp-genkeys.c: config_file should be declared, not defined.
- * ntpd/refclock_mx4200.c (mx4200_pps): debug cleanup.
- * ntpd/refclock_hopfser.c: If we're not using it, provide the _bs.
- * ntpd/refclock_heath.c (heath_receive): Add missing "break"
- statements.
- * ntpd/ntp_proto.c: Lose extra definition of mode_ntpdate.
- * librsaref/Makefile.am (nodist_librsaref_a_SOURCES): Put RSASRCS
- on the same line as rsaref.h to improve portability.
- * libntp/msyslog.c: Lint cleanup.
- From: Marc.Brett@westerngeco.com
-
- * util/ntp-genkeys.c:
- * ntpdate/ntpdate.c:
- * ntpd/ntp_config.c: Netinfo header reorder.
- From: Jack Bryans <jbryans@csulb.edu>
-
- * configure.in: timespec can be found by looking in goofy places
- under SunOS.
-
-2001-04-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_nmea.c: PPSAPI cleanup, default to RMC sentences,
- handle milliseconds, multiple sentences, other good stuff.
- From: John Woolner <vk1et@tpg.com.au>, Marc.Brett@westerngeco.com,
- John.Hay@icomtek.csir.co.za
-
- * ntpd/ntp_proto.c (receive): In the AM_NEWBCL case, return in all
- cases at the end.
- * ntpd/ntp_peer.c (newpeer): Check cast_flags against MDF_BCLNT,
- not against MDF_BCAST.
- * ntpd/ntp_loopfilter.c (local_clock): Lose debug info.
- * ntpd/ntp_crypto.c (crypto_recv): Bugfix.
- From: Dave Mills.
-
- * configure.in: 4.0.99k27
-
- * ntpd/ntp_loopfilter.c (local_clock): Check clock_panic > 0.
- Check clock_max > 0.
- * html/ntpd.htm: Cleanup.
- * html/miscopt.htm: Cleanup.
- * html/confopt.htm: Cleanup minpoll documentation.
- From: Dave Mills.
-
-2001-04-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/cmd_args.c (getstartup): check_netinfo needs an extern
- declaration.
- Reported by: Jack Bryans <jbryans@csulb.edu>
-
- * configure.in (ac_cv_make_timetrim): Added.
- * util/Makefile.am (bin_PROGRAMS): MAKE_TIMETRIM
- Requested by: Jack Bryans <jbryans@csulb.edu>
-
- * configure.in: 4.0.99k26
-
- * util/ntp-genkeys.c:
- * ntpd/refclock_oncore.c:
- * ntpd/ntp_peer.c:
- * libntp/msyslog.c:
- * libntp/audio.c:
- Lint cleanup.
- From: Simon Burge <simonb@wasabisystems.com>
-
- * ntpd/ntp_loopfilter.c (local_clock): debug message improvements
- from Dave Mills.
-
- * libntp/emalloc.c (emalloc): Tell people we are exiting if we log
- an out-of-memory condition.
-
- * util/ntp-genkeys.c (main): Don't allow '#' in a generated MD5
- key. Reported by: Dave Tyson <Dave.Tyson@liverpool.ac.uk>
-
-2001-04-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (clock_update): minpoll cleanup.
- (clock_select): minpoll cleanup.
- (clock_filter): Bugfixes from Mark Martinec <Mark.Martinec@ijs.si>
- * ntpd/ntp_loopfilter.c (rstclock): minpoll cleanup. Debug cleanup.
- * ntpd/ntp_config.c (getconfig): Initialize/bounds check minpoll
- using NTP_MINDPOLL insted of sys_minpoll.
- From: Dave Mills.
-
-2001-04-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/msyslog.c:
- * ElectricFence/page.c (stringErrorReport): Follow Rainer's lead
- and use strerror().
-
- * ntpd/refclock_shm.c (shm_start): Always use strerror.
- * libntp/msyslog.c (msyslog): Use strerror if present.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.
-
- * ntpd/ntp_config.c (getconfig): Read stratum fudge value into
- long variable.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * libparse/parsesolaris.c (rdchar): Cast ~0 to unsigned long.
- * libntp/buftvtots.c (buftvtots): Allow for 8-byte tv_sec, tv_usec
- in struct timeval.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
-2001-04-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c (getconfig): move "tinker" so it's generally
- available.
-
-2001-04-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Look for getclock().
-
- * ntpd/ntp_config.c (getconfig): Squawk if provided minpoll or
- maxpoll values are out of range.
-
- * ntpd/ntp_proto.c (poll_update): Some operations can only be done
- if we're compiling with some REFCLOCKs.
- From Dave Mills.
-
- * configure.in (RSASRCS): Added.
- * librsaref/Makefile.am (nodist_librsaref_a_SOURCES): Use RSASRCS.
-
- * configure.in: Limit the DECL_HSTRERROR_0 to aix4.3.*. RSN, we
- could also limit it to xlc...
-
- * configure.in: 4.0.99k25
-
- * html/leap.htm: Added.
- * html/index.htm: Update.
- * html/driver7.htm: Update.
- * html/driver6.htm: Update.
- * html/driver36.htm: Update.
- * html/audio.htm: Update.
- * html/y2k.htm: Removed.
- From Dave Mills.
-
-2001-04-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * acconfig.h: Lose extra declarations of PACKAGE and VERSION.
-
- * acconfig.h:
- * configure.in:
- * include/l_stdlib.h: DECL_HSTRERROR_0 needed for xlc under AIX 4.3.2.
- Reported by: Harald Barth <haba@pdc.kth.se>
-
- * ntpd/ntp_proto.c (proto_config): cal_enable (PROTO_CAL) is
- invalid if no refclocks are present.
- From: Frodo Looijaard <frodol@dds.nl>
-
- * README.cvs: On some systems, the -C option fails.
-
- * ntpd/refclock_nmea.c:
- * ntpd/ntp_refclock.c:
- * html/driver20.htm:
- PPSAPI patches for NMEA driver.
- From: John.Hay@icomtek.csir.co.za
-
- * README.rsa: Describe RSAEuro support, provide alternate rsa.c
- patch.
- * configure.in: Check for rsaeuro1, RSAOBJS, RSADIR respectively.
- * html/build.htm: Hint at rsaeuro1 directory.
- * include/global.h (BYTE): Define.
- * librsaref/Makefile.am (nodist_librsaref_a_SOURCES): Removed rsaref2
- specific sources.
- (librsaref_a_LIBADD): Add appropriate objects.
- (librsaref_a_DEPENDENCIES): Work around automake limitation.
- (stamp-rsaref): Use RSADIR.
- * scripts/README: Document ntp-close.
- * scripts/Makefile.am (EXTRA_DIST): Distribute it.
- * Makefile.am (DISTCLEANFILES): Remove .warning.
- * librsaref/Makefile.am (DISTCLEANFILES): Remove copied/touched
- librsaref sources, stamp-rsaref.
- * ntpdate/Makefile.am (DISTCLEANFILES): Remove version.c.
- * ntpq/Makefile.am (DISTCLEANFILES): Likewise.
- * parseutil/Makefile.am (DISTCLEANFILES): Remove $(EXTRA_PROGRAMS).
- Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpd/ntp_control.c: Header cleanup
-
-2001-04-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Properly align --help output.
- Explain ElectricFence.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpd/ntp_loopfilter.c (local_clock): Lose debugging statements.
- * ntpd/ntp_proto.c (clock_filter): Rewrite.
- From: Dave Mills
-
- * ntpd/ntp_control.c (ctl_getitem): msyslog() possible buffer
- overflow exploit.
-
- * configure.in: 4.0.99k24
-
- * html/pic/radio2.jpg:
- * html/release.htm:
- * html/refclock.htm:
- * html/pps.htm:
- * html/ntpd.htm:
- * html/miscopt.htm:
- * html/driver22.htm:
- * html/confopt.htm:
- Updated documentation from Dave Mills.
-
- * util/ntp-genkeys.c: sys_minpoll.
- * ntpd/refclock_atom.c: Comment additions.
- * ntpd/ntp_proto.c: mode_ntpdate and peer_ntpdate added.
- (transmit): We want 3, not 2, consecutive polls. hpoll logic
- cleanup. mode_ntpdate changes.
- (receive): When setting up a newpeer, use our sys_minpoll, not the
- peer->ppoll.
- (clock_update): sys_minpoll changes. Reorder some case 1 code.
- Don't exit in case 2.
- (poll_update): hpoll cleanup.
- (peer_clear): u_rand. Use u_rand to randomize the initial poll.
- * ntpd/ntp_peer.c (newpeer): Bump peer_ntpdate if we're in
- mode_ntpdate.
- * ntpd/ntp_loopfilter.c: Initialize sys_poll and sys_minpoll to
- NTP_MINDPOLL.
- (local_clock): Clean up some debug/info messages.
- (rstclock): Use sys_minpoll.
- (loop_config): KERNEL_PLL sanity checks. LOOP_MINPOLL support.
- * ntpd/ntp_crypto.c (crypto_recv): Turn off FLAG_AUTOKEY when we
- turn off TEST10.
- * ntpd/ntp_control.c (ctl_getitem): Buffer overflow check. Clean
- up some loop logic.
- * ntpd/ntp_config.c: Added "tinker" and "minpoll". Use
- sys_minpoll now, instead of old manifest constant.
- (save_resolve): Print keyid using decimal, not hex. From Lars-Owe
- Ivarsson <larsowe@paradisaea.its.uu.se>
- * include/ntpd.h: Added peer_ntpdate and sys_minpoll.
- * include/ntp_config.h (CONF_CLOCK_MINPOLL): Added.
- * include/ntp.h: keyid cleanup. LOOP_* cleanup.
- From Dave Mills.
-
-2001-04-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (clock_filter): Swell stuff.
- From: Mark Martinec <Mark.Martinec@ijs.si>
-
- * ports/winnt/ntpd/ntpd.dsp:
- * ports/winnt/ntpd/hopf_PCI_io.c:
- * ports/winnt/include/hopf_PCI_io.h:
- * ports/winnt/include/config.h:
- * ntpd/refclock_hopfser.c:
- * ntpd/refclock_hopfpci.c:
- * ntpd/refclock_conf.c:
- * ntpd/ntp_control.c:
- * ntpd/Makefile.am:
- * libntp/clocktypes.c:
- * include/ntp.h:
- * include/hopf6039.h:
- * include/Makefile.in:
- * include/Makefile.am:
- * html/pic/fg6039.jpg:
- * html/refclock.htm:
- * html/driver39.htm:
- * html/driver38.htm:
- * html/copyright.htm:
- Updated Oncore dudes.
-
- * configure.in:
- HOPF drivers and documentation.
- From: Bernd Altmeier <altmeier@atlsoft.de> (with some light
- hacking from Harlan to clean up indentation and lose the // comments)
-
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_conf.c: Make it go.
- From: Reg Clemens <reg@dwf.com>
-
- * configure.in (openssl): Publish and default to RSAREF; hide
- openssl, and only use it if explicitly requested (at least until
- we work with it).
-
-2001-04-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/y2k.htm:
- * html/tickadj.htm:
- * html/release.htm:
- * html/refclock.htm:
- * html/quick.htm:
- * html/pps.htm:
- * html/ntptrace.htm:
- * html/ntptime.htm:
- * html/ntpq.htm:
- * html/ntpdc.htm:
- * html/ntpdate.htm:
- * html/ntpd.htm:
- * html/miscopt.htm:
- * html/index.htm:
- * html/genkeys.htm:
- * html/exec.htm:
- * html/driver7.htm:
- * html/driver22.htm:
- * html/copyright.htm:
- * html/confopt.htm:
- * html/build.htm:
- * html/authopt.htm:
- * html/assoc.htm:
- Updates from Dave Mills.
-
-2001-04-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (OPENSSL): Just use -lcrypto.
- Reported by Dave Mills.
-
-2001-03-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k20
-
- * ntpd/refclock_heath.c: Add support for GC-1000 II.
- From Dave Mills.
-
- * ntpd/ntp_proto.c (transmit): Check peer->unreach.
- (peer_clear): peer->outdate is a f(BURST_INTERVAL1), not
- NTP_MINPOLL.
- * ntpd/ntp_loopfilter.c (local_clock): mode_ntpdate stuff.
- * ntpd/ntp_crypto.c: OpenSSL/RSAREF support.
- * ntpd/cmd_args.c: Use -q, not -z, for mode_ntpdate.
- (getstartup): nofork on mode_ntpdate. Usage update.
- * include/ntp_crypto.h: OpenSSL/RSAREF support.
- From: Dave Mills.
-
- * configure.in (rsaref): Buglet.
-
-2001-03-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (clock_update): mode_ntpdate support.
- * ntpd/ntp_loopfilter.c (local_clock): mode_ntpdate support.
- * ntpd/cmd_args.c: Added -z (mode_ntpdate).
- * include/ntpd.h: mode_ntpdate added.
- * include/ntp_crypto.h: RSAREF/OPENSSL cleanup.
- From: Dave Mills.
-
-2001-03-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * config.h.in:
- * aclocal.m4:
- * configure.in: Prepare for OpenSSL support
-
-2001-03-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * README.rsa: Note that RSAEURO will not work.
- Reported by: pieter.delacourt@banksys.be
-
-2001-03-25 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_if.h:
- * include/ntp_machine.h:
- * include/ntp_unixtime.h:
- * libntp/humandate.c:
- * libntp/iosignal.c:
- * libntp/mktime.c:
- * libntp/prettydate.c:
- * libntp/systime.c:
- * libntp/tvtoa.c:
- * libntp/uglydate.c:
- * libntp/utvtoa.c:
- * libparse/clk_computime.c:
- * libparse/clk_dcf7000.c:
- * libparse/clk_hopf6021.c:
- * libparse/clk_meinberg.c:
- * libparse/clk_rawdcf.c:
- * libparse/clk_rcc8000.c:
- * libparse/clk_schmid.c:
- * libparse/clk_trimtaip.c:
- * libparse/clk_trimtsip.c:
- * libparse/clk_varitext.c:
- * libparse/parse.c:
- * libparse/parse_conf.c:
- * ntpd/check_y2k.c:
- * ntpd/ntp_config.c:
- * ntpd/ntp_control.c:
- * ntpd/ntp_intres.c:
- * ntpd/ntp_io.c:
- * ntpd/ntp_loopfilter.c:
- * ntpd/ntp_monitor.c:
- * ntpd/ntp_proto.c:
- * ntpd/ntp_refclock.c:
- * ntpd/ntp_request.c:
- * ntpd/ntp_resolver.c:
- * ntpd/ntp_timer.c:
- * ntpd/ntp_util.c:
- * ntpd/ntpd.c:
- * ntpd/refclock_acts.c:
- * ntpd/refclock_arbiter.c:
- * ntpd/refclock_arc.c:
- * ntpd/refclock_as2201.c:
- * ntpd/refclock_atom.c:
- * ntpd/refclock_bancomm.c:
- * ntpd/refclock_chronolog.c:
- * ntpd/refclock_chu.c:
- * ntpd/refclock_datum.c:
- * ntpd/refclock_dumbclock.c:
- * ntpd/refclock_fg.c:
- * ntpd/refclock_gpsvme.c:
- * ntpd/refclock_heath.c:
- * ntpd/refclock_hpgps.c:
- * ntpd/refclock_irig.c:
- * ntpd/refclock_jupiter.c:
- * ntpd/refclock_leitch.c:
- * ntpd/refclock_local.c:
- * ntpd/refclock_msfees.c:
- * ntpd/refclock_mx4200.c:
- * ntpd/refclock_nmea.c:
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_pcf.c:
- * ntpd/refclock_pst.c:
- * ntpd/refclock_shm.c:
- * ntpd/refclock_tpro.c:
- * ntpd/refclock_trak.c:
- * ntpd/refclock_true.c:
- * ntpd/refclock_ulink.c:
- * ntpd/refclock_usno.c:
- * ntpd/refclock_wwv.c:
- * ntpd/refclock_wwvb.c:
- * ntpdate/ntpdate.c:
- * ntpdate/ntptime_config.c:
- * ntpdate/ntptimeset.c:
- * ntpdc/ntpdc.c:
- * ntpdc/ntpdc_ops.c:
- * ntpq/ntpq.c:
- * ntpq/ntpq_ops.c:
- * ntptrace/ntptrace.c:
- * parseutil/testdcf.c:
- * util/hist.c:
- * util/ntp-genkeys.c:
- * util/ntptime.c:
- * util/precision.c:
- * util/tickadj.c:
- time.h and sys/time.h cleanup.
-
-2001-03-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: '99k19
-
- * ntpd/refclock_atom.c (atom_ppsapi): PPS API RFC alignment patches.
- From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-
- * util/ntptime.c: MNT options
- From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-
- * ntpd/ntp_refclock.c (refclock_newpeer): Lose "extra" free().
- From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-
- * configure.in: 4.0.99k18 and auto* upgrade
-
-2001-03-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpdc/ntpdc_ops.c (printpeer): No more "valid".
- * ntpd/ntp_request.c (peer_info): No more "valid".
- * ntpd/ntp_refclock.c (refclock_transmit): valid/hpoll cleanup.
- * ntpd/ntp_proto.c (transmit): valid/hpoll and peer->ttl cleanup.
- peer->valid/oreach cleanup.
- (receive): Call newpeer() with the pkt->ppoll, not
- NTP_MINDPOLL (in several places).
- In AM_NEWPASS, if we have a NULL peer, return.
- (poll_update): Added xpoll definition, fixed oldpoll definition.
- Algorithmic improvements.
- * ntpd/ntp_peer.c (newpeer): Better minpoll/maxpoll
- initialization.
- (resetmanycast): That's a poll_update() on an MDF_ACAST, not a
- poll_clear().
- * ntpd/ntp_crypto.c: include <fcntl.h>.
- (crypto_recv): Leave the crypto_flags alone when wiggling the
- peer-> stuff.
- (crypto_cert): Make room for daddy. Do a real open() on the cert
- file. Read the cert. Initial hack and slash. Better debug info.
- * ntpd/ntp_control.c: CP_VALID now does "unreach".
- (ctl_putpeer): Ditto.
- * include/ntp_request.h: info_peer gets a placeholder for "valid".
- * include/ntp_crypto.h (CRYPTO_FLAG_CERT): Comment update.
- * include/ntp.h: Lose "valid" from struct peer.
- From: Dave Mills.
-
-2001-03-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): hpoll calc logic cleanup.
- (receive): New cert stuff.
- (poll_update): Improvements.
- (peer_clear): New cert stuff.
- (peer_xmit): New cert stuff.
- * ntpd/ntp_crypto.c: New cert stuff, documentation cleanup. Lose
- extraneous poll_uopdate()s.
- * ntpd/ntp_control.c: Deal with new cert stuff.
- * ntpd/ntp_config.c (getconfig): Handle CONF_CRYPTO_CERT.
- * include/ntp_crypto.h (CRYPTO_FLAG_CERT): Added.
- (CRYPTO_CERT): Added.
- (CRYPTO_CONF_CERT): Added.
- Add declaration for struct value certif.
- * include/ntp_control.h (CS_CERTIF): Added.
- (CP_CERTIF): Added.
- * include/ntp_config.h (CONF_CRYPTO_CERT): Added.
- * include/ntp.h (TEST10,TEST11): New meaning. Add certif to
- struct peer.
- (FLAG_PROVEN): Added.
- (MAX_EXT_LEN): Removed.
- exten grew from 672/4 to 5000/4 for PUBKEY.
- From: Dave Mills.
-
-2001-03-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): Documentation cleanup.
- (receive): Watch for NULL peer->pubkey.ptr (TEST11).
- (poll_update): peer->nextdate, not ->outdate. More cleanup around
- the disabled PUBKEY chunk.
- * ntpd/ntp_crypto.c (make_keylist): ltemp might be smaller than
- sys_automax - check peer->kpoll, too. Other ltemp cleanup.
- (crypto_recv): fstamp is a PUBKEY-only variable.
- * include/ntp.h (NTP_AUTOMAX): 13, not 12.
- From: Dave Mills.
-
-2001-03-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): hpoll cleanup. Call clock_select()
- after calling poll_update, not before.
- (receive): Call poll_update after crypto_recv if FLAG_SKEY.
- (process_packet): Set peer->ppoll Later.
- (poll_update): peer->hpoll sanity checking. Set peer->outdate,
- not ->nextate, when burst > 0. MDF_ACAST cleanup.
- (clock_select): Fix hpoll typo in call to poll_update().
- * ntpd/ntp_crypto.c (crypto_xmit): tstamp's value is a function of
- PUBKEY.
- * include/ntp.h (clear_to_zero): #define value is a function of
- AUTOKEY.
- From: Dave Mills.
-
-2001-02-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): Documentation/code update.
- (poll_update): Sanity check peer->hpoll. Improve debug info.
- (peer_clear): Improve debug info. Turn off FLAG_ASSOC in addition
- to FLAG_AUTOKEY.
- (clock_select): peer->status is CTL_PST_SEL_DISTSYSPEER, and don't
- call poll_update(). Make each entry in the peer_list a
- CTL_PST_SEL_SELCAND sooner, too. Rework similar logic later on.
- Change debug level on some info.
- (peer_xmit): Check peer->flags using FLAG_ASSOC, not
- CRYPTO_FLAG_AUTO in a couple places. Don't call poll_update() if
- sendlen > LEN_PKT_NOMAC.
- * ntpd/ntp_loopfilter.c (local_clock): Improve debug info.
- Sanity-check sys_poll sooner.
- * ntpd/ntp_crypto.c: New artwork.
- (COOKIE_LEN,AUTOKEY_LEN,VALUE_LEN): New.
- (make_keylist): More debug info. Use FLAG_ASSOC, not
- CRYPTO_FLAG_ASSOC.
- (crypto_recv): More debug info. Clean up/improve sanity checks on
- CRYPTO_ASSOC and CRYPTO_RESP packets, and in other places.
- (crypto_xmit): Clean up/improve sanity checks on CRYPTO_ASSOC and
- CRYPTO_RESP packets. Use FLAG_ASSOC, not CRYPTO_FLAG_ASSOC. More
- debug info.
- * include/ntp.h (NTP_CANLOCK): Lose it.
- (clear_to_zero): is now "assoc".
- (FLAG_ASSOC): Added.
- From: Dave Mills
-
-2001-02-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpdate/ntpdate.h (NTP_MAXAGE): Added.
- * ntpd/ntp_refclock.c (refclock_receive): Cleanup.
- * ntpd/ntp_proto.c (transmit): Don't reset peer->ppoll in one case.
- Update peer->hpoll based on CTL_PST_SEL_CORRECT, not FLAG_SYSPEER.
- Don't update peer->ppoll based on MDF_[BM]CAST.
- (peer_clear): ppoll is initialized to maxpoll.
- (clock_select): call poll_update(peer->hpoll) earlier.
- (peer_xmit): Call poll_update later.
- * ntpd/ntp_peer.c (peer_config): Rework initial values of [hkp]poll.
- * ntpd/ntp_loopfilter.c (CLOCK_PHI): Added. Deal with other
- (allow_*) stuff. Treat Windows/NT the same as others regarding
- panic steps. Deal with tinker stuff.
- * ntpd/ntp_config.c: Tinker stuff.
- * ntpd/cmd_args.c (getCmdOpts): -g now wiggles "allow_panic"
- (renamed from "correct_any"). -x now wiggles "allow_step"
- (renamed from "allow_step_backward").
- * include/ntpd.h: Add tinker variables. Rename/rework variables
- associated with "permission to step" and "permission to make a
- panic correction"
- * include/ntp_config.h (CONFIG_TINKER): Added.
- (CONF_CLOCK_MAX): Tinker keyword
- (CONF_CLOCK_PANIC): Tinker keyword
- (CONF_CLOCK_PHI): Tinker keyword
- (CONF_CLOCK_MINSTEP): Tinker keyword
- * include/ntp.h (NTP_MINCLOCK): Tinker and other cleanup.
- From: Dave Mills
-
-2001-02-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): Don't peer_clear() and reset
- minpoll unconditionally; make sure the peer is configured.
- (poll_update): When updating peer->ppoll, check on BCAST and
- MCAST, not ACAST
- (peer_clear): PUBKEY cleanup. Zero out the peer structure
- earlier. Initialization cleanup/fixes.
- (peer_xmit): CRYPTO_FLAG_AUTO is in peer->flags now.
- (key_expire): Debug output.
- * ntpd/ntp_peer.c (unpeer): PUBKEY cleanup.
- (newpeer): peer variable setup cleanup.
- * ntpd/ntp_crypto.c (make_keylist): Keep CRYPTO_FLAG_AUTO in
- peer->flags, not crypto_flags.
- (crypto_xmit): Ditto.
- (crypto_recv): Fix up RV_TSP logic (several places).
- * include/ntp.h (clear_to_zero): Moved...
- From: Dave Mills.
-
-2001-02-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (peer_xmit): Crypto-related fixes
- From Dave Mills.
-
- * ntpd/ntp_crypto.c (crypto_recv): Allocate space for the trailing
- NUL on the keystr.
-
-2001-01-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k17
-
- * ntpd/refclock_local.c (STRATUM): 3 -> 5
- * ntpd/ntp_proto.c: sys_maxd -> sys_selerr, sys_epsil ->
- sys_syserr. various cleanups and improvements.
- From: Dave Mills.
-
-2001-01-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k16
-
- * config.h.in: Regenerated - became empty somehow.
- Reported by John.Hay@icomtek.csir.co.za
-
- * ntpd/ntp_proto.c (clock_select): Fix sdisp calculation.
- From Dave Mills.
-
- * util/ntp-genkeys.c:
- * ntpd/refclock_chu.c:
- * ntpd/refclock_atom.c:
- * ntpd/ntpd.c:
- * ntpd/ntp_loopfilter.c:
- * ntpd/ntp_io.c:
- * ntpd/cmd_args.c:
- * libntp/audio.c:
- * include/l_stdlib.h:
- * html/copyright.htm:
- Lint fixes (Thanks bunches!)
- From: Marc.Brett@westerngeco.com
-
-2001-01-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k15
-
- * ntpd/ntp_proto.c (clock_select): Track error[] items sooner.
- Typo grabbing the dtemp value and in the sdisp calculation.
- From Dave Mills.
-
-2001-01-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k14
-
- * ntpd/ntp_proto.c: Change description of sys_rootdelay and
- sys_rootdispersion.
- (process_packet): Fix p_del test (bad distance).
- (process_packet): Fix bad synch distance test.
- (process_packet): Fix call to clock_filter (p_disp)
- (clock_update): Fix sys_rootdelay calculation.
- (clock_filter): Initialize jit to f(sys_precision)
- (clock_filter): Update jit using distance[i] instead of
- SQUARE(). peer->jitter uses dtemp instead of SQUARE().
- (clock_filter): Updated CLOCK_SGATE checks. When printing debug
- info, show jitter along with popcorn spike.
- (clock_select): New sdisp calc.
- (root_distance): New return value calc.
- (peer_xmit): xpkt.rootdispersion value change.
- * include/ntp.h (CLOCK_SGATE): Popcorn spike gate (Whoa, Molly!)
- From Dave Mills.
-
-2001-01-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * config.sub (Repository): Updated.
- * config.guess (Repository): Updated.
-
- * ntpd/ntp_loopfilter.c (local_clock): Just use sys_jitter in the
- calculation for rootdispersion.
- From Dave Mills.
-
-2001-01-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): Fix documentation. Set
- peer->outdate and call poll_update in a new place. Sanity checks
- in the MODE_BROADCAST case.
- (clock_select): Track the old peer. Use the old peer in
- subsequent checks, where appropriate. Clean up unpeer() logic.
- From Dave Mills.
-
-2001-01-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_chu.c: Start using HAVE_AUDIO.
- * ntpd/ntp_proto.c (clock_select): If about to discard an
- ephemeral association, do it only if not the system peer.
- From Dave Mills.
-
- * html/pic/wingdorothy.gif:
- * html/pic/bustardfly.gif:
- * html/pic/boom3a.gif:
- * html/pic/tonea.gif:
- * html/pic/stack1a.jpg:
- * html/pic/pogoa.gif:
- * html/pic/pogo8.gif:
- * html/pic/pogo6.gif:
- * html/pic/pogo5.gif:
- * html/pic/pogo4.gif:
- * html/pic/pogo3.gif:
- * html/pic/pogo1.gif:
- * html/pic/oz2.gif:
- * html/pic/flatheads.gif:
- * html/pic/boom4.gif:
- * html/pic/boom3.gif:
- * html/pic/appletree.gif:
- * html/pic/alice51.gif:
- * html/pic/alice44.gif:
- * html/pic/alice35.gif:
- * html/pic/alice31.gif:
- * html/pic/alice15b.gif:
- * html/pic/alice13.gif:
- * html/pic/alice11.gif:
- * html/release.htm:
- * html/rdebug.htm:
- * html/prefer.htm:
- * html/porting.htm:
- * html/ntptrace.htm:
- * html/ntpq.htm:
- * html/ntpdate.htm:
- * html/monopt.htm:
- * html/kernpps.htm:
- * html/index.htm:
- * html/hints.htm:
- * html/gadget.htm:
- * html/driver7.htm:
- * html/copyright.htm:
- * html/config.htm:
- * html/build.htm:
- * html/authopt.htm:
- * html/assoc.htm:
- * html/accopt.htm:
- Cleanup from Dave Mills.
-
-2000-12-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k13
-
- * ntpd/refclock_wwv.c (wwv_start): Call audio_init with DEVICE_AUDIO.
- * ntpd/refclock_irig.c (irig_start): Call audio_init with DEVICE_AUDIO.
- * ntpd/refclock_chu.c: Documentation cleanup.
- (DEVICE_AUDIO): Added.
- (fd_audio): Added.
- (chu_start): Separate audio from serial device.
- (chu_receive): Rewrite - get data from serial or audio device as
- appropriate.
- (chu_audio_receive): Renamed (from chu_receive) to allow both
- audio and serial capability.
- (chu_serial_receive): Ditto.
- (chu_decode): Do the Right Thing based on audio/serial data.
- * ntpd/ntp_refclock.c (refclock_open): Check for failure using <0
- instead of ==-1.
- * libntp/audio.c: Header cleanup, and remove
- HAVE_STRUCT_AUDIO_INFO_* related fields.
- (audio_init): Func arg is device to attempt to open.
- * include/audio.h (audio_init): Now takes a char * argument.
- From Dave Mills.
-
- * configure.in (ntp_refclock): HAVE_AUDIO added. Remove
- HAVE_STRUCT_AUDIO_INFO_* stuff; Dave rewrote the audio stuff.
-
-2000-12-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k12
-
-2000-12-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/release.htm:
- * html/patches.htm:
- * html/measure.htm:
- * html/confopt.htm:
- * html/clockopt.htm:
- * html/biblio.htm:
- * html/authopt.htm:
- * html/assoc.htm:
- Updates from Dave Mills.
-
- * include/ntp_crypto.h: Make sure crypto_flags is visible.
- From Dave Mills.
-
-2000-12-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (process_packet): pleap/pstratum.
- (peer_xmit): Use CRYPTO_FLAG_AUTO.
- * ntpd/ntp_crypto.c (make_keylist): Use CRYPTO_FLAG_AUTO. Only
- sign host name and timestamps if the clock is synched.
- * include/ntp_crypto.h (CRYPTO_FLAG_AUTO): Added.
- From: Dave Mills
-
-2000-12-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (transmit): Call clock_select in a few new
- places. BURST/IBURST cleanup. Don't turn off FLAG_BURST at the
- EOburst.
- (receive): Set peer->unreach = 0 before we call process_packet().
- (process_packet): ditto, before calling poll_update(). Lose some
- debugging, MODE_BCLIENT/CLIENT cleanup.
- (poll_update): Bump nextupdate on FLAG_REFCLOCK, not _REFCLOCK or
- _IBURST.
- (peer_clear): Don't set IBURST on MDF_BCLNT.
- From: Dave Mills.
-
- * ntpdate/ntpdate.c (alarming): Appease ansi2knr.
-
-2000-12-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_control.c (ctl_putpeer): CP_TTL and CP_TTLMAX
- MDF_ACAST and MDF_MCAST cleanup.
-
- * ntpd/refclock_wwv.c (wwv_start): ttlmax/ttl cleanup.
- * ntpd/refclock_usno.c (usno_timeout): ttlmax/ttl cleanup.
- * ntpd/refclock_parse.c (CLK_REALTYPE): ttlmax/ttl cleanup.
- * ntpd/refclock_chu.c (chu_start): ttlmax/ttl cleanup.
- * ntpd/refclock_acts.c (acts_timeout): ttlmax/ttl cleanup.
- * ntpd/ntp_refclock.c (refclock_newpeer): Don't do the
- any_interface -> loopback_interface trick.
- * ntpd/ntp_proto.c (transmit): Broadcast/manycast cleanup.
- * ntpd/ntp_peer.c: Cleanup.
- * ntpd/ntp_io.c: Cleanup.
- * ntpd/ntp_crypto.c (crypto_recv): AUTOKEY based on BCLNT, not MCAST2.
- * include/ntpd.h: Declare findbcastinter().
- * include/ntp.h: struct peer's ttlmax is now max ttl/refclock
- mode. ttl is now ttl for manycast mode.
- (FLAG_MCAST): Reworked several FLAG_ bits.
- From Dave Mills.
-
-2000-12-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpq/ntpq.c: CP_TTLMAX support.
- * ntpd/ntp_proto.c (transmit): MDF_ACAST ttl fixes.
- * ntpd/ntp_peer.c (resetmanycast): Reset ttl if MDF_ACAST.
- (peer_config): Save max ttl in ttlmax.
- * ntpd/ntp_control.c: ttlmax support.
- * include/ntp_control.h (CP_TTLMAX): Added.
- * include/ntp.h: Added ttlmax to struct peer.
- Dave Mills.
-
-2000-12-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (receive): That any_interface is now an
- rbufp->dstadr.
- Various other doc and code cleanup.
- * ntpd/ntp_peer.c (findmanycastpeer): Fixes
- From Dave Mills
-
-2000-12-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_request.c (do_conf): call peer_config with
- any_interface, not 0.
- * ntpd/ntp_proto.c (transmit): Manycast cleanup
- * ntpd/ntp_peer.c (findmanycastpeer): manycast cleanup
- * ntpd/ntp_io.c (sendpkt): Only check ttl if we have a ttl
- (findinterface): Cleanup
- * ntpd/ntp_control.c: cleanup
- * include/ntpd.h: Added resetmanycast.
- * include/ntp_control.h (CP_TTL): disp -> ttl
- * ntpq/ntpq.c: disp -> ttl
- From Dave Mills
-
-2000-11-26 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k11
-
- * ntpd/ntp_proto.c (transmit):
- * ntpd/ntp_peer.c:
- * ntpd/ntp_io.c:
- * ntpd/ntp_control.c (ctl_putpeer):
- * ntpd/ntp_config.c (getconfig):
- * include/ntpd.h: mcast/ucast interface cleanup.
- From: Dave Mills
-
- * include/ntp_request.h: Put data[] as MAXFILENAME+16. This will
- fix the conf_peer requests again, but re-break compatibility with
- old versions of the daemon. Sigh.
-
- * util/ntp-genkeys.c (cleanlinks): Don't do it if nosymlinks.
-
-2000-11-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_parse.c (rawdcf_init_1): make Linux happier with
- some modem control stuff.
- From: Wolfram Pienkoss <wp@bszh.de> (via Frank Kardel)
-
- * ntpd/refclock_pcf.c (pcf_poll): isdst fix
- From: Andreas Voegele <andreas.voegele@gmx.de>
-
-2000-10-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k10
-
- * ntpd/refclock_wwvb.c (wwvb_start): Cosmetic reorder.
- * ntpd/refclock_atom.c (RANGEGATE): Cleanup. Add ASTAGE.
- Add ppsparams to struct ppsunit.
- (atom_start): Init peer->burst to ASTAGE.
- (atom_shutdown): Multi-handle
- (atom_pps): Multi-handle
- (atom_pps): RANGEGATE cleanup
- (atom_poll): Poll count cleanup. Error check cleanup. Burst cleanup.
- * ntpd/ntp_refclock.c (refclock_transmit): Lose the pre-burst
- check poll_update().
- (refclock_sample): Fix the jitter calc.
- (refclock_receive): Pass the jitter to the clock_filter().
-
- * ntpd/ntp_proto.c (clock_update): If we lose sync, reset the poll
- to NTP_MINDPOLL.
- (poll_update): Poll wiggles. Make sure peer->nextdate is timely.
- (clock_select): If we lose sync, reset the poll to NTP_MINDPOLL.
- * ntpd/ntp_loopfilter.c (local_clock): Show the asocid in debug
- output. popcorn debug message changes. Clamp the poll interval
- if the system peer has changed. PPS wiggle changes.
- From Dave Mills.
-
-2000-10-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_pcf.c (pcf_start):
- * html/driver35.htm:
- The radio clock transmits 69 bits with a period of 2.5
- milliseconds per bit. Thus the driver now sets the default
- calibration offset to 0.1725 (69 * 2.5 = 172.5).
- Its now possible to disable the check of the radio clock's
- synchronisation status bit. Several users requested this option.
- From: Andreas Voegele <andreas.voegele@gmx.de>
-
- * html/refclock.htm:
- * html/rdebug.htm:
- * html/prefer.htm:
- * html/pps.htm:
- * html/ntpdc.htm:
- * html/miscopt.htm:
- * html/ldisc.htm:
- * html/kern.htm:
- * html/index.htm:
- * html/exec.htm:
- * html/driver22.htm:
- * html/clockopt.htm:
- Updates from Dave Mills
-
- * ntpd/ntp_intres.c (request): Sanity check the size of the response
-
-2000-10-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpq/ntpq_ops.c (dopeers): Dave didn't like the patch to show
- the units on the times...
- * ntpdc/ntpdc_ops.c (doset): SYS_FLAG_PPS cleanup
- * ntpd/refclock_wwv.c (wwv_newchan): Update the peer refid if
- we're talking to a stratum 0 source
- * ntpd/refclock_trak.c: Needs PPS
- * ntpd/refclock_oncore.c: Disable for now
- * ntpd/refclock_mx4200.c: Needs PPSAPI, not PPS
- Header cleanup. PPS interface cleanup.
- Process sentences with a switch
- Cleanup and sanity checks
- * ntpd/refclock_datum.c: header cleanup, light body cleanup
- * ntpd/refclock_conf.c: CLOCK_TRAK needs PPS
- MX4200 needs PPSAPI, not PPS
- Disable ONCORE for now
- * ntpd/refclock_bancomm.c: Surgery
- * ntpd/refclock_atom.c: Cleanup
- (atom_control): added
- (atom_ppsapi): added
- * ntpd/ntp_request.c (setclr_flags): SYS_FLAG_PPS cleanup
- * ntpd/ntp_refclock.c: stropts.h back in in TTYCLK and
- HAVE_SYS_CLKDEFS_H
- Get ntp_syscall if KERNEL_PLL
- Define cal_enable
- (refclock_receive): Cleanup
- (refclock_control): sanity check procptr
- * ntpd/ntp_proto.c (init_proto): pps_enable
- (proto_config): Turn on/off PPS discipline
- * ntpd/ntp_loopfilter.c: pps_enable
- (local_clock): record_loop_stats() if !ntp_enable
- (local_clock): Turn off PPS if it's not enabled
- Other cleanup/fixes
- * ntpd/ntp_config.c: pps and calibrate keywords. Initialize
- pps_assert to 0, not 1 (swap assert/clear?)
- * include/ntpd.h: We have pll_status if KERNEL_PLL
- Added pps_enable and cal_enable
- * include/ntp_request.h (SYS_FLAG_PPS): Renamed from
- SYS_FLAG_AUTHENTICATE
- * include/ntp.h (PROTO_PPS): Added
- (PROTO_CAL): Added
- From: Dave Mills
-
-2000-09-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_refclock.h (stropts.h, sys/clkdefs.h): Harmful and
- useless file include's turned off.
- * libntp/iosignal.c (netinet/in.h, sys/sockio.h): Duplicate file
- include's turned off.
- * ntpd/ntp_refclock.c (ntp_tty.h): File included.
- (refclock_open, refclock_ioctl): Use `TTY' from ntp_tty.h.
- * ntpd/refclock_atom.c: Grab a few headers regardless; if we don't
- CLOCK_ATOM we provide a stub pps_sample() routine so the WHARTON
- can be compiled/used.
- * ntpq/ntpq_ops.c (dopeers, doopeers): Print the units for
- each column header.
- Tue Sep 12 16:25:51 2000 Philippe De Muyter <phdm@macqel.be>
-
- * ntpd/refclock_atom.c (atom_start): Lose "temp", because we now
- initially either CAPTUREASSERT or CAPTURECLEAR.
- (atom_pps): pps_info_t is our friend. Update comments to reflect
- reality. DTRT with pps_info. Do some overflow checks.
- From: Dave Mills.
-
-2000-09-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Much improved Solaris patch-level check for the
- FLL bug test.
- From: Marc.Brett@westgeo.com
-
-2000-09-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/Makefile.am (noinst_HEADERS): Added ntp_tty.h
- Reported by Dave Mills
-
-2000-09-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntptrace/ntptrace.c:
- * ntpdate/ntptimeset.c (receive):
- * ntpdate/ntpdate.c (receive):
- STRATUM cleanup
- * ntpd/refclock_atom.c (atom_poll): Autostratum. Lose the leap.
- * ntpd/ntp_proto.c: sys_prefer
- (process_packet): stratum cleanup
- (clock_select): Autostratum the ATOM
- * ntpd/ntp_loopfilter.c: pps_update/pps_stratum wiggle.
- * include/ntpd.h: Lose pps_update, gain sys_prefer
- * include/ntp.h: STRATUM variable cleanup
- From Dave Mills
-
-2000-09-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c (oncore_get_timestamp): Print debug
- messages being aware of HAVE_STRUCT_TIMESPEC.
-
- * ntpd/refclock_atom.c: Have pps_params tag along in the ppsunit
- structure, where it really belongs.
- (atom_pps): Use PPS_CAPTURE{ASSERT,CLEAR}
- From: Dave Mills.
-
-2000-09-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_var_atom_ok): Cleanup ATOM/PPSAPI stuff...
-
- * scripts/ntp-close: Find "close" ntp servers.
- From: Neal McBurnett <neal@bcn.boulder.co.us>
-
- * ntpd/refclock_conf.c:
- * ntpd/refclock_oncore.c: Re-enabled oncore driver for HAVE_PPSAPI
- case only.
-
-2000-09-12 Philippe De Muyter <phdm@macqel.be>
-
- * ntpd/refclock_parse.c (we400a_pollinfo): Useless variable removed.
- [WHARTON slot]: Set NO_POLL, NO_INIT and NO_DATA; fix `fixed format'
- and `offset' fields.
-
- * include/ntp_tty.h: New file
- * libntp/icom.c: Use it.
-
- * ntp_update (UPDATE_OPTIONS): Use -d, too. Fix Pass 1 comment.
-
-2000-09-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c: shmem_fname added. oncore_init_shmem()
- updated.
- (oncore_start): Comment cleanup
- (oncore_read_config): Move call to oncore_shmem_init()
- (oncore_init_shmem): Prototype change
- (oncore_init_shmem): Don't exit on errors
- (oncore_msg_any): timespec/timeval cleanup
- (oncore_msg_Cj_id): shmem_fname changes
- (oncore_msg_BaEaHa): saw_At bugfix
- (oncore_get_timestamp): Added current_mode/current_params. Commented.
- Added time_pps_getcap() calls.
- From: Reg Clemens <reg@dwf.com>
-
- * ntpd/ntp_io.c (input_handler): Better recvfrom() error message
- From: Dean Gibson <timekeeper@tcp-udp.net>
-
- * ntpdc/ntpdc.c (passwd): Get them working again.
- From: Benjamin Greenwald <beng@lcs.mit.edu>
-
-2000-09-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_atom.c:
- (atom_start):
- * ntpd/ntp_refclock.c: Comment cleanup. PPS/PPSAPI cleanup
- (refclock_open): PPS/PPSAPI cleanup
- From: Dave Mills
-
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_mx4200.c:
- HAVE_TIMESPEC -> HAVE_STRUCT_TIMESPEC
-
- * configure.in: ATOM requires struct timespec, not PPSAPI. Clean
- up dependencies accordingly.
-
-2000-09-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_var_atom_ok): Improve ATOM configure message
- PARSE requires ATOM.
-
- * ntpd/ntpd.c (set_process_priority): Clean up debug messages.
-
-2000-09-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: ac_cv_atom_ok, depends on HAVE_PPSAPI.
- I notice the PARSE clocks require ATOM. Could be interesting...
-
-2000-09-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.in (distdir): Seems to be a bug in an automake library
- somewhere...
-
-2000-09-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_loopfilter.c (loop_config): V3 API needs MOD_BITS when
- initializing ntv.modes. Initialize ntv.{maxerror,esterror,status}
- earlier. Clean up KERNEL_PLL code.
-
-2000-09-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpq/ntpq.c: report offset as "offset", not "phase". Lose
- compliance.
- * ntpd/refclock_local.c (local_poll): variance -> jitter
- * ntpd/refclock_chu.c (chu_major): Lose variance.
- * ntpd/ntp_util.c (hourly_stats): sys_error -> sys_jitter
- (record_loop_stats): ditto
- * ntpd/ntp_request.c (peer_info): variance -> jitter
- * ntpd/ntp_refclock.c (refclock_sample): variance -> jitter
- (refclock_receive): variance -> jitter
- * ntpd/ntp_proto.c (process_packet): variance -> jitter
- (clock_filter): variance -> jitter
- (clock_select): variance -> jitter
- (root_distance): variance -> jitter
- * ntpd/ntp_peer.c (newpeer): variance -> jitter
- * ntpd/ntp_loopfilter.c: Cleanup pll_nano selection bogon.
- Centralize the kernel API data.
- (local_clock): Lose sys_error.
- (loop_config): Code cleanup.
- * ntpd/ntp_control.c: Call offset "offset" and not "phase". Lose
- CS_COMPLIANCE. Deal with variance/jitter rename.
- * include/ntp_refclock.h: Rename variance to jitter in struct
- refclockproc.
- * include/ntp_control.h (CS_COMPLIANCE): Lose it.
- * include/ntp.h: Rename variance to jitter in struct peer.
- From: Dave Mills
-
-2000-09-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_atom.c: Use the new ppsunit. Cleanup and improve
- documentation.
- * ntpd/ntp_refclock.c (refclock_sample): Don't accumulate
- variance.
- From Dave Mills
-
-2000-08-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver22.htm: Update the docs.
- * ntpd/refclock_atom.c (atom_start): Open the device if it hasn't
- been opened already.
- (pps_sample): Make it more visible.
- From Dave Mills.
-
- * configure.in: 4.0.99k8
-
- Revert to the older automake.
-
- * configure.in: The PPSAPI headers use "inline", so require a STDC
- compiler.
-
- * ntpd/refclock_atom.c (atom_shutdown): Typo
- From Dave Mills
-
- * configure.in: Convert to autoconf-2.49
-
- * ntpd/refclock_atom.c: Header cleanup Comment cleanup. Lose the
- TTYCLK stuff. Convert to PPSAPI.
- * ntpd/ntp_refclock.c (refclock_newpeer): Move refclock_unpeer().
- From: Dave Mills
-
-2000-08-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure: Fix the autoconf problem...
-
-2000-08-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 99k7
-
- * util/ntptime.c (main): Report TAI stuff
- * ntpq/ntpq.c: CS_COMPLIANCE/CS_JITTER cleanup
- * ntpd/ntp_loopfilter.c (local_clock): sys_error/sys_jitter cleanup.
- kernel PPL cleanup.
- * ntpd/ntp_crypto.c: Check NTP_API if we're doing KERNEL_PLL so we
- can get the TAI stuff.
- * ntpd/ntp_control.c: CS_COMPLIANCE now reports "error" instead of
- "jitter". CS_JITTER now reports jitter.
- * include/ntpd.h: Added sys_jitter
- * include/ntp_control.h (CS_JITTER): Added
- From: Dave Mills
-
- * ntpd/cmd_args.c (getCmdOpts): Crack -N at pre-scan, as we do the
- priority wiggle before the final scan.
- From: Tom Smith <smith@cag.lkg.dec.com>
- We might do better to move the priority wiggle to after the final
- scan. Especially if we want to permit command-line options to
- have decent control over the priority. When we rewrite the config
- file stuff we might go to a multi-scan to solve some of these
- problems.
-
-2000-08-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: '99k6, and manually fix configure.
-
- * include/ntp_request.h (NTP_MAXHOSTNAME): 144 -> 32
-
-2000-08-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (main): Don't call fclose if stream is NULL.
-
-2000-08-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver35.htm:
- * ntpd/refclock_pcf.c: Updates and improvements
- From: Andreas Voegele <andreas.voegele@gmx.de>
-
- * configure.in (ac_cv_struct_ntptimeval): Lose the TAI check - we
- don't need it since we can check NTP_API. Re-hack the generated
- configure script.
-
- * configure: Manual hack to the ntptimeval.time.tv_nsec stuff
- because we're running an old autoconf.
-
-2000-08-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntptime.c: Use: HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC, it's
- the standard name.
-
- * configure.in: Look for struct ntptimeval.tai in sys/timex.h
- Cleanup struct tptimeval member tests.
-
- * util/ntp-genkeys.c: New command-line arguments
-
-2000-08-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (main): More small steps...
-
-2000-08-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_crypto.c (crypto_rsa): Now that we're using
- NTP_KEYSDIR, make sure there is a '/ between the dir and the file.
-
- * util/ntp-genkeys.c (main): More small steps...
-
-2000-08-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (main): Another small step...
-
- * configure.in: 99k5
-
- * include/ntp_request.h: Make data[] member of req_pkt 32 again.
- Bump the version number...
-
- * ntpd/ntp_loopfilter.c (local_clock): Change 0. to 0 in a couple
- of places.
- From Dave Mills
-
-2000-08-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (main): Minimal progress...
-
-2000-08-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/check_y2k.c: Make debug definition match ntpd.h's declaration
-
- * ntpd/Makefile.am (check-local): Use test in favor of [
-
-2000-08-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (NTP_KEYSDIR): Typo
-
-2000-08-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ElectricFence/Makefile.am (check-local): use test instead of [
-
- * configure.in: AC_REPLACE_FUNCS(strdup)
- * libntp/strdup.c (strdup): Added.
- * libntp/Makefile.am (EXTRA_libntp_a_SOURCES): Added strdup.c
-
- * util/Makefile.am (ntp_genkeys_DEPENDENCIES): Use $U on .o files
- (ntp_genkeys_LDADD): ditto.
-
- * ntpd/ntp_crypto.c: Use NTP_KEYSDIR
-
- * util/ntp-genkeys.c (snifflink): Ignore ENOENT, too.
-
- * ntpd/ntp_proto.c (peer_xmit): Crypto cleanup
- * ntpd/ntp_crypto.c: Cleanup
- * ntpd/ntp_control.c: Join the club
- * ntpd/ntp_config.c: Call crypto_config() instead; we got rid of
- crypto_flags.
- * include/ntp_crypto.h (CRYPTO_FLAG_ENAB): New crypto flags, rework
- * include/ntp_control.h (CS_FLAGS): Wiggle in.
- * include/ntp.h: Added crypto peer status to struct peer
- From Dave Mills
-
-2000-08-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c: Initialize path_keysdir to NTP_KEYSDIR.
-
- * configure.in (NTP_KEYSDIR): Added
- * acinclude.m4: Added AC_DEFINE_DIR macro
-
- * util/ntp-genkeys.c (main): Sanity checks on the file paths.
-
-2000-08-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (crypto_config): Only #ifdef PUBKEY
- (PATH_MAX): Try harder...
-
-2000-08-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (main): Use snifflink()
- (snifflink): Implement...
-
- * configure.in: Check for readlink()
-
-2000-07-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (main): Use strdup on the tokens returned
- from ntp_config...
- (crypto_config): Fix a typo...
- (crypto_config): Even more...
- (usage): Flesh it out.
-
- * include/ntp_config.h:
- * ntpd/ntp_config.c: Move a whack of #defines to ntp_config.h so
- ntp-genkeys.c can see them, too.
-
- * util/ntp-genkeys.c: Add stubs to work with ../ntpd/ntp_config.o,
- start hooking things up.
- (main): debugging
- (crypto_config): better implementation
-
-
- * ntpd/ntp_config.c (getconfig):
- * ntpd/ntpd.c: Initialize "debug" here, not in ntp_config.c
-
- * util/Makefile.am (ntp_genkeys_LDADD): Added ../ntpd/ntp_config.o
- * util/Makefile.am (ntp_genkeys_DEPENDENCIES): Added.
-
-2000-07-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99k4
- * util/ntp-genkeys.c: Start hacking for new functionality.
- * include/Makefile.am (noinst_HEADERS): Added ntp_cmdargs.h and
- ntp_config.h .
- * ntpd/ntp_config.c: Grab ntp_cmdargs.h. Make some new globals
- (ugh), move ntpd-specific variables and code to cmd_args.c .
- * ntpd/cmd_args.c: Move command argument processing functions from
- ntp_config.c to this file.
- * ntpd/Makefile.am (ntpd_SOURCES): Added cmd_args.c
- * include/ntpd.h: Move getstartup() to ntp_cmdargs.h
- * include/ntp_cmdargs.h: New file
- Begin the hacking fest to make it easier for ntp-genkeys to use
- ntpd's config processing code. I really hope this is the lesser
- of the evils...
-
-2000-07-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp-genkeys.c (usage): Added.
-
- * ntpd/ntp_crypto.c: Cleanup
- * ntpd/ntp_proto.c (transmit): Add some parens.
- (peer_xmit): Add ntohl when grabbing sndauto.seq for broadcast.
- * ntpd/ntp_peer.c (findpeer): Cleanup
- * ntpd/ntp_loopfilter.c (local_clock): Typo
- From Dave Mills
-
- * include/ntp_config.h: Created
-
- * util/ntp-genkeys.c: Always build, but realize we may not have
- RSAREF. Compile parts appropriately.
-
- * util/Makefile.am (bin_PROGRAMS): Always make ntp-genkeys
- (ntp-genkeys_LDADD): Use $LIBRSAREF instead of the "real path"
- * configure.in: Lose MAKE_NTP_GENKEYS
-
- * configure.in:
- * util/ntp-genkeys.c:
- * util/Makefile.am:
- Renamed ntp_genkeys to ntp-genkeys.
-
-2000-07-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpdate/ntpdate.c (ntpdatemain): Cleanup error message.
-
- * ntpdate/ntpdate.c (ntpdatemain): Add missing authtrust() call
- From: Jason Heiss <jheiss@cruzeiro.ugcs.caltech.edu>
-
- * ntpd/refclock_ulink.c (ulink_receive):
- * ntpd/ntp_crypto.c:
- * libntp/authparity.c:
- Lint/noise cleanup
- From: Marc Brett <mbrett@rgs0.london.waii.com>
-
- * ntpd/ntp_proto.c: Specifically track manycastserver and
- survivors
- From: Dave Mills
-
-2000-07-26 Sven Dietrich <sven_dietrich@trimble.com>
-
- * ntpd/ntpd.c: remove WINNT priority adjustment to the ports/winnt area
- where it does not clutter up the main distribution.
-
-2000-07-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (receive): dstadr_sin needs higher visibility
- From: Dave Mills
-
- * flock-build: Added baldwin
-
- * ntpd/ntp_request.c:
- * ntpd/ntp_proto.c:
- * ntpd/ntp_peer.c:
- * ntpd/ntp_io.c:
- * ntpd/ntp_intres.c:
- * ntpd/ntp_crypto.c (make_keylist):
- * ntpd/ntp_control.c:
- * ntpd/ntp_config.c (CONF_MOD_IBURST, save_resolve):
- * include/ntpd.h (findpeerbyassoc, newpeer, peer_config, *_interface):
- * include/ntp_request.h (CONF_FLAG_IBURST):
- * include/ntp_crypto.h (crypto_xmit, make_keylist):
- * include/ntp.h (FLAG_IBURST):
- * html/release.htm:
- * html/confopt.htm:
- * html/assoc.htm:
- Add iburst option, fix broadcast/multicast and some types.
- From: Dave Mills
-
-2000-07-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/Makefile.am (bin_SCRIPTS): Install ntp-wait
-
- * configure.in: 4.0.99k
-
-2000-07-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (peer_xmit): PUBKEY cleanup
-
-2000-07-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99j5
-
- * html/ntpd.htm (HREF): Document other missing command-line options
-
- * html/ntpd.htm (HREF): Document
- * html/confopt.htm (href): Undocument
- * ntpd/ntp_config.c (getconfig): -N high for high-priority.
- Lose the ntp.conf way of setting priority.
-
- * ntpd/ntp_crypto.c: PUBKEY/AUTOKEY cleanup
- From Dave Mills
-
-2000-07-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/confopt.htm (href): Document it.
- * ntpd/ntp_config.c (getconfig): CONFIG_PRIORITY support
- * ntpd/ntpd.c (set_process_priority): Use it.
-
- * ntpd/ntp_crypto.c: Crypto key stuff
- * ntpd/ntp_proto.c: pubkey -> pubkey.ptr
- * ntpd/ntp_control.c (ctl_putpeer): fstamp -> pubkey.fstamp
- * ntpd/ntp_peer.c:
- * include/ntpd.h:
- * include/ntp_types.h:
- * include/ntp_request.h:
- * include/ntp_crypto.h:
- * include/ntp_control.h:
- * include/ntp.h: Type cleanup
- From: Dave Mills
-
-2000-07-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ElectricFence/Makefile.am (check-local): Don't run the tests if
- we didn't build the programs...
- (check-local): Same, but watch the return codes...
-
- * ElectricFence/page.c: #include config.h if it's there.
- Properly handle the sys_errlist declaration.
-
- * html/ntpq.htm:
- * html/index.htm:
- * html/debug.htm:
- * html/authopt.htm:
- Reality check.
- From Dave Mills
-
-2000-07-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.am (SUBDIRS): Added ElectricFence
- * configure.in (AC_CONFIG_FILES): Added ElectricFence support
- * ElectricFence: Imporpted.
-
-2000-07-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/ntp_genkeys.c (main): Cleanup
- * ntpd/refclock_wwv.c (wwv_qrz): sqrt -> SQRT
- * ntpd/refclock_chu.c (chu_rf): sqrt -> SQRT
- * ntpd/ntpd.c (set_process_priority): Disable high-priority for now.
- PUBKEY cleanup.
- * ntpd/ntp_timer.c: sys_revoketime cleanup.
- * ntpd/ntp_proto.c (receive): PUBKEY cleanup. Comment and code
- cleanup.
- (process_packet): Comment and code (PUBKEY) cleanup.
- (peer_xmit): Comment and code cleanup.
- (fast_xmit): Comment and code cleanup.
- * ntpd/ntp_peer.c (expire_all): revoketime cleanup. PUBKEY cleanup.
- * ntpd/ntp_crypto.c: Comment reorg. DH parameters are now
- file-static instead of local to subroutines.
- (make_keylist): peer->pcookie.key cleanup/fix
- (crypto_recv): Subroutine documentation cleanup, other cleanup
- (crypto_xmit): Cleanup/document.
- (crypto_setup): Cleanup/document.
- (crypto_agree): Cleanup/document.
- (crypto_rsa): now static
- (crypto_dh): now static. Comment cleanup. Code cleanup.
- (crypto_tai): now static. Code and comment cleanup.
- (crypto_config): Deal with CRYPTO_CONF_LEAP.
- * ntpd/ntp_control.c (CS_DHPARAMS): Rename corresponding token to
- "params". Remove CS_TAI from def_sys_var[].
- (ctl_putsys): CS_HOST, CS_DHPARAMSm CS_REVTIME, and CS_LEAPTIME
- bugfix. CS_TAI cleanup.
- * ntpd/ntp_config.c (CONF_CRYPTO_LEAP): Added
- (getconfig): Added CONF_CRYPTO_LEAP support.
- * include/ntp_syslog.h: Lose GIZMO stuff.
- * include/ntp_crypto.h (CRYPTO_CONF_LEAP): Added
- * include/ntp.h: struct autokey, cookie,value, and pkt changes for
- signature field. Update the inline docs on pkt's exten field.
- From: Dave Mills
-
-
-2000-07-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_util.c (stats_config): If we read a bogus old_drift,
- use 0 instead of failing.
-
-2000-07-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * README.cvs: Cleanup.
-
- * ntpd/refclock_datum.c (datum_pts_poll): index -> unit_index
- * ntpd/ntp_resolver.c (findhostaddr): const cleanup
- * libntp/recvbuff.c:
- * libntp/msyslog.c:
- * libntp/emalloc.c:
- * libntp/authreadkeys.c:
- Fix header order.
- From: Simon Burge <simonb@netbsd.org>
-
- * ntpd/ntp_util.c (stats_config): Use HAVE_FINITE and HAVE_ISFINITE
- * configure.in (ac_cv_struct_ntptimeval_timespec): isfinite()
- checks for HP-UX11.
- From: Albert Chin-A-Young <china@thewrittenword.com>
-
-2000-07-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * flock-build (LIST): Lose malarky, update some machine/OS descriptions
-
- * configure.in: 4.0.99j4
-
- * ntpq/ntpq.c: Lose PUBKEY stuff - older ntpq's will complain when
- they see the info in a packet.
- * ntpd/ntp_proto.c (peer_xmit): TAI changes.
- * ntpd/ntp_crypto.c: Fix host/network byteorder stuff. Follow
- global->struct changes. TAI changes. Bugfixes.
- * ntpd/ntp_control.c: Follow field reorder/rename.
- * include/ntp_crypto.h: Move crypto stuff from separate globals
- into structs.
- * include/ntp_control.h (CS_HOST): Reorder/rename some fields
- From: Dave Mills
-
-2000-06-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_peer.c (unpeer): Moved keystr cleanup inside ifdef PUBKEY
-
- * configure.in: 4.0.99j3
-
- * html/release.htm:
- * html/ntpq.htm:
- * html/authopt.htm:
- Updates from Dave Mills
-
- * ntpd/ntp_request.c (dns_a): Don't call crypto_public for now...
- * ntpd/ntp_proto.c (receive): Follow the TEST wiggles
- (peer_xmit): TAI support
- * ntpd/ntp_crypto.c: TAI support
- * ntpd/ntp_control.c: CS_VERSION and CS_TAI support
- * include/ntp_crypto.h (CRYPTO_FLAG_TAI): Added.
- * include/ntp_control.h (CS_VERSION): Added.
- * include/ntp.h (TEST4,TEST5,TEST8,TEST9): Wiggle.
- From: Dave Mills
-
- * ntpd/Makefile.am (ntpd_SOURCES): Lose refclock_ulink331.c
- because the new refclock_ulink.c handles it.
-
-2000-06-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c (getconfig): Sanity check the right variable
- From: Dave Mills.
-
-2000-06-25 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99j2
-
- * ntpd/ntp_proto.c:
- * ntpd/ntp_peer.c:
- * ntpd/ntp_crypto.c:
- * include/ntp_crypto.h:
- * include/ntp.h:
- AUTOKEY/PUBKEY/DH/crypto changes
- From: Dave Mills
-
-2000-06-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver34.htm:
- * ntpd/refclock_ulink.c:
- * ntpd/refclock_ulink331.c: (removed)
- Updated for 320/330 series refclocks
- From: joseph lang <tcnojl1@earthlink.net>
-
- * ntpd/refclock_oncore.c: Patches/improvements
- * html/driver30.htm: New release
- From: Reg Clemens <reg@orion.dwf.com>
-
-2000-06-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99j1
-
- * ntpdc/ntpdc.c (getcmds):
- * configure.in:
- Readline support.
- From: Aaron Sherman <ajs@narn.ajs.com>
-
- * ntpd/refclock_ulink331.c: Added.
- Sent in by Doug Grosso <dgrosso@mint.net>
- * ntpd/Makefile.am (ntpd_SOURCES): Added refclock_ulink331.c
-
- * libntp/snprintf.c: Added stdio.h
- From: Marc Brett <mbrett@rgs0.london.waii.com>
-
- * include/ntp.h: struct autokey's siglen is u_int32. So is the
- siglen in struct cookie. So is siglen and value length in struct
- value. Add fstamp to struct peer. Resize the exten AUTOKEY field
- in struct pkt.
- * include/ntp_crypto.h: crypto_enable -> crypto_flags and a
- variety of other cleanups.
- * ntpd/ntp_config.c: crypto_enable -> crypto_flags, and some
- key/fudge cleanup.
- * ntpd/ntp_control.c: Much cleanup.
- * ntpd/ntp_crypto.c: Many changes that Harlan is too tired to
- properly document.
- * ntpd/ntp_peer.c: crypto_enable -> crypto_flags
- (peer_config): Hold off on crypto_public() until some resolver
- issue is fixed.
- * ntpd/ntp_proto.c (receive): Disable the reverse DNS lookup for now.
- (process_packet): Don't record_raw_stats() for now.
- crypto_enable was renamed to crypto_flags.
- (peer_xmit): In MODE_ACTIVE or MODE_PASSIVE, only call
- crypto_xmit() if the peer->cmmd is not CRYPTO_AUTO. Reset
- peer->cmmd to 0 when we're thru.
- Don't reset peer->cmmd to 0 until the end of MODE_CLIENT.
- * ntpd/ntpd.c: Lose the call to crypto_init(). Instead, call
- crypto_setup() later on if we have crypto_flags.
- * util/ntp_genkeys.c: Lose GENLEN; use PRIMELEN/2 .
- From Dave Mills.
-
- * ntpd/ntp_crypto.c (crypto_rsa):
- (crypto_dh):
- Do some debug logging if readlink() fails with something other
- than EINVAL (file isn't a symlink).
-
-2000-06-04 James R. Van Zandt <jrv@vanzandt.mv.com>
-
- * html/miscopt.htm (trap): punctuation
-
- * html/ntpd.htm (-g): typo
-
- * html/miscopt.htm (logconfig): List the "clock" event class.
- "allprefix" should be two words.
-
-2000-05-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_timer.c: Protect <unistd.h>
-
-2000-05-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/Makefile.am: Document what we expect from -lm
-
-2000-05-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99j
-
-2000-05-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/ntptime.htm: More fixes
- From: Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
-
-2000-05-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * build (KEYSUF):
- * flock-build:
- * configure.in: Lose the "md5" options from the --with-crypto
- check; Dave hates it.
-
- * ntpd/ntp_util.c (stats_config):
- * ntpd/ntp_loopfilter.c (loop_config):
- * libntp/systime.c (adj_systime):
- * include/ntp_proto.h (NTP_MAXFREQ):
- Renamed MAX_FREQ to NTP_MAXFREQ
-
- * ntpd/ntpd.c (ntpdmain):
- * ntpd/ntp_proto.c (receive):
- (poll_update):
- * ntpd/ntp_intres.c (addentry):
- * ntpd/ntp_config.c (getconfig):
- Lint cleanup
- From: Marc Brett <mbrett@rgs0.london.waii.com>
-
- * include/ntp_stdlib.h:
- * libntp/systime.c (adj_systime):
- * ntpd/ntp_loopfilter.c (loop_config):
- * ntpd/ntp_util.c (stats_config):
- * ports/winnt/ntpd/nt_clockstuff.c (adj_systime):
- MAXFREQ -> MAX_FREQ
- * include/ntp_proto.h: Define MAX_FREQ
-
-2000-05-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_stdlib.h:
- * libntp/systime.c (adj_systime):
- * ntpd/ntp_loopfilter.c (loop_config):
- * ntpd/ntp_util.c (stats_config):
- * ports/winnt/ntpd/nt_clockstuff.c (adj_systime):
- sys_maxfreq -> MAXFREQ
- Per Dave Mills.
-
-2000-05-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * acinclude.m4: Typo...
-
-2000-05-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/gpstolfp.c (GPSORIGIN): Try new ULONG_CONST macro
-
- * ntpdate/ntptimeset.c:
- * ntpdate/ntpdate.h:
- * ntpd/refclock_oncore.c (oncore_msg_En):
- * ntpd/ntp_util.c (stats_config):
- * ntpd/ntp_request.c:
- * ntpd/ntp_intres.c (findhostaddr):
- * ntpd/ntp_config.c (getconfig):
- * libntp/systime.c (adj_systime):
- * libntp/lib_strbuf.c:
- * libntp/authparity.c:
- * libntp/audio.c:
- Header/lint cleanup
- From/reported by: Simon Burge <simonb@netbsd.org>
-
- * ntpd/ntp_resolver.c (findhostaddr): Compiler noise cleanup
-
- * ntpd/ntp_intres.c: Compiler noise cleanup
-
- * html/ntptime.htm: Document reality check
- From: Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
-
-2000-05-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_intres.c (ntp_intres): Quiet some debug messages
- Reported by: Brian Bergstrand <brianb@mac.com>
-
-2000-05-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/mkver.in (ConfStr): Use -r if we're using RSAREF,
- otherwise use -a if we're using autokey, otherwise use no extra
- suffix.
-
-2000-05-11 Sven Dietrich <sven_dietrich@trimble.com>
-
- * ports/winnt/include/config.h: New defines to support AUTOKEY
- * ports/winnt/include/unistd.h: Added another dummy placeholder.h
- * ports/winnt/ntpd/ntpd.dsp: Added ntp_crypt.c to makefile
- * ports/winnt/ntpd/ntpd.c: service_main needs a local hostname[]
- * html/hints/winnt.htm: Add remark about 4.0.99i not compiling.
- These changes got WINNT running again. No idea if the keys stuff
- works however.
-
-2000-05-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i9
-
- * ntpd/ntp_crypto.c: tstamp and autokey cleanup
- From: Dave Mills
-
- * ntpd/ntp_proto.c (clock_update): Only call expire_all() if
- AUTOKEY
- From many folks, including Reg Clemens <reg@dwf.com>
-
-2000-05-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i8
-
- * flock-build: Use new --with-crypto choices
- * build (KEYSUF): Deal with new --with-crypto
- * configure.in: --with-crypto={md5,autokey,rsaref};
- lose --enable-autokey
-
-2000-05-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * build (KEYSUF): Catch --disable-autokey first.
-
-2000-05-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * flock-build: If we don't use autokey, don't use rsaref either.
-
- * configure.in: 4.0.99i7
-
- * build (KEYSUF):
- * flock-build:
- It's --disable-autokey now
-
- * configure.in: MD5 is not optional (but AUTOKEY is)
- * include/ntp_stdlib.h:
- * libntp/a_md5encrypt.c:
- * libntp/authkeys.c:
- (authhavekey):
- (MD5auth_setkey):
- (auth_delkeys):
- (authencrypt):
- (authdecrypt):
- * libntp/authreadkeys.c:
- (authreadkeys):
- * ntpd/ntp_proto.c (init_proto):
- * libntp/authusekey.c:
- MD5 is required.
-
-2000-05-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i6
-
- * ntpd/ntp_proto.c (transmit): Fix up the UNREACH code.
- (receive): Lose some debug code.
- (clock_update): expire_all() if LEAP_NOTINSYNC
- crypto_xmit() a CRYPTO_AUTO if !FLAG_AUTOKEY instead of recauto.tstamp
- crypto_xmit() a CRYPTO_PRIV (not CRYPTO_AUTO) based on pcookie.tstamp
- crypto_xmit() a CRYPTO_AUTO (not CRYPTO_PRIV) based on FLAG_MCAST2
- and !FLAG_AUTOKEY
- * ntpd/ntp_crypto.c (crypto_recv): Clean up debug output.
- Don't AUTOKEY if FLAG_MCAST2
- From: Dave Mills
-
- * flock-build: Also make obe withouyt md5 (no AUTOKEY)
- * build (BDIR): Handle -noautokey build directory suffix
- * configure.in: Prepare for AUTOKEY in mkver.in
- * scripts/mkver.in (ConfStr): Indicate in the version string if
- we're not using AUTOKEY.
-
-2000-05-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/ntp-wait.in: Fun things with backspaces
-
- * configure.in: 4.0.99i5
-
- * ntptrace/ntptrace.c: Protect sys/ioctl.h; grab config.h
-
- * ntpd/ntp_proto.c (transmit): AUTOKEY and tstamp fixes.
- (clock_update): Check oleap against LEAP_NOTINSYNC
- (peer_clear): Free pubkey when we're done
- Check peer's keynumber against the seq in MODE_BROADCAST.
- Reorder tstamp changes.
- * ntpd/ntp_crypto.c (crypto_recv): Check the packet if we get a
- CRYPTO_RESP and reorder the update of tstamp.
- (crypto_recv): Don't expire the peer until we're thru with it.
- * include/ntp.h: AUTOKEY and pkeyid changes
- From Dave Mills
-
- * ntpdate/ntpdate.c: Protect sys/ioctl.h
-
-2000-05-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i4
-
- * include/ntp.h:
- * include/ntp_crypto.h:
- * include/ntpd.h:
- * ntpd/ntp_crypto.c:
- * ntpd/ntp_proto.c:
- * ntpd/ntpd.c:
- * util/ntp_genkeys.c:
- Dave Mills closed some potential vulnerabilities in the key protocol.
-
-2000-04-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i3
-
- * ntpd/ntp_proto.c: Just check tstamp, forget about sndauto.seq
- * ntpd/ntp_crypto.c (crypto_recv): Lose inappropriate ntohl()
- conversion on tstamp.
- AUTOKEY if tstamp>0, not !=
- Stash tstamp before we check pcookie.key (several places)
- * ntpd/ntp_control.c (ctl_putpeer): In CP_INITSEQ, check
- recauto.key, not keylist.
- From: Dave Mills
-
-2000-04-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i2
-
- * ntpq/ntpq.c: PUBKEY stuff
- * ntpd/ntp_proto.c (clock_select): nreach, and better survivor pick.
- * ntpd/ntp_peer.c (newpeer): Better nextdate choice.
- * ntpd/ntp_control.c (ctl_putsys): Buglet in CS_HOSTNAM code.
- From Dave Mills.
-
-2000-04-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * build (IAM): Show hostname if we trip a buildkey check.
-
-2000-04-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * build: deal with optional 1st argument (SIG), which must match
- the contents of .buildkey
-
- * flock-build: Generalize, implement SIG and .buildkey, and drive
- list from LIST, which the user can override.
-
-2000-04-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i1
- Dave updated some docs, implemented the kpoll variable, and
- wiggled a host/network byte order thing in the crypto key code.
-
-2000-04-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwvb.c (wwvb_receive): Grab any character (instead
- of just a space) before the DSTchar.
- From: Dave Mills
-
-2000-04-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99i
-
- Dave made some documentation updates.
-
-2000-04-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * flock-build: Add malarky. By default, --enable-parse-clocks.
- Start 2 builds, one with and the other without rsaref.
-
- * configure.in: 4.0.99h6
- Dave improved the crypto stuff some more.
-
-2000-04-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_acts.c (acts_receive): Do a better job with year
- conversions and leap-year checks. The PTB stuff caught this.
- Reported by: Daniel.Aeby@eam.admin.ch
-
-2000-04-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_atom.c (atom_pps): Bugfix
- From: Philippe Charnier <charnier@xp11.frmug.org>
-
-2000-03-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libparse/clk_wharton.c (cvt_wharton_400a): Do not return
- CVT_NONE when receiving the early warning bit set.
- From: Philippe De Muyter <phdm@macqel.be>
-
- * configure.in: 4.0.99h5
- Dave made more changes to the auth key stuff.
-
-2000-03-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99h4
- Dave made a bunch of changes/fixes to the auth key stuff.
-
-2000-03-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_resolver.c: Typos.
-
-2000-03-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99h3
-
- * ntpd/ntp_intres.c: Use LOG_INFO instead of LOG_DEBUG.
- * ntpd/ntp_resolver.c: Ditto.
-
-2000-03-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/Makefile.am (ntp_genkeys_LDADD): Might need snprintf (-lntp)
-
- * librsaref/Makefile.am (stamp-rsaref): nodist_HEADERS are not
- supoprted yet. Hack around it.
-
- * ntpd/ntp_resolver.c (findhostaddr): hstrerror isn't always available.
-
- * configure.in: Look for hstrerror.
-
- * util/ntp_genkeys.c (main): Use snprintf, not sprintf.
-
- * ntpd/ntp_crypto.c: Use gethostname, not uname
- * util/ntp_genkeys.c: Ditto
- From: Dave Mills
-
-2000-03-19 Harlan Stenn <harlan@pfcs.com>
-
- * ntpd/ntp_proto.c (receive): Rename ntp_res_send() to
- ntp_res_name() and adjust the number of arguments.
- * ntpd/ntp_resolver.c (ntp_res_name): Ditto
- * include/ntpd.h: Ditto
-
- * ntpd/ntp_resolver.c: Add de_done to the dns_entry structure.
-
-2000-03-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99h2
-
- * libparse/Makefile.am (info_trimble.c): Use $(srcdir)/foo.sed
- instead of foo.sed .
-
- * librsaref/Makefile.am (stamp-rsaref): Copy each file to the build
- directory, not to the source directory. This sucks; it wastes
- space (but it's more portable).
-
- * configure.in (ac_busted_vpath_in_make): Add FreeBSD. I bet all
- systems that use pmake will need this.
- (ac_busted_vpath_in_make): Remove FreeBSD - I found a workaround.
-
- * Makefile.am: General cleanup
-
- * configure.in: 4.0.99h1
-
- * ntpd/ntp_resolver.c: Lose unneeded header.
-
-2000-03-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/snprintf.c: #include <config.h>
-
- * libntp/Makefile.am (EXTRA_libntp_a_SOURCES): Use it correctly...
-
-2000-03-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/Makefile.am (EXTRA_DIST): Added snprintf.c
-
- * configure.in: Look for (and provide if it's missing) snprintf()
-
- * ntpd/ntp_request.c (dns_a): Call crypto_public with the resolved
- name and the peer pointer.
- (dns_a): crypto_public() is only available if PUBKEY is #defined.
-
- * ntpd/ntp_crypto.c (crypto_public): sprintf is Evil. Use snprintf.
- (crypto_setup): Ditto
- (crypto_read): Ditto
-
- * ntpd/ntp_resolver.c (ntp_res_send): Lose some debugging noise.
-
- * ntpd/ntp_config.c (getconfig): Lose testing code.
-
- * ntpd/ntp_request.c (dns_a): Fix buglet in hostname length check.
-
-2000-03-16 Harlan Stenn <harlan@pfcs.com>
-
- * ntpd/ntp_request.c (dns_a): Start cracking the returned information.
-
-2000-03-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_resolver.c (ntp_res): Authenticate the keyid.
-
- * ntpd/ntp_crypto.c (crypto_line): Fix definition
- (crypto_read): Ditto.
-
- * ntpd/ntp_config.c (getconfig): Move req_keyid generation here.
-
- * librsaref/Makefile.am (BUILT_SOURCES): Cleanup more nodist_ stuff.
-
-2000-03-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * build (RSASUF): If we have rsaref2/ and are building
- --without-rsaref, note it as a build-directory suffix.
-
- * configure.in: 4.0.99h
- Crypto merge
-
- * librsaref/Makefile.am (nodist_librsaref_a_SOURCES): Added nodist_
-
-2000-02-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Lose the changequote calls and fix the quoting.
- Reported by: Akim Demaille <akim@epita.fr>
-
- * ntpd/ntp_request.c: Log various error conditions.
-
-2000-02-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99g
-
- * ntpd/ntpd.c: Only log EINTR if debug > 2.
-
-2000-02-25 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/mkver.in (ConfStr): Use `-r' when configured with crypto.
-
- * ntpd/refclock_wwvb.c (wwvb_receive): Undo the previous chagne.
-
-2000-02-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwvb.c (wwvb_receive): LENWWVB0 can return 6 or 7
- fields.
- From: Michael Sinatra <msinatra@uclink4.berkeley.edu>
- with a cleanup from Ulrich.
-
- * scripts/mkver.in (ConfStr): Make RSAREF appear as part of the
- version.
-
-2000-02-21 Sven Dietrich <sven_dietrich@trimble.com>
-
- * ports/winnt/include/config.h: Enable MD5 and RANDOM by default
- * ports/winnt/libntp/SetSystemTime.c: Fix warning and const declaration
- From: Carl Byington <carl@five-ten-sg.com>
-
-2000-02-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.am (SUBDIRS): Make librsaref right after includes so we
- can copy any needed header files over.
-
- * libntp/Makefile.am (INCLUDES): Also look in librsaref for des.h
- * ntpd/Makefile.am (INCLUDES): Ditto
- * util/Makefile.am (INCLUDES): Ditto
-
- * librsaref/Makefile.am (librsaref_a_SOURCES): Use the des.h from
- the rsaref2 distribution.
-
- * include/Makefile.am (noinst_HEADERS): No, we don't want des.h
-
-2000-02-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/Makefile.am (noinst_HEADERS): Add des.h
-
-2000-02-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c (do_resolve_internal): Try Real Hard to
- generate a full random key.
- From: Carl Byington <carl@five-ten-sg.com>
-
- * include/ntp.h: Now we know we have either mrand48() or random().
- * configure.in: If we have mrand48, use it. Otherwise, use (and
- provide if necessary) random().
- * libntp/Makefile.am (EXTRA_DIST): random.c
- * libntp/random.c: Added.
-
-2000-02-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * librsaref/Makefile.am (stamp-rsaref): Typo
-
- * configure.in (ac_cv_func_ctty_for_f_setown): Yes for OpenBSD
- (ac_cv_var_ntp_syscalls): Fix quoting of description
- From: Jonathan Rozes <jrozes@vinton.com>
-
- * librsaref/Makefile.am: Fix stamp-rsaref dependency order.
-
- * configure.in: 4.0.99f
-
-2000-02-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_mx4200.c: Remove the DOP-weighted position
- averaging code and revert to a simple mean average. The weighted
- average consistently produced a *worse* result. Go figure.
- * html/mx4200data.htm: Cleanup, reflect current reality.
- * html/driver9.htm: Cleanup, reflect current reality.
- * html/copyright.htm: Cleanup, and credit where credit is due.
- From: Marc.Brett@westgeo.com
-
- * ntpd/refclock_oncore.c: Cleanup/fixes
- * html/driver30.htm: Cleanup
- * html/Oncore-SHMEM.htm: Cleanup
- From: Reg Clemens <reg@dwf.com>
-
-2000-02-16 Sven Dietrich <sven_dietrich@trimble.com>
-
- * winnt/scripts/mkver.bat: Frederick Czajka [w2k@austin.rr.com]
- winnt/ntpq/ntpq.dsp: modified mkver.bat to eliminate the
- winnt/ntpd/ntpd.dsp: need to have Perl installed and the
- winnt/ntpdc/ntpdc.dsp: PERL environment variable to be set.
- winnt/ntpdate/ntpdate.dsp:
- winnt/ntptrace/ntptrace.dsp: Thanks, Frederick!
-
- * ntpd/refclock_nmea.c: Correctly interpret the quality indicator.
-
-2000-02-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_nmea.c: Correctly interpret the quality indicator.
- Deal with the time supplied in centiseconds. GPGCA/GPGGA cleanup.
- From: Andrew Hood <ajhood@fl.net.au>
-
- * libparse/Makefile.am (K_CFLAGS): Use instead. Add NEED_NTP_BOPS.
-
-2000-02-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/ntp-wait.in: Intensify, including some suggestions from
- Ulrich.
-
- * configure.in: 4.0.99e
-
- * scripts/ntp-wait.in: Lose cruft, sleep after each try.
-
- * scripts/ntp-restart: It's ntpd now. Also, call ntp-wait.
-
- * configure.in (AC_CONFIG_*): New scripts that use PATH_PERL
-
- * scripts/Makefile.am (noinst_SCRIPTS): Added ntp-wait
- (noinst_SCRIPTS): Added all of the scripts that now use PATH_PERL
-
- * configure.in: Get the path to perl
- (AC_CONFIG_*): Added scripts/ntp-wait
-
- * ntptrace/ntptrace.c (DoTrace): If the server's srcadr is 0.0.0.0
- then we haven't synced yet. Note and punt.
- Reported by: Bdale Garbee <bdale@gag.com>,http://bugs.debian.org/56551
-
-2000-02-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ports/winnt/include/config.h: Typo (CLOCK_PALISADE comment)
- From: Carl Byington <carl@five-ten-sg.com>
-
- * configure.in: Disable kernel_fll_bug for Generic_105181-17 under
- Solaris-2.6
- From: Juergen Georgi <georgi@belwue.de>
-
-2000-02-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99d
-
- * html/Oncore-SHMEM.htm: New document
- * html/driver30.htm: Cleanup and improvements
- From: Reg Clemens <reg@dwf.com>
-
-2000-01-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c: Patches/improvements
- From: Reg Clemens <reg@dwf.com>
-
-2000-01-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99c
-
-2000-01-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Autoconf update...
-
- * ntpdate/ntpdate.c (ntpdatemain): Typo
- From: Jack Bryans <jbryans@csulb.edu>
-
- * Makefile.am (EXTRA_DIST): Add flock-build. Probably UDel specific...
-
-2000-01-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/check_y2k.c (main): Reformat for ansi2knr
-
- * configure.in (AC_OUTPUT): Revert to obsolete form until automake
- catches up.
-
-2000-01-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Use AC_CHECK_TYPES((s_char)) instead of
- AC_CHECK_TYPE.
- (ac_cv_var_kernel_fll_bug): Generic_106541-08 is apparently OK, too.
-
- * scripts/Makefile.am (EXTRA_DIST): Need to explicitly distribute
- mkver.in and ntpver.in now, apparently.
- * configure.in: Search for the various audio_info members so the
- printing in audio_show is less of a circus. This required an
- autoconf upgrade. Major sigh.
-
- * libntp/audio.c (audio_show): Clean up (more) properly.
-
-2000-01-21 Sven Dietrich <sven_dietrich@trimble.com>
-
- * Add pointer to html/hints/winnt.htm to INSTALL file
- * Fix NT makefiles to accomodate at least one weird
- version of Visual C that can't handle the LFs without
- the DOS CR also.
-
-2000-01-20 Sven Dietrich <sven_dietrich@trimble.com>
-
- * Update Copyright in Palisade driver to 2000
- * Fix Palisade MIN & MAX POLL to optimal values
-
-2000-01-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver7.htm: Patches from Dave Mills
- * html/driver36.htm: Patches from Dave Mills
-
- * html/copyright.htm: Added Kamal Mostafa
-
-2000-01-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99b
-
-2000-01-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_chu.c: NCHAN is used with generic ICOM.
-
- * ntpd/refclock_wwv.c: Use new audio stuff
- * ntpd/refclock_irig.c: Use new audio stuff
- * ntpd/refclock_chu.c: Use new audio stuff
- * ntpd/ntp_proto.c: Clean up
- * ntpd/ntp_loopfilter.c (local_clock): Clean up error message
- * include/icom.h: Number of arguments changed
- * libntp/Makefile.am (libntp_a_SOURCES): Added audio.c
- * libntp/audio.c: New file
- * include/Makefile.am (noinst_HEADERS): audio.h added
- * include/audio.h: New file
- From: Dave Mills <mills@udel.edu>
-
- * scripts/freq_adj: Added. FreeBSD frequency adjustment script.
-
- * configure.in: Do a better job on my oncore_ok check for SCO.
-
-2000-01-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99a
-
- * scripts/ntpsweep: New version
- * html/copyright.htm: Added Hans Lambermont
- From: Hans Lambermont <Hans.Lambermont@nl.origin-it.com>
-
-2000-01-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c (oncore_start): Only dance with the
- pps_device if it's there.
- From: reg@dwf.com
-
- * configure.in: ONCORE is OK if ac_cv_hdr_def_tiocdcdtimestamp=yes
-
- * build: Just overwrite the log file each time; sometimes NFS goes
- a little goofy.
-
- * ntpd/refclock_fg.c: Syntax/punctuation cleanup
-
-2000-01-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/ntpsweep: New version
- From: Hans Lambermont <Hans.Lambermont@nl.origin-it.com>
-
- * ntpd/refclock_fg.c: New version
- * html/driver37.htm: New version
- From: Dmitry Smirnov <das@online.nsk.su>
-
-2000-01-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * README.des: Cleanup
-
-2000-01-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.99
-
- * html/driver36.htm: Cleanup
- * html/monopt.htm: Ditto
- From: Dave Mills <mills@udel.edu>
-
- * ntpd/ntp_intres.c (ntp_intres): Put "NTP_INTRES running" at a
- higher debug level
-
-2000-01-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwv.c: More improvements
- From: Dave Mills <mills@udel.edu>
-
-2000-01-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwv.c: Bugfixes/improvements
- From: Dave Mills <mills@udel.edu>
-
- * configure.in: Get the quoting right on the sys_errlist check.
- From documentation by: Akim Demaille <akim@epita.fr>
-
-2000-01-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: <netinet/ip.h> cannot be detected...
- * ntpd/ntp_io.h: ...but every OS has it
- * ntpd/refclock_oncore.c: Lint removal
- * ntpq/ntpq_ops.c: Lint removal
- * ntpq/refclock_chu.c: chu_major() is not an audio routine (?), lint
- * libntp/icom.c: AIX doesn't have <sys/termios.h>
- From: Marc.Brett@westgeo.com
-
- * ntpd/refclock_chu.c: NetBSD needs sys/ioctl.h
- (chu_debug): NetBSD-specific debug output.
- From: Frederick Bruckman <fb@enteract.com>
-
-2000-01-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98m
- I skipped `l' - it looks like a `1'.
-
- * html/driver7.htm: Doc update
- * html/driver36.htm: Ditto
- * html/audio.htm: Ditto
-
- * ntpd/refclock_wwv.c: Dvae snuck another fix/change in on me.
-
- * configure.in: 4.0.98k
-
- * ntpd/refclock_chu.c (chu_start): Call icom_init with the speed
- * ntpd/refclock_wwv.c (wwv_start): Ditto, plus other improvements.
- * libntp/icom.c (icom_init): Add speed parameter
- * include/icom.h: Update declaration
- From: Dave Mills <mills@udel.edu>
-
- * include/Makefile.am (noinst_HEADERS): Added icom.h
- From: Frederick Bruckman <fb@enteract.com>
-
-2000-01-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98j
-
- * ntpd/refclock_wwv.c (timecode): Make definition == declaration
- (wwv_newchan): Ditto
- (wwv_corr4): Dave fixed the declaration.
-
- * flock-build: Add rackety to the flock - it runs SunOS 4.1.3/cc
-
- * ntpd/refclock_wwv.c: Undo that declaration cleanup for now...
-
- * ntpd/ntp_io.c (open_socket): TOS support
- From: Marc.Brett@westgeo.com
-
-2000-01-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwv.c: Declaration cleanup
- * ntpd/refclock_fg.c (fg_receive): Not all sprintf's are created
- equal...
- From: Marc.Brett@westgeo.com
-
- * ntpd/refclock_wwv.c: Dave Cleaned and Improved things.
- * ntpd/ntp_loopfilter.c (local_clock): Dave fixed something.
-
- * ntpd/refclock_wwv.c: Rename max to p_max or s_max as appropriate
- to avoid native SunOS compiler collision.
- (wwv_epoch): Make declaration == definition
- (wwv_rsec): Ditto
- (wwv_newchan): Ditto
- (wwv_qsy): Ditto
- (timecode): Ditto
-
- * ntpd/refclock_oncore.c (oncore_init_shmem): Use a cast to widen
- mmap's NIL offset.
-
- * ntpd/refclock_chu.c (chu_rf): Make declaration == definition.
- Rename min/max to es_min/es_max to avoid native SunOS compiler
- collision.
- (chu_uart): Make declaration == definition.
-
- * libntp/icom.c (sndpkt): Make declaration and definition equivalent.
- (doublefreq): Ditto.
-
- * ntpd/refclock_oncore.c (MAP_FAILED): Some systems do not #define
- this.
-
- * ntpd/refclock_wwv.c:
- * ntpd/refclock_chu.c:
- * libntp/icom.c:
- * libntp/Makefile.am:
- * include/icom.h:
- * html/driver7.htm:
- * html/driver36.htm:
- Support for ICOM. The WWV/H driver, by the way, is getting truly
- awesome. The CHU autotune function works okay as it is. I'd like
- to find somebody else to test the audio drivers just to make sure
- I haven't done something stupid. There is a new define ICOM
- intended for the driver autotune function; however, I crafted the
- thing in much the same way as the refclock_atom.c thing - it tries
- to open /dev/icom and, if that fails, goes quietly to sleep.
- From: Dave Mills <mills@udel.edu>
-
-2000-01-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c (oncore_read_config): Patches and cleanup
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
- more isascii() stuff from HMS.
-
- * ntpd/refclock_fg.c (fg_receive): Cast.
- From: Tom Smith <smith@cag.lkg.dec.com>
-
- * ntpd/map_vme.c (map_vme): tx.access_result indicates failure on
- < 0, not <= 0. A fix that apparently did not get brought over
- from the ntp3 base.
- From: Michael Barone <michael.barone@lmco.com>
-
- * configure.in: Move the ONCORE_SHMEM_STATUS check and definition
- here.
-
- * ntpd/refclock_oncore.c (oncore_init_shmem): Some systems do not
- have MAP_HASSEMAPHORE.
-
- * ntpd/refclock_oncore.c: Drive ONCORE_SHMEM_STATUS based on
- HAVE_SYS_MMAN_H . If this needs finer checks, do it in
- configure.in .
- (oncore_read_config): Add the isascii() checks; older versions of
- Unix don't guarantee correct behavior of is*() without it.
-
- * ntpd/refclock_oncore.c: Add proof-of-concept support for
- delivering receiver data stream to other processes through
- a memory-mapped file.
- From: Poul-Henning Kamp <phk@FreeBSD.org>
-
-2000-01-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_refclock_chu): Provide the CHU driver by
- default, and by default prefer the AUDIO version. We used to
- limit this to SunOS or Solaris; now we drive by the availability
- of the audioio header file.
- Select the IRIG and WWV audio drivers the same way.
-
- * flock-build: build ignores the -l flag; lose it.
- (BUILD_ARGS): added.
- * build: Remove unused -l stuff (LOG variable).
-
- * ntpd/ntp_refclock.c: HAVE_PPSAPI header cleanup
- From: Reg Clemens <reg@dwf.com>
-
-2000-01-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (CLOCK_WWV): Require <sys/audioio.h> or <sun/audioio.h>
-
-1999-12-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98i
-
- * ntpd/refclock_gpsvme.c: Fixes
- From: Michael Barone <michael.barone@lmco.com>
- Patch severely hacked by HMS to "make it conform". I hope I
- didn't break anything.
-
- * scripts/ntpsweep: Nifty utility
- From: Hans.Lambermont@nl.origin-it.com
-
- * ntpd/refclock_fg.c:
- * ntpd/refclock_conf.c:
- * ntpd/ntp_control.c:
- * ntpd/Makefile.am:
- * libntp/clocktypes.c:
- * include/ntp.h:
- * html/refclock.htm:
- * html/driver37.htm:
- * configure.in:
- * acconfig.h:
- Forum Graphic GPS clock support
- From: Dmitry Smirnov <das@online.nsk.su>
-
- * configure.in: Default to compile the IRIG, CHU and WWV/H
- drivers and compile the CHU driver for audio, not modem.
- Requested by Dave Mills.
-
- * html/audio.htm:
- * html/driver36.htm:
- * html/qth.htm:
- Dave wrote these to go along with the changes I checked in yesterday.
-
-1999-12-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwv.c:
- * ntpd/refclock_conf.c:
- * ntpd/refclock_chu.c:
- * ntpd/ntp_refclock.c:
- * ntpd/ntp_loopfilter.c:
- * html/refclock.htm:
- * html/pps.htm:
- * html/index.htm:
- * html/driver7.htm:
- * html/driver6.htm:
- * html/copyright.htm:
-
- I indulged an old agenda to polish up some programs originally
- written for a DSP evaluation board. The result is a really hot
- audio driver for the NIST WWV/WWVH time/frequency station plus a
- makeover for the CHU audio driver. Currently, they and their IRIG
- audio driver buddy use the SunOS/Solaris audio interface, which is
- clean and simple. I hook the line in jack to a shortwave radio and
- these drivers (driver 7 for CHU and driver 36 for WWV) and the
- drivers do the rest. The WWV/H driver is really hot - I am
- currently watching the ionosphere move from the doppler that shows
- up on the tick modulation tracked by the program. During midday
- when the F2 layer settles down, the program closes in on a few
- tens of microseconds of spare jitter and wander. This watch on
- whichever 15/20 MHz signal sounds the best. At night on 5/10 MHz
- and even 2.5 HMz where the multipath, interference and noise are
- much worse, the driver bangs around somewhat more.
-
- The CHU driver makeover discovered a few broken bones after all
- these years, but its majority decoder is back in business. For
- various reasons to icky to reveal here, its 103-modem demodulator
- is not quite as good as the chip, but it comes close and hey,
- 2025/2125 FSK is just not a good idea for HF radio. This driver is
- not nearly as sophisitcated as the WWV/H driver, but here a few
- hundred miles south of Ottawa, it does a passably good job.
-
- I tell you this in the hopes of getting somebody interested in
- porting the audio interface to other machines, in particular
- Linux, FreeBSD and anything else with a sound card. When the
- ionosphere stays cool, the WWV/H driver is as good as anything
- else around here and with much less jitter than a serial port. The
- only downside is all the audio drivers chew up a modest fraction
- of cycles for the DSP routines - a few percent on the newer
- silicon, up to half the cycles on an old Sparc IPC. Whattheheck,
- these old machines aren't doing anything else around here except
- serving time, and even when sucking cycles for DSP they still mind
- the PPS microseconds.
-
- The audio driver documentation had a makeover, too.
- From: Dave Mills <mills@udel.edu>
-
-1999-12-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98h
-
-1999-12-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/syssignal.c: Small cleanup to Marc's patch.
-
- * ntpd/ntp_refclock.c:
- * ntpd/refclock_atom.c: Header cleanup
- * html/driver30.htm: Cleanup and improvements.
- From: Reg Clemens <reg@dwf.com>
-
- * ntpd/ntp_refclock.c:
- * ntpd/refclock_jupiter.c:
- * ntpd/refclock_msfees.c:
- * ntpd/refclock_mx4200.c:
- Portability (Solaris) patches
- * ntpd/refclock_mx4200.c:
- Self-survey improvements, cleanup for, PPS re-activation
- * libntp/syssignal.c:
- Fix for "interrupted system call" (EINTR) failure of the PPS
- ioctl(TIOCGPPSEV) call in Solaris. Not sure why it was
- interrupted, but this works around the failure. Not sure if
- the (now silent) interrupt affects the timing accuracy.
- THERE IS A CHANCE THIS PART OF THE PATCH MAY ADVERSELY
- AFFECT OTHER SYSTEMS!
- * scripts/ntp-status: Added.
- From: Marc.Brett@westgeo.com
-
- * ntpdate/ntpdate.c: Deal with multiple addresses.
- From: Jeffrey C Honig <jch@bsdi.com>
-
- * ntpd/refclock_conf.c: Replaced macro SHM with CLOCK_SHM.
- * ntpd/refclock_shm.c (shm_poll): Take clock time in UTC.
- pp->day starts at 1, t->tm_yday starts at 0.
- From: Jakob Stoklund Olesen <stoklund@taxidriver.dk>
-
-1999-12-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * NEWS: Updated ONCORE instructions
- From: Kamal A Mostafa <kamal@whence.com>
-
-1999-12-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98g
-
- * ntpd/refclock_oncore.c: Cleanup and fixes
- From: Reg Clemens <reg@dwf.com> and Kamal A Mostafa <kamal@whence.com>
-
-1999-12-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwv.c: Cleanup/checkin of the current state of affairs.
- From: Dave Mills <mills@udel.edu>
-
- * ntpd/refclock_oncore.c: #elif conversion. I can only hope I did
- it right.
-
- * ntpd/refclock_oncore.c: Various patches
- From: Reg Clemens <reg@dwf.com> and Kamal A Mostafa <kamal@whence.com>
-
-1999-12-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_proto.c (default_get_precision): Use the right arg type
- to pass "sizeof freq" to sysctlbyname().
- From: Ollivier Robert <roberto@eurocontrol.fr>
-
- * ntpd/refclock_wwv.c: Cleanup and fixes.
- From: Dave Mills <mills@udel.edu>
-
-1999-12-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwv.c: Cleanup and fixes
- * ntpd/refclock_conf.c: WWV declaration cleanup.
- From: Dave Mills <mills@udel.edu>
-
-1999-12-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libparse/clk_rawdcf.c (cvt_rawdcf): Buglet.
- From: Frank Kardel <kardel@acm.org>
-
-1999-12-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/Makefile.am (ntpd_SOURCES): Added refclock_wwv.c
-
- * ntpd/refclock_wwvb.c:
- * ntpd/refclock_wwv.c:
- * ntpd/refclock_conf.c:
- * ntpd/refclock_chu.c:
- * libntp/clocktypes.c:
- * include/ntp.h: Dave cleaned some things up
- Dave cleaned some things up (WWVB -> SPECTRACOM, CHU -> CHU_AUDIO,
- WWV_AUDIO)
-
- * acconfig.h: REFCLOCK_WWVB -> REFCLOCK_SPECTRACOM, added REFCLOCK_WWV
- * configure.in: Deal with it.
-
-1999-12-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_refclock.c (refclock_open): More PPS cleanup
- From: Dave Mills <mills@udel.edu>
-
- * ntpq/ntpq.c:
- * ntpq/ntpq_ops.c:
- Make `ntpq -pn' independent of DNS, ad advertised.
- From: Kamal A Mostafa <kamal@whence.com>
-
- * ntpd/refclock_mx4200.c (mx4200_start): make missing 3rd
- parameter a 0.
-
-1999-12-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_refclock.c (refclock_open): "flags" processing cleanup
- (refclock_open): PPS device initialization cleanup
- * include/ntp_refclock.h (LDISC_CHU):
- (LDISC_PPS): Clean up comments
- From: Dave Mills <mills@udel.edu>
-
-1999-12-03 Sven Dietrich <sven_dietrich@trimble.com>
-
- * libntp/mexit.c: Moved WINNT port specific file to ports/winnt/libntp
- * ports/winnt/libntp/libntp.dsp: Fix WinNT makefile for new source loc.
-
-1999-12-03 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/Makefile.am (libntp_a_SOURCES): Lose mexit.c - Sven will
- move it to the winnt port area.
-
-1999-12-03 Sven Dietrich <sven_dietrich@trimble.com>
-
- * libntp/systime.c: Removed adjtime hack for WINNT
- * ports/winnt/ntpd/nt_clockstuff.c: Winnt double precision adjtime
- * ports/winnt/inlcude/clockstuff.h: Remove no longer needed externs
-
-1999-12-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libparse/Makefile.in: Manually hacked to remove the
- libparse_kernel.a.[co] cruft
-
- * libparse/Makefile.am (k*.o): Generate these form the Makefile,
- not from separate .c files
-
- * html/tickadj.htm:
- * html/notes.htm:
- * html/hints/solaris.html:
- Point to the new dosynctodr report.
-
- * html/hints/solaris.xtra.S99ntpd:
- Update. Should be rewritten to take advantage of the new -g
- switch and perhaps a loop to wait until ntpd hits a reasonable
- "state".
-
- * html/hints/solaris-dosynctodr.html: New information
- From: "John W. Sopko Jr." <sopko@cs.unc.edu>
-
-1999-12-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/authkeys.c (auth_moremem): Clear memory allocated for sk.
- From: Hugo Mildenberger <hugo.mildenberger@topmail.de>
-
-1999-12-01 Sven Dietrich <sven_dietrich@trimble.com>
-
- * libntp/recvbuff.c: Unused functions cleanup
- * ntpd/ntpd.c: ProcessorAffinity, IO cleanup
- * ports/winnt/instsrv/instsrv.c: Service name changed to NTP
-
- NT port shouldn;t hop between CPUs. Set affinity to first processor.
- Service name was NetworkTimeProtocol. Too long. Now NTP.
-
-1999-12-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * scripts/plot_summary.pl: Improved option parsing. Fixed one
- minor Perl compatibility error.
- * scripts/summary.pl: Official revision for NTPv4: Parse new
- statistic file formats correctly, provide error checking for bad
- input files, and guard against negative arguments to sqrt()
- because of numeric effects. Use one pattern to select valid
- statistic files. Add selectable output directory
- (``--output-directory'') and improved option parsing. Directory
- with statistic files (now settable also with
- ``--input-directory'') defaults to ``/var/log/ntp''.
- From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-
- * html/driver8.htm:
- * libparse/clk_computime.c:
- * libparse/clk_dcf7000.c:
- * libparse/clk_hopf6021.c:
- * libparse/clk_meinberg.c:
- * libparse/clk_rawdcf.c:
- * libparse/clk_rcc8000.c:
- * libparse/clk_schmid.c:
- * libparse/clk_trimtaip.c:
- * libparse/clk_trimtsip.c:
- * libparse/data_mbg.c:
- * libparse/kclk_computime.c:
- * libparse/kclk_dcf7000.c:
- * libparse/kclk_hopf6021.c:
- * libparse/kclk_meinberg.c:
- * libparse/kclk_rawdcf.c:
- * libparse/kclk_rcc8000.c:
- * libparse/kclk_schmid.c:
- * libparse/kclk_trimtaip.c:
- * libparse/kclk_trimtsip.c:
- * libparse/kparse.c:
- * libparse/kparse_conf.c:
- * libparse/parse.c:
- * libparse/parse_conf.c:
- * libparse/parsesolaris.c:
- * libparse/parsestreams.c:
- * ntpd/refclock_parse.c:
- Mods and updates
- From: Frank Kardel <kardel@acm.org>
-
- * acconfig.h: PCF refclock
- * configure.in:
- * html/driver35.htm:
- * html/refclock.htm:
- * include/ntp.h:
- * libntp/clocktypes.c:
- * ntpd/Makefile.am:
- * ntpd/ntp_control.c:
- * ntpd/refclock_conf.c:
- * ntpd/refclock_pcf.c:
- From: Andreas Voegele <andreas.voegele@gmx.de>
-
- * acconfig.h: DECL_STIME_1
-
- * configure.in (iCFLAGS): Use -std1 for alpha*-dec-osf* if we are
- using "cc".
- Reported by: Tom Smith <smith@cag.lkg.dec.com>
-
-1999-11-30 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/l_stdlib.h: DECL_SYSTIME_1 --- a long *
- * configure.in: Use it for DEC OSF[45]
- Reported by: Tom Smith <smith@cag.lkg.dec.com>
-
- * ntpd/refclock_parse.c: Add missing declarations
- * ntptrace/ntptrace.c: Ditto
- * ntpd/ntp_proto.c: Ditto
- * ntpd/refclock_palisade.c: Ditto
- From: Jonathan Stone <jonathan@dsg.stanford.edu>
-
-1999-11-18 Sven Dietrich <sven_dietrich@trimble.com>
- * Win NT port updates
- * ntpd.dsp: makefile only builds supported refclocks
- * config.h: cleanup, undefine unsupported clock_atom
- * win32_io, clock_NMEA: foundation for future refclock support
- * recvbuff, transmitbuff, IOcompletionport: streamline packet handler
- * html/hints/winnt.htm: Added up-to-date html docs for WINNT
-
-1999-11-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/copyright.htm: Credit Jack for his work.
-
- * html/pic/*: Save a *ton* of space on the pictures.
- From: Jack Sasportas <jack@innovativeinternet.com>
-
-1999-11-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in : changequote for osf[45] test.
- Reported by: Tom Smith <smith@cag.lkg.dec.com>
-
- * ntp_update: Ignore stuff in any A.* directory.
-
-1999-11-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Clean up header checks for sys/syssgi.h and
- sys/select.h . Originally, we did not check for sys/select.h
- under some versions of SCO (see xntp3-5). Somewhere in ntp4 we
- dropped the SCO check and added the check for sys/syssgi.h,
- exclusive of checking for sys/select.h. Marc Brett can't think of
- a reason why we should not be checking for sys/select.h, so let's
- look for it now.
-
-1999-11-13 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpdate/ntpdate.c: Add the ability for ntpdate to query a
- multicast address. We use the response to the multicast address
- to learn new servers which we then add to the peer list and query.
- In changing this I made the list of peers a linked list.
-
- To be complete I should detect a broadcast address and make it
- behave the same way. But that requires a scan of the interface
- list which is more complicated that I want to deal with...
-
- Fix a bug, allowing ntpdate to compile if SLEWALWAYS and STEP_SLEW
- are both defined.
-
- From: Jeffrey C Honig <jch@bsdi.com>
-
- * ntpd/ntp_refclock.c: sys/sio.h and SCO5_CLOCK cleanup
- From: Kamal A Mostafa <kamal@whence.com>
-
- * ntpd/ntp_loopfilter.c: Let -g do a "correct any" for the first
- time adjustment.
- From: Dave Mills <mills@udel.edu>
-
- * configure.in: sys/sio.h needs to be checked independently.
- Reported by: Kamal A Mostafa <kamal@whence.com>
-
-1999-11-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98f
-
- * configure.in: DECL_PLOCK_0 and DECL_STIME_0 are for dec-osf5*, too
- * ntpd/ntpd.c: DEC OSF cleanup (editorial comments by HMS)
- From: Tom Smith <smith@cag.lkg.dec.com>
-
- * ntpd/ntp_refclock.c: MAXUNIT bugfix
- From: Marc.Brett@westgeo.com
-
- * ntpd/ntp_refclock.c:
- * ntpd/ntpd.c:
- * ntpd/refclock_arc.c:
- * ntpd/refclock_as2201.c:
- * ntpd/refclock_atom.c:
- * ntpdc/ntpdc.c:
- * ntpq/ntpq.c:
- Code cleanup.
- From: Marc.Brett@westgeo.com
-
- * include/ntp_stdlib.h:
- * libntp/systime.c:
- * ntpd/ntp_proto.c:
- Replaced the 'sco5_oldclock' variable with 'systime_10ms_ticks'.
- Cleared libntp/systime.c and include/ntp_stdlib.h of references
- to SCO5_CLOCK and RELIANTUNIX_CLOCK (moved to ntpd/ntp_proto.c).
- From: Kamal A Mostafa <kamal@whence.com>
-
- * configure.in: alpha-dec-osf4* -> alpha*-dec-osf4*|alpha*-dec-osf5*
- From: Tom Smith <smith@cag.lkg.dec.com>
-
- * configure.in: Look for <sys/sio.h>. If TIOCDCDTIMESTAMP is
- there, we have TTYCLK.
- * acconfig.h: Lose old AIOCTIMESTAMP stuff
- Reported by: Kamal A Mostafa <kamal@whence.com>
-
-1999-11-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntpd.c (set_process_priority): Clean up nice() and setpriority()
-
-1999-11-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.am (EXTRA_DIST): Added README.cvs
- Reported by: Kamal A Mostafa <kamal@whence.com>
-
-1999-11-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98e
-
-1999-11-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Lose AIOCTIMESTAMP tests
-
- * ntpd/ntpd.c: lose select() EINTR debug warning
- * ntpd/ntp_refclock.c: AIOCTIMESTAMP -> TIOCDCDTIMESTAMP. Watch
- CLK_SETSTR.
- * ntpd/refclock_atom.c: fdpps is only there for PPS or PPSAPI.
- AIOCTIMESTAMP is gone now.
- From: Kamal A Mostafa <kamal@whence.com>
-
- * configure.in (HAVE_MLOCKALL): Deal with dec-osf5 realities
- * ntpd/refclock_ulink.c (ulink_poll): Fix cast.
- * libntp/machines.c (ntp_set_tod): Use a long* for the argument to
- stime().
- Reported by: Tom Smith <smith@cag.lkg.dec.com>
-
- * ntpd/ntpd.c (set_process_priority): Use whatever we have until
- something works.
-
- * ntpd/ntp_loopfilter.c: Keep clock_frequency changes in a temp
- variable so we can record it to loopstats (near as HMS can tell).
- From: Dave Mills <mills@udel.edu>
-
-1999-11-06 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * acconfig.h: RELIANTUNIX_CLOCK
- * configure.in (ac_cv_var_tickadj): RELIANTUNIX_CLOCK
- * libntp/systime.c (adj_systime): Reliant patches
- From: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
-
-1999-11-05 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_parse.c (parse_start): ASYNC_PPS_CD_NEG cleanup
- * configure.in (ac_cv_make_ntptime): OK on Linux
- From: <Ulrich.Windl@rz.uni-regensburg.de>
-
- * configure.in: NetBSD has PPSAPI now
- F_SETOWN is needed for NetBSD
- From: Jonathan Stone <jonathan@dsg.stanford.edu>
-
-1999-11-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98d
-
- * ntpd/refclock_parse.c: Cleanup/fixes
- From: John Hay <jhay@mikom.csir.co.za>
-
- * ntpd/refclock_parse.c: Lose #include "ntp_select.h"
- * ntpd/ntpd.c: Lose #include "ntp_select.h"
- * ntpd/ntp_io.c: Lose #include "ntp_select.h"
- * ntpd/ntp_intres.c: Lose #include "ntp_select.h"
- * libntp/iosignal.c: Lose #include "ntp_select.h"
- * include/ntpd.h: #include "ntp_select.h" for declaration of activefds
- Reported by: Christian Krackowizer <kra1@technodat.co.at>
-
-1999-11-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98c
-
- * libntp/syssignal.c: Don't warn about SA_RESTART
- * libntp/recvbuff.c: Fix free buffer count
- From: Jeffrey C Honig <jch@bsdi.com>
-
- * html/pps.htm:
- * html/howto.htm:
- * html/confopt.htm:
- * html/clockopt.htm:
- * html/uthopt.htm:
- Updates.
- From: Dave Mills <mills@udel.edu>
-
- * ntpd/refclock_wwvb.c: burst fixes
- * ntpd/refclock_ulink.c: burst fixes
- * ntpd/refclock_tpro.c: burst and NSTAGE fixes
- * ntpd/refclock_pst.c: burst fixes
- * ntpd/refclock_irig.c: SAMPLE -> SAMPLES
- * ntpd/refclock_heath.c: burst fixes
- * ntpd/refclock_dumbclock.c: burst fixes
- * ntpd/refclock_chronolog.c: burst fixes
- * ntpd/refclock_bancomm.c: burst fixes
- * ntpd/refclock_atom.c: burst fixes
- * ntpd/refclock_as2201.c: burst fixes
- * ntpd/ntp_refclock.c: PPSAPI, code, and comment cleanup/fixes
- * ntpd/ntp_proto.c: Broadcast/restrict cleanup
- * ntpd/ntp_loopfilter.c: Cleanup and fixes
- * libntp/gpstolfp.c: Lose the UL qualifiers - old compilers hate them
- From: Dave Mills <mills@udel.edu>
-
-1999-10-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: TIOCSPPS cleanup
-
-1999-10-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98b
-
- * ntpd/refclock_atom.c: AIOCTIMESTAMP patch
- * ntpd/ntpd.c: SCO clock patch
- * ntpd/ntp_request.c: noselect patch
- * ntpd/ntp_refclock.c: AIOCTIMESTAMP patch
- * ntpd/ntp_proto.c: noselect patch
- * ntpd/ntp_intres.c: noselect patch
- * ntpd/ntp_config.c: noselect patch
- * include/ntp_request.h: noselect patch
- * include/ntp.h: noselect patch
- From: Kamal A Mostafa <kamal@whence.com>
-
- * configure.in:
- * acconfig.h: TTYCLK_AIOCTIMESTAMP
- Stuff for Kamal
-
- * ntpd/refclock_atom.c (atom_pps): make "result" initialization
- uglier, but more bulletproof.
-
- * configure.in (sys/timepps.h): Fixed.
- From: John Hay <jhay@mikom.csir.co.za>
-
-1999-10-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c: Rename instance.state to instance.o_state
-
- * refclock_oncore.c:
- * refclock_mx4200.c:
- * refclock_chu.c:
- * refclock_atom.c:
- * ntp_refclock.c:
- * ntp_peer.c:
- * ntp_loopfilter.c:
- * include/ntp_refclock.h:
- Various cleanup and fixes
- From: Dave Mills <mills@udel.edu>
-
-1999-10-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c (CONFIG_FILE): NT changes
- From: Sven Dietrich <Sven_Dietrich@trimble.com>
-
-1999-10-16 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: sys/timepps.h verification changes
-
- * ntpd/refclock_atom.c (atom_poll): PPS cleanup
- From: Dave Mills <mills@udel.edu>
- (atom_pps): Portability patch
- From: John Hay <jhay@mikom.csir.co.za>
-
-
- * libntp/msyslog.c:
- * libntp/gpstolfp.c:
- Lint cleanup
- From: Jonathan Stone <jonathan@dsg.stanford.edu>
-
- * parseutil/dcfd.c: abs() -> l_abs(), time.h (AIX 4.3.2 patches)
- From: Dana Kaempen <decay@flash.net>
-
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_atom.c:
- * ntpd/ntp_refclock.c:
- PPS cleanup
- From: John.Hay@mikom.csir.co.za
-
- * util/ntptime.c:
- * ntpdate/ntptimeset.c:
- * ntpdate/ntpdate.c:
- * ntpd/refclock_trak.c:
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_mx4200.c:
- * ntpd/refclock_msfees.c:
- * ntpd/refclock_atom.c:
- * ntpd/ntp_control.c:
- * ntpd/ntp_config.c:
- * configure.in:
- * configure:
- PPS, Solaris 7, cleanup patches
- From: Marc.Brett@westgeo.com
-
- * ports/winnt/ntptrace/ntptrace.dsp:
- * ports/winnt/ntpq/ntpq.dsp:
- * ports/winnt/ntpdc/ntpdc.dsp:
- * ports/winnt/ntpdate/ntpdate.dsp:
- * ports/winnt/ntpd/refclock_trimbledc.c:
- * ports/winnt/ntpd/ntpd.dsp:
- * ports/winnt/ntpd/ntp_iocompletionport.c:
- * ports/winnt/ntpd/nt_clockstuff.c:
- * ports/winnt/libntp/util_clockstuff.c:
- * ports/winnt/libntp/libntp.dsp:
- * ports/winnt/libntp/SetSystemTime.c:
- * ports/winnt/instsrv/instsrv.c:
- * ports/winnt/include/sys/ioctl.h:
- * ports/winnt/include/termios.h:
- * ports/winnt/include/config.h:
- * ports/winnt/include/clockstuff.h:
- * ports/winnt/ntp.dsw:
- * ntpd/refclock_shm.c:
- * ntpd/refclock_palisade.c:
- * ntpd/ntpd.c:
- * ntpd/ntp_timer.c:
- * ntpd/ntp_refclock.c:
- * libntp/systime.c:
- * libntp/machines.c:
- NT patches
- From: Sven Dietrich <Sven_Dietrich@trimble.com>
-
-1999-10-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_wwvb.c:
- * ntpd/refclock_usno.c:
- * ntpd/refclock_ulink.c:
- * ntpd/refclock_tpro.c:
- * ntpd/refclock_pst.c:
- * ntpd/refclock_parse.c:
- * ntpd/refclock_palisade.c:
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_mx4200.c:
- * ntpd/refclock_msfees.c:
- * ntpd/refclock_jupiter.c:
- * ntpd/refclock_irig.c:
- * ntpd/refclock_heath.c:
- * ntpd/refclock_chu.c:
- * ntpd/refclock_atom.c:
- * ntpd/refclock_as2201.c:
- * ntpd/refclock_arc.c:
- * ntpd/refclock_arbiter.c:
- * ntpd/refclock_acts.c:
- * ntpd/ntp_refclock.c:
- * include/ntp_refclock.h:
- Bunches of fixes.
- From: Dave Mills <mills@udel.edu>
-
-1999-10-10 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver16.htm: New version
- * ntpd/refclock_bancomm.c: New version
- From: "Cliff, Gary" <gary.cliff@cdott.com>
- "Ramasivan, Ganesh" <ganesh.ramasivan@cdott.com>
-
- * ntpd/refclock_ulink.c (ulink_receive): Cleanup
- (ulink_poll): Cleanup
- * ntpd/refclock_atom.c (atom_pps): SunOS timespec/timeval cleanup
- From: Marc.Brett@westgeo.com
-
- * INSTALL: Point NT folks at ports/winnt
- Reported by: Stephen Gildea <gildea@intouchsys.com>
-
- * include/ntp_stdlib.h: Noise abatement
- * include/ntpd.h: Noise abatement
- Reported by: "W. David Higgins" <wdh@grouper.ccur.com>
-
- * configure.in: DECL_STDIO_0 with gcc under solaris.
-
- * include/l_stdlib.h: DECL_TOUPPER_0
- DECL_STRERROR_0
-
- * configure.in: Fix a bunch of implicit declarations for SunOS
-
- * html/release.htm: cleanup - we still provide MD5.
- Reported by: Winslowe Lacesso <lacesso@cs.ubc.ca>
-
-1999-10-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c:
- * ntpd/refclock_atom.c:
- * ntpd/ntp_refclock.c:
- PPS API code updated to the current spec
- From: Dave Mills
-
- * configure.in (ac_cv_make_tickadj): Don't make tickadj starting
- with solaris2.5
- Requested by: Dave Mills
-
-1999-10-04 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: We might need -lsocket for the -lnsl check.
-
-1999-09-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_ulink.c: Typos in C++ comment
- Reported by: Thomas.Tornblom@Sun.SE
-
- * configure.in: 4.0.98a
-
- * ntpd/ntp_config.c (getconfig): Fix typo.
- From: "David E. Myers" <dem@skyline.rtp.nc.us>
- From: David Godfrey <dave@delta.demon.co.uk>
- From: Geoffrey Sisson <geoff@nominet.org.uk>
-
-1999-09-17 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.98
-
- NetInfo support:
-
- * config.guess
- * config.sub
- Add Mac OS (versions 10 and up).
-
- * acconfig.h
- * config.h.in
- * configure.in
- Check for NetInfo API; add HAVE_NETINFO macro and friends.
-
- * include/ntp.h
- * ntpd/ntp_config.c
- * ntpdate/ntpdate.c
- Add support for reading configuration from NetInfo.
-
- * ntpd/ntp_config.c
- Get rid of unnecessary eol variable in tokenizer.
-
- * html/notes.htm
- * html/ntpd.htm
- * html/ntpdate.htm
- Document NetInfo functionality.
-
- * util/tickadj.c
- Use HAVE_KVM_OPEN conditional around kvm.h include.
-
- From: Wilfredo Sanchez <wsanchez@apple.com>
-
-1999-09-15 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * acconfig.h:
- * config.h.in:
- * configure.in:
- * html/driver34.htm:
- * html/refclock.htm:
- * include/ntp.h:
- * libntp/clocktypes.c:
- * ntpd/Makefile.am:
- * ntpd/ntp_control.c:
- * ntpd/refclock_conf.c:
- * ntpd/refclock_ulink.c:
- Ultralink driver
- From: Dave Strout <dstrout@linuxfoundary.com>
-
-1999-09-14 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: ReliantUNIX patches
- From: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
-
- * ntpd/refclock_atom.c: PPS cleanup
- * ntpd/ntp_refclock.c (refclock_ioctl): PPS cleanup
- From: Dave Mills <mills@udel.edu>
-
- * ntptrace/ntptrace.c (ReceiveBuf): addserver() can return NIL.
- Reported by: "Alan J. Wylie" <alanw@cyrano.com>
-
- * libntp/ieee754io.c:
- * ntpd/ntp_proto.c:
- * ntpd/ntp_refclock.c:
- Lint cleanup.
- From: Marc.Brett@westgeo.com
-
-1999-09-12 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_refclock.c (refclock_ioctl): Declaration cleanup.
-
- * ntpd/ntp_proto.c (init_proto): msyslog kern_enable at LOG_DEBUG.
-
- * ntpd/refclock_atom.c: Add missing declaration.
-
-1999-09-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_make_ntptime): Just look for struct
- ntptimeval, not timespec or nsec (Solaris 2.7 should get ntptime
- and it uses msec).
- (ac_cv_var_oncore_ok): Reorder so it's a "normal" clock
-
- * configure.in: Solaris Kernel FLL bug fixed in 106541-07
-
-1999-09-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.97f
-
- * ntptrace/ntptrace.c:
- * ntpdate/ntptimeset.c:
- * ntpdate/ntptime_config.c:
- * ntpdate/ntpdate.c:
- * util/ntptime.c:
- * parseutil/dcfd.c:
- * libparse/parsestreams.c:
- * libparse/parse_conf.c:
- * libparse/parse.c:
- * libparse/clk_varitext.c:
- * libparse/clk_trimtsip.c:
- * libparse/clk_trimtaip.c:
- * libparse/clk_schmid.c:
- * libparse/clk_rcc8000.c:
- * libparse/clk_rawdcf.c:
- * libparse/clk_meinberg.c:
- * libparse/clk_hopf6021.c:
- * libparse/clk_dcf7000.c:
- * libparse/clk_computime.c:
- * libntp/msyslog.c:
- * libntp/iosignal.c:
- * libntp/syssignal.c:
- * adjtimed/adjtimed.c:
- * ntpd/refclock_shm.c:
- * ntpd/refclock_parse.c:
- * ntpd/refclock_palisade.c:
- * ntpd/refclock_mx4200.c:
- * ntpd/refclock_jupiter.c:
- * ntpd/refclock_datum.c:
- * ntpd/ntpd.c:
- * ntpd/ntp_util.c:
- * ntpd/ntp_timer.c:
- * ntpd/ntp_request.c:
- * ntpd/ntp_refclock.c:
- * ntpd/ntp_monitor.c:
- * ntpd/ntp_loopfilter.c:
- * ntpd/ntp_io.c:
- * ntpd/ntp_intres.c:
- * ntpd/ntp_filegen.c:
- * include/l_stdlib.h:
- <errno.h> and errno declaration cleanup.
-
- * ntpd/map_vme.c: cleanup some spacing.
-
-1999-09-01 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.97e
-
- * configure.in (ac_cv_struct_sigaction_has_sa_sigaction):
- * acconfig.h: Ditto
- * parseutil/dcfd.c (main): Use it.
- From: HOSAKA Eiichi <HOSAKA.Eiichi@dd.anritsu.co.jp>
-
-1999-08-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.97d
-
- * include/ntp_stdlib.h: Clean up previous NeXT patch.
- From: Jack Bryans <jbryans@csulb.edu>
-
- * ntpd/refclock_parse.c: Permit RTS to power a DCF77.
- From: Carsten Paeth <calle@calle.in-berlin.de>
-
- * ntpd/refclock_oncore.c (oncore_start): This makes the Oncore run
- on systems without hardpps().
- From: Poul-Henning Kamp <phk@freebsd.org>
-
-1999-08-28 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.97c
-
- * configure.in (ac_cv_make_ntptime): Typo.
- From: Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
-
-1999-08-26 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.97b
-
- * libntp/iosignal.c:
- * ntpd/ntp_peer.c:
- * ntpd/refclock_nmea.c:
- * ntpdate/ntptime_config.c:
- * ntpdate/ntptimeset.c:
- AIX, Irix, and SunOS lint cleanup
- From: Marc.Brett@westgeo.com
-
-1999-08-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in 4.0.97a
-
- * configure.in (AC_OUTPUT): added scripts/Makefile
- * Makefile.am (SUBDIRS): Added scripts
- * scripts/Makefile.am: Added
-
-1999-08-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_nmea.c: Patches for:
- Trimble OEM Ace-II receiver. Low cost PCB with single
- voltage input, external active antenna and two serial
- ports with either NMEA and ITAPs output. Programmable
- to be tuned for 'time' accuracy in fixed station config.
- From: Nick Hibma <nick.hibma@jrc.it>
-
-1999-08-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c: Added listen_to_virtual_ips support (-L flag)
- * ntpd/ntp_io.c: Ditto
-
-1999-08-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_intres.c (request): Lint cleanup
- * ntpd/ntp_control.c (ctl_putclock): Ditto
- * libntp/recvbuff.c (getrecvbufs): Ditto
- (get_free_recv_buffer): Ditto
- * libntp/systime.c (adj_systime): Ditto
-
-1999-08-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.97
-
- * libntp/systime.c:
- * ntpd/ntp_loopfilter.c:
- * ntpd/ntpd.c:
- * ports/winnt/libntp/nt_clockstuff.c:
- From: Sven Dietrich <Sven_Dietrich@trimble.com>
-
- * README.cvs: Updated.
-
- * configure.in:
- * include/ntp_machine.h:
- * libntp/mexit.c:
- * ntpd/ntp_config.c:
- * ntpd/ntp_peer.c:
- * ntpd/ntp_restrict.c:
- * ntpd/refclock_arc.c:
- * ntpdate/ntpdate.c:
- Irix, SunOS, AIX, lint patches
- From: Marc.Brett@westgeo.com
-
- * util/ansi2knr.c: New release (fix for bug reported by Marc Brett)
- From: "L. Peter Deutsch" <ghost@aladdin.com>
-
- * include/ntp_stdlib.h: NeXT portability patch
- From: Jack Bryans <jbryans@csulb.edu>
-
- * configure.in:
- * dot.emacs: (cleanup)
- * ntpdate/Makefile.am:
- * ntpdate/ntpdate.h:
- * ntpdate/ntptime_config.c:
- * ntpdate/ntptimeset.c:
- ntptimeset patches.
- From: Jeffrey Hutzelman <jhutz@cmu.edu>
-
- * ntpd/refclock_parse.c (local_input): ts.l_ui -> ts.fp.l_ui
-
-1999-08-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.96p1
-
- * ntpd/ntpd.c (sys/resource.h): Include this file only #if
- HAVE_SYS_RESOURCE_H.
- (set_process_priority): Use TIOCNOTTY only if it is #define'd.
- * ntpd/refclock_parse.c (STREAM): STREAM does not imply HAVE_TERMIOS.
- (termios.h, termio.h, fcntl.h): Do not include those files here;
- they are already included by ntp_refclock.h or ntp_io.h.
- * ntpd/refclock_leitch.c (sgtty.h, termios.h, termio.h): Do not
- include those files here; they are already included by ntp_refclock.h.
- * ntpdate/ntpdate.c (sys/resource.h) : Include that file only #if
- HAVE_RESOURCE_H.
- From: Philippe De Muyter <phdm@macqel.be>
-
- * ntptrace/ntptrace.c (input_handler): Make it a "normal" function
- definition.
- Reported by: GIANNI_CATANIA@hp-italy-om6.om.hp.com
-
- * configure.in: pc-cygwin32 -> pc-cygwin* because of a change in
- B20.
- From: Stephen Gildea <gildea@intouchsys.com>
-
-1999-08-09 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.96
-
- * parseutil/dcfd.c (main): Replace SA_ONSTACK and SV_ONSTACK with
- HAVE_SIGACTION and HAVE_SIGVEC, respectively. HP-UX provides both
- of the former but only one of the latter...
-
-1999-08-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Better tests for -lnsl and -lsocket
- From: Albert Chin-A-Young <china@thewrittenword.com>
-
- Works for me - handle openlog() and -lgen the same way.
-
- * Makefile.am (EXTRA_DIST): Add in the y2k notes
-
- * parseutil/dcfd.c: Renamed drift_comp to accum_drift
-
- * configure.in: Added MAKE_CHECK_Y2K support; check_y2k needs libparse.
- * ntpd/Makefile.am (check_PROGRAMS): Use MAKE_CHECK_Y2K
- * ntpd/Makefile.am (check-local): Added.
- * parseutil/Makefile.am (check-local): Added.
-
- * include/ntp.h: Y2KFixes
- * libparse/parse.c: Ditto
- * ntpd/Makefile.am (check_PROGRAMS): Ditto
- * ntpd/refclock_acts.c: Ditto
- * ntpd/refclock_arc.c (arc_receive): Ditto
- * ntpd/refclock_heath.c: Ditto
- * ntpd/refclock_hpgps.c: Ditto
- * parseutil/Makefile.am (check-local): Ditto
- * parseutil/dcfd.c (check_y2k): Ditto
- * NOTES.y2kfixes: Ditto
- * readme.y2kfixes: Ditto
- * results.y2kfixes: Ditto
- * ntpd/check_y2k.c: Ditto
- From: y2k@y2k.labs.att.com
-
-1999-08-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Look for sys/ppstime.h.
-
-1999-07-31 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_io.c (create_sockets): Typo.
- From: Doug Wells <dmw@contek.com>
-
-1999-07-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_struct_ntptimeval): Explicitly look for
- struct ntptimeval.
- (ac_cv_var_kernel_pll): Require struct ntptimeval.
- Linux. Grrr.
- Reported by: Ronald Kuetemeier <ronaldk@smginc.com>
-
-1999-07-27 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.95
-
- * ports/winnt: New release
- From: Sven Dietrich <Sven_Dietrich@trimble.com>
-
-1999-07-26 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/machines.c (ntp_set_tod): Bugfix
- From: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
-
-1999-07-25 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.94b
-
- * acconfig.h:
- * configure.in:
- * libparse/Makefile.am:
- * libparse/parse_conf.c:
- * libparse/clk_varitext.c:
- * libparse/kclk_varitext.c:
- * ntpd/refclock_parse.c: VARITEXT parse clock
- * ntpdate/ntpdate.c: bugfix
- From: Tony McConnell <tonym@datel-technology.co.uk>
-
-1999-07-24 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_syscall.h (ntp_gettime): Make it static
- * configure.in: Added AC_C_INLINE
- Reported by: "Charles C. Fu" <ccwf@klab.caltech.edu>
-
-1999-07-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntpd.h:
- * libntp/machines.c:
- * libntp/systime.c:
- * ntpd/ntp_config.c:
- * ntpd/ntp_filegen.c:
- * ntpd/ntp_io.c:
- * ntpd/ntp_proto.c:
- * ntpd/ntp_timer.c:
- * ntpdate/ntpdate.c: Windows NT port cleanup
- From: Sven Dietrich <Sven_Dietrich@trimble.com>
-
-1999-07-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/authkeys.c:
- * libntp/ieee754io.c:
- * libntp/iosignal.c:
- * libntp/machines.c:
- * libntp/mexit.c:
- * libntp/recvbuff.c:
- * ntpd/ntp_filegen.c:
- * ntpd/ntp_loopfilter.c:
- * ntpd/ntp_request.c:
- * ntpd/ntp_timer.c:
- * ntpd/ntpd.c: Compile/lint cleanup
- From: Allen Smith <easmith@beatrice.rutgers.edu>
-
-1999-07-21 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.94a
-
- * configure.in (ac_cv_make_ntptime): Add tv_nsec check.
-
- * include/Makefile.am (noinst_HEADERS): Forgot ntp_syscall.h
- From: John.Hay@mikom.csir.co.za
-
- * configure.in: 4.0.94
-
- * Makefile.am (SUBDIRS): librsaref
- (dist-hook): Lose CVS subdirs in the distribution tarball
-
- * include/Makefile.am (noinst_HEADERS): Added iosignal.h, recvbuff.h
-
- * Makefile.am (dist-hook): Don't call dos2unix anymore
-
-1999-07-20 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * acconfig.h:
- * util/ntptime.c: FreeBSD nano patches
- From: Per Hedeland <per@erix.ericsson.se> and
- Allen Smith <easmith@beatrice.rutgers.edu>
-
- * include/ntp.h:
- include/ntp_fp.h:
- include/ntp_io.h:
- include/ntp_machine.h:
- include/ntp_refclock.h:
- include/ntp_stdlib.h:
- include/ntpd.h:
- libntp/Makefile.am:
- libntp/emalloc.c:
- libntp/machines.c:
- libntp/mexit.c:
- libntp/msyslog.c:
- libntp/statestr.c:
- libntp/syssignal.c:
- libntp/systime.c:
- libparse/parse.c:
- libparse/parse_conf.c:
- ntpd/ntp_control.c:
- ntpd/ntp_intres.c:
- ntpd/ntp_io.c:
- ntpd/ntp_proto.c:
- ntpd/ntp_refclock.c:
- ntpd/ntp_request.c:
- ntpd/ntp_timer.c:
- ntpd/ntp_util.c:
- ntpd/ntpd.c:
- ntpd/refclock_nmea.c:
- ntpd/refclock_palisade.c:
- ntpd/refclock_palisade.h:
- ntpd/refclock_shm.c:
- ntpdate/ntpdate.c:
- ntptrace/ntptrace.c: Cleanup
- * libntp/recvbuff.c:
- libntp/iosignal.c:
- include/iosignal.h:
- include/recvbuff.h: Added
- From: Sven_Dietrich@Trimble.COM
-
- * README: Add README.cvs
-
- * configure.in (ac_cv_var_struct_ntptime_val_timespec): Typo.
- From: John Hay <jhay@mikom.csir.co.za>
-
-1999-07-19 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.am (EXTRA_DIST): Lose ntpmak; "build" does a better job.
-
- * ntpq/Makefile.am (version.o): Use mkver
- * ntptrace/Makefile.am (version.o): Ditto
- * ntpdate/Makefile.am (version.o): Ditto
- * ntpd/Makefile.am (version.o): Ditto
- * ntpdc/Makefile.am (version.o): Ditto
-
- * configure.in (AC_OUTPUT): scripts/mkver
-
- * scripts/mkver.in: Created. Note RSAREF in the version string
-
-1999-07-18 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * README.des: Updated.
-
- * ntpq/Makefile.am (LDADD): Add LIBRSAREF
-
- * ntpdc/Makefile.am (LDADD): Add LIBRSAREF
-
- * ntpdate/Makefile.am (LDADD): Add LIBRSAREF
-
- * ntpd/Makefile.am (LDADD): Add LIBRSAREF
-
- * configure.in (AC_OUTPUT): Added librsaref/Makefile
- Added tests for making/using librsaref.a
- Lose old DES stuff; AC_DEFINE(DES) if we find the rsaref stuff.
-
-1999-07-11 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_trak.c (trak_receive): disambiguate expression.
- At least now it is unambiguous. It may even still be correct.
- Reported by: Tom Smith <smith@cag.lkg.dec.com>
-
- * ntp_update (UPDATE_OPTIONS): Typo.
-
-1999-07-07 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntp_update: Check out copyright.htm before COPYRIGHT
-
- * ntpd/ntp_config.c: Support for PPS assert/clear/hardpps
- * ntpd/ntp_refclock.c (refclock_ioctl): Ditto
- (refclock_gtlin): Ditto
- * html/clockopt.htm: Document.
- From: John Hay <jhay@mikom.csir.co.za>
-
- * html/monopt.htm: We have four types of files now
- * ntpd/refclock_oncore.c: If debug is on, tell when
- we are waiting for a valid almanac
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
- * include/ntp_machine.h (HAVE_TERMIOS): STREAMS does not imply
- HAVE_TERMIOS !!!
- * include/parse.h (timercmp): Macro defined if needed.
- * ntpd/ntp_config.c (SIGCHLD): Macro defined as SIGCLD if needed.
- (sys/wait.h): File included only if HAVE_SYS_WAIT_H.
- * configure.in (sys/wait.h): File added to AC_CHECK_HEADERS list.
- From: Philippe De Muyter <phdm@macqel.be>
-
-1999-06-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_irig.c (irig_debug): NetBSD patches
- From: Frederick Bruckman <fb@enteract.com>
-
- * util/ntptime.c (main): ntx.freq bugfix (-f option)
- From: Frederick Bruckman <fb@enteract.com>
-
-1999-06-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Fix typo with DECL_H_ERRNO test
-
- * ntpd/ntp_loopfilter.c: Lose syscall decl, it's handled in
- l_stdlib.h now.
- * ntpd/ntp_request.c: Ditto
- * util/ntptime.c: Ditto
-
-Mon May 31 18:49:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpd/ntp_proto.c (proto_config): Don't set sys_bclient on
- PROTO_MULTICAST_ADD, only caller can decide; remove wrong set on
- PROTO_MULTICAST_DEL.
-
-Mon May 31 18:49:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpd/refclock_parse.c (stream_receive): Cast size_t to int to
- match format.
- (local_receive): Likewise.
- (trimbletaip_event): Likewise.
- (stream_receive): Cast struct timeval members to long to match
- format.
- (local_receive): Likewise.
-
- * ntpd/ntp_util.c (stats_config): Cast size_t to int to match
- format.
-
- * libparse/clk_rawdcf.c (cvt_rawdcf): Cast ptr difference to int
- to match format.
- * ntpd/refclock_parse.c (gps16x_poll): Likewise.
-
- * ntpd/ntp_filegen.c (filegen_open): Use long format, cast arg to
- match.
-
- * ntpd/refclock_parse.c (list_err): Use long format to match arg.
- (parse_statistics): Likewise.
- (gps16x_message): Likewise.
- (cvt_ts): Use long format, cast args to match.
- (parse_start): Add missing arg.
- (gps16x_message): Swap args to match format.
-
- * ntpd/ntpd.c (ntpdmain): Cast uid to long, adapt format.
-
- * ntpd/ntp_intres.c (readconf): Use long format to match arg.
- * ntpd/ntp_io.c (getrecvbufs): Likewise.
- * ntpd/ntp_proto.c (default_get_precision): Likewise.
-
- * ntpd/ntp_loopfilter.c (local_clock): Cast clock_panic to int to
- match format.
-
- * ntpd/ntp_io.c (io_multicast_add): Print s_addr member, not
- struct in_addr, to match format.
-
- * include/ntp_stdlib.h: Declare msyslog() as printf-like for gcc
- format checking.
-
-Fri May 28 16:39:35 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpdc/ntpdc_ops.c (iostats): Align timereset line.
-
- * ntpq/ntpq_ops.c (doopeers): Properly align header.
-
- * ntpdc/ntpdc_ops.c (debug): Removed declaration, already in
- ntp_stdlib.h.
- * ntpq/ntpq_ops.c: Likewise.
-
- * ntpdate/ntpdate.c (debug): Declare volatile to match
- ntp_stdlib.h.
- * ntpdc/ntpdc.c, ntpq/ntpq.c, ntptrace/ntptrace.c, util/tickadj.c,
- util/ntptime.c: Likewise.
-
- * include/parse.h (debug): Don't declare to avoid clash with
- ntp_stdlib.h.
-
- * include/Makefile.am (noinst_HEADERS): Add new ntp_syscall.h.
-
- * configure.in: Also check for -lrt for POSIX.1c functions.
-
-Wed May 26 21:03:30 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * configure.in: Removed -Wwrite-strings from CFLAGS.
-
- * ntpdc/ntpdc.c (help): Remove superfluous cast.
- * ntpq/ntpq.c (help): Likewise.
-
-Tue May 25 18:00:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpq/ntpq_ops.c (struct varlist): name cannot be const char *
- since it may be malloc'ed.
-
- * ntpdc/ntpdc.c (sendrequest): Declare pass as const char *, don't
- lose const in cast.
- * ntpq/ntpq.c (sendrequest): Likewise.
-
- * ntpd/ntp_control.c (ctl_getitem): Remove superfluous cast.
- * include/ntpd.h (struct ctl_var): text cannot be const char *
- since it's malloc'ed.
-
-1999-06-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/l_stdlib.h: Don't include <netinet/in.h>, add forward
- declaration of struct in_addr instead.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- Patch:
-
- * include/l_stdlib.h: Fixed syscall() declaration.
- * configure.in: Updated test to match.
-
- * configure.in: Check if we need to declare errno and h_errno.
- Check for <resolv.h> which may provide a h_errno declaration and
- <arpa/nameserv.h> which the latter needs.
- * acconfig.h: Provide the necessary templates.
-
- * include/ntp_syscall.h: New file, hides various implementations
- of ntp_adjtime() and ntp_gettime() syscalls.
- * ntpd/ntp_loopfilter.c: Use it.
- * ntpd/ntp_request.c: Likewise.
- * ntpd/refclock_local.c: Likewise.
- * util/ntptime.c: Likewise.
-
- * include/l_stdlib.h: Include <netinet/in.h>, declare inet_ntoa if
- necessary.
- Moved syscall() declaration here.
-
- * kernel/sys/parsestreams.h: Include <sys/termios.h> for it's
- definition of struct ppsclockev.
- Include <sys/ppsclock.h> unconditionally for definition of
- CIOGETEV via TIOCGPPSEV.
- * kernel/sys/ppsclock.h: Protect struct ppsclockev from
- redefinition.
-
- * include/ntp_refclock.h: Protect it from multiple inclusion.
- * include/ntp_fp.h: Likewise.
- * include/ntp.h: Likewise.
-
- * include/ntpd.h: Include ntp_refclock.h for MAXDIAL declaration.
- * libntp/authkeys.c: Include ntpd.h for current_time declaration.
-
- * include/ntpd.h (getauthkeys, auth_agekeys, rereadkeys): Moved
- prototypes to ntp_stdlib.h
-
- * include/ntp_stdlib.h: Declare variables exported by libntp.
- * include/ntpd.h: Likewise for ntpd.
-
- * libntp/authkeys.c (key_hash, authnokey, authfreekeys,
- cache_flags): Made static.
- * libntp/systime.c (tvu_maxslew, tsf_maxslew, sys_clock_offset,
- sys_residual): Likewise.
- * ntpd/ntp_intres.c (confentries): Likewise.
- * ntpd/ntp_loopfilter.c (clock_offset, clock_panic): Likewise.
- (pll_nano): Likewise. Removed duplicate definition.
- * ntpd/ntp_peer.c (peer_free, current_association_ID,
- assocpeer_calls, init_peer_starttime): Likewise.
- * ntpd/ntp_proto.c (sys_offset, sys_authdly): Likewise.
- * ntpd/ntp_request.c (numrequests, numresppkts, errorcounter):
- Likewise.
- * ntpd/ntp_restrict.c (res_calls, res_found, res_not_found,
- res_timereset, res_limited_refcnt): Likewise.
- * ntpd/ntpd.c (was_alarmed, worker_thread): Likewise.
-
- * ntpq/ntpq_ops.c: Moved declaration of external variable from
- ntpq.c to file scope.
-
- * adjtimed/adjtimed.c: Moved declarations of external variables to
- ntpd.h and ntp_stdlib.h.
- * clockstuff/propdelay.c: Likewise.
- * libntp/a_md5encrypt.c, libntp/authencrypt.c, libntp/authkeys.c,
- libntp/mfp_mul.c, libntp/msyslog.c, libntp/systime.c: Likewise.
- * ntpd/ntp_config.c, ntpd/ntp_control.c, ntpd/ntp_filegen.c,
- ntpd/ntp_intres.c, ntpd/ntp_io.c, ntpd/ntp_loopfilter.c,
- ntpd/ntp_monitor.c, ntpd/ntp_peer.c, ntpd/ntp_proto.c,
- ntpd/ntp_refclock.c, ntpd/ntp_request.c, ntpd/ntp_restrict.c,
- ntpd/ntp_timer.c, ntpd/ntp_util.c, ntpd/ntpd.c,
- ntpd/refclock_acts.c, ntpd/refclock_arbiter.c, ntpd/refclock_arc.c,
- ntpd/refclock_as2201.c, ntpd/refclock_atom.c,
- ntpd/refclock_bancomm.c, ntpd/refclock_chronolog.c,
- ntpd/refclock_chu.c, ntpd/refclock_datum.c,
- ntpd/refclock_dumbclock.c, ntpd/refclock_gpsvme.c,
- ntpd/refclock_heath.c, ntpd/refclock_hpgps.c, ntpd/refclock_irig.c,
- ntpd/refclock_jupiter.c, ntpd/refclock_leitch.c,
- ntpd/refclock_local.c, ntpd/refclock_msfees.c,
- ntpd/refclock_mx4200.c, ntpd/refclock_nmea.c,
- ntpd/refclock_oncore.c, ntpd/refclock_palisade.h,
- ntpd/refclock_parse.c, ntpd/refclock_pst.c, ntpd/refclock_shm.c,
- ntpd/refclock_tpro.c, ntpd/refclock_trak.c, ntpd/refclock_true.c,
- ntpd/refclock_usno.c, ntpd/refclock_wwvb.c: Likewise.
- * ntpdate/ntpdate.c: Likewise.
- * ntpdc/ntpdc.c, ntpdc/ntpdc_ops.c: Likewise.
- * ntpq/ntpq.c: Likewise.
- * ntptrace/ntptrace.c: Likewise.
- * util/ntptime.c, til/tickadj.c: Likewise.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * include/ntp_machine.h: Removed superfluous yy/mm/dd comments.
- * include/ntpd.h: Likewise.
- * libntp/authencrypt.c: Likewise.
- * libntp/a_md5encrypt.c: Likewise.
- * libntp/caljulian.c: Likewise.
- * libntp/ymd2yd.c: Likewise.
- * libntp/syssignal.c: Likewise.
- * libntp/ymd2yd.c: Likewise.
- * ntpd/ntp_control.c: Likewise.
- * ntpd/ntp_io.c: Likewise.
- * ntpd/ntp_timer.c: Likewise.
- * ntpdate/ntpdate.c: Likewise.
- * ntpq/ntpq_ops.c: Likewise.
- * ntpd/ntp_peer.c (findpeer): Wrap debug output in DEBUG/debug.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * dot.emacs: Removed wrong indentation of substatements.
- Wrap in c-style.
- From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpd/refclock_palisade.c: Patches from Marc Brett
- * ntpd/refclock_palisade.h: Ditto.
- * util/hist.c: Ditto.
-
-Tue Jun 1 00:40:04 1999 Harlan Stenn <stenn@pogo.udel.edu>
-
- * build: mips-dec-ultrix4.4 hates "set -e"
-
- * flock-build: Created
-
- * build: added -l option
-
-Mon May 31 20:28:40 1999 Harlan Stenn <stenn@pogo.udel.edu>
-
- * README: Removed auto{make,conf}.patch files
-
-Tue May 25 01:20:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.am ($(srcdir)/COPYRIGHT): Added
- (EXTRA_DIST): Remove auto*.patches
-
-Thu May 20 01:03:00 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Makefile.am (dist-hook): Call dos2unix on the .htm files
-
- * ntpd/refclock_palisade.h: Clean up declarations.
-
- * configure.in (ac_cv_struct_ntptimeval_timespec): Added.
- (ac_cv_make_ntptime): Only if ntptimeval does not use timespec.
-
- * util/tickadj.c: Linux Patches
- From: Reg Clemens <reg@dwf.com>
-
-Wed May 19 01:18:24 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.93a
-
- * ntpd/refclock_palisade.h: Restore some lost patches
- From: Kamal A Mostafa <kamal@whence.com>
-
-Sun May 16 13:18:32 1999 Philippe De Muyter <phdm@macqel.be>
-
- * libparse/clk_wharton.c (cvt_wharton_400a, inp_wharton_400a): Expect
- serial output format number 1, not 5.
- (clock_wharton_400a) : Likewise.
- * ntpd/refclock_parse.c (parse_clockinfo): For Wharton 400a clock,
- do not poll, but expect a message every second.
- * html/parsedata.htm : Entry added for Wharton 400a clock.
- * html/driver8.htm : Entry fixed for Wharton 400a clock.
-
-Sun May 16 02:59:46 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.93
-
-Sat May 15 18:53:47 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ntp_refclock): ONCORE requires PPSAPI, CIOGETEV,
- or TIOCGPPSEV.
- Reported by: Reg Clemens <reg@dwf.com>
-
-Fri May 14 23:58:35 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92h2
-
- * configure.in (ac_cv_make_ntptime): Not under Linux. Yes, it
- works for some people. We're tired of the complaints from the
- others.
-
-Fri May 14 18:58:59 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * libntp/authreadkeys.c (authreadkeys): Reject autokey keys.
- Include ntp.h for NTP_MAXKEY definition, ntp_fp.h for types used
- in ntp.h.
-
-Wed May 12 23:02:22 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * libntp/authkeys.c (auth_delkeys): Don't remove autokey keys,
- leave info on KEY_TRUSTED flag alone.
- Include ntp.h for NTP_MAXKEY definition.
-
-Thu May 13 02:19:02 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92h1
-
- * configure.in: patch for ReliantUNIX
- From: Andrej Borsenkow <borsenkow.msk@sni.de>
-
- * ntpd/refclock_oncore.c: Patches
- From: Reg Clemens <reg@dwf.com>
-
-Thu Apr 29 14:01:04 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * html/*.htm: Remove unnecessary &nbsp;. Cleanup <pre></pre>
- sections.
-
- * configure.in: Properly align configure --help output.
- * html/config.htm: Include this version, removing Netscape &nbsp;
- cruft.
-
-Wed Apr 28 15:08:55 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * kernel/sys/parsestreams.h: Only include <sys/ppsclock.h> if
- struct ppsclockev is missing from system headers.
-
- * util/tickadj.c (getoffsets): Define kernels[] only if used.
- (openfile): Rename fd to avoid shadowing global fd.
- (writevar): Likewise.
- (readvar): Likewise.
-
- * parseutil/dcfd.c (read_drift): drift_file is const char *.
- (update_drift): Likewise.
- (adjust_clock): Likewise.
- (main): Likewise.
-
- * ntpd/refclock_parse.c (gps16x_poll): Adapt format to match
- parse->localstate type.
-
- * ntpd/ntp_refclock.c (refclock_gtlin): Only define gotit label
- if used.
-
- * include/l_stdlib.h (openlog, syslog): char * args are const.
-
- * configure.in (*-*-osf4*): Enable declaration of stime().
-
- * ntpd/refclock_oncore.c (oncore_msg_any): Cast args to long to
- match prototype.
- (oncore_msg_En): Likewise.
-
- * include/ntp_refclock.h (struct refclockstat): Declare p_lastcode
- as const char *.
-
- * ntpq/ntpq_ops.c (struct varlist): Define name as const.
-
- * ntpdc/ntpdc.c (tokenize): Define cp as const char *, remove
- wrong cast instead.
-
- * ntpd/ntp_util.c (record_clock_stats): Make text arg const.
- * include/ntpd.h (record_clock_stats): Adapt declaration.
- * ntpd/refclock_oncore.c (oncore_start): Removed superfluous casts.
- (oncore_msg_Cf): Likewise.
- (oncore_msg_Fa): Likewise.
- (oncore_msg_Cj): Likewise.
- (oncore_msg_Ea): Likewise.
- (oncore_msg_Bj): Likewise.
-
- * configure.in (*-*-solaris2.4): Enable declarations of
- gettimeofday(), settimeofday(); they are `protected' by
- __cplusplus in <sys/time.h>.
-
-Tue Apr 27 21:14:47 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * scripts/summary.pl: Use . as default statsdir.
- (do_loop): Accept new loopstats format with additional sys_error
- and clock_stability fields.
- (do_peer): Accept new peerstats format with additional skew field.
-
-Mon Apr 26 01:50:38 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Upgraded automake (1.4a) and autoconf (2.14.1)
-
- * configure.in (ac_refclock_irig): We no longer need stropts.h.
- * ntpd/refclock_irig.c: Ditto
-
-Mon Apr 26 17:33:33 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * configure.in (*-*-irix6*): Don't pass MIPSpro cc-only flag -n32
- to gcc.
-
-Thu Apr 22 15:06:40 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
-
- * ntpd/ntp_config.c (getconfig): IN_CLASSD() expects address in
- host byte order, but struct sockaddr_in.s_addr is in network byte
- order.
- * ntpd/ntp_io.c (io_multicast_del): Likewise.
-
-Sat Apr 24 01:00:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92h
-
- * ntptrace/ntptrace.c: -m maxhost patch
- From: "R. Gary Cutbill" <rgary@chrysalis.com>
-
- * util/ntptime.c: Patches.
- From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-
- * html/accopt.htm, html/assoc.htm, html/authopt.htm,
- html/biblio.htm, html/build.htm, html/clockopt.htm,
- html/confopt.htm, html/copyright.htm, html/debug.htm,
- html/exec.htm, html/extern.htm, html/hints.htm, html/index.htm,
- html/kern.htm, html/miscopt.htm, html/monopt.htm, html/notes.htm,
- html/ntpd.htm, html/ntpdate.htm, html/ntpdc.htm, html/ntpq.htm,
- html/ntptime.htm, html/ntptrace.htm, html/patches.htm,
- html/porting.htm, html/pps.htm, html/rdebug.htm,
- html/refclock.htm, html/release.htm, html/tickadj.htm,
- html/hints/solaris.html: Fixed many typos and problems.
- * acconfig.h (DECL_CFSETISPEED_0, DECL_MRAND48_0, DECL_NLIST_0,
- DECL_SRAND48_0, DECL_STIME_0): New templates.
- * include/l_stdlib.h: Include termios.h to get definition of
- speed_t.
- (cfsetispeed, cfsetospeed, mrand48, nlist, srand48, stime): New
- declarations.
- (openlog): Declare 2- or 3-argument form.
- * configure.in: Enable declarations of functions missing from
- Ultrix V4.3 system headers.
- * ntpd/refclock_oncore.c: Include <sys/types.h>, Ultrix V4.3
- <sys/stat.h> needs it for dev_t.
- From: Rainer Orth <ro@techfak.uni-bielefeld.de>
-
- * ntpdc/ntpdc_ops.c: Reality checks.
-
- * configure.in: netbsd has stubs for the timer_* stuff and doesn't
- support PPSAPI. IRIG requires <stropts.h> .
- From: Frederick Bruckman <fb@enteract.com>
-
- * ntpdc/ntpdc_ops.c: (kerninfo) Report in seconds regardless of
- kernel precision. Report kernel flags as text.
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
-Sun Apr 18 14:26:51 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92g
-
- * ntpd/ntp_refclock.c (refclock_ioctl): We don't want
- PPS_HARDPPSONASSERT by default.
- * ntpd/refclock_oncore.c: Prefer timepps.h over sys/timepps.h
- From: Poul-Henning Kamp <phk@freebsd.org>
-
-Tue Apr 13 17:32:35 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92f
-
- * ntpd/ntp_refclock.c (refclock_open): VMIN should be 1, not 0
- From: Reg Clemens <reg@dwf.com>
-
-Sun Apr 11 18:26:44 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_mx4200.c: Patches/improvements
- * ntpd/ntpd.c (set_process_priority): Lint
- From: Marc.Brett@westgeo.com
-
- * util/ntptime.c: Lint, bit definition cleanup
- From: Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
-
-Wed Apr 7 03:02:23 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c: Use timepps.h or sys/timepps.h
- * configure.in: Look for either timepps.h or sys/timepps.h
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
- * ntpd/ntp_io.c (create_sockets): Don't warn about ENXIO.
- (Several places)
- From: Andrej Borsenkow <borsenkow.msk@sni.de>
-
- * libntp/mfp_mul.c (mfp_mul): Lint.
- Marc.Brett@westgeo.com
-
-Sun Apr 4 03:23:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92e
- Dave redesigned the clock state machine.
-
-1999-02-28 Frank Kardel <kardel@acm.org>
-
- * parseutil/dcfd.c: added DCF77 module powersetup
-
- * ntpd/refclock_parse.c (parse_control): using gmprettydate instead of prettydate()
- (mk_utcinfo): new function for formatting GPS derived UTC information
- (gps16x_message): changed to use mk_utcinfo()
- (trimbletsip_message): changed to use mk_utcinfo()
- ignoring position information in unsynchronized mode
- (parse_start): augument linux support for optional ASYNC_LOW_LATENCY
-
- * ntpd/ntp_control.c (ctl_putclock): cleanup of end of buffer handling
-
- * libparse/parse.c (timepacket): removed unnecessary code
-
- * libparse/clk_trimtsip.c (struct trimble): new member t_utcknown
- (cvt_trimtsip): fixed status monitoring, bad receiver states are
- now recognized
-
- * libntp/prettydate.c (gmprettydate): new function for format date
- and time with respect to UTC
-
- * libntp/gpstolfp.c (GPSWRAP): update GPS rollover to 990 weeks
-
- * include/trimble.h (CMD_RUTCPARAM): control variable name unification
-
- * include/ntp_fp.h: added prototype for gmprettydate()
-
-Sat Feb 27 00:03:16 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/systime.c: definition
- * ntpd/ntp_proto.c: sco5_oldclock declaration
- * configure.in: SCO5_CLOCK for *-*-sco3.2v5*
- * util/tickadj.c (main): SCO5_OLDCLOCK -> SCO5_CLOCK
- From: Kees Hendrikse <kees@echelon.nl>
-
- * ntpd/ntp_config.c (getconfig): Indentation cleanup
- Deal with 'P' case better
- * ntpd/ntpd.c: Declare set_process_priority()
- * ntpd/refclock_dumbclock.c: Lint cleanup
- From: Marc.Brett@westgeo.com
-
-Wed Feb 24 10:22:51 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92d
-
- * configure.in: Dave says we can't enable PARSE clocks by default.
- Also, Solaris 2.7 still has its kernel bug - disable kernel FLL
- there.
- Reported by: Dave Mills <dlm@udel.edu>
-
-Tue Feb 23 23:37:44 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libparse/Makefile.am (parsesolaris.o): Devious hack to deal
- with bug in sys/systm.h .
- Suggested by: Chaim Frenkel <chaimf@pobox.com>
-
-Tue Feb 23 20:46:31 1999 Frank Kardel <kardel@acm.org>
-
- * ntpd/refclock_parse.c: fixed #endifs
- (stream_receive): fixed formats
-
-Mon Feb 22 00:35:06 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92c
-
- * ntpd/refclock_chronolog.c: Lint
- * ntpd/refclock_dumbclock.c: Ditto
- * ntpd/refclock_oncore.c: Ditto
- From: Marc.Brett@westgeo.com
-
- * ntpd/refclock_oncore.c (oncore_msg_any): Call GETTIMEOFDAY, not
- gettimeofday().
- From: david.higgins@mail.ccur.com
-
- * configure.in (MCAST): Not in i386-sequent-sysv4
- Reported by: Joseph Geter <joe.geter@somills.com>
-
- * util/ntptime.c: Linux cleanup.
- From: Reg Clemens <reg@dwf.com>
-
- * configure.in: Rename SCO5_OLDCLOCK to SCO5_CLOCK
- * acconfig.h: Ditto
-
- * ntpd/ntp_proto.c: SCO5_CLOCK stuff
- (init_proto): Use the SCO5_CLOCK stuff
- * libntp/systime.c: SCO5_CLOCK stuff
- (get_systime): Use the SCO5_CLOCK stuff
- (adj_systime): Use the SCO5_CLOCK stuff
- From: Kees Hendrikse <kees@echelon.nl>
-
- * ntpd/ntp_config.c: Added -P option and associated baggage.
- (getstartup): Update help text
- (getconfig): Process -P option
- (getconfig): Update help text
- * ntpd/ntpd.c (set_process_priority): Created.
- (service_main): remove process priority stuff - we want to do at
- after we start up the resolver, so call set_process_priority()
- after getconfig().
- From: Kamal A Mostafa <kamal@whence.com>
-
-1999-02-21 Frank Kardel <kardel@acm.org>
-
- * ntpd/ntp_util.c (hourly_stats): removed unused variable
-
- * libntp/ieee754io.c: renamed index to fieldindex to avoid index() name clash
-
- * ntpd/refclock_parse.c (parse_start): add initialization for Linux PPSkit
-
-Sun Feb 21 17:53:33 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_io.c (create_sockets): Skip interfaces that are really
- just aliases.
- From: "Erik R. Leo" <erikl@sover.net>
-
- * configure.in: 4.0.92b
-
- * ntpd/ntpd.c (service_main): Check for an error return from
- sched_get_priority_max().
-
-Wed Feb 17 03:48:47 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92a
-
- * configure.in: configure.in requires autoconf 2.13 or later.
- Reported by Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
-
-Wed Feb 17 00:12:11 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * acconfig.h: TERMIOS_NEEDS__SVID3
- * configure.in: Ditto
- * ntpd/refclock_palisade.h: Ditto
- * include/ntp_refclock.h: Ditto
- * ntpd/ntpd.c (service_main): We want sched_get_priority_max().
- From: Kamal A Mostafa <kamal@whence.com>
-
- * ntpd/ntp_refclock.c (refclock_open): Zero the entire c_cc[] array.
- From: Reg Clemens <reg@dwf.com>
-
-Tue Feb 16 23:37:49 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Updated ansi2knr
- Reported by: Marc Brett
-
-Mon Feb 15 02:55:28 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.92
-
- * ntpd/ntp_refclock.c: Added refclock_chronolog and
- refclock_dumbclock.
- From: Robert McMillin <rlm@syseca-us.com>
-
-Sun Feb 14 15:57:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * dropped SCO3 support #defines.
- * changed SCO5_TICKADJ #define to SCO5_OLDCLOCK
- * Added code in libntp/systime.c to accumulate changes until a whole
- tick can be added or dropped. Adjusted gettimeofday() output
- to include the contents of the accumulator.
- * cleaned up util/tickadj.c; tickadj -As now does the right thing.
- From: Kees Hendrikse <kees@echelon.nl>
-
- * ntpq/ntpq.c: Rename delay() to auth_delay()
- Reported by: Andrej Borsenkow <borsenkow.msk@sni.de>
-
- * ntpd/refclock_palisade.h: Cleanup.
- From: Marc.Brett@westgeo.com
-
- * ntpd/ntp_refclock.c (refclock_ioctl): Typo.
- From: Reg Clemens <reg@dwf.com>
-
- * ntpd/ntp_io.c (create_sockets): Only bind a given network once.
- From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
-
-Sat Jan 30 11:48:37 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.91f
-
-Thu Jan 28 22:58:40 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_parse.c (CLK_REALTYPE): We really want ttl, not hmode.
- * ntpd/ntp_config.c (getconfig): "mode" really should update the
- ttl member, not the hmode member.
-
- * ntpd/refclock_local.c: More offset cleanup from Dave.
-
-Thu Jan 28 00:15:20 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.91e
-
- * ntpd/refclock_local.c: Bugfix.
- From: Dave Mills
-
- * ntpd/refclock_palisade.c: Lint/IRIX portability cleanup
- * ntpd/refclock_palisade.h: Re-enable the declaration of float()
- * ntpd/ntp_io.c (create_sockets): Initialize size to 0
- From: Marc.Brett@westgeo.com
-
- * ntpd/refclock_parse.c (CLK_REALTYPE): Use hmode, not ttl.
- * configure.in (ac_cv_var_no_parenb_ignpar): Not under Linux.
- Reported by: Thomas Quinot <thomas@Cuivre.FR.EU.ORG>
-
- * ntpdc/ntpdc.c (my_delay): Renamed, from delay.
- Reported by: Andrej Borsenkow <borsenkow.msk@sni.de>
-
-Tue Jan 26 00:56:10 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.91d
-
- * ntpq/ntpq.c: Y2K patches
- From: Marc.Brett@westgeo.com
-
- * html/driver29.htm: New version
- * ntpd/refclock_palisade.c: Ditto
- * ntpd/refclock_palisade.h: Ditto
- From: Sven_Dietrich@Trimble.COM
-
- * upgrade ansi2knr.c
-
- * Some stuff that Dave did.
-
- * configure.in: 4.0.91c
-
- * ntpd/refclock_oncore.c: Prototype cleanup. Enum cleanup.
- * ntpd/ntp_proto.c (clock_select): Fix memory leak.
- * configure.in (ac_cv_struct_ppsclockev): Might need sys/time.h to
- check for struct clockppsev. Return pce->serial, not 0;
- From: Marc.Brett@westgeo.com
-
- * ntpd/refclock_oncore.c (oncore_msg_En): Clean up.
- From: John.Hay@mikom.csir.co.za
-
-Mon Jan 25 11:50:29 1999 Philippe De Muyter <phdm@macqel.be>
-
- * libparse/parse_conf.c (clockformats): Entry added for
- clock_wharton_400a.
- * libparse/clk_wharton.c: New file.
- * libparse/Makefile.am (libparse_a_SOURCES): clk_wharton.c added;
- (libparse_kernel_a_SOURCES): kclk_wharton.c added.
- (kclk_wharton.o): New dependency rule.
- * ntpd/refclock_parse.c (parse_clockinfo): Entry added for the
- WHARTON clock (mode 15).
- * acconfig.h (CLOCK_WHARTON_400A): New configuration macro.
- * configure.in (CLOCK_WHARTON_400A): Macro defined like other
- CLOCK_xxx macros.
-
-Sun Jan 24 13:51:30 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c (do_resolve_internal): Missing #ifdef DEBUG
- From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
-
- * Makefile.am (SUBDIRS): Lose authstuff
- * configure.in: Ditto
-
-Sat Jan 23 15:28:03 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.91b
-
-Sat Jan 23 15:02:25 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_oncore.c: use HAVE_STRUCT_PPSCLOCKEV
- * acconfig.h: HAVE_STRUCT_PPSCLOCKEV
- * configure.in (ac_cv_struct_ppsclockev): Added test
-
-Thu Jan 21 15:35:25 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.91a
-
- * ntpd/refclock_nmea.c (nmea_receive): Call refclock_process()
- every second (or each time a nmea string is received).
- From: John Hay <jhay@mikom.csir.co.za>
-
- * ntpd/ntp_refclock.c (refclock_ioctl): Use TIOCPPS if we have it.
- (refclock_ioctl): Use LDISC_CLKPPS, not LDISC_PPS when deciding
- how to set str.
- * ntpd/ntp_loopfilter.c: Lose unused ntp_gettime() stuff.
- * ntpd/ntp_request.c: Ditto.
- * ntpd/refclock_local.c: Ditto.
- * ntpd/refclock_shm.c (shm_poll): Fix the refclock_process() call.
- * ntpd/refclock_oncore.c: patches and cleanup
- * configure.in: ioctl/PPS checks, ONCORE cleanup
- * acconfig.h: ONCORE cleanup
- From: Reg Clemens <reg@dwf.com>
-
- * configure.in (CFLAGS): cc on Sequent wants -Wc,+abi-socket.
- We also need to figure out why -lsocket isn't being detected;
- -lsocket is needed.
- From: Dana Kaempen <decay@flash.net>
-
- * include/ntp_stdlib.h: AIX portability patches, header cleanup.
- * ntptrace/ntptrace.c: Ditto.
- * ntpdate/ntpdate.c: Ditto.
- * ntpd/refclock_true.c: Ditto.
- * ntpd/refclock_mx4200.c: Ditto.
- * ntpd/refclock_jupiter.c: Ditto.
- * libntp/msyslog.c: Ditto.
- From: Marc.Brett@waii.com
-
-Sun Jan 10 15:15:07 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.91
-
-Sat Jan 9 00:11:34 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_stdlib.h: msyslog() is declared differently if we're
- not __STDC__.
-
- * include/ntp_types.h: It's HAVE_PROTOTYPES, not USE_PROTOTYPES.
- * include/ntp_machine.h: Ditto.
-
-Fri Jan 8 20:47:10 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Upgrade to autoconf-2.13
- Do the prototypes check much earlier, as it might alter CFLAGS and
- things which will affect other tests.
-
- * ntpd/ntp_request.c (do_conf): The problem was with a template
- for "version" on an IRIX C compiler...
- From: Marc.Brett@waii.com
-
- * libntp/authkeys.c: #include config.h first.
- Reported by: brian.bumpass@funb.com
-
-Thu Jan 7 00:24:35 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * util/tickadj.c (main): return() instead of exit().
- * ntpd/ntp_request.c (do_conf): Disambiguate ||.
- * ntpd/ntp_proto.c (clock_select): Initialize variables.
- From: Marc.Brett@waii.com
-
- * scripts/ntpver.in: Use PATH_SH
-
- * configure.in (PATH_SH): Added.
-
-Tue Jan 5 19:02:51 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90h
-
- * html/driver30.htm: Updated.
- * html/refclock.htm: Refer to driver30
- * ntpd/refclock_oncore.c: Vastly improve and make less FreeBSD centric,
- From: Poul-Henning Kamp <phk@critter.freebsd.dk> and
- Reg.Clemens <reg@dwf.com>
-
- * include/ntp.h: Portability/lint patches
- * libntp/binio.c: Ditto.
- * libntp/caljulian.c: Ditto.
- * libntp/caltontp.c: Ditto.
- * libntp/ieee754io.c: Ditto.
- * libntp/md5c.c: Ditto.
- * libntp/mfp_mul.c: Ditto.
- * libntp/msyslog.c: Ditto.
- * libntp/statestr.c: Ditto.
- * libntp/systime.c: Ditto.
- * libparse/clk_trimtsip.c: Ditto.
- * libparse/data_mbg.c: Ditto.
- * libparse/parse.c: Ditto.
- * ntpd/ntp_control.c: Ditto.
- * ntpd/ntp_filegen.c: Ditto.
- * ntpd/ntp_intres.c: Ditto.
- * ntpd/ntp_io.c: Ditto.
- * ntpd/ntp_peer.c: Ditto.
- * ntpd/ntp_proto.c: Ditto.
- * ntpd/ntp_util.c: Ditto.
- * ntpd/ntpd.c: Ditto.
- * ntpd/refclock_arc.c: Ditto.
- * ntpd/refclock_chu.c: Ditto.
- * ntpd/refclock_datum.c: Ditto.
- * ntpd/refclock_leitch.c: Ditto.
- * ntpd/refclock_parse.c: Ditto.
- * ntpd/refclock_usno.c: Ditto.
- * ntpq/ntpq.c: Ditto.
- * util/tickadj.c: Ditto.
- From: Marc.Brett@waii.com
-
-Mon Jan 4 00:56:55 1999 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90g
-
- * ntpd/ntp_config.c (getconfig): MODE was setting ttl, not hmode.
- Reported by: Carsten Emde <ce@ceag.ch>
-
-Fri Dec 4 01:01:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90f
-
- * ntpd/refclock_mx4200.c: New version
- From: Marc.Brett@waii.com
-
-1998-12-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_config.c (do_resolve_internal): If fork fails, say why.
- Reported by: Jeff_Dennison@admin.tc.faa.gov
-
- * ntpd/ntpd.c (ntpdmain): fork() can return a -1. Someday we'll
- report this condition...
-
-1998-12-02 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90e
-
- * ntpd/refclock_palisade.c: Reformat code so ansi2knr will work
- * ntpd/refclock_palisade.h: Ditto
- From: Marc.Brett@waii.com
-
-Sun Nov 29 21:00:53 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90d
-
- * configure.in (CFLAGS): Use "-O2 -g3 -n32" by default for Irix6.2
- and later.
- Reported by: Jack Bryans <jbryans@csulb.edu>
-
-1998-11-29 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90c
-
- * ntpd/refclock_oncore.c (oncore_msg_En): Convert to nano
- From: John Hay <jhay@mikom.csir.co.za>
-
- * include/ntp_request.h (RM_VN_MODE): Add version parameter, so
- xntpdc will work across v3 and v4.
- * ntpd/ntp_request.c: Track requested version
- (req_ack): Use requested version in RM_VN_MODE
- (more_pkt): Ditto
- (flush_pkt): Ditto
- (process_private): Get requested version
- * ntpd/ntp_intres.c (request): Use default version
- * ntpdc/ntpdc.c (sendrequest): Ditto
- From: John Hay <jhay@mikom.csir.co.za>
-
-Fri Nov 27 14:27:21 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_palisade.c: Lint cleanup
- * ntpd/refclock_palisade.h: Ditto.
- From: Marc Brett <mbrett@rgs0.london.waii.com>
-
-Mon Nov 23 04:45:03 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90b
-
- * New code and cleanup for the NT stuff
- From: Carl Byington <carl@five-ten-sg.com>
-
-Sat Nov 21 21:21:45 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90a
-
- * libntp/systime.c (step_systime): net_set_tod calls clock_settime.
- * libntp/machines.c (ntp_set_tod): Take a 2nd arg for NT.
- * include/ntp_machine.h: ntp_set_tod() has 2 args always.
- * ports/winnt/bldrel.bat: Typo.
- From: Carl Byington <carl@five-ten-sg.com>
-
- * ntpd/ntp_intres.c (findhostaddr): h_errno is a #define under AIX.
- * configure.in: clock_settime is a stub in AIX4.
- From: Perry Ross <pross@platinum.com>
-
- * libntp/Makefile.am (EXTRA_DIST): Lose libntp.mak
- * ntpd/Makefile.am (EXTRA_DIST): Ditto.
- * ntpdate/Makefile.am (EXTRA_DIST): Ditto.
- * ntpdc/Makefile.am (EXTRA_DIST): Ditto.
- * ntpq/Makefile.am (EXTRA_DIST): Ditto.
- From: Greg Schueman <schueman@ix.netcom.com>
-
-Sat Nov 21 12:33:16 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.90
-
- Nano changes from Dave Mills.
-
-Thu Nov 19 04:23:46 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp_machine.h: STREAM also needs HAVE_SYS_STREAM_H
- Reported by: Ronald Cole <ronald@forte-intl.com>
-
-Mon Nov 16 19:17:34 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73e14
-
- * util/ntptime.c (main): Protect STA_NANO
-
- * ntpd/refclock_oncore.c: General overhaul and simplifications.
- The new manual clarifies a lot of fine points, and the driver has
- been suitably simplified. Uses Site Survey if possible, otherwise
- does it by hand. Should also work with non-UT models, as long as
- they talk the Motorola Binary Protocol. The driver Doesn't (need
- to) know where the author lives anymore.
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
- * ntpd/refclock_palisade.h: New version.
- * ntpd/refclock_palisade.c: New version.
- From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
-
-Sat Oct 24 01:19:21 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73e13
-
- * ntpdc/ntpdc_ops.c (clkbug): Patches
- * ntpd/ntp_refclock.c (refclock_buginfo): Patches
- From: Marc.Brett@waii.com
-
-Sat Oct 10 20:13:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73e12
-
- * ntpd/ntp_util.c (hourly_stats): Added prio_set stuff.
-
- * ntpd/ntpd.c (ntpdmain): HAVE_SETPGRP_0 typo.
- * parseutil/dcfd.c (detach): Ditto.
- * ntpd/ntp_control.c (ctl_putpeer): Sometimes, peer->dstadr is
- NIL.
- From: Perry Ross <pross@platinum.com>
-
- * ntpd/ntpd.c:
- Some systems use sys/sched.h, not sched.h (Irix)
- * configure.in (CFLAGS): nextstep needs -posix.
- Reported by: Jack Bryans <jbryans@csulb.edu>
-
-Sat Oct 3 02:32:46 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73e11
-
- * configure.in (ac_refclock_palisade): Needs termios.
-
- * libntp/mktime.c: Some systems need sys/types.h
-
- * configure.in: Added AC_TYPE_SIZE_T and AC_CHECK_TYPE(time_t, long)
- The time_t stuff should only be needed on Older machines, so the
- fact that I'm using a long shouldn't be a problem (hollow laugh).
-
- * include/l_stdlib.h: Sometimes we need to #include <sys/types.h>
-
- * libntp/Makefile.am (../include/des.h): Typo.
-
-Fri Oct 2 20:52:47 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_intres.c (request): Accept responses back thru V2.
-
-Thu Oct 1 00:11:16 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73e9
-
- * ntpd/ntpd.c (catch_danger): Added.
- (ntpdmain): AIX SIGDANGER stuff
- From: Lars-Owe Ivarsson <larsowe@paradisaea.its.uu.se>
-
- * configure.in:
- * include/ntp_machine.h:
- * include/ntp_string.h:
- * libntp/machines.c:
- * libparse/clk_hopf6021.c:
- * libparse/clk_trimtsip.c:
- * ntpd/refclock_leitch.c:
- * ntpd/refclock_palisade.c:
- * ntpd/refclock_parse.c:
- Here are some patches to suppress warnings from various compilers
- (IRIX 5.3, MipsPro C 7.1 on IRIX 6.4, AIX 4.1) and loaders (IRIX
- 5.3, IRIX 6.4). Shouldn't affect functionality at all.
- From: Marc Brett <mbrett@rgs0.london.waii.com>
- (I got similar patches for AIX from Lars-Owe Ivarsson
- <larsowe@paradisaea.its.uu.se>)
-
-Thu Sep 24 21:33:50 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: '73e8
-
- * configure.in: AIX4 stubs the POSIX timer_ stuff,
- sched_setscheduler, and mlockall.
- Reported by: Lars-Owe Ivarsson <larsowe@paradisaea.its.uu.se>
-
- * configure.in: OpenBSD stubs the POSIX timer_ stuff.
- Reported by: sidney august cammeresi iv <cammeres@uiuc.edu>
- (and several other folks whose names I can't find at the moment)
-
-Mon Sep 21 15:35:23 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: '73e7
-
- * ntpd/refclock_parse.c: Missing declaration
- From: Marc Brett <mbrett@rgs0.london.waii.com>
-
- * include/README: Remove old MCAST descriptions
-
- * include/Makefile.am (noinst_HEADERS): Lose sun-in.h .
-
-Mon Sep 21 14:50:12 1998 Harlan Stenn <stenn@grundoon.udel.edu>
-
- * ntpdate/ntpdate.c (timer): Properly format the definition.
-
-Sun Sep 20 23:02:50 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: '73e6
-
- * include/Makefile.am (noinst_HEADERS): Renamed in.h to sun-in.h
-
-Fri Sep 18 01:05:55 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: '73e5
-
- * ntpd/refclock_palisade.c: SCO patch
- From: Kamal A Mostafa <kamalm@sco.com>
-
- * libparse/clk_trimtsip.c (cvt_trimtsip): Fix rollover bug.
- From: "Michael J. Tubby B.Sc. G8TIC" <Mike.Tubby@thorcom.co.uk>
-
- * libntp/authencrypt.c:
- * libntp/systime.c:
- * ntpd/refclock_acts.c:
- * ntpd/refclock_arbiter.c:
- * ntpd/refclock_arc.c:
- * ntpd/refclock_as2201.c:
- * ntpd/refclock_atom.c:
- * ntpd/refclock_chu.c:
- * ntpd/refclock_conf.c:
- * ntpd/refclock_datum.c:
- * ntpd/refclock_heath.c:
- * ntpd/refclock_hpgps.c:
- * ntpd/refclock_irig.c:
- * ntpd/refclock_leitch.c:
- * ntpd/refclock_nmea.c:
- * ntpd/refclock_palisade.c:
- * ntpd/refclock_parse.c:
- * ntpd/refclock_pst.c:
- * ntpd/refclock_trak.c:
- * ntpd/refclock_true.c:
- * ntpd/refclock_usno.c:
- * ntpd/refclock_wwvb.c:
- Typos, cleanup, and bugfixes
- From: Marc Brett <mbrett@rgs0.london.waii.com>
-
- * ntpd/ntp_timer.c (timer): Typo.
- * include/ntp_refclock.h: in refclockstat, clockdesc should be const.
- * ntpd/ntp_io.c (create_sockets): Typo.
- * ntpd/ntp_control.c (free_varlist): Use the appropriate cast when
- calling free().
- (set_var): Use char *td for non-const char data.
- (ctl_getitem): Use char * for non-const data.
- (Many of these reported by Marc Brett)
-
-Sun Sep 13 19:19:09 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntpd.c: Added nofork declaration.
- (ntpdmain): Initialize it...
- * ntpd/ntp_config.c: added nofork.
- Updated ntp_options.
- (getstartup): Updated "usage" string. Deal with -n flag.
- (getconfig): Ditto.
- From: Jeffrey Hutzelman <jhutz@cs.cmu.edu>
-
- * ntpd/ntp_io.c (open_socket): Use ntoa() to print out the address
- when bind() fails. (in 2 places)
- Reported by: "Markus W. Fehr" <mfehr@ch.ibm.com>
- Only soft-fail if an interface is unavailable.
- (create_sockets): Don't SO_REUSEADDR if the interface is unavailable.
- From: "Markus W. Fehr" <mfehr@ch.ibm.com>
-
- * configure.in: If we --disable-all-clocks, then don't enable
- parse clocks by default.
- Reported by: Marion Hakanson <hakanson@cse.ogi.edu>
-
-Sat Aug 22 23:58:14 1998 Frank Kardel <kardel@acm.org>
-
- * ntpd/refclock_parse.c (local_input): fixed IO handling for non-STREAM IO
-
-Sun Aug 16 20:13:32 1998 Frank Kardel <kardel@acm.org>
-
- * libntp/ieee754io.c: debug information only compile for LIBDEBUG case
-
- * ntpd/refclock_parse.c (gps16x_message): reduced UTC parameter information (dropped A0,A1)
- made uval a local variable (killed one of the last globals)
- (sendetx): added logging of messages when in debug mode
- (trimble_check): added periodic checks to facilitate re-initialization
- (trimbletsip_init): made use of EOL character if in non-kernel operation
- (trimbletsip_message): extended message interpretation
- (getdbl): fixed data conversion
-
- * libparse/parse_conf.c (clockformats): Trimble TSIP driver now also
- available for kernel operation
-
- * libparse/info_trimble.c: re-generated
-
- * libparse/clk_trimtsip.c (cvt_trimtsip): initial kernel capable version (no more floats)
- (clock_trimtsip =): new format name
-
- * libparse/clk_trimtaip.c (clock_trimtaip =): changed format name
-
- * include/trimble.h (CMD_RSTATTRACK): renamed mode 6 variable name
-
- * scripts/monitoring/ntploopwatch: moved emacs mode selector
-
-Mon Aug 10 15:32:48 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_acts.c: Patch cleanup
- * ntpd/ntp_refclock.c: Patch cleanup
- * ntpd/ntp_timer.c: Patch cleanup
- From: qli@huey.udel.edu
-
-Wed Jul 29 15:23:21 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/machines.c: IRIX needs time.h
- Reported by: Judith E Bush <jbush@fi.edu>
-
- * ntpd/ntpd.c (service_main): Better AIX PROCLOCK fix.
- From: Matt Ladendorf <matt.ladendorf@anheuser-busch.com> and
- Grover Davidson <Grover.Davidson@anheuser-busch.com>
-
-Wed Jul 29 01:36:48 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntpd.h (MAXINTERFACES): Moved here...
- * ntpd/ntp_io.c: From here...
- (create_sockets): Only deal with MAXINTERFACES.
- (create_sockets): Only deal with specified interfaces.
-
- * ntpd/ntp_config.c (CONFIG_LISTEN): Added
- Added ifnum and listenaddrs[]
- (getconfig): Added defn for "addr"
- (getconfig): Initialize ifnum.
-
- * ntpd/ntpd.c (service_main): call init_io after getconfig
- From: Vebjorn Ljosa <ljosa@initio.no>
-
-Wed Jul 29 00:42:28 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_palisade.c: Use NEED_HPUX9_TIOCM_STUFF
-
- * acconfig.h (NEED_HPUX9_TIOCM_STUFF): Added.
-
- * configure.in (REFCLOCK_PALISADE): Needs termio*.h
- (NEED_HPUX9_TIOCM_STUFF): Added.
-
- * ntpd/ntp_io.c (create_sockets): Use strchr instead of strstr.
-
- * libntp/mktime.c: #include <sys/types.h>
-
- * libntp/ieee754io.c: #include <sys/types.h>
-
-Wed Jul 29 00:24:22 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_acts.c (ACTS_MAXPOLL): 14 -> 18.
- Import current_nextdate
- (acts_receive): Update peer->nextdate with current_nextdate
- (acts_poll): Call acts_timeout() (debugging)
-
- * ntpd/ntp_refclock.c: Export current_nextdate.
- (refclock_transmit): Check peer->valid >= NTP_SHIFT - 2, not >.
- (refclock_transmit): hpoll wiggles, update current_nextdate
-
- * ntpd/ntp_timer.c: #include "ntp_refclock.h"
- (MODE_MANUAL): Added.
- (timer): MODE_MANUAL stuff
-
- From: qli@huey.udel.edu
-
-Tue Jul 28 23:23:15 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Check for inet_ntoa in -lbind .
-
- * ntpd/ntpd.c: #undef PROCLOCK for AIX.
-
-Mon Jul 20 01:06:24 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (AC_TYPE_SIZE_T): Added.
-
-Sat Jul 11 09:38:30 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73e
-
- * ports/winnt/: Replaced with new code (no SHM or PALISADE)
- From: Greg Schueman <schueman@ix.netcom.com>
-
-Fri Jul 10 12:12:59 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73d
-
- * include/ntp_machine.h (HAVE_SRANDOM): VxWorks patches
- (HAVE_RANDOM): Ditto.
- (CALL): Ditto.
- From: Casey Crellin <ccrellin@mweb.com>
-
- * ntpd/refclock_parse.c (local_input): Typo.
- Reported by: Tony Li <tony1@home.net>
-
-Wed Jul 8 01:49:01 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73c
-
- * PARSE patches from Frank Kardel
-
- * libntp/machines.c (ntp_set_tod): Get it right.
-
-Sun Jul 5 22:15:34 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73a
-
- * kernel/sys/timex.h (MOD_CANSCALE): Add rest of patch to handle
- scaling.
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
-Wed Jun 10 21:16:01 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.73
-
- * ntpd/ntp_loopfilter.c (local_clock): MOD_CANSCALE patches, and
- be careful with the integration if we're nearly perfect.
- From: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
- * util/tickadj.c (main): Typo fix...
- From: Marion Hakanson <hakanson@cse.ogi.edu>
-
- * ntpd/ntp_io.c (create_sockets): Attempt to ignore alias
- interfaces.
- From: Kenneth Maupin <maupin@easystreet.com>
-
- * ntpd/ntp_refclock.c: PPS fixes
- * ntpd/refclock_msfees.c (msfees_start): Portability fixes and
- PPS/STREAM enhancements
- From: John Hay <jhay@mikom.csir.co.za>
-
- * ntpd/ntp_refclock.c (refclock_gtlin): Patch...
- From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
-
-Sun Jun 28 18:43:30 1998 Frank Kardel <kardel@acm.org>
-
- * libntp/buftvtots.c (buftvtots): using WORD_BIGENDIAN instead of XNTP_BIG_ENDIAN
-
- * libparse/clk_trimtsip.c (getflt): fixed ENDIAN issue
- (getdbl): fixed ENDIAN issue
- (getint): use get_msb_short()
- (cvt_trimtsip): use gpstolfp() for conversion
-
- * libntp/Makefile.am (libntp_a_SOURCES): added gpstolfp.c source
-
- * libntp/binio.c: added {get,put}_msb_{short,long}() functions
-
- * include/ntp_fp.h: added gpstolfp() prototype
-
- * include/binio.h: added binio MSB prototypes
-
-Sat Jun 13 13:48:17 1998 Frank Kardel <kardel@acm.org>
-
- * parseutil/testdcf.c: signed/unsigned
- SYSV clock name clash fixed
-
- * parseutil/dcfd.c: signed/unsigned
- SYSV clock name clash fixed
- year wrapping at 1998
- ctype macros take ints as args
-
- * ntptrace/ntptrace.c (decodeipaddr): ctype macros take ints as args
-
- * ntpq/ntpq_ops.c (doprintpeers): signed/unsigned
-
- * ntpq/ntpq.c: ctype macros take ints as args
- signed/unsigned
-
- * ntpdc/ntpdc.c: signed/unsigned
-
- * ntpd/refclock_usno.c: signed/unsigned
-
- * ntpd/refclock_true.c (true_send): signed/unsigned, name clashes
-
- * ntpd/refclock_parse.c: signed/unsigned, name clashes
-
- * ntpd/refclock_nmea.c (nmea_receive): ctype macros take ints as args
-
- * ntpd/refclock_heath.c (heath_receive): prototypes (signed/unsigned issues)
-
- * ntpd/refclock_arc.c: prototypes (signed/unsigned issues)
-
- * ntpd/refclock_acts.c: prototypes (signed/unsigned issues)
-
- * ntpd/ntpd.c: prototypes (signed/unsigned issues)
-
- * ntpd/ntp_util.c (getauthkeys): prototypes (signed/unsigned issues)
- fix SYSV clock name clash
-
- * ntpd/ntp_request.c: prototypes (signed/unsigned issues)
- fix SYSV clock name clash
-
- * ntpd/ntp_io.c (input_handler): variable naming, signed/unsigned
-
- * ntpd/ntp_intres.c (readconf): signed/unsigned issues
-
- * ntpd/ntp_control.c: prototypes (signed/unsigned issues)
- fix SYSV clock name clash
-
- * ntpd/ntp_config.c: fix SYSV clock name clash
- ctype macros take ints as args
-
- * libparse/parsestreams.c: dirt (debug) removed
-
- * libparse/parsesolaris.c: more prototypes
- fix name clashes
- allow for ansi2knr
-
- * libparse/parse.c: bcopy/memcpy cleanup
- fix SYSV clock name clash
-
- * libparse/clk_trimtsip.c (cvt_trimtsip): fix SYSV clock name clash
-
- * libparse/clk_trimtaip.c (cvt_trimtaip): fix SYSV clock name clash
-
- * libparse/clk_schmid.c (cvt_schmid): fix SYSV clock name clash
-
- * libparse/clk_rcc8000.c (cvt_rcc8000): fix SYSV clock name clash
-
- * libparse/clk_rawdcf.c (cvt_rawdcf): fix SYSV clock name clash
-
- * libparse/clk_hopf6021.c (cvt_hopf6021): fix SYSV clock name clash
-
- * libparse/clk_dcf7000.c (cvt_dcf7000): fix SYSV clock name clash
-
- * libparse/clk_computime.c: fix SYSV clock name clash
-
- * libntp/octtoint.c (octtoint): ctype macros take ints as args
-
- * libntp/mstolfp.c (mstolfp): ctype macros take ints as args
-
- * libntp/hextolfp.c (hextolfp): ctype macros take ints as args
-
- * libntp/hextoint.c (hextoint): ctype macros take ints as args
-
- * libntp/decodenetnum.c (decodenetnum): ctype macros take ints as args
-
- * libntp/atouint.c (atouint): ctype macros take ints as args
-
- * libntp/atolfp.c (atolfp): ctype macros take ints as args
-
- * libntp/atoint.c (atoint): ctype macros take ints as args
-
- * kernel/sys/parsestreams.h: STREAM macro gone in favor of HAVE_SYS_STREAM_H
-
- * include/parse.h: STREAM macro gone in favor of HAVE_SYS_STREAM_H
-
-Fri Jun 12 11:08:53 1998 Frank Kardel <kardel@acm.org>
-
- * ntpd/ntp_timer.c: prototype fixes (ansi2knr/knr compiler)
-
- * ntpd/ntp_proto.c (make_keylist): type cast for e(!!!)malloc()
-
- * libparse/Makefile.am: adjust for ansi2knr
-
- * libntp/ieee754io.c: ansi2knr compatibility
-
- * include/ntp_refclock.h: added pps_sample() extern declaration
- added refclock_process_offset() extern declaration
-
- * include/ntp.h: fixed function * prototypes
-
- * ntpd/refclock_parse.c (bind): added input routine
- (local_input): added input routine
-
- * ntpd/ntp_io.c (input_handler): direct input processing for
- refclocks to save input recv buffers
-
- * include/ntp_refclock.h: added int io_input(struct recvbuf *)
- pointer to allow direct processing of read refclock data in
- order to save many bug recv buffers on single character input
- (problem with "fast" machines)
-
- * parse_conf.c: conditional compile macros fixed
-
- * parse.c: conditional compile macros fixed
- printf prototype
-
- * clk_trimtaip.c: conditional compile macros fixed
- printf prototype
-
- * clk_schmid.c: conditional compile macros fixed
- printf prototype
-
- * clk_rcc8000.c: conditional compile macros fixed
- printf prototype
-
- * clk_hopf6021.c: conditional compile macros fixed
- printf prototype
-
- * clk_dcf7000.c: conditional compile macros fixed
- printf prototype
-
- * clk_computime.c: conditional compile macros fixed
- printf prototype
-
-Sat Jun 6 07:41:54 1998 Frank Kardel <kardel@acm.org>
-
- * ntpd/refclock_palisade.c: fixed termio.h / termios.h inclusion
-
- * include/ntp_refclock.h: made refclockproc/clockdesc const
-
- * ntpd/ntp_control.c (ctl_putpeer): avoided ambigous 'else' (gcc)
-
- * ntpd/refclock_parse.c (parse_start): added BURST mode initialisation
-
- * scripts/stats/summary.sh (CLOCK): allow for Y2K log files
-
- * libparse/clk_rawdcf.c: simplified condidional compile expression
-
-Wed May 27 08:10:43 1998 Frank Kardel <kardel@acm.org>
-
- * include/Makefile.am (noinst_HEADERS): added new header files
- mbg_gps166.h binio.h ascii.h ieee754io.h
-
- * ntpdc/ntpdc.c (sendrequest): fixed info_auth_keyid setting it
- got accidentally trashed every other round
-
-Mon May 25 22:55:07 1998 Frank Kardel <kardel@acm.org>
-
- * configure.in: PARSE clocks are enabled by default whenever
- possible (termio.h or termios.h present)
- removed RAWDCF_SETDTR feature
-
- * acconfig.h: removed RAWDCF_SETDTR option (now implicit by
- compilation and run time configuration)
-
- * ntpd/refclock_parse.c (rawdcf_init): offer a RAWDCF clock (type 14)
- that attempts to set the DTR modem line for receiver power
-
- * libparse/clk_meinberg.c (cvt_meinberg): support current standard
- Meinberg data formats
-
-Sun May 24 09:43:19 1998 Frank Kardel <kardel@acm.org>
-
- * libparse/clk_rawdcf.c (pps_rawdcf): trigger pps on zero going
- edge - that is simpler wiring (Rx->DCD).
-
- * parseutil/testdcf.c (wday): const keyword
-
- * parseutil/dcfd.c (cvt_rawdcf): sign issues and calling interfaces
-
- * ntpq/ntpq.c (MAXVARLEN): adjusted internal buffer length for
- variable values
-
- * ntpd/refclock_parse.c: adjust to new io handling (fixed formats
- only)
- (mkreadable): don't include >"< in readable ASCII output (-> ntpq
- parsing)
- output debug messages to stdout instead of msyslog()
- fixed version information string
-
- * ntpd/refclock_atom.c (pps_sample): new auxiliary pps interface
-
- * libparse/parsestreams.c (parserput): get event status consistent
- with direct calls
- (zs_xsisr): simulate CARRIER status to avoid unnecessary M_xHANGUP
- events
-
- * libparse/parsesolaris.c (parserput): get event status consistent
- with direct calls
- (zs_xsisr): simulate CARRIER status to avoid unnecessary M_xHANGUP
- events
-
- * libparse/parse.c: removed old input cruft
- (parse_restart): new generic input help function
- (parse_addchar): ditto
- (parse_end): ditto
- (pps_one): new generic pps help function
- (pps_zero): ditto
-
- * libparse/clk_trimtsip.c (clock_trimtsip =): new input handling
-
- * libparse/clk_trimtaip.c (clock_trimtaip =): new input handling
- (inp_trimtaip): new input handler
-
- * libparse/clk_schmid.c (clock_schmid =): new input handling
- (inp_schmid): new input handler
-
- * libparse/clk_rcc8000.c (clock_rcc8000 =): new input handling
- (inp_rcc8000): new input handler
-
- * libparse/clk_rawdcf.c (clock_rawdcf =): new input handling
- (snt_rawdcf): adjusted to new input handling
- (inp_rawdcf): new input handler
-
- * libparse/clk_meinberg.c (clock_meinberg): new input handling
- (gps_input): new input handler
- (mbg_input): new input handler
-
- * libparse/clk_hopf6021.c (clock_hopf6021 =): new input handling
- (inp_hopf6021): new input handler
-
- * libparse/clk_dcf7000.c (clock_dcf7000 =): new input handling
- (inp_dcf7000): new input handler
-
- * libparse/clk_computime.c (clock_computime =): new input handling
- (inp_computime): new input handler
-
- * libparse/Makefile.am: link kernel module with libntp.a
-
- * include/parse.h (struct parse): removed old data structure cruft
- (new input model) new PARSE_INP* macros for input handling
- removed old SYNC_* macros from old input model
- (struct clockformat): removed old parse functions in favor of the
- new input model
- updated prototypes
-
- * include/ntp_refclock.h: prototype for refclock_atom pps_sample()
- interface
-
- * acconfig.h: added PPS_SAMPLE define
- * configure.in (LIBPARSE): added PPS_SAMPLE configuration
- <refclock_atom aux interface>
-
- * libntp/systime.c (adj_systime): debug output (> level 6) for
- adjtime results
-
- * libntp/mfp_mul.c (mfp_mul): controlled debug output
-
- * libntp/ieee754io.c (get_byte): controlled debug output
- (fetch_ieee754): ditto
- (put_ieee754): ditto
-
-Tue May 5 20:09:51 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: document DES is not usually present.
-
-Wed Apr 29 22:00:22 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.72h
-
- * authstuff/Makefile.am (check-local-rsn): check-local doesn't
- work with RSAREF...
- Reported by: "Auteria Wally Winzer Jr." <wally.winzer@champusa.com>
-
- * libntp/machines.c: the settime() choices were ordered badly.
- Reported by: Michael Joosten <joost@c-lab.de>
-
-Sat Apr 25 00:35:53 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_var_no_parenb_ignpar): Undo the kernel PLL
- block I just installed - Dave wants to control this via
- KERNEL_FLL_BUG.
-
-Fri Apr 24 20:35:57 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/Makefile.am (libntp_a_DEPENDENCIES): Set per libntp_a_LIBADD
-
- * configure.in: Do a better job of blocking kernel PLL under
- solaris2.6.
-
-Fri Apr 24 00:41:12 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 4.0.72f
- (ac_cv_struct_nlist_n_un): Don't look for ntp_adjtime or
- ntp_gettime under solaris2.6.
-
- * ntpd/ntp_proto.c (process_packet): Give verbose error messages
-
- * include/global.h (PROTOTYPES): Drive via HAVE_PROTOTYPES.
-
-Wed Apr 22 16:55:55 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_var_use_des): Added. 4.0.72e.
- * libntp/Makefile.am (libntp_a_LIBADD): Added DESOBJS
-
-Tue Apr 21 02:08:06 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_arc.c (arc_receive): Typo...
- From: Sam Steingold <sds@usa.net>
-
-Fri Apr 10 03:05:35 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_refclock_chu): AUDIO_CHU support. Disabled by
- default, and currently only supported on SunOS and Solaris.
- * acconfig.h: AUDIO_CHU
-
-Wed Apr 8 19:53:53 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/Makefile.am (EXTRA_DIST): Added mktime.c
-
- * configure.in: AC_REPLACE_FUNCS(mktime).
- (--enable-dst-minutes=60): Added, for (missing) mktime().
-
- * ntpd/refclock_heath.c (heath_receive): Use mktime() instead of
- the old hack.
-
-Tue Apr 7 21:15:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (LIBOBJS): Hack it before AC_OUTPUT to deal with
- ANSI2KNR-filtering rules.
- From: Jim Meyering <meyering@ascend.com>
-
-Mon Apr 6 01:40:45 1998 Harlan Stenn <stenn@grundoon.udel.edu>
-
- * libntp/strerror.c: ANSIfy strerror's definition.
-
-Thu Mar 12 20:24:45 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * libntp/statestr.c: Only #include <config.h> if HAVE_CONFIG_H is
- #define'd.
- From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
-
-Wed Mar 11 00:27:32 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Cygwin needs to check for the advapi32 library.
- NT doesn't support a root user, so don't bother with getuid().
- Also, don't bother with umask().
-
- * ntpd/ntp_io.c: cygwin32 patches
- * ntpd/ntp_proto.c: Ditto.
- * ntpd/ntpd.c: Ditto.
- * ntpd/ntp_timer.c: Ditto.
- * ntpdate/ntpdate.c: Ditto.
- * libntp/machines.c: Ditto.
- * libntp/systime.c: Ditto.
- * include/ntp_machine.h: Ditto.
- * include/ntp_unixtime.h: Ditto.
- From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
-
-Tue Mar 10 22:26:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_make_tickadj): Added.
- Now that tickadj is the only(?) utility that cares about tick and
- tickadj, we don't need to have NOKMEM and no PRESET_* be fatal.
-
-Sat Mar 7 02:57:17 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_loopfilter.c (local_clock): Patch STA_FLL check
- From: Poul-Henning Kamp <phk@freebsd.org>
-
- * various: Renamed ACTS to CLOCK_ACTS, ARBITER to CLOCK_ARBITER,
- ARCRON_MSF to CLOCK_ARCRON_MSF, AS2201 to CLOCK_AS2201, BANC to
- CLOCK_BANC, DATUM to CLOCK_DATUM, GPSVME to CLOCK_GPSVME, HEATH to
- CLOCK_HEATH, HPGPS to CLOCK_HPGPS, IRIG to CLOCK_IRIG, JUPITER to
- CLOCK_JUPITER, LEITCH to CLOCK_LEITCH, MSFEES to CLOCK_MSFEES,
- MX4200 to CLOCK_MX4200, NMEA to CLOCK_NMEA, PALISADE to
- CLOCK_PALISADE, PARSE to CLOCK_PARSE, PPS720 to CLOCK_PPS720, PST
- to CLOCK_PST, PTBACTS to CLOCK_PTBACTS, SHM_CLOCK to CLOCK_SHM,
- ONCORE to CLOCK_ONCORE, TPRO to CLOCK_TPRO, TRAK to CLOCK_TRAK,
- TRUETIME to CLOCK_TRUETIME, USNO to CLOCK_USNO, WWVB to CLOCK_WWVB
-
- * Makefile.am (ETAGS_ARGS): Added acconfig.h
-
- * various: Renamed LOCAL_CLOCK to CLOCK_LOCAL.
-
- * configure.in: First cut at *-pc-cygwin32 support
- Requested by: Sven Dietrich <Sven_Dietrich@Trimble.COM>
-
- * configure.in: gdt-surveying code is gone. Sigh.
- Reported by: Poul-Henning Kamp <phk@critter.freebsd.dk>
-
-Wed Mar 4 21:41:06 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * many places: Renamed ATOM to CLOCK_ATOM
-
-Tue Mar 3 03:18:13 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_timer.c (timer): Only call refclock_transmit if
- REFCLOCK is #define'd.
- Reported by a bunch of folks.
-
-Mon Mar 2 03:46:07 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ntp_refclock): Use CLOCK_CHU, which no longer
- needs any special headers.
- * ntpd/refclock_chu.c: Call it CLOCK_CHU
- (chu_receive): Define it correctly.
-
- * include/winnt/sys/time.h (gettimeofday): Prototypes are OK.
- (settimeofday): Prototypes are OK.
- From: JJEVNISEK@qgraph.com
-
- * ntpq/ntpq_ops.c: varlist name and value aren't const.
- * ntpdc/ntpdc_ops.c (fudge): The flags are u_val, not val.
- * ntpdc/ntpdc.c: const cleanup, exit cleanup.
- * ntpd/refclock_wwvb.c (wwvb_receive): Move the definition of tz
- somewhere more normal.
- * ntpd/ntp_request.c (do_trustkey): kp gets u_long data, not
- u_int32 (but Harlan thinks this patch may be wrong).
- * ntpd/ntp_refclock.c (refclock_process): clocktime needs
- offset.l_ui, not offset.l_i .
- * ntpd/ntp_control.c (set_var): t isn't const.
- * libntp/a_md5encrypt.c (session_key): Cast 2nd arg to MD5auth_setkey.
- * include/ntpd.h: ctl_var's text field isn't const.
- * include/ntp_refclock.h: clockdesc isn't const.
- From: Marc Brett <Marc.Brett@waii.com>
-
- * ntpd/ntp_loopfilter.c (local_clock): Limit ntv.constant to
- MAXTC, and log error returns from ntp_adjtime.
- From: Juha Sarlin <juha@c3l.tyreso.se>
-
-Mon Mar 2 03:05:23 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (ac_cv_var_kernel_fll_bug): KERNEL_FLL_BUG
- * acconfig.h: KERNEL_FLL_BUG: added.
- * ntpd/ntp_loopfilter.c (local_clock): Only avoid STA_FLL if
- KERNEL_FLL_BUG is #define'd (Solaris2.6)
-
-Sat Feb 21 00:45:10 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * automake-1.2d.patches: Added ansi2knr.o rules.
-
- * ntpd/refclock_tpro.c: P() stuff
-
-Fri Feb 20 20:10:20 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: Improve the ${CC} -pipe test (cygwin-32's gcc -pipe
- silently does nothing).
- Reported by: Sven Dietrich <Sven_Dietrich@Trimble.COM>
-
-Wed Feb 18 00:51:08 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
-* configure.in: 4.0.72 released.
-
-* configure.in:AC_REPLACE_FUNCS(strerror), check for poll.h, and deal
- with the --enable-JUPITER stuff.
-* libntp/Makefile.am (libntp_a_LIBADD): Added (for strerror support).
-* libntp/clocktypes.c: Added REFCLK_GPS_JUPITER.
-* ntpdate/ntpdate.c: poll() support
-* ntpd/Makefile.am: Add refclock_jupiter.c
-* ntpd/refclock_conf.c: Added refclock_jupiter
-* ntpd/refclock_mx4200.c (mx4200_pps): Bugfixes.
-* include/ntp.h (REFCLK_GPS_JUPITER): Added, and bumped REFCLK_MAX.
- From: Craig Leres <leres@ee.lbl.gov>
-
-Mon Feb 16 21:02:42 1998 Harlan Stenn <stenn@grundoon.udel.edu>
-
- * ntpd/ntp_proto.c: P()
-
-Mon Feb 16 12:43:11 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
-* include/ntp_types.h: Added P() prototyping hack back in.
-* include/parse.h: Ditto.
-* include/ntpd.h: Ditto.
-* include/ntp_unixtime.h: Ditto.
-* include/ntp_stdlib.h: Ditto.
-* include/ntp_select.h: Ditto.
-* include/ntp_refclock.h: Ditto.
-* include/ntp_fp.h: Ditto.
-* include/md5.h: Ditto.
-* include/ntp_filegen.h: Ditto.
-* include/ntp_calendar.h: Ditto.
-* include/l_stdlib.h: Ditto.
-
- * configure.in (ACTS): Sometimes, TIOCMBIS is in sys/ioctl.h
- Reported by Kenneth Jaldehag <kenneth.jaldehag@sp.se>
- * configure.in (HEATH): Ditto.
- * configure.in (PTBACTS): Ditto.
- * configure.in (USNO): Ditto.
-
-Sat Feb 14 00:02:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_irig.c (irig_rf): Rename sincos[] to sin_cos[].
-
-Fri Feb 13 22:22:08 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * include/ntp.h (RANDPOLL): Use random or mrand48.
- * ntpd/ntp_config.c (do_resolve_internal): Ditto.
- * ntpd/ntp_peer.c (unpeer): Ditto.
- * ntpd/ntp_proto.c (make_keylist): Ditto.
-
- * ntpd/ntpd.c (xntpdmain): Use srandom or srand48.
-
- * configure.in: Look for {s,}random() and [ms]rand48().
-
-Wed Feb 11 22:50:24 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/ntp_restrict.c (hack_restrict): Renamed restrict()
- * include/ntpd.h: Ditto
- * ntpd/ntp_request.c (do_restrict): Ditto
- * ntpd/ntp_config.c (getconfig):
- * ntpd/ntp_io.c (create_sockets): Ditto.
-
-1998-01-23 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_irig.c: Allow either <sun/audioio.h> or
- <sys/audioio.h> . From Dave Mills.
-
- * configure.in: Under SunOS, it's sun/audioio.h .
-
-1998-01-22 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * html/driver6.html: Updated header file info
- * html/irig.html: Ditto.
- * configure.in: sys/bsd_audioirig.h replaced with sys/audioio.h
- for new irig driver that Dave installed.
-
-1998-01-08 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * Many places: Lose the P(()) prototype stuff
-
- * util/tickadj.c (writevar): Make offset an off_t
- (readvar): Ditto
- (getoffsets): Make offsets off_t
-
- * adjtimed/adjtimed.c (GetClockRate): Fix lseek arg 2.
- (SetClockRate): Ditto
-
- * Many things in many places from many people.
-
- * configure.in: Added AC_TYPE_OFF_T
-
-1997-11-26 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * ntpd/refclock_palisade.c: ANSIfied.
-
-Wed Sep 3 23:51:44 1997 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in (AM_C_PROTOTYPES): Added.
-
- * Makefile.am (AUTOMAKE_OPTIONS): Added ansi2knr.
-
diff --git a/contrib/ntp/INSTALL b/contrib/ntp/INSTALL
deleted file mode 100644
index 7483e00..0000000
--- a/contrib/ntp/INSTALL
+++ /dev/null
@@ -1,178 +0,0 @@
-Basic Installation
-==================
-
- These are generic *nix installation instructions.
-
- For Windows/NT, please see ports/winnt and html/hints/winnt.htm.
-
- 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 a while. 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.
-
- 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.
-
-`--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/Makefile.am b/contrib/ntp/Makefile.am
deleted file mode 100644
index 96918fc..0000000
--- a/contrib/ntp/Makefile.am
+++ /dev/null
@@ -1,143 +0,0 @@
-#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
-AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
-
-SUBDIRS = \
- scripts \
- include \
- ElectricFence \
- @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 \
- parseutil \
- adjtimed \
- clockstuff \
- kernel \
- sntp \
- util
-DISTCHECK_CONFIGURE_FLAGS= --with-arlib --with-sntp
-
-EXTRA_DIST = \
- COPYRIGHT \
- ChangeLog \
- ChangeLog-4.1.0 \
- NEWS \
- NOTES.y2kfixes \
- README.bk \
- README.hackers \
- README.patches \
- README.refclocks \
- README.versions \
- TODO \
- WHERE-TO-START \
- build \
- config.guess \
- config.h.in \
- config.sub \
- dot.emacs \
- excludes \
- flock-build \
- install-sh \
- 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
-
-# HMS: make ports be the last directory...
-# DIST_HOOK_DIRS = conf html scripts ports
-
-# HMS: Keep .warning first, as that way it gets printed first.
-BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version
-
-$(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 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` && \
- 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
-
-.warning:
- @echo "Compiling with GCC now generates lots of new warnings."
- @echo " "
- @echo "Don't be concerned. They're just warnings."
- @echo " "
- @echo "Don't send bug reports about the warnings, either."
- @echo " "
- @echo "Feel free to send patches that fix these warnings, though."
- @echo " "
- @sleep 1
- @touch .warning
-
-# HMS: The following seems to be a work-in-progress...
-
-CVO=`$(srcdir)/config.guess`
-
-.buildcvo:
- echo "$(CVO)" > .buildcvo
-
-.checkcvo: .buildcvo FRC.checkcvo
- @if [ "`cat .buildcvo`" != "$(CVO)" ];then \
- echo "This directory was configured for `cat .buildcvo`"; \
- echo "but this machine is a $(CVO)"; \
- exit 1; \
- fi
-
-BHOST=`(hostname || uname -n)`
-
-.buildhost:
- echo "$(BHOST)" > .buildhost
-
-.checkhost: .buildhost FRC.checkhost
- @if [ "`cat .buildhost`" != "$(BHOST)" ];then \
- echo "Built on `cat .buildhost` but this is $(BHOST)"; \
- echo " "; \
- fi
-
-FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
-
-# HMS: what was I trying to do with this?
-#dot.emacs: FRC.distwarn
diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in
deleted file mode 100644
index 9cf55d2..0000000
--- a/contrib/ntp/Makefile.in
+++ /dev/null
@@ -1,712 +0,0 @@
-# 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 foreign dist-tarZ no-dependencies
-AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
-
-SUBDIRS = \
- scripts \
- include \
- ElectricFence \
- @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 \
- parseutil \
- adjtimed \
- clockstuff \
- kernel \
- sntp \
- util
-
-DISTCHECK_CONFIGURE_FLAGS = --with-arlib --with-sntp
-
-EXTRA_DIST = \
- COPYRIGHT \
- ChangeLog \
- ChangeLog-4.1.0 \
- NEWS \
- NOTES.y2kfixes \
- README.bk \
- README.hackers \
- README.patches \
- README.refclocks \
- README.versions \
- TODO \
- WHERE-TO-START \
- build \
- config.guess \
- config.h.in \
- config.sub \
- dot.emacs \
- excludes \
- flock-build \
- install-sh \
- 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
-
-# HMS: make ports be the last directory...
-# DIST_HOOK_DIRS = conf html scripts ports
-
-# HMS: Keep .warning first, as that way it gets printed first.
-BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version
-
-
-# HMS: The following seems to be a work-in-progress...
-CVO = `$(srcdir)/config.guess`
-
-BHOST = `(hostname || uname -n)`
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-DIST_SOURCES =
-
-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) && $(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 acinclude.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
- else :; fi
-
-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)
- touch $(srcdir)/config.h.in
-
-distclean-hdr:
- -rm -f config.h stamp-h1
-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) $(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) 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 $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- 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)$$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=`$(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)
- $(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 \
- 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
- list='$(DIST_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
- $(MAKE) $(AM_MAKEFLAGS) \
- 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-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: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile config.h
-installdirs: installdirs-recursive
-installdirs-am:
-
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) 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-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:
-
-clean-generic:
-
-distclean-generic:
- -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-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-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) 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 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` && \
- 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
-
-.warning:
- @echo "Compiling with GCC now generates lots of new warnings."
- @echo " "
- @echo "Don't be concerned. They're just warnings."
- @echo " "
- @echo "Don't send bug reports about the warnings, either."
- @echo " "
- @echo "Feel free to send patches that fix these warnings, though."
- @echo " "
- @sleep 1
- @touch .warning
-
-.buildcvo:
- echo "$(CVO)" > .buildcvo
-
-.checkcvo: .buildcvo FRC.checkcvo
- @if [ "`cat .buildcvo`" != "$(CVO)" ];then \
- echo "This directory was configured for `cat .buildcvo`"; \
- echo "but this machine is a $(CVO)"; \
- exit 1; \
- fi
-
-.buildhost:
- echo "$(BHOST)" > .buildhost
-
-.checkhost: .buildhost FRC.checkhost
- @if [ "`cat .buildhost`" != "$(BHOST)" ];then \
- echo "Built on `cat .buildhost` but this is $(BHOST)"; \
- echo " "; \
- fi
-
-FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
-
-# HMS: what was I trying to do with this?
-#dot.emacs: FRC.distwarn
-# 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/NEWS b/contrib/ntp/NEWS
deleted file mode 100644
index 0d5bead..0000000
--- a/contrib/ntp/NEWS
+++ /dev/null
@@ -1,154 +0,0 @@
-(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
-* Virtual IP improvements
-* ntp_loopfilter fixes and improvements
-* 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
-* Preparation for OpenSSL support
-* Resolver changes/improvements are not backward compatible with mode 7
- requests (which are implementation-specific anyway)
-* leap second stuff
-* manycast should work now
-* ntp-genkeys does new good things.
-* scripts/ntp-close
-* PPS cleanup and improvements
-* readline support for ntpdc
-* Crypto/authentication rewrite
-* WINNT builds with MD5 by default
-* WINNT no longer requires Perl for building with Visual C++ 6.0
-* algorithmic improvements, bugfixes
-* Solaris dosynctodr info update
-* html/pic/* is *lots* smaller
-* 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,
- you *must* have a properly specified:
- pps <filename> [assert/clear] [hardpps]
- line in the /etc/ntp.conf file.
-* PARSE cleanup
-* PPS cleanup
-* 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
-* PPS cleanup
-* ReliantUNIX patches
-* NetInfo support
-* Ultralink driver
-* 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.
-* Autokey cleanup
-* ReliantUnix patches
-* html cleanup
-* tickadj cleanup
-* PARSE cleanup
-* IRIX -n32 cleanup
-* byte order cleanup
-* ntptrace improvements and patches
-* ntpdc improvements and patches
-* PPS cleanup
-* mx4200 cleanup
-* New clock state machine
-* SCO cleanup
-* Skip alias interfaces
-
-(4.0.92)
-* chronolog and dumbclock refclocks
-* SCO updates
-* Cleanup/bugfixes
-* Y2K patches
-* Updated palisade driver
-* Plug memory leak
-* wharton kernel clock
-* Oncore clock upgrades
-* NMEA clock improvements
-* PPS improvements
-* AIX portability patches
-
-(4.0.91)
-* New ONCORE driver
-* New MX4200 driver
-* Palisade improvements
-* config file bugfixes and problem reporting
-* autoconf upgrade and cleanup
-* 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.
-* MX4200 driver patches.
-* Jupiter driver added.
-* Palisade driver added. Needs work (ANSI, ntoh/hton, sizeof double, ???)
diff --git a/contrib/ntp/NOTES.y2kfixes b/contrib/ntp/NOTES.y2kfixes
deleted file mode 100644
index cf181c1..0000000
--- a/contrib/ntp/NOTES.y2kfixes
+++ /dev/null
@@ -1,107 +0,0 @@
-Name of the Application: xntp
-
-Version Number: 4.0.91
-
-Download Size: 4541953 bytes
-
-Downloaded from: http://www.eecis.udel.edu/~ntp/
-
-Operating Systems Supported: many
-
-Operating Systems Tested: unix
-
-Testing
-
-Dates tested (CPU clock set)
-
- 1999-12-31
- 2000-01-01
- 2000-02-29
-
- Critical fragments of code tested with other dates by special
- algorithms.
-
-Hardware Platform: Sun Sparc
-
-OS: Solaris 2.6
-
-Compiler: gcc
-
-Version: 2.8.1
-
-Repairs: 9
-
-No. of files Repaired: 13
-
-
-Compilation of Patches Required: yes
-
-Results Description:
-
-1) Tested suspicious code.
-
-2) Repaired problem code and added documentation to ntp.h.
-
-3) Verified ntpd works on critical Y2K dates.
-
-
-Comments:
-
-1) Errors were found in improper use of tm_year within struct tm,
- calculations that did not support year 2000 as a leap year
- (it truly is, despite any unchanged comments remaining in
- the NTP source), and some incorrect date calculations, while
- not traditional Y2K errors, would break in the year 2000.
-
-2) include/ntpd.h
- Added some definitions and documentation about the right way
- of doing things. Definitions used by most, if not all, of
- the Y2K repairs.
-
-Cautions:
-
-1) Some of the Y2K repairs were to reference clock drivers that
- we did not have the local hardware to test. While I believe
- the changes are sound, they really need to be tested.
- This includes:
-
- refclock_arc.c
- refclock_heath.c
- refclock_hpgps.c
-
- Also, parseutil/dcfd.c is another hardware dependent module that
- was repaired without live testing.
-
-Non-Y2K Problems Observed:
-
-1) Inconsistent casts of variables containing time values may
- make expansion to 64 bit integer values in a portable manner
- difficult.
-
-2) libntp/caltontp.c:
- Has logic I believe will fail starting in year 2100 or so.
- Left unchanged/untested as it works well beyond basic NTP 2036
- limit checked by check_y2k.c.
- If NTP is implemented on 64-bit machines, this should be fixed
-
-3) ntpd/refclock_acts.c:
- ACTS time format has changed somewhat since the code was written.
- In particular the '*' '#' character switch no longer occurs...
- only '*' is typed.
-
- NOTE: Author (falsely) stated Y2K is NOT a leap year when it
- really is.
-
- TRUTH: ACTS will go beyond Y2K: it uses FourDigitYear % 100 values
- for year so year 2000 will revert to "00".
-
-
-4) ntpd/refclock_oncore.c
- Some very strange logic in manipulating year values:
- 1122 instance->pp->year = buf[6]*256+buf[7];
- Multiply by 256????
-
- Response from PHK:
- The entire protocol is binary, the year is a 16 bit quantity
- which according to the manual can have the range 1998-2018.
-
diff --git a/contrib/ntp/README b/contrib/ntp/README
deleted file mode 100644
index f9eeabc..0000000
--- a/contrib/ntp/README
+++ /dev/null
@@ -1,148 +0,0 @@
-
-Submit patches, bug reports, and enhancement requests via
-
- http://bugzilla.ntp.org
-
- The ntp Distribution Base Directory
-
-This directory and its subdirectories contain the Network Time Protocol
-Version 4 (NTP) distribution for Unix and Windows/NT systems. This release
-may still work on VxWorks, too.
-
-The contents of the base directory are given in this file. The contents of
-subdirectories are given in the README files in each subdirectory.
-
-A complete explanation of the configure, compile and install process, as
-well as setting up an NTP subnet, is in the HTML pages in the ./html/
-directory. For more information on NTP and how to get a working setup,
-read WHERE-TO-START.
-
-For Windows/NT, visit html/hints/winnt .
-
-The base directory ./ contains the autoconfiguration files, source
-directories and related stuff:
-
-COPYRIGHT Excerpt from the HTML file ./html/copyright.html. This file
- specifies copyright conditions, together with a list of
- major authors and electric addresses.
-
-INSTALL Generic installation instructions for autoconf-based programs.
- Unless you really know what you are doing, you should read the
- directions in the HTML pages, starting with ./html/index.htm.
-
-NEWS What's new in this release.
-
-README This file.
-
-README.bk Instructions for folks who use the BitKeeper-repository
- version of NTP.
-
-README.hackers Notes to folks who want to hack on the code.
-
-TODO List of items the NTP developers are working on.
-
-WHERE-TO-START Hints on what to read in order to get a working
- configuration.
-
-Makefile.am Automake file configuration file. Edit only if you have the
- GNU automake and autoconf utilities installed.
-
-Makefile.in Autoconf make file template for Unix.
-
-adjtimed Directory containing the sources for the adjtime daemon
- for HP/UX systems prior to HP-UX 10.0.
-
-authstuff Directory containing sources for miscellaneous programs
- to test, calibrate and certify the cryptographic
- mechanisms for DES and MD5 based authentication. These
- programs do not include the cryptographic routines
- themselves, so are free of U.S. export restrictions.
-
-build A script to build the distribution in A.`config.guess`
- subdirectory (more or less).
-
-clockstuff Directory containing sources for miscellaneous programs
- to test certain auxiliary programs used with some kernel
- configurations, together with a program to calculate
- propagation delays for use with radio clocks and
- national time dissemination services such as WWV/WWVH,
- WWVB and CHU.
-
-conf Directory containing a motley collection of
- configuration files for various systems. For example only.
-
-config.guess Script used to identify the machine architecture and
- operating system.
-
-config.h.in Configuration file generated automatically from
- configure.in. Do not edit.
-
-configure Script used to configure the distribution. See the HTML pages
- (./html/index.htm) for a complete description of the options
- available.
-
-configure.in Master configuration template. Edit only if you have the
- GNU automake and autoconf utilities installed.
-
-dot.emacs C-mode indentation rules for code "Just the way Dave likes it".
-
-flock_build (UDel only) Build the distribution on a number of
- different platforms.
-
-html Directory containing a complete set of documentation on
- building and configuring a NTP server or client. The
- documentation is in the form of HTML files suitable for
- browsing and contains links to additional documentation
- at various web sites. If a browser is unavailable, an
- ordinary text editor can be used.
-
-include Directory containing include header files used by most
- programs in the distribution.
-
-install-sh Script to install a program, script or data file.
-
-kernel Directory containing sources for kernel programs such as
- line disciplines and STREAMS modules used with the CHU
- decoder and precision PPS signals.
-
-libntp Directory containing library source code used by most
- programs in the distribution.
-
-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.
-
-ntpq Directory containing sources for a utility program to
- query local and remote NTP peers for state variables and
- related timekeeping information. This program conforms
- to Appendix A of the NTP Version 3 Specification RFC 1305.
-
-ntptrace Directory containing sources for a utility program that
- can be used to reveal the chain of NTP peers from a
- designated peer to the primary server at the root of the
- timekeeping subnet.
-
-parse Directory containing files belonging to the generic
- parse reference clock driver. For reasonably simple
- clocks it is possible to get away with about 3-4Kb of
- code. additionally the SunOS 4.x/Solaris 5.3 streams
- module for parse squats here.
-
-patches Directory containing patches already applied to this
- distribution. These are included for record and to help
- in possible porting problems.
-
-scripts Directory containing scripts to build the configuration
- files in this directory and then the makefiles used in
- various dependent directories. the subdirectories
- monitoring and support hold various perl and shell
- scripts for visualizing synchronization and daemon startup.
-
-stamp.h.in Configuration file generated automatically from configure.in.
- Do not edit.
-
-util Directory containing sources for various utility and
- testing programs.
-
-David L. Mills (mills@udel.edu)
-21 June 1998
diff --git a/contrib/ntp/README.bk b/contrib/ntp/README.bk
deleted file mode 100644
index 2b840c4..0000000
--- a/contrib/ntp/README.bk
+++ /dev/null
@@ -1,63 +0,0 @@
-In order to use the BitKeeper repository version of NTP you will have
-to have the following tools installed:
-
- autoconf 2.53 or later
- automake 1.5 or later
- lynx
-
-Lynx is used to generate the COPYRIGHT file. Don't ask.
-
-You can get bitkeeper by visiting:
-
- http://www.bitkeeper.com/
-
-We are using bitkeeper under their free license program. You can use
-bitkeeper for free to access NTP, too. If you have questions about this,
-please ask. The license is pretty easy to read.
-
-Once you have installed bitkeeper, you can clone any NTP repository.
-
- Note: as of 2002-05, ntp.bkserver.net and ntp.bkbits.net are
- being upgraded. Depending on the "phase" of the upgrade, one
- of the two machines may not answer.
-
-You can get the ntp-stable repository by either of the following commands:
-
- bk clone bk://www.ntp.org/home/bk/ntp-stable ntp-stable
-
- bk clone bk://ntp.bkserver.net/ntp-stable ntp-stable
-
- bk clone bk://ntp.bkbits.net/ntp-stable ntp-stable
-
-You can get the ntp-dev repository by either of the following commands:
-
- bk clone bk://www.ntp.org/home/bk/ntp-dev ntp-dev
-
- bk clone bk://ntp.bkserver.net/ntp-dev ntp-dev
-
- bk clone bk://ntp.bkbits.net/ntp-dev ntp-dev
-
-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:
-
- bk clone http://ntp.bkserver.net/REPO REPO
-
-Finally, it's possible to use SMTP as a bk transport mechanism. So far, we
-haven't tried this.
-
-Once you have obtained the sources, do the following:
-
- cd REPO
- bk -r edit to check out the files
- autoreconf -f -i generates configure and Makefile.in's
-
-and you should be ready to go. You will get some warning messages from
-autoreconf. Ignore these messages.
-
-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.cvs b/contrib/ntp/README.cvs
deleted file mode 100644
index c72177d..0000000
--- a/contrib/ntp/README.cvs
+++ /dev/null
@@ -1,56 +0,0 @@
-
- NOTE: The CVS repository for NTP is inactive. NTP is now maintained
- using BitKeeper; see README.bk for more info.
-
-To get the NTP distribution via anonymous CVS:
-
- % cvs -d :pserver:anoncvs@www.ntp.org:/cvs/ntp login
-
-the password is: anoncvs
-
- % rm -rf ntp
- % cvs -d :pserver:anoncvs@www.ntp.org:/cvs/ntp co ntp
-
-after which the "ntp_update" script in the top-level of the tree should
-keep things in synch and properly timestamped.
-
-PLEASE NOTE:
-
- When obtaining the NTP distribution directly via CVS instead of
- using "ntp_update", the files are installed in an arbitrary
- order.
-
- When you run "make", this may cause some of the generated files
- to be reconstructed.
-
- If you do not have the right verison of automake and autoconf,
- these files will be regenerated incorrectly.
-
- In this case, you can "fix" your distribution by running:
-
- ntp_update -C
-
- which will force any local changes to your NTP files to be
- discarded and replaced with the versions in the repository.
-
- If "ntp_update -C" does not work just remove the "broken"
- files (probably Makefile.in files) and re-run ntp_udate.
-
-There are some mailing lists for the NTP CVS distribution. For more
-information, send a message to <majordomo@ntp.org> with the word "lists"
-in the body of the message.
-
-If you get NTP via CVS, you MAY need to build the release using GNU make
-and gcc.
-
-You can then "make dist" to build a release tarball that does not require
-GNU make or gcc.
-
-The reason GNU make and gcc may be required is because the repository
-version of NTP does not have the make dependencies built-in. These
-dependencies are created dynamically, and this dynamic process may
-require GNU make and gcc.
-
-I'm told that the version of automake we are now using does not require
-GNU make or gcc for the dependency tracking, but I haven't tested this
-yet.
diff --git a/contrib/ntp/README.des b/contrib/ntp/README.des
deleted file mode 100644
index 88f0aea..0000000
--- a/contrib/ntp/README.des
+++ /dev/null
@@ -1,16 +0,0 @@
-If you want DES support in ntp:
-
-- Use MD5 instead:
-- - convert your DES keys to MD5 by changing the 'A', 'N' or 'S' to 'M'
-
-If you *need* DES support:
-
-- first see if you can simply "want" DES support instead
-- Follow the instructions in README.rsa
-
-Be advised that the RSA DES code is not quite as portable as one might
-wish for. In particular, DES under NTP will only work between machines
-of the same "endianness".
-
-Dave would prefer that new/alternative encryption schemes follow the
-RSA API.
diff --git a/contrib/ntp/README.hackers b/contrib/ntp/README.hackers
deleted file mode 100644
index a33b004..0000000
--- a/contrib/ntp/README.hackers
+++ /dev/null
@@ -1,28 +0,0 @@
-Notes to hackers.
-
-See README.patches for information about submitting patches.
-
----
-
-Dave likes this code indented formatted in a consistent way.
-The file "dot.emacs" has the emacs C-mode indentation style that Dave likes.
-
----
-
-NTP4 uses ANSI C. Some folks are blessed with a pre-ansi C compiler. We
-support them by using "ansi2knr" in the Makefiles, which is automatically
-detected and selected by the configure process.
-
-For ansi2knr to work, we MUST define functions as follows:
-
-type stuff
-function_name ( actual parameters )
-
-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
deleted file mode 100644
index d59345e..0000000
--- a/contrib/ntp/README.patches
+++ /dev/null
@@ -1,39 +0,0 @@
-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/README.refclocks b/contrib/ntp/README.refclocks
deleted file mode 100644
index 38eecc8..0000000
--- a/contrib/ntp/README.refclocks
+++ /dev/null
@@ -1,50 +0,0 @@
-This is a list of the #define REFCLK_* stuff.
-
-If you want to add a new refclock let us know and we'll assign you a number.
-
-Should this list also include the name of the party responsible for the
-refclock?
-
-LOCALCLOCK 1 /* external (e.g., lockclock) */
-GPS_TRAK 2 /* TRAK 8810 GPS Receiver */
-WWV_PST 3 /* PST/Traconex 1020 WWV/H */
-SPECTRACOM 4 /* Spectracom (generic) Receivers */
-TRUETIME 5 /* TrueTime (generic) Receivers */
-IRIG_AUDIO 6 /* IRIG-B/W audio decoder */
-CHU_AUDIO 7 /* CHU audio demodulator/decoder */
-PARSE 8 /* generic driver (usually DCF77,GPS,MSF) */
-GPS_MX4200 9 /* Magnavox MX4200 GPS */
-GPS_AS2201 10 /* Austron 2201A GPS */
-GPS_ARBITER 11 /* Arbiter 1088A/B/ GPS */
-IRIG_TPRO 12 /* KSI/Odetics TPRO-S IRIG */
-ATOM_LEITCH 13 /* Leitch CSD 5300 Master Clock */
-MSF_EES 14 /* EES M201 MSF Receiver */
-GPSTM_TRUE 15 /* OLD TrueTime GPS/TM-TMD Receiver */
-IRIG_BANCOMM 16 /* Bancomm GPS/IRIG Interface */
-GPS_DATUM 17 /* Datum Programmable Time System */
-NIST_ACTS 18 /* NIST Auto Computer Time Service */
-WWV_HEATH 19 /* Heath GC1000 WWV/WWVH Receiver */
-GPS_NMEA 20 /* NMEA based GPS clock */
-GPS_VME 21 /* TrueTime GPS-VME Interface */
-ATOM_PPS 22 /* 1-PPS Clock Discipline */
-PTB_ACTS 23 /* PTB Auto Computer Time Service */
-USNO 24 /* Naval Observatory dialup */
-GPS_HP 26 /* HP 58503A Time/Frequency Receiver */
-ARCRON_MSF 27 /* ARCRON MSF radio clock. */
-SHM 28 /* clock attached thru shared memory */
-PALISADE 29 /* Trimble Navigation Palisade GPS */
-ONCORE 30 /* Motorola UT Oncore GPS */
-GPS_JUPITER 31 /* Rockwell Jupiter GPS receiver */
-CHRONOLOG 32 /* Chrono-log K WWVB receiver */
-DUMBCLOCK 33 /* Dumb localtime clock */
-ULINK 34 /* Ultralink M320 WWVB receiver */
-PCF 35 /* Conrad parallel port radio clock */
-WWV_AUDIO 36 /* WWV/H audio demodulator/decoder */
-FG 37 /* Forum Graphic GPS */
-HOPF_SERIAL 38 /* hopf DCF77/GPS serial line receiver */
-HOPF_PCI 39 /* hopf DCF77/GPS PCI receiver */
-JJY 40 /* JJY receiver */
-TT560 41 /* TrueTime 560 IRIG-B decoder */
-ZYFER 42 /* Zyfer GPStarplus receiver */
-RIPENCC 43 /* RIPE NCC Trimble driver */
-??????? 44 Claas Hilbrecht (20020711)
diff --git a/contrib/ntp/README.rsa b/contrib/ntp/README.rsa
deleted file mode 100644
index e92eacd..0000000
--- a/contrib/ntp/README.rsa
+++ /dev/null
@@ -1,103 +0,0 @@
-If you want to use the RSA stuff for crypto keys:
-
-- Get RSAREF or RSAEURO.
-- - Unpack it in the top-level source directory of the NTP distribution
- in a directory named rsaref2 or rsaeuro1, respectively
- (You should see directories like ports, rsaref2, scripts)
-
-Make sure rsa.c has the security patch applied - a copy of it is at the
-end of this file.
-
-When you run configure, the Right Thing will happen.
-
-Be advised that the RSA DES code is not quite as portable is one might
-wish for. In particular, DES under NTP will only work between machines
-of the same "endianness".
-
-Note that the next release of NTP uses OpenSSL instead of RSAREF.
-
---- rsa.c.orig Fri Mar 25 14:01:48 1994
-+++ rsaref2/source/rsa.c Mon Dec 13 13:10:28 1999
-@@ -33,6 +33,9 @@
- unsigned char byte, pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen;
-
-+ if (publicKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (publicKey->bits + 7) / 8;
- if (inputLen + 11 > modulusLen)
- return (RE_LEN);
-@@ -78,6 +81,9 @@
- unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen, pkcsBlockLen;
-
-+ if (publicKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (publicKey->bits + 7) / 8;
- if (inputLen > modulusLen)
- return (RE_LEN);
-@@ -128,6 +134,9 @@
- int status;
- unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen;
-+
-+ if (privateKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-
- modulusLen = (privateKey->bits + 7) / 8;
- if (inputLen + 11 > modulusLen)
-@@ -168,6 +177,9 @@
- unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen, pkcsBlockLen;
-
-+ if (privateKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (privateKey->bits + 7) / 8;
- if (inputLen > modulusLen)
- return (RE_LEN);
-
---- rsa.c.orig Sat Sep 28 22:59:40 1996
-+++ rsaeuro1/source/rsa.c Sat Jul 8 00:33:13 2000
-@@ -51,6 +51,9 @@ R_RANDOM_STRUCT *randomStruct; /* rando
- unsigned char byte, pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen;
-
-+ if (publicKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (publicKey->bits + 7) / 8;
-
- if(inputLen + 11 > modulusLen)
-@@ -101,6 +104,9 @@ R_RSA_PUBLIC_KEY *publicKey; /* RSA p
- unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen, pkcsBlockLen;
-
-+ if (publicKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (publicKey->bits + 7) / 8;
-
- if(inputLen > modulusLen)
-@@ -154,6 +160,9 @@ R_RSA_PRIVATE_KEY *privateKey; /* RSA p
- unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen;
-
-+ if (privateKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (privateKey->bits + 7) / 8;
-
- if(inputLen + 11 > modulusLen)
-@@ -193,6 +202,9 @@ R_RSA_PRIVATE_KEY *privateKey; /* RSA p
- unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN];
- unsigned int i, modulusLen, pkcsBlockLen;
-
-+ if (privateKey->bits > MAX_RSA_MODULUS_BITS)
-+ return (RE_LEN);
-+
- modulusLen = (privateKey->bits + 7) / 8;
-
- if(inputLen > modulusLen)
diff --git a/contrib/ntp/README.versions b/contrib/ntp/README.versions
deleted file mode 100644
index 5509250..0000000
--- a/contrib/ntp/README.versions
+++ /dev/null
@@ -1,35 +0,0 @@
-
-NTP uses A.B.C - style release numbers.
-
-The third (C) part of the version number can be:
-
- 0-69 for patches/bugfixes to the A.B.C series.
- 70-79 for alpha releases of the A.B+1.0 series.
- 80+ for beta releases of the A.B+1.0 series.
-
-At the moment:
-
- A is 4, for ntp V4.
- B is the minor release number.
- C is the patch/bugfix number, and may have extra cruft in it.
-
-Any extra cruft in the C portion of the number indicates an "interim" release.
-
-Interim releases almost always have a C portion consisting of a number
-followed by an increasing letter, optionally followed by -rcX, where X
-is an increasing number. The -rcX indicates a "release candidate".
-
-Here are some recent versions numbers as an example:
-
- 4.1.0 A production release (from the ntp-stable repository)
- 4.1.0b-rc1 A release candidate for 4.1.1 (from the ntp-stable repo)
- 4.1.71 An alpha release of 4.2.0, from the ntp-dev repo
-
-Note that after the ntp-dev repo produces a production release it will
-be copied into the ntp-stable and the cycle will repeat.
-
-The goal of this scheme is to produce version numbers that collate
-"properly" with the output of the "ls" command.
-
-Feel free to suggest improvements...
-
diff --git a/contrib/ntp/TODO b/contrib/ntp/TODO
deleted file mode 100644
index c9f81fa..0000000
--- a/contrib/ntp/TODO
+++ /dev/null
@@ -1,124 +0,0 @@
-
- *** IF YOU CAN HELP FIX ANY OF THESE THINGS, PLEASE DO! ***
-
-010402: Look harder at -lm and -lelf - they are needed less and less...
-
-970711: Look Real Hard at changing the key stuff from u_long to u_int32.
-
-970711: Make sure it's safe to convert proto_config's 2nd argument from
- u_long to u_int32. Watch "set" in ntp_request.c:setclr_flags().
-
-970318: in hourly_stats(?), squawk if the magnitude of the drift is,
- say, >400.
-
-970301: Implement the utmp/wtmp timestamping on time steps.
-
-970210: Find a way to dump the current configuration to either syslog or
- a file.
-
-Problems that need to be fixed:
-
-- Get rid of the old SYS_* macros:
- (It's worth noting that any code that would have been "enabled" by any
- of these macros has not been used since 5.83, and there have been very
- few complaints...)
-
- SYS_44BSD:
- authstuff/md5driver.c
-
- SYS_BSDI:
- authstuff/md5driver.c
-
- SYS_DECOSF1:
- util/ntptime.c
-
- SYS_DOMAINOS:
- parseutil/dcfd.c
- xntpd/ntpd.c
-
- SYS_HPUX:
- kernel/sys/ppsclock.h
- ntpdate/ntpdate.c
- ntptrace/ntptrace.c
-
- SYS_PTX:
- libntp/machines.c
-
- SYS_SOLARIS:
- libparse/parse.c
- libparse/clk_trimtsip.c
- xntpd/ntp_io.c
- xntpd/ntp_refclock.c
- xntpd/ntpd.c
-
- SYS_SUNOS4:
- libparse/parse.c
- libparse/clk_trimsip.c
-
- SYS_WINNT:
- include/ntp.h
- include/ntp_fp.h
- include/ntp_if.h
- include/ntp_machine.h
- include/ntp_select.h
- include/ntp_syslog.h
- include/ntp_unixtime.h
- include/ntpd.h
- libntp/libntp.mak
- libntp/machines.c
- libntp/mexit.c
- libntp/msyslog.c
- libntp/systime.c
- ntpdate/ntpdate.c
- ntpdate/ntpdate.mak
- ntpq/ntpq.c
- ntpq/ntpq.mak
- ntpq/ntpq_ops.c
- ntptrace/ntptrace.c
- ntptrace/ntptrace.mak
- xntpd/ntp_config.c
- xntpd/ntp_filegen.c
- xntpd/ntp_intres.c
- xntpd/ntp_io.c
- xntpd/ntp_loopfilter.c
- xntpd/ntp_peer.c
- xntpd/ntp_proto.c
- xntpd/ntp_refclock.c
- xntpd/ntp_timer.c
- xntpd/ntp_unixclock.c
- xntpd/ntp_util.c
- xntpd/ntpd.c
- xntpd/xntpd.mak
- xntpdc/ntpdc.c
- xntpdc/xntpdc.mak
-
-- config.guess might need help to identify:
-
- Fujitsu's UXP --enable-adjtime-is-accurate
- --enable-step-slew
-
- Unixware --enable-adjtime-is-accurate
- --enable-tick=10000
- --enable-tickadj=80
- --enable-udp-wildcard
- --disable-step-slew
-
- DomainOS --enable-adjtime-is-accurate
- --disable-kmem
- --enable-tick=1000000
-
- OpenVMS --enable-slew-always
- --enable-hourly-todr-sync
-
- Is adjtime accurate on ALL sysv4* machines?
- Can we identify DomainOS with *-apollo-* ?
- Do we catch all Unixware machines with *-univel-sysv* ?
-
-- How can we test if UDP_WILDCARD_DELIVERY should be used?
-
-- Combine enable-step-slew and enable-ntpdate-step
-
-- Make sure enable-hourly-todr-sync is always disabled
- What about NextStep and OpenVMS, where hourly TODR sync used to be enabled?
-
-- Check dcfd.c for variables that need to be volatile.
diff --git a/contrib/ntp/WHERE-TO-START b/contrib/ntp/WHERE-TO-START
deleted file mode 100644
index 2e3e77b..0000000
--- a/contrib/ntp/WHERE-TO-START
+++ /dev/null
@@ -1,41 +0,0 @@
-The Network Time Protocol (NTP) Version 4 Distribution
-
-This is a distribution of the Network Time Protocol (NTP) Version 4
-sources and documentation. NTP can be used by Unix, DEC VMS and
-Microsoft Windows NT platforms to synchronize the computer clock to
-external sources of time, such as other NTP time servers or a local
-radio clock. The daemon included in this distribution can operate as a
-server, a client, or a relay from a set of servers to a dependent client
-population on a local net. This distribution includes the daemon itself,
-plus utility programs and supporting documentation.
-
-You are welcome to the lot, with due consideration of the copyright
-information in the COPYRIGHT file. You are also invited to contribute
-bugfixes and drivers for new and exotic radios, telephones and sundials.
-This distribution is normally available by anonymous ftp as the
-compressed tar archive ntp-<version>.tar.Z in the pub/ntp directory on
-louie.udel.edu and <version> is the version number. The current version
-number can be found on the NTP web page <http://www.eecis.udel.edu/~ntp>.
-
-A considerable amount of documentation, including build instructions,
-configuration advice, program usage and miscellaneous information is
-included in the ./html directory of this distribution. The intended
-access method is using a web browser such as netscape; however, the
-pages have been formatted so that viewing with an ordinary text editor
-is practical. Start the browser on the ./html/index.htm page, which
-contains additional instructions and hotlinks to the remaining pages.
-Some hotlinks for the larger documents, such as related technical
-memoranda, reports and papers, lead to other web sites where this
-information is stashed. We apologize for the inconvenience this may
-cause for users without Internet and World Wide Web access.
-
-If you are an old hand and just want to build the distribution, you
-might find the INSTALL file a useful shortcut. A descriptive list of all
-files in the base directory of this distribution is in the README file.
-A list of "significant" changes for the release is in the NEWS file.
-
-If you're interested in helping us test pre-release versions of ntpd,
-please look in <ftp://louie.udel.edu/pub/ntp/testing/>.
-
-David L. Mills (mills@udel.edu)
-21 June 1998
diff --git a/contrib/ntp/acconfig.h b/contrib/ntp/acconfig.h
deleted file mode 100644
index 0a973f7..0000000
--- a/contrib/ntp/acconfig.h
+++ /dev/null
@@ -1 +0,0 @@
-#undef ULONG_CONST
diff --git a/contrib/ntp/acinclude.m4 b/contrib/ntp/acinclude.m4
deleted file mode 100644
index 194bf6a..0000000
--- a/contrib/ntp/acinclude.m4
+++ /dev/null
@@ -1,37 +0,0 @@
-AC_DEFUN(hs_ULONG_CONST,
-[ 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]),
- AC_EGREP_CPP(Reiser,
-[#define RCAT(a,b)a/**/b
-RCAT(Rei,ser)
-], AC_DEFINE([ULONG_CONST(a)], [a/**/L]),
- AC_MSG_ERROR([How do we create an unsigned long constant?])))])
-dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
-dnl
-dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
-dnl variable, taking care of fixing up ${prefix} and such.
-dnl
-dnl Note that the 3 argument form is only supported with autoconf 2.13 and
-dnl later (i.e. only where AC_DEFINE supports 3 arguments).
-dnl
-dnl Examples:
-dnl
-dnl AC_DEFINE_DIR(DATADIR, datadir)
-dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
-dnl
-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, [
- ac_expanded=`(
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- eval echo \""[$]$2"\"
- )`
- ifelse($3, ,
- AC_DEFINE_UNQUOTED($1, "$ac_expanded"),
- AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
-])
diff --git a/contrib/ntp/aclocal.m4 b/contrib/ntp/aclocal.m4
deleted file mode 100644
index c4e624e..0000000
--- a/contrib/ntp/aclocal.m4
+++ /dev/null
@@ -1,1048 +0,0 @@
-# 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.
-
-AC_DEFUN(hs_ULONG_CONST,
-[ 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]),
- AC_EGREP_CPP(Reiser,
-[#define RCAT(a,b)a/**/b
-RCAT(Rei,ser)
-], AC_DEFINE([ULONG_CONST(a)], [a/**/L]),
- AC_MSG_ERROR([How do we create an unsigned long constant?])))])
-dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
-dnl
-dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
-dnl variable, taking care of fixing up ${prefix} and such.
-dnl
-dnl Note that the 3 argument form is only supported with autoconf 2.13 and
-dnl later (i.e. only where AC_DEFINE supports 3 arguments).
-dnl
-dnl Examples:
-dnl
-dnl AC_DEFINE_DIR(DATADIR, datadir)
-dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
-dnl
-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, [
- ac_expanded=`(
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- eval echo \""[$]$2"\"
- )`
- ifelse($3, ,
- AC_DEFINE_UNQUOTED($1, "$ac_expanded"),
- AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
-])
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
-
-# 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.
-
-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.
-
-# 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])])
-
-
-# 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])
-AC_REQUIRE([AC_PROG_CPP])
-AC_MSG_CHECKING([for function prototypes])
-if test "$am_cv_prog_cc_stdc" != no; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
- U= ANSI2KNR=
-else
- AC_MSG_RESULT(no)
- U=_ ANSI2KNR=./ansi2knr
-fi
-# Ensure some checks needed by ansi2knr itself.
-AC_HEADER_STDC
-AC_CHECK_HEADERS(string.h)
-AC_SUBST(U)dnl
-AC_SUBST(ANSI2KNR)dnl
-])
-
-AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
-
-
-# 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
-# @ovindex CC
-# If the C compiler in not in ANSI C mode by default, try to add an option
-# to output variable @code{CC} to make it so. This macro tries various
-# options that select ANSI C on some system or another. It considers the
-# compiler to be in ANSI C mode if it handles function prototypes correctly.
-#
-# If you use this macro, you should check after calling it whether the C
-# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
-# program @code{ansi2knr}, which comes with Ghostscript.
-# @end defmac
-
-AC_DEFUN([AM_PROG_CC_STDC],
-[AC_REQUIRE([AC_PROG_CC])
-AC_BEFORE([$0], [AC_C_INLINE])
-AC_BEFORE([$0], [AC_C_CONST])
-dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
-dnl a magic option to avoid problems with ANSI preprocessor commands
-dnl like #elif.
-dnl FIXME: can't do this because then AC_AIX won't work due to a
-dnl circular dependency.
-dnl AC_BEFORE([$0], [AC_PROG_CPP])
-AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
-AC_CACHE_VAL(am_cv_prog_cc_stdc,
-[am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# 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"
- AC_TRY_COMPILE(
-[#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;
-], [
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
-],
-[am_cv_prog_cc_stdc="$ac_arg"; break])
-done
-CC="$ac_save_CC"
-])
-if test -z "$am_cv_prog_cc_stdc"; then
- AC_MSG_RESULT([none needed])
-else
- AC_MSG_RESULT([$am_cv_prog_cc_stdc])
-fi
-case "x$am_cv_prog_cc_stdc" in
- x|xno) ;;
- *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-])
-
-AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
-
diff --git a/contrib/ntp/adjtimed/Makefile.am b/contrib/ntp/adjtimed/Makefile.am
deleted file mode 100644
index 14a44c6..0000000
--- a/contrib/ntp/adjtimed/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = @MAKE_ADJTIMED@
-EXTRA_PROGRAMS = adjtimed
-INCLUDES = -I$(top_srcdir)/include
-LDADD = ../libntp/libntp.a
-#EXTRA_DIST = TAGS
-ETAGS_ARGS = Makefile.am
diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in
deleted file mode 100644
index b411260..0000000
--- a/contrib/ntp/adjtimed/Makefile.in
+++ /dev/null
@@ -1,445 +0,0 @@
-# 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 = ../ansi2knr #no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = @MAKE_ADJTIMED@
-EXTRA_PROGRAMS = adjtimed
-INCLUDES = -I$(top_srcdir)/include
-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 =
-EXTRA_PROGRAMS = adjtimed$(EXEEXT)
-bin_PROGRAMS = @MAKE_ADJTIMED@
-PROGRAMS = $(bin_PROGRAMS)
-
-adjtimed_SOURCES = adjtimed.c
-adjtimed_OBJECTS = adjtimed$U.$(OBJEXT)
-adjtimed_LDADD = $(LDADD)
-adjtimed_DEPENDENCIES = ../libntp/libntp.a
-adjtimed_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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 $(srcdir)/Makefile.in Makefile.am
-SOURCES = adjtimed.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-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)
-adjtimed$(EXEEXT): $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES)
- @rm -f adjtimed$(EXEEXT)
- $(LINK) $(adjtimed_LDFLAGS) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -test "$U" = "" || rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed$U.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`
-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) > $@ || 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) $(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 $(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 -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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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 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/adjtimed/README b/contrib/ntp/adjtimed/README
deleted file mode 100644
index d4bd593..0000000
--- a/contrib/ntp/adjtimed/README
+++ /dev/null
@@ -1,22 +0,0 @@
-------------------------------------------------------------------------------
-The adjtimed daemon emulates the BSD adjtime(2) system call. The
-adjtime() routine communicates with this daemon via SYSV messages.
-
-The emulation uses an undocumented kernel variable (as of 6.0/2.0
-and later releases) and as such it cannot be guaranteed to work in
-future HP-UX releases. Perhaps HP-UX will have a real adjtime(2)
-system call in the future.
-
-Author: Tai Jin (tai@sde.hp.com)
-------------------------------------------------------------------------------
-
-IMPORTANT NOTE: This stuff must be compiled with no optimization !!
-
-NOTE: This code is known to work as of 8.0 on s300's, s700's and s800's.
- PLEASE do not modify it unless you have access to kernel sources
- and fully understand the implications of any changes you are making.
- One person already has trashed adjtimed by making it do "the right
- thing". This is not an exact replacement for BSD adjtime(2), don't
- try to make it into one.
-
- -- Ken
diff --git a/contrib/ntp/adjtimed/adjtimed.c b/contrib/ntp/adjtimed/adjtimed.c
deleted file mode 100644
index f38e66d..0000000
--- a/contrib/ntp/adjtimed/adjtimed.c
+++ /dev/null
@@ -1,491 +0,0 @@
-/*************************************************************************/
-/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
-/* Hewlett-Packard Laboratories. */
-/* */
-/* Permission is hereby granted for unlimited modification, use, and */
-/* distribution. This software is made available with no warranty of */
-/* any kind, express or implied. This copyright notice must remain */
-/* intact in all versions of this software. */
-/* */
-/* The author would appreciate it if any bug fixes and enhancements were */
-/* to be sent back to him for incorporation into future versions of this */
-/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
-/*************************************************************************/
-
-#ifndef lint
-static char RCSid[] = "adjtimed.c,v 3.1 1993/07/06 01:04:45 jbj Exp";
-#endif
-
-/*
- * Adjust time daemon.
- * This daemon adjusts the rate of the system clock a la BSD's adjtime().
- * The adjtime() routine uses SYSV messages to communicate with this daemon.
- *
- * Caveat: This emulation uses an undocumented kernel variable. As such, it
- * cannot be guaranteed to work in future HP-UX releases. Fortunately,
- * it will no longer be needed in HPUX 10.01 and later.
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <sys/lock.h>
-#include <time.h>
-#include <signal.h>
-#include <nlist.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-
-#include "adjtime.h"
-
-double atof (const char *);
-
-int InitClockRate (void);
-int AdjustClockRate (register struct timeval *delta, register struct timeval *olddelta);
-long GetClockRate (void);
-int SetClockRate (long);
-void ResetClockRate (void);
-void Cleanup (void);
-void Exit (int);
-
-#define MILLION 1000000L
-
-/* emacs cc-mode goes nuts if we split the next line... */
-#define tvtod(tv) ((double)tv.tv_sec + ((double)tv.tv_usec / (double)MILLION))
-
-char *progname = NULL;
-int verbose = 0;
-int sysdebug = 0;
-static int mqid;
-static double oldrate = 0.0;
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- struct timeval remains;
- struct sigvec vec;
- MsgBuf msg;
- char ch;
- int nofork = 0;
- int fd;
-
- progname = argv[0];
-
-#ifdef LOG_LOCAL6
- openlog("adjtimed", LOG_PID, LOG_LOCAL6);
-#else
- openlog("adjtimed", LOG_PID);
-#endif
-
- while ((ch = ntp_getopt(argc, argv, "hkrvdfp:")) != EOF) {
- switch (ch) {
- case 'k':
- case 'r':
- if ((mqid = msgget(KEY, 0)) != -1) {
- if (msgctl(mqid, IPC_RMID, (struct msqid_ds *)0) == -1) {
- msyslog(LOG_ERR, "remove old message queue: %m");
- perror("adjtimed: remove old message queue");
- exit(1);
- }
- }
-
- if (ch == 'k')
- exit(0);
-
- break;
-
- case 'v':
- ++verbose, nofork = 1;
- break;
-
- case 'd':
- ++sysdebug;
- break;
-
- case 'f':
- nofork = 1;
- break;
-
- case 'p':
- fputs("adjtimed: -p option ignored\n", stderr);
- break;
-
- default:
- puts("usage: adjtimed -hkrvdf");
- puts("-h\thelp");
- puts("-k\tkill existing adjtimed, if any");
- puts("-r\trestart (kills existing adjtimed, if any)");
- puts("-v\tdebug output (repeat for more output)");
- puts("-d\tsyslog output (repeat for more output)");
- puts("-f\tno fork");
- msyslog(LOG_ERR, "usage error");
- exit(1);
- } /* switch */
- } /* while */
-
- if (!nofork) {
- switch (fork()) {
- case 0:
- close(fileno(stdin));
- close(fileno(stdout));
- close(fileno(stderr));
-
-#ifdef TIOCNOTTY
- if ((fd = open("/dev/tty")) != -1) {
- ioctl(fd, TIOCNOTTY, 0);
- close(fd);
- }
-#else
- setpgrp();
-#endif
- break;
-
- case -1:
- msyslog(LOG_ERR, "fork: %m");
- perror("adjtimed: fork");
- exit(1);
-
- default:
- exit(0);
- } /* switch */
- } /* if */
-
- if (nofork) {
- setvbuf(stdout, NULL, _IONBF, BUFSIZ);
- setvbuf(stderr, NULL, _IONBF, BUFSIZ);
- }
-
- msyslog(LOG_INFO, "started");
- if (verbose) printf("adjtimed: started\n");
-
- if (InitClockRate() == -1)
- Exit(2);
-
- (void)signal(SIGHUP, SIG_IGN);
- (void)signal(SIGINT, SIG_IGN);
- (void)signal(SIGQUIT, SIG_IGN);
- (void)signal(SIGTERM, Cleanup);
-
- vec.sv_handler = ResetClockRate;
- vec.sv_flags = 0;
- vec.sv_mask = ~0;
- sigvector(SIGALRM, &vec, (struct sigvec *)0);
-
- if (msgget(KEY, IPC_CREAT|IPC_EXCL) == -1) {
- if (errno == EEXIST) {
- msyslog(LOG_ERR, "message queue already exists, use -r to remove it");
- fputs("adjtimed: message queue already exists, use -r to remove it\n",
- stderr);
- Exit(1);
- }
-
- msyslog(LOG_ERR, "create message queue: %m");
- perror("adjtimed: create message queue");
- Exit(1);
- }
-
- if ((mqid = msgget(KEY, 0)) == -1) {
- msyslog(LOG_ERR, "get message queue id: %m");
- perror("adjtimed: get message queue id");
- Exit(1);
- }
-
- /* Lock process in memory to improve response time */
- if (plock(PROCLOCK)) {
- msyslog(LOG_ERR, "plock: %m");
- perror("adjtimed: plock");
- Cleanup();
- }
-
- /* Also raise process priority.
- * If we do not get run when we want, this leads to bad timekeeping
- * and "Previous time adjustment didn't complete" gripes from xntpd.
- */
- if (nice(-10) == -1) {
- msyslog(LOG_ERR, "nice: %m");
- perror("adjtimed: nice");
- Cleanup();
- }
-
- for (;;) {
- if (msgrcv(mqid, &msg.msgp, MSGSIZE, CLIENT, 0) == -1) {
- if (errno == EINTR) continue;
- msyslog(LOG_ERR, "read message: %m");
- perror("adjtimed: read message");
- Cleanup();
- }
-
- switch (msg.msgb.code) {
- case DELTA1:
- case DELTA2:
- AdjustClockRate(&msg.msgb.tv, &remains);
-
- if (msg.msgb.code == DELTA2) {
- msg.msgb.tv = remains;
- msg.msgb.mtype = SERVER;
-
- while (msgsnd(mqid, &msg.msgp, MSGSIZE, 0) == -1) {
- if (errno == EINTR) continue;
- msyslog(LOG_ERR, "send message: %m");
- perror("adjtimed: send message");
- Cleanup();
- }
- }
-
- if (remains.tv_sec + remains.tv_usec != 0L) {
- if (verbose) {
- printf("adjtimed: previous correction remaining %.6fs\n",
- tvtod(remains));
- }
- if (sysdebug) {
- msyslog(LOG_INFO, "previous correction remaining %.6fs",
- tvtod(remains));
- }
- }
- break;
-
- default:
- fprintf(stderr, "adjtimed: unknown message code %d\n", msg.msgb.code);
- msyslog(LOG_ERR, "unknown message code %d", msg.msgb.code);
- } /* switch */
- } /* loop */
-} /* main */
-
-/*
- * Default clock rate (old_tick).
- */
-#define DEFAULT_RATE (MILLION / HZ)
-#define UNKNOWN_RATE 0L
-#define TICK_ADJ 5 /* standard adjustment rate, microsec/tick */
-
-static long default_rate = DEFAULT_RATE;
-static long tick_rate = HZ; /* ticks per sec */
-static long slew_rate = TICK_ADJ * HZ; /* in microsec/sec */
-
-int
-AdjustClockRate(
- register struct timeval *delta,
- register struct timeval *olddelta
- )
-{
- register long rate, dt, leftover;
- struct itimerval period, remains;
-
- dt = (delta->tv_sec * MILLION) + delta->tv_usec;
-
- if (verbose)
- printf("adjtimed: new correction %.6fs\n", (double)dt / (double)MILLION);
- if (sysdebug)
- msyslog(LOG_INFO, "new correction %.6fs", (double)dt / (double)MILLION);
- if (verbose > 2) printf("adjtimed: leftover %ldus\n", leftover);
- if (sysdebug > 2) msyslog(LOG_INFO, "leftover %ldus", leftover);
- rate = dt;
-
- /*
- * Apply a slew rate of slew_rate over a period of dt/slew_rate seconds.
- */
- if (dt > 0) {
- rate = slew_rate;
- } else {
- rate = -slew_rate;
- dt = -dt;
- }
- period.it_value.tv_sec = dt / slew_rate;
- period.it_value.tv_usec = (dt % slew_rate) * (MILLION / slew_rate);
- /*
- * Note: we assume the kernel will convert the specified period into ticks
- * using the modified clock rate rather than an assumed nominal clock rate,
- * and therefore will generate the timer interrupt after the specified
- * number of true seconds, not skewed seconds.
- */
-
- if (verbose > 1)
- printf("adjtimed: will be complete in %lds %ldus\n",
- period.it_value.tv_sec, period.it_value.tv_usec);
- if (sysdebug > 1)
- msyslog(LOG_INFO, "will be complete in %lds %ldus",
- period.it_value.tv_sec, period.it_value.tv_usec);
- /*
- * adjust the clock rate
- */
- if (dt) {
- if (SetClockRate((rate / tick_rate) + default_rate) == -1) {
- msyslog(LOG_ERR, "set clock rate: %m");
- perror("adjtimed: set clock rate");
- }
- }
- /*
- * start the timer
- * (do this after changing the rate because the period has been rounded down)
- */
- period.it_interval.tv_sec = period.it_interval.tv_usec = 0L;
- setitimer(ITIMER_REAL, &period, &remains);
- /*
- * return old delta
- */
- if (olddelta) {
- dt = ((remains.it_value.tv_sec * MILLION) + remains.it_value.tv_usec) *
- oldrate;
- olddelta->tv_sec = dt / MILLION;
- olddelta->tv_usec = dt - (olddelta->tv_sec * MILLION);
- }
-
- oldrate = (double)rate / (double)MILLION;
- return(0);
-} /* AdjustClockRate */
-
-static struct nlist nl[] = {
-#ifdef __hp9000s800
-#ifdef PRE7_0
- { "tick" },
-#else
- { "old_tick" },
-#endif
-#else
- { "_old_tick" },
-#endif
- { "" }
-};
-
-static int kmem;
-
-/*
- * The return value is the clock rate in old_tick units or -1 if error.
- */
-long
-GetClockRate(void)
-{
- long rate, mask;
-
- if (lseek(kmem, (off_t)nl[0].n_value, 0) == -1L)
- return (-1L);
-
- mask = sigblock(sigmask(SIGALRM));
-
- if (read(kmem, (caddr_t)&rate, sizeof(rate)) != sizeof(rate))
- rate = UNKNOWN_RATE;
-
- sigsetmask(mask);
- return (rate);
-} /* GetClockRate */
-
-/*
- * The argument is the new rate in old_tick units.
- */
-int
-SetClockRate(
- long rate
- )
-{
- long mask;
-
- if (lseek(kmem, (off_t)nl[0].n_value, 0) == -1L)
- return (-1);
-
- mask = sigblock(sigmask(SIGALRM));
-
- if (write(kmem, (caddr_t)&rate, sizeof(rate)) != sizeof(rate)) {
- sigsetmask(mask);
- return (-1);
- }
-
- sigsetmask(mask);
-
- if (rate != default_rate) {
- if (verbose > 3) {
- printf("adjtimed: clock rate (%lu) %ldus/s\n", rate,
- (rate - default_rate) * tick_rate);
- }
- if (sysdebug > 3) {
- msyslog(LOG_INFO, "clock rate (%lu) %ldus/s", rate,
- (rate - default_rate) * tick_rate);
- }
- }
-
- return (0);
-} /* SetClockRate */
-
-int
-InitClockRate(void)
-{
- if ((kmem = open("/dev/kmem", O_RDWR)) == -1) {
- msyslog(LOG_ERR, "open(/dev/kmem): %m");
- perror("adjtimed: open(/dev/kmem)");
- return (-1);
- }
-
- nlist("/hp-ux", nl);
-
- if (nl[0].n_type == 0) {
- fputs("adjtimed: /hp-ux has no symbol table\n", stderr);
- msyslog(LOG_ERR, "/hp-ux has no symbol table");
- return (-1);
- }
- /*
- * Set the default to the system's original value
- */
- default_rate = GetClockRate();
- if (default_rate == UNKNOWN_RATE) default_rate = DEFAULT_RATE;
- tick_rate = (MILLION / default_rate);
- slew_rate = TICK_ADJ * tick_rate;
- fprintf(stderr,"default_rate=%ld, tick_rate=%ld, slew_rate=%ld\n",default_rate,tick_rate,slew_rate);
-
- return (0);
-} /* InitClockRate */
-
-/*
- * Reset the clock rate to the default value.
- */
-void
-ResetClockRate(void)
-{
- struct itimerval it;
-
- it.it_value.tv_sec = it.it_value.tv_usec = 0L;
- setitimer(ITIMER_REAL, &it, (struct itimerval *)0);
-
- if (verbose > 2) puts("adjtimed: resetting the clock");
- if (sysdebug > 2) msyslog(LOG_INFO, "resetting the clock");
-
- if (GetClockRate() != default_rate) {
- if (SetClockRate(default_rate) == -1) {
- msyslog(LOG_ERR, "set clock rate: %m");
- perror("adjtimed: set clock rate");
- }
- }
-
- oldrate = 0.0;
-} /* ResetClockRate */
-
-void
-Cleanup(void)
-{
- ResetClockRate();
-
- if (msgctl(mqid, IPC_RMID, (struct msqid_ds *)0) == -1) {
- if (errno != EINVAL) {
- msyslog(LOG_ERR, "remove message queue: %m");
- perror("adjtimed: remove message queue");
- }
- }
-
- Exit(2);
-} /* Cleanup */
-
-void
-Exit(status)
- int status;
-{
- msyslog(LOG_ERR, "terminated");
- closelog();
- if (kmem != -1) close(kmem);
- exit(status);
-} /* Exit */
diff --git a/contrib/ntp/arlib/COPYING b/contrib/ntp/arlib/COPYING
deleted file mode 100644
index 57e5c2a..0000000
--- a/contrib/ntp/arlib/COPYING
+++ /dev/null
@@ -1,46 +0,0 @@
-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
deleted file mode 100644
index b42a17a..0000000
--- a/contrib/ntp/arlib/INSTALL
+++ /dev/null
@@ -1,182 +0,0 @@
-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
deleted file mode 100644
index c0b4094..0000000
--- a/contrib/ntp/arlib/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-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
deleted file mode 100644
index 728a9fc..0000000
--- a/contrib/ntp/arlib/Makefile.in
+++ /dev/null
@@ -1,484 +0,0 @@
-# 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
deleted file mode 100644
index 1d2e787..0000000
--- a/contrib/ntp/arlib/README
+++ /dev/null
@@ -1,49 +0,0 @@
-
- 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
deleted file mode 100644
index c92d475..0000000
--- a/contrib/ntp/arlib/UNSHAR.HDR
+++ /dev/null
@@ -1,32 +0,0 @@
-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
deleted file mode 100644
index fb76c3d..0000000
--- a/contrib/ntp/arlib/aclocal.m4
+++ /dev/null
@@ -1,835 +0,0 @@
-# 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
deleted file mode 100644
index afdc02f..0000000
--- a/contrib/ntp/arlib/arlib.3
+++ /dev/null
@@ -1,230 +0,0 @@
-.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
deleted file mode 100644
index 3d76e57..0000000
--- a/contrib/ntp/arlib/arlib.c
+++ /dev/null
@@ -1,1056 +0,0 @@
-/*
- * 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
deleted file mode 100644
index a295b88..0000000
--- a/contrib/ntp/arlib/arlib.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 8f905d1..0000000
--- a/contrib/ntp/arlib/arplib.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
deleted file mode 100755
index 7d85a60..0000000
--- a/contrib/ntp/arlib/configure
+++ /dev/null
@@ -1,4424 +0,0 @@
-#! /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
deleted file mode 100644
index 509e23d..0000000
--- a/contrib/ntp/arlib/configure.in
+++ /dev/null
@@ -1,57 +0,0 @@
-# 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
deleted file mode 100755
index aea3d00..0000000
--- a/contrib/ntp/arlib/depcomp
+++ /dev/null
@@ -1,472 +0,0 @@
-#! /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
deleted file mode 100755
index 6ce63b9..0000000
--- a/contrib/ntp/arlib/install-sh
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/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
deleted file mode 100755
index 6a37006..0000000
--- a/contrib/ntp/arlib/missing
+++ /dev/null
@@ -1,336 +0,0 @@
-#! /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
deleted file mode 100755
index d2d5f21..0000000
--- a/contrib/ntp/arlib/mkinstalldirs
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /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
deleted file mode 100644
index 83db6a8..0000000
--- a/contrib/ntp/arlib/sample.c
+++ /dev/null
@@ -1,143 +0,0 @@
-#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
deleted file mode 100755
index 58551fd..0000000
--- a/contrib/ntp/build
+++ /dev/null
@@ -1,88 +0,0 @@
-#! /bin/sh
-
-LOGF=make.log
-IAM=`hostname || uname -n`
-
-case "$1" in
- 0.*)
- SIG=$1
- shift
- CONFIG_ARGS="$@"
- KEY=`sed -e q < .buildkey`
- case "$SIG" 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
- ;;
- *)
- CONFIG_ARGS="$@"
- ;;
-esac
-
-#set -e
-#set -x
-
-CVO=`./config.guess`
-case "$CVO" in
- *-*-*) ;;
- *) echo "config.guess returned <$CVO>, which makes no sense to me."
- exit 1
- ;;
-esac
-
-MYNAME=`IFS=. ; set $IAM ; echo $1`
-
-case "$IAM" in
- *.udel.edu)
- BDIR=A.$MYNAME
- ;;
- *)
- BDIR=A.$CVO
- ;;
-esac
-
-KEYSUF=""
-
-case "$CONFIG_ARGS" in
- *--with-crypto=autokey*)
- KEYSUF="-autokey"
- ;;
- *--without-crypto*)
- KEYSUF="-noopenssl"
- ;;
-esac
-
-CCSUF=""
-
-case "$CC" in
- '') ;;
- *) CCSUF="-$CC"
- ;;
-esac
-
-BDIR="$BDIR$KEYSUF$CCSUF"
-
-[ -d "$BDIR" ] || mkdir $BDIR
-[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo
-[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost
-
-cd $BDIR
-
-(
-[ -f config.status ] || ../configure $CONFIG_ARGS
-
-./config.status
-
-case "$MAKE" in
- '') make && make check
- ;;
- *) $MAKE && $MAKE check
- ;;
-esac
-) > $LOGF 2>&1
diff --git a/contrib/ntp/clockstuff/Makefile.am b/contrib/ntp/clockstuff/Makefile.am
deleted file mode 100644
index ebfd74e..0000000
--- a/contrib/ntp/clockstuff/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
-EXTRA_PROGRAMS = propdelay chutest clktest
-
-INCLUDES = -I$(top_srcdir)/include
-# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
-propdelay_LDADD = -lm
-chutest_LDADD = ../libntp/libntp.a
-clktest_LDADD = ../libntp/libntp.a
-ETAGS_ARGS = Makefile.am
-#EXTRA_DIST = TAGS
-
-chutest$(EXEEXT): ../libntp/libntp.a
-
-clktest$(EXEEXT): ../libntp/libntp.a
diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in
deleted file mode 100644
index d02dbd4..0000000
--- a/contrib/ntp/clockstuff/Makefile.in
+++ /dev/null
@@ -1,446 +0,0 @@
-# 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 = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
-EXTRA_PROGRAMS = propdelay chutest clktest
-
-INCLUDES = -I$(top_srcdir)/include
-# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
-propdelay_LDADD = -lm
-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 =
-EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT) clktest$(EXEEXT)
-noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
-PROGRAMS = $(noinst_PROGRAMS)
-
-chutest_SOURCES = chutest.c
-chutest_OBJECTS = chutest$U.$(OBJEXT)
-chutest_DEPENDENCIES = ../libntp/libntp.a
-chutest_LDFLAGS =
-clktest_SOURCES = clktest.c
-clktest_OBJECTS = clktest$U.$(OBJEXT)
-clktest_DEPENDENCIES = ../libntp/libntp.a
-clktest_LDFLAGS =
-propdelay_SOURCES = propdelay.c
-propdelay_OBJECTS = propdelay$U.$(OBJEXT)
-propdelay_DEPENDENCIES =
-propdelay_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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 $(srcdir)/Makefile.in Makefile.am
-SOURCES = chutest.c clktest.c propdelay.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-propdelay$(EXEEXT): $(propdelay_OBJECTS) $(propdelay_DEPENDENCIES)
- @rm -f propdelay$(EXEEXT)
- $(LINK) $(propdelay_LDFLAGS) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -test "$U" = "" || 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@
-
-.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`
-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) > $@ || 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) > $@ || 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) > $@ || 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) $(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 $(PROGRAMS)
-
-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-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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
-
-chutest$(EXEEXT): ../libntp/libntp.a
-
-clktest$(EXEEXT): ../libntp/libntp.a
-# 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/clockstuff/README b/contrib/ntp/clockstuff/README
deleted file mode 100644
index c7f9727..0000000
--- a/contrib/ntp/clockstuff/README
+++ /dev/null
@@ -1,31 +0,0 @@
-README file for directory ./clockstuff of the NTP Version 4 distribution
-
-This directory contains the sources for utility programs designed to
-support radio clocks. The chutest.c and clktest.c are desgined to
-test the chu_clk and tty_clk line disciplines and STREAMS modules in
-the ../kernel directory.
-
-These files have been modified to work with either the line disciplines
-or the STREAMS modules. Be sure to define -DSTREAM if appropriate.
-
-These are random bits of things written to help with clocks. You can
-make things in here by typing one or more of:
-
- make propdelay (or `make')
- make chutest
- make clktest
-
-Propdelay computes high frequency propagation delays, given the
-longitude and latitude of the transmitter and receiver. Use
-this for WWV/H and CHU. Don't use it for WWVB (the computation
-is easier for that).
-
-Chutest can be used to input and process data from a CHU modem
-attached to a serial port. It will use the CHU line discipline
-(if installed), or raw mode otherwise. This was used to test
-out the initial reduction algorithms, and may not be up to date.
-
-Clktest can be used to test the clock line discipline (CLKLDISC,
-it must be available), and to take a look at radio clocks attached to a
-serial port.
-
diff --git a/contrib/ntp/clockstuff/chutest.c b/contrib/ntp/clockstuff/chutest.c
deleted file mode 100644
index 785c253..0000000
--- a/contrib/ntp/clockstuff/chutest.c
+++ /dev/null
@@ -1,816 +0,0 @@
-/* chutest.c,v 3.1 1993/07/06 01:05:21 jbj Exp
- * chutest - test the CHU clock
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#include <sgtty.h>
-
-#include "../include/ntp_fp.h"
-#include "../include/ntp.h"
-#include "../include/ntp_unixtime.h"
-
-#ifdef CHULDISC
-#ifdef STREAM
-# ifdef HAVE_SYS_CHUDEFS_H
-#include <sys/chudefs.h>
-#endif
-#include <stropts.h>
-#endif
-#endif
-
-#ifdef CHULDISC
-# ifdef HAVE_SYS_CHUDEFS_H
-#include <sys/chudefs.h>
-#endif
-#endif
-
-#ifndef CHULDISC
-#ifndef STREAM
-#define NCHUCHARS (10)
-
-struct chucode {
- u_char codechars[NCHUCHARS]; /* code characters */
- u_char ncodechars; /* number of code characters */
- u_char chustatus; /* not used currently */
- struct timeval codetimes[NCHUCHARS]; /* arrival times */
-};
-#endif
-#endif
-
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-char *progname;
-int debug;
-
-int dofilter = 0; /* set to 1 when we should run filter algorithm */
-int showtimes = 0; /* set to 1 when we should show char arrival times */
-int doprocess = 0; /* set to 1 when we do processing analogous to driver */
-#ifdef CHULDISC
-int usechuldisc = 0; /* set to 1 when CHU line discipline should be used */
-#endif
-#ifdef STREAM
-int usechuldisc = 0; /* set to 1 when CHU line discipline should be used */
-#endif
-
-struct timeval lasttv;
-struct chucode chudata;
-
-extern u_long ustotslo[];
-extern u_long ustotsmid[];
-extern u_long ustotshi[];
-
-/*
- * main - parse arguments and handle options
- */
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int c;
- int errflg = 0;
- extern int ntp_optind;
- extern char *ntp_optarg;
- void init_chu();
-
- progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "cdfpt")) != EOF)
- switch (c) {
- case 'c':
-#ifdef STREAM
- usechuldisc = 1;
- break;
-#endif
-#ifdef CHULDISC
- usechuldisc = 1;
- break;
-#endif
-#ifndef STREAM
-#ifndef CHULDISC
- (void) fprintf(stderr,
- "%s: CHU line discipline not available on this machine\n",
- progname);
- exit(2);
-#endif
-#endif
- case 'd':
- ++debug;
- break;
- case 'f':
- dofilter = 1;
- break;
- case 'p':
- doprocess = 1;
- case 't':
- showtimes = 1;
- break;
- default:
- errflg++;
- break;
- }
- if (errflg || ntp_optind+1 != argc) {
-#ifdef STREAM
- (void) fprintf(stderr, "usage: %s [-dft] tty_device\n",
- progname);
-#endif
-#ifdef CHULDISC
- (void) fprintf(stderr, "usage: %s [-dft] tty_device\n",
- progname);
-#endif
-#ifndef STREAM
-#ifndef CHULDISC
- (void) fprintf(stderr, "usage: %s [-cdft] tty_device\n",
- progname);
-#endif
-#endif
- exit(2);
- }
-
- (void) gettimeofday(&lasttv, (struct timezone *)0);
- c = openterm(argv[ntp_optind]);
- init_chu();
-#ifdef STREAM
- if (usechuldisc)
- process_ldisc(c);
- else
-#endif
-#ifdef CHULDISC
- if (usechuldisc)
- process_ldisc(c);
- else
-#endif
- process_raw(c);
- /*NOTREACHED*/
-}
-
-
-/*
- * openterm - open a port to the CHU clock
- */
-int
-openterm(
- char *dev
- )
-{
- int s;
- struct sgttyb ttyb;
-
- if (debug)
- (void) fprintf(stderr, "Doing open...");
- if ((s = open(dev, O_RDONLY, 0777)) < 0)
- error("open(%s)", dev, "");
- if (debug)
- (void) fprintf(stderr, "open okay\n");
-
- if (debug)
- (void) fprintf(stderr, "Setting exclusive use...");
- if (ioctl(s, TIOCEXCL, (char *)0) < 0)
- error("ioctl(TIOCEXCL)", "", "");
- if (debug)
- (void) fprintf(stderr, "done\n");
-
- ttyb.sg_ispeed = ttyb.sg_ospeed = B300;
- ttyb.sg_erase = ttyb.sg_kill = 0;
- ttyb.sg_flags = EVENP|ODDP|RAW;
- if (debug)
- (void) fprintf(stderr, "Setting baud rate et al...");
- if (ioctl(s, TIOCSETP, (char *)&ttyb) < 0)
- error("ioctl(TIOCSETP, raw)", "", "");
- if (debug)
- (void) fprintf(stderr, "done\n");
-
-#ifdef CHULDISC
- if (usechuldisc) {
- int ldisc;
-
- if (debug)
- (void) fprintf(stderr, "Switching to CHU ldisc...");
- ldisc = CHULDISC;
- if (ioctl(s, TIOCSETD, (char *)&ldisc) < 0)
- error("ioctl(TIOCSETD, CHULDISC)", "", "");
- if (debug)
- (void) fprintf(stderr, "okay\n");
- }
-#endif
-#ifdef STREAM
- if (usechuldisc) {
-
- if (debug)
- (void) fprintf(stderr, "Poping off streams...");
- while (ioctl(s, I_POP, 0) >=0) ;
- if (debug)
- (void) fprintf(stderr, "okay\n");
- if (debug)
- (void) fprintf(stderr, "Pushing CHU stream...");
- if (ioctl(s, I_PUSH, "chu") < 0)
- error("ioctl(I_PUSH, \"chu\")", "", "");
- if (debug)
- (void) fprintf(stderr, "okay\n");
- }
-#endif
- return s;
-}
-
-
-/*
- * process_raw - process characters in raw mode
- */
-int
-process_raw(
- int s
- )
-{
- u_char c;
- int n;
- struct timeval tv;
- struct timeval difftv;
-
- while ((n = read(s, &c, sizeof(char))) > 0) {
- (void) gettimeofday(&tv, (struct timezone *)0);
- if (dofilter)
- raw_filter((unsigned int)c, &tv);
- else {
- difftv.tv_sec = tv.tv_sec - lasttv.tv_sec;
- difftv.tv_usec = tv.tv_usec - lasttv.tv_usec;
- if (difftv.tv_usec < 0) {
- difftv.tv_sec--;
- difftv.tv_usec += 1000000;
- }
- (void) printf("%02x\t%lu.%06lu\t%lu.%06lu\n",
- c, tv.tv_sec, tv.tv_usec, difftv.tv_sec,
- difftv.tv_usec);
- lasttv = tv;
- }
- }
-
- if (n == 0) {
- (void) fprintf(stderr, "%s: zero returned on read\n", progname);
- exit(1);
- } else
- error("read()", "", "");
-}
-
-
-/*
- * raw_filter - run the line discipline filter over raw data
- */
-int
-raw_filter(
- unsigned int c,
- struct timeval *tv
- )
-{
- static struct timeval diffs[10] = { 0 };
- struct timeval diff;
- l_fp ts;
- void chufilter();
-
- if ((c & 0xf) > 9 || ((c>>4)&0xf) > 9) {
- if (debug)
- (void) fprintf(stderr,
- "character %02x failed BCD test\n");
- chudata.ncodechars = 0;
- return;
- }
-
- if (chudata.ncodechars > 0) {
- diff.tv_sec = tv->tv_sec
- - chudata.codetimes[chudata.ncodechars].tv_sec;
- diff.tv_usec = tv->tv_usec
- - chudata.codetimes[chudata.ncodechars].tv_usec;
- if (diff.tv_usec < 0) {
- diff.tv_sec--;
- diff.tv_usec += 1000000;
- } /*
- if (diff.tv_sec != 0 || diff.tv_usec > 900000) {
- if (debug)
- (void) fprintf(stderr,
- "character %02x failed time test\n");
- chudata.ncodechars = 0;
- return;
- } */
- }
-
- chudata.codechars[chudata.ncodechars] = c;
- chudata.codetimes[chudata.ncodechars] = *tv;
- if (chudata.ncodechars > 0)
- diffs[chudata.ncodechars] = diff;
- if (++chudata.ncodechars == 10) {
- if (doprocess) {
- TVTOTS(&chudata.codetimes[NCHUCHARS-1], &ts);
- ts.l_ui += JAN_1970;
- chufilter(&chudata, &chudata.codetimes[NCHUCHARS-1]);
- } else {
- register int i;
-
- for (i = 0; i < chudata.ncodechars; i++) {
- (void) printf("%x%x\t%lu.%06lu\t%lu.%06lu\n",
- chudata.codechars[i] & 0xf,
- (chudata.codechars[i] >>4 ) & 0xf,
- chudata.codetimes[i].tv_sec,
- chudata.codetimes[i].tv_usec,
- diffs[i].tv_sec, diffs[i].tv_usec);
- }
- }
- chudata.ncodechars = 0;
- }
-}
-
-
-/* #ifdef CHULDISC*/
-/*
- * process_ldisc - process line discipline
- */
-int
-process_ldisc(
- int s
- )
-{
- struct chucode chu;
- int n;
- register int i;
- struct timeval diff;
- l_fp ts;
- void chufilter();
-
- while ((n = read(s, (char *)&chu, sizeof chu)) > 0) {
- if (n != sizeof chu) {
- (void) fprintf(stderr, "Expected %d, got %d\n",
- sizeof chu, n);
- continue;
- }
-
- if (doprocess) {
- TVTOTS(&chu.codetimes[NCHUCHARS-1], &ts);
- ts.l_ui += JAN_1970;
- chufilter(&chu, &ts);
- } else {
- for (i = 0; i < NCHUCHARS; i++) {
- if (i == 0)
- diff.tv_sec = diff.tv_usec = 0;
- else {
- diff.tv_sec = chu.codetimes[i].tv_sec
- - chu.codetimes[i-1].tv_sec;
- diff.tv_usec = chu.codetimes[i].tv_usec
- - chu.codetimes[i-1].tv_usec;
- if (diff.tv_usec < 0) {
- diff.tv_sec--;
- diff.tv_usec += 1000000;
- }
- }
- (void) printf("%x%x\t%lu.%06lu\t%lu.%06lu\n",
- chu.codechars[i] & 0xf, (chu.codechars[i]>>4)&0xf,
- chu.codetimes[i].tv_sec, chu.codetimes[i].tv_usec,
- diff.tv_sec, diff.tv_usec);
- }
- }
- }
- if (n == 0) {
- (void) fprintf(stderr, "%s: zero returned on read\n", progname);
- exit(1);
- } else
- error("read()", "", "");
-}
-/*#endif*/
-
-
-/*
- * error - print an error message
- */
-void
-error(
- char *fmt,
- char *s1,
- char *s2
- )
-{
- (void) fprintf(stderr, "%s: ", progname);
- (void) fprintf(stderr, fmt, s1, s2);
- (void) fprintf(stderr, ": ");
- perror("");
- exit(1);
-}
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* maximum number of CHU units permitted */
-#define CHUDEV "/dev/chu%d" /* device we open. %d is unit number */
-#define NCHUCODES 9 /* expect 9 CHU codes per minute */
-
-/*
- * When CHU is operating optimally we want the primary clock distance
- * to come out at 300 ms. Thus, peer.distance in the CHU peer structure
- * is set to 290 ms and we compute delays which are at least 10 ms long.
- * The following are 290 ms and 10 ms expressed in u_fp format
- */
-#define CHUDISTANCE 0x00004a3d
-#define CHUBASEDELAY 0x0000028f
-
-/*
- * To compute a quality for the estimate (a pseudo delay) we add a
- * fixed 10 ms for each missing code in the minute and add to this
- * the sum of the differences between the remaining offsets and the
- * estimated sample offset.
- */
-#define CHUDELAYPENALTY 0x0000028f
-
-/*
- * Other constant stuff
- */
-#define CHUPRECISION (-9) /* what the heck */
-#define CHUREFID "CHU\0"
-
-/*
- * Default fudge factors
- */
-#define DEFPROPDELAY 0x00624dd3 /* 0.0015 seconds, 1.5 ms */
-#define DEFFILTFUDGE 0x000d1b71 /* 0.0002 seconds, 200 us */
-
-/*
- * Hacks to avoid excercising the multiplier. I have no pride.
- */
-#define MULBY10(x) (((x)<<3) + ((x)<<1))
-#define MULBY60(x) (((x)<<6) - ((x)<<2)) /* watch overflow */
-#define MULBY24(x) (((x)<<4) + ((x)<<3))
-
-/*
- * Constants for use when multiplying by 0.1. ZEROPTONE is 0.1
- * as an l_fp fraction, NZPOBITS is the number of significant bits
- * in ZEROPTONE.
- */
-#define ZEROPTONE 0x1999999a
-#define NZPOBITS 29
-
-/*
- * The CHU table. This gives the expected time of arrival of each
- * character after the on-time second and is computed as follows:
- * The CHU time code is sent at 300 bps. Your average UART will
- * synchronize at the edge of the start bit and will consider the
- * character complete at the center of the first stop bit, i.e.
- * 0.031667 ms later. Thus the expected time of each interrupt
- * is the start bit time plus 0.031667 seconds. These times are
- * in chutable[]. To this we add such things as propagation delay
- * and delay fudge factor.
- */
-#define CHARDELAY 0x081b4e80
-
-static u_long chutable[NCHUCHARS] = {
- 0x2147ae14 + CHARDELAY, /* 0.130 (exactly) */
- 0x2ac08312 + CHARDELAY, /* 0.167 (exactly) */
- 0x34395810 + CHARDELAY, /* 0.204 (exactly) */
- 0x3db22d0e + CHARDELAY, /* 0.241 (exactly) */
- 0x472b020c + CHARDELAY, /* 0.278 (exactly) */
- 0x50a3d70a + CHARDELAY, /* 0.315 (exactly) */
- 0x5a1cac08 + CHARDELAY, /* 0.352 (exactly) */
- 0x63958106 + CHARDELAY, /* 0.389 (exactly) */
- 0x6d0e5604 + CHARDELAY, /* 0.426 (exactly) */
- 0x76872b02 + CHARDELAY, /* 0.463 (exactly) */
-};
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp propagation_delay;
-static l_fp fudgefactor;
-static l_fp offset_fudge;
-
-/*
- * We keep track of the start of the year, watching for changes.
- * We also keep track of whether the year is a leap year or not.
- * All because stupid CHU doesn't include the year in the time code.
- */
-static u_long yearstart;
-
-/*
- * Imported from the timer module
- */
-extern u_long current_time;
-extern struct event timerqueue[];
-
-/*
- * Time conversion tables imported from the library
- */
-extern u_long ustotslo[];
-extern u_long ustotsmid[];
-extern u_long ustotshi[];
-
-
-/*
- * init_chu - initialize internal chu driver data
- */
-void
-init_chu(void)
-{
-
- /*
- * Initialize fudge factors to default.
- */
- propagation_delay.l_ui = 0;
- propagation_delay.l_uf = DEFPROPDELAY;
- fudgefactor.l_ui = 0;
- fudgefactor.l_uf = DEFFILTFUDGE;
- offset_fudge = propagation_delay;
- L_ADD(&offset_fudge, &fudgefactor);
-
- yearstart = 0;
-}
-
-
-void
-chufilter(
- struct chucode *chuc,
- l_fp *rtime
- )
-{
- register int i;
- register u_long date_ui;
- register u_long tmp;
- register u_char *code;
- int isneg;
- int imin;
- int imax;
- u_long reftime;
- l_fp off[NCHUCHARS];
- l_fp ts;
- int day, hour, minute, second;
- static u_char lastcode[NCHUCHARS];
- extern u_long calyearstart();
- extern char *mfptoa();
- void chu_process();
- extern char *prettydate();
-
- /*
- * We'll skip the checks made in the kernel, but assume they've
- * been done. This means that all characters are BCD and
- * the intercharacter spacing isn't unreasonable.
- */
-
- /*
- * print the code
- */
- for (i = 0; i < NCHUCHARS; i++)
- printf("%c%c", (chuc->codechars[i] & 0xf) + '0',
- ((chuc->codechars[i]>>4) & 0xf) + '0');
- printf("\n");
-
- /*
- * Format check. Make sure the two halves match.
- */
- for (i = 0; i < NCHUCHARS/2; i++)
- if (chuc->codechars[i] != chuc->codechars[i+(NCHUCHARS/2)]) {
- (void) printf("Bad format, halves don't match\n");
- return;
- }
-
- /*
- * Break out the code into the BCD nibbles. Only need to fiddle
- * with the first half since both are identical. Note the first
- * BCD character is the low order nibble, the second the high order.
- */
- code = lastcode;
- for (i = 0; i < NCHUCHARS/2; i++) {
- *code++ = chuc->codechars[i] & 0xf;
- *code++ = (chuc->codechars[i] >> 4) & 0xf;
- }
-
- /*
- * If the first nibble isn't a 6, we're up the creek
- */
- code = lastcode;
- if (*code++ != 6) {
- (void) printf("Bad format, no 6 at start\n");
- return;
- }
-
- /*
- * Collect the day, the hour, the minute and the second.
- */
- day = *code++;
- day = MULBY10(day) + *code++;
- day = MULBY10(day) + *code++;
- hour = *code++;
- hour = MULBY10(hour) + *code++;
- minute = *code++;
- minute = MULBY10(minute) + *code++;
- second = *code++;
- second = MULBY10(second) + *code++;
-
- /*
- * Sanity check the day and time. Note that this
- * only occurs on the 31st through the 39th second
- * of the minute.
- */
- if (day < 1 || day > 366
- || hour > 23 || minute > 59
- || second < 31 || second > 39) {
- (void) printf("Failed date sanity check: %d %d %d %d\n",
- day, hour, minute, second);
- return;
- }
-
- /*
- * Compute seconds into the year.
- */
- tmp = (u_long)(MULBY24((day-1)) + hour); /* hours */
- tmp = MULBY60(tmp) + (u_long)minute; /* minutes */
- tmp = MULBY60(tmp) + (u_long)second; /* seconds */
-
- /*
- * Now the fun begins. We demand that the received time code
- * be within CLOCK_WAYTOOBIG of the receive timestamp, but
- * there is uncertainty about the year the timestamp is in.
- * Use the current year start for the first check, this should
- * work most of the time.
- */
- date_ui = tmp + yearstart;
- if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG)
- && date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG))
- goto codeokay; /* looks good */
-
- /*
- * Trouble. Next check is to see if the year rolled over and, if
- * so, try again with the new year's start.
- */
- date_ui = calyearstart(rtime->l_ui);
- if (date_ui != yearstart) {
- yearstart = date_ui;
- date_ui += tmp;
- (void) printf("time %u, code %u, difference %d\n",
- date_ui, rtime->l_ui, (long)date_ui-(long)rtime->l_ui);
- if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG)
- && date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG))
- goto codeokay; /* okay this time */
- }
-
- ts.l_uf = 0;
- ts.l_ui = yearstart;
- printf("yearstart %s\n", prettydate(&ts));
- printf("received %s\n", prettydate(rtime));
- ts.l_ui = date_ui;
- printf("date_ui %s\n", prettydate(&ts));
-
- /*
- * Here we know the year start matches the current system
- * time. One remaining possibility is that the time code
- * is in the year previous to that of the system time. This
- * is only worth checking if the receive timestamp is less
- * than CLOCK_WAYTOOBIG seconds into the new year.
- */
- if ((rtime->l_ui - yearstart) < CLOCK_WAYTOOBIG) {
- date_ui = tmp + calyearstart(yearstart - CLOCK_WAYTOOBIG);
- if ((rtime->l_ui - date_ui) < CLOCK_WAYTOOBIG)
- goto codeokay;
- }
-
- /*
- * One last possibility is that the time stamp is in the year
- * following the year the system is in. Try this one before
- * giving up.
- */
- date_ui = tmp + calyearstart(yearstart + (400*24*60*60)); /* 400 days */
- if ((date_ui - rtime->l_ui) >= CLOCK_WAYTOOBIG) {
- printf("Date hopelessly off\n");
- return; /* hopeless, let it sync to other peers */
- }
-
- codeokay:
- reftime = date_ui;
- /*
- * We've now got the integral seconds part of the time code (we hope).
- * The fractional part comes from the table. We next compute
- * the offsets for each character.
- */
- for (i = 0; i < NCHUCHARS; i++) {
- register u_long tmp2;
-
- off[i].l_ui = date_ui;
- off[i].l_uf = chutable[i];
- tmp = chuc->codetimes[i].tv_sec + JAN_1970;
- TVUTOTSF(chuc->codetimes[i].tv_usec, tmp2);
- M_SUB(off[i].l_ui, off[i].l_uf, tmp, tmp2);
- }
-
- /*
- * Here is a *big* problem. What one would normally
- * do here on a machine with lots of clock bits (say
- * a Vax or the gizmo board) is pick the most positive
- * offset and the estimate, since this is the one that
- * is most likely suffered the smallest interrupt delay.
- * The trouble is that the low order clock bit on an IBM
- * RT, which is the machine I had in mind when doing this,
- * ticks at just under the millisecond mark. This isn't
- * precise enough. What we can do to improve this is to
- * average all 10 samples and rely on the second level
- * filtering to pick the least delayed estimate. Trouble
- * is, this means we have to divide a 64 bit fixed point
- * number by 10, a procedure which really sucks. Oh, well.
- * First compute the sum.
- */
- date_ui = 0;
- tmp = 0;
- for (i = 0; i < NCHUCHARS; i++)
- M_ADD(date_ui, tmp, off[i].l_ui, off[i].l_uf);
- if (M_ISNEG(date_ui, tmp))
- isneg = 1;
- else
- isneg = 0;
-
- /*
- * Here is a multiply-by-0.1 optimization that should apply
- * just about everywhere. If the magnitude of the sum
- * is less than 9 we don't have to worry about overflow
- * out of a 64 bit product, even after rounding.
- */
- if (date_ui < 9 || date_ui > 0xfffffff7) {
- register u_long prod_ui;
- register u_long prod_uf;
-
- prod_ui = prod_uf = 0;
- /*
- * This code knows the low order bit in 0.1 is zero
- */
- for (i = 1; i < NZPOBITS; i++) {
- M_LSHIFT(date_ui, tmp);
- if (ZEROPTONE & (1<<i))
- M_ADD(prod_ui, prod_uf, date_ui, tmp);
- }
-
- /*
- * Done, round it correctly. Prod_ui contains the
- * fraction.
- */
- if (prod_uf & 0x80000000)
- prod_ui++;
- if (isneg)
- date_ui = 0xffffffff;
- else
- date_ui = 0;
- tmp = prod_ui;
- /*
- * date_ui is integral part, tmp is fraction.
- */
- } else {
- register u_long prod_ovr;
- register u_long prod_ui;
- register u_long prod_uf;
- register u_long highbits;
-
- prod_ovr = prod_ui = prod_uf = 0;
- if (isneg)
- highbits = 0xffffffff; /* sign extend */
- else
- highbits = 0;
- /*
- * This code knows the low order bit in 0.1 is zero
- */
- for (i = 1; i < NZPOBITS; i++) {
- M_LSHIFT3(highbits, date_ui, tmp);
- if (ZEROPTONE & (1<<i))
- M_ADD3(prod_ovr, prod_uf, prod_ui,
- highbits, date_ui, tmp);
- }
-
- if (prod_uf & 0x80000000)
- M_ADDUF(prod_ovr, prod_ui, (u_long)1);
- date_ui = prod_ovr;
- tmp = prod_ui;
- }
-
- /*
- * At this point we have the mean offset, with the integral
- * part in date_ui and the fractional part in tmp. Store
- * it in the structure.
- */
- /*
- * Add in fudge factor.
- */
- M_ADD(date_ui, tmp, offset_fudge.l_ui, offset_fudge.l_uf);
-
- /*
- * Find the minimun and maximum offset
- */
- imin = imax = 0;
- for (i = 1; i < NCHUCHARS; i++) {
- if (L_ISGEQ(&off[i], &off[imax])) {
- imax = i;
- } else if (L_ISGEQ(&off[imin], &off[i])) {
- imin = i;
- }
- }
-
- L_ADD(&off[imin], &offset_fudge);
- if (imin != imax)
- L_ADD(&off[imax], &offset_fudge);
- (void) printf("mean %s, min %s, max %s\n",
- mfptoa(date_ui, tmp, 8), lfptoa(&off[imin], 8),
- lfptoa(&off[imax], 8));
-}
diff --git a/contrib/ntp/clockstuff/clktest.c b/contrib/ntp/clockstuff/clktest.c
deleted file mode 100644
index 86edf59d..0000000
--- a/contrib/ntp/clockstuff/clktest.c
+++ /dev/null
@@ -1,529 +0,0 @@
-/* clktest.c,v 3.1 1993/07/06 01:05:23 jbj Exp
- * clktest - test the clock line discipline
- *
- * usage: clktest -b bps -f -t timeo -s cmd -c char1 -a char2 /dev/whatever
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <signal.h>
-#include <netinet/in.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#include <sgtty.h>
-
-#include "../include/ntp_fp.h"
-#include "../include/ntp.h"
-#include "../include/ntp_unixtime.h"
-
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-#if defined(ULT_2_0_SUCKS)
-#ifndef sigmask
-#define sigmask(m) (1<<(m))
-#endif
-#endif
-
-#ifndef STREAM
-#ifndef CLKLDISC
-CLOCK_LINE_DISCIPLINE_NEEDED_BY_THIS_PROGRAM;
-#endif
-#endif
-
-/*
- * Mask for blocking SIGIO and SIGALRM
- */
-#define BLOCKSIGMASK (sigmask(SIGIO)|sigmask(SIGALRM))
-
-/*
- * speed table
- */
-struct speeds {
- int bps;
- int rate;
-} speedtab[] = {
- { 300, B300 },
- { 1200, B1200 },
- { 2400, B2400 },
- { 4800, B4800 },
- { 9600, B9600 },
- { 19200, EXTA },
- { 38400, EXTB },
- { 0, 0 }
-};
-
-char *progname;
-int debug;
-
-#ifdef CLKLDISC
-#define DEFMAGIC '\r'
-#endif
-
-#ifdef CLKLDISC
-# ifdef STREAM
-# include <stropts.h>
-# ifdef HAVE_SYS_CLKDEFS_H
-# include <sys/clkdefs.h>
-# endif
-# define DEFMAGIC "\r"
-# endif
-#endif
-
-struct timeval timeout = { 0 };
-char *cmd = NULL;
-int cmdlen;
-int docmd = 0;
-#ifdef CLKLDISC
-u_long magic1 = DEFMAGIC;
-u_long magic2 = DEFMAGIC;
-#endif
-#ifdef STREAM
-char magic[32];
-#endif
-int speed = B9600;
-int ttflags = RAW|EVENP|ODDP;
-
-volatile int wasalarmed;
-volatile int iosig;
-
-struct timeval lasttv;
-
-extern u_long ustotslo[];
-extern u_long ustotsmid[];
-extern u_long ustotshi[];
-
-/*
- * main - parse arguments and handle options
- */
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int c;
- int errflg = 0;
- struct speeds *spd;
- u_long tmp;
- int fd;
- struct sgttyb ttyb;
- struct itimerval itimer;
- extern int ntp_optind;
- extern char *ntp_optarg;
- int alarming();
- int ioready();
-
- progname = argv[0];
-#ifdef STREAM
- magic[0] = 0;
-#endif
- while ((c = ntp_getopt(argc, argv, "a:b:c:dfs:t:")) != EOF)
- switch (c) {
-#ifdef CLKLDISC
- case 'a':
-#endif
- case 'c':
- if (!atouint(ntp_optarg, &tmp)) {
- (void) fprintf(stderr,
- "%s: argument for -%c must be integer\n",
- progname, c);
- errflg++;
- break;
- }
-#ifdef CLKLDISC
- if (c == 'c')
- magic1 = tmp;
- else
- magic2 = tmp;
-#endif
-#ifdef STREAM
- magic[strlen(magic)+1] = '\0';
- magic[strlen(magic)] = tmp;
-#endif
- break;
- case 'b':
- if (!atouint(ntp_optarg, &tmp)) {
- errflg++;
- break;
- }
- spd = speedtab;
- while (spd->bps != 0)
- if ((int)tmp == spd->bps)
- break;
- if (spd->bps == 0) {
- (void) fprintf(stderr,
- "%s: speed %lu is unsupported\n",
- progname, tmp);
- errflg++;
- } else {
- speed = spd->rate;
- }
- break;
- case 'd':
- ++debug;
- break;
- case 'f':
- ttflags |= CRMOD;
- break;
- case 's':
- cmdlen = strlen(ntp_optarg);
- if (cmdlen == 0)
- errflg++;
- else
- cmd = ntp_optarg;
- break;
- case 't':
- if (!atouint(ntp_optarg, &tmp))
- errflg++;
- else {
- timeout.tv_sec = (long)tmp;
- docmd = 1;
- }
- break;
- default:
- errflg++;
- break;
- }
- if (errflg || ntp_optind+1 != argc) {
- (void) fprintf(stderr,
-#ifdef CLKLDISC
- "usage: %s [-b bps] [-c magic1] [-a magic2] [-f] [-s cmd] [-t timeo] tty_device\n",
-#endif
-#ifdef STREAM
- "usage: %s [-b bps] [-c magic1] [-c magic2]... [-f] [-s cmd] [-t timeo] tty_device\n",
-#endif
- progname);
- exit(2);
- }
-
-#ifdef STREAM
- if (!strlen(magic))
- strcpy(magic,DEFMAGIC);
-#endif
-
- if (docmd)
- fd = open(argv[ntp_optind], O_RDWR, 0777);
- else
- fd = open(argv[ntp_optind], O_RDONLY, 0777);
- if (fd == -1) {
- (void) fprintf(stderr, "%s: open(%s): ", progname,
- argv[ntp_optind]);
- perror("");
- exit(1);
- }
-
- if (ioctl(fd, TIOCEXCL, (char *)0) < 0) {
- (void) fprintf(stderr, "%s: ioctl(TIOCEXCL): ", progname);
- perror("");
- exit(1);
- }
-
- /*
- * If we have the clock discipline, set the port to raw. Otherwise
- * we run cooked.
- */
- ttyb.sg_ispeed = ttyb.sg_ospeed = speed;
-#ifdef CLKLDISC
- ttyb.sg_erase = (char)magic1;
- ttyb.sg_kill = (char)magic2;
-#endif
- ttyb.sg_flags = (short)ttflags;
- if (ioctl(fd, TIOCSETP, (char *)&ttyb) < 0) {
- (void) fprintf(stderr, "%s: ioctl(TIOCSETP): ", progname);
- perror("");
- exit(1);
- }
-
- if (fcntl(fd, F_SETOWN, getpid()) == -1) {
- (void) fprintf(stderr, "%s: fcntl(F_SETOWN): ", progname);
- perror("");
- exit(1);
- }
-
-#ifdef CLKLDISC
- {
- int ldisc;
- ldisc = CLKLDISC;
- if (ioctl(fd, TIOCSETD, (char *)&ldisc) < 0) {
- (void) fprintf(stderr, "%s: ioctl(TIOCSETD): ", progname);
- perror("");
- exit(1);
- }
- }
-#endif
-#ifdef STREAM
- if (ioctl(fd, I_POP, 0) >=0 ) ;
- if (ioctl(fd, I_PUSH, "clk") < 0) {
- (void) fprintf(stderr, "%s: ioctl(I_PUSH): ", progname);
- perror("");
- exit(1);
- }
- if (ioctl(fd, CLK_SETSTR, magic) < 0) {
- (void) fprintf(stderr, "%s: ioctl(CLK_SETSTR): ", progname);
- perror("");
- exit(1);
- }
-#endif
-
-
- (void) gettimeofday(&lasttv, (struct timezone *)0);
- if (docmd) {
- /*
- * set non-blocking, async I/O on the descriptor
- */
- iosig = 0;
- (void) signal(SIGIO, ioready);
- if (fcntl(fd, F_SETFL, FNDELAY|FASYNC) < 0) {
- (void) fprintf(stderr, "%s: fcntl(F_SETFL): ",
- progname);
- perror("");
- exit(1);
- }
-
- /*
- * Set up the alarm interrupt.
- */
- wasalarmed = 0;
- (void) signal(SIGALRM, alarming);
- itimer.it_interval = itimer.it_value = timeout;
- setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
- doboth(fd);
- }
- doioonly(fd);
-}
-
-
-/*
- * doboth - handle both I/O and alarms via SIGIO
- */
-int
-doboth(
- int fd
- )
-{
- int n;
- int sawalarm;
- int sawiosig;
- int omask;
- fd_set fds;
- struct timeval tvzero;
-
- sawalarm = 0;
- sawiosig = 0;
- FD_ZERO(&fds);
- for (;;) {
- omask = sigblock(BLOCKSIGMASK);
- if (wasalarmed) { /* alarmed? */
- sawalarm = 1;
- wasalarmed = 0;
- }
- if (iosig) {
- sawiosig = 1;
- iosig = 0;
- }
-
- if (!sawalarm && !sawiosig) {
- /*
- * Nothing to do. Wait for something.
- */
- sigpause(omask);
- if (wasalarmed) { /* alarmed? */
- sawalarm = 1;
- wasalarmed = 0;
- }
- if (iosig) {
- sawiosig = 1;
- iosig = 0;
- }
- }
- (void)sigsetmask(omask);
-
- if (sawiosig) {
-
- do {
- tvzero.tv_sec = tvzero.tv_usec = 0;
- FD_SET(fd, &fds);
- n = select(fd+1, &fds, (fd_set *)0,
- (fd_set *)0, &tvzero);
- if (n > 0)
- doio(fd);
- } while (n > 0);
-
- if (n == -1) {
- (void) fprintf(stderr, "%s: select: ",
- progname);
- perror("");
- exit(1);
- }
- sawiosig = 0;
- }
- if (sawalarm) {
- doalarm(fd);
- sawalarm = 0;
- }
- }
-}
-
-
-/*
- * doioonly - do I/O. This avoids the use of signals
- */
-int
-doioonly(
- int fd
- )
-{
- int n;
- fd_set fds;
-
- FD_ZERO(&fds);
- for (;;) {
- FD_SET(fd, &fds);
- n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0,
- (struct timeval *)0);
- if (n > 0)
- doio(fd);
- }
-}
-
-
-/*
- * doio - read a buffer full of stuff and print it out
- */
-int
-doio(
- int fd
- )
-{
- register char *rp, *rpend;
- register char *cp;
- register int i;
- char raw[512];
- struct timeval tv, tvd;
- int rlen;
- int ind;
- char cooked[2049];
- static char *digits = "0123456789abcdef";
-
- rlen = read(fd, raw, sizeof(raw));
- if (rlen < 0) {
- (void) fprintf(stderr, "%s: read(): ", progname);
- perror("");
- return;
- }
- if (rlen == 0) {
- (void) printf("Zero length read\n");
- return;
- }
-
- cp = cooked;
- rp = raw;
- rpend = &raw[rlen];
- ind = 0;
-
- while (rp < rpend) {
- ind = 1;
- if (isprint(*rp))
- *cp++ = *rp;
- else {
- *cp++ = '<';
- *cp++ = digits[((*rp)>>4) & 0xf];
- *cp++ = digits[*rp & 0xf];
- *cp++ = '>';
- }
- if (
-#ifdef CLKLDISC
- (*rp == (char)magic1 || *rp == (char)magic2)
-#else
- ( strchr( magic, *rp) != NULL )
-#endif
- ) {
- rp++;
- ind = 0;
- *cp = '\0';
- if ((rpend - rp) < sizeof(struct timeval)) {
- (void)printf(
- "Too little data (%d): %s\n",
- rpend-rp, cooked);
- return;
- }
-
- tv.tv_sec = 0;
- for (i = 0; i < 4; i++) {
- tv.tv_sec <<= 8;
- tv.tv_sec |= ((long)*rp++) & 0xff;
- }
- tv.tv_usec = 0;
- for (i = 0; i < 4; i++) {
- tv.tv_usec <<= 8;
- tv.tv_usec |= ((long)*rp++) & 0xff;
- }
-
- tvd.tv_sec = tv.tv_sec - lasttv.tv_sec;
- tvd.tv_usec = tv.tv_usec - lasttv.tv_usec;
- if (tvd.tv_usec < 0) {
- tvd.tv_usec += 1000000;
- tvd.tv_sec--;
- }
-
- (void)printf("%lu.%06lu %lu.%06lu %s\n",
- tv.tv_sec, tv.tv_usec, tvd.tv_sec, tvd.tv_usec,
- cooked);
- lasttv = tv;
- } else {
- rp++;
- }
- }
-
- if (ind) {
- *cp = '\0';
- (void)printf("Incomplete data: %s\n", cooked);
- }
-}
-
-
-/*
- * doalarm - send a string out the port, if we have one.
- */
-int
-doalarm(
- int fd
- )
-{
- int n;
-
- if (cmd == NULL || cmdlen <= 0)
- return;
-
- n = write(fd, cmd, cmdlen);
-
- if (n < 0) {
- (void) fprintf(stderr, "%s: write(): ", progname);
- perror("");
- } else if (n < cmdlen) {
- (void) printf("Short write (%d bytes, should be %d)\n",
- n, cmdlen);
- }
-}
-
-
-/*
- * alarming - receive alarm interupt
- */
-void
-alarming(void)
-{
- wasalarmed = 1;
-}
-
-/*
- * ioready - handle SIGIO interrupt
- */
-void
-ioready(void)
-{
- iosig = 1;
-}
diff --git a/contrib/ntp/clockstuff/propdelay.c b/contrib/ntp/clockstuff/propdelay.c
deleted file mode 100644
index 3ce571c..0000000
--- a/contrib/ntp/clockstuff/propdelay.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/* propdelay.c,v 3.1 1993/07/06 01:05:24 jbj Exp
- * propdelay - compute propagation delays
- *
- * cc -o propdelay propdelay.c -lm
- *
- * "Time and Frequency Users' Manual", NBS Technical Note 695 (1977).
- */
-
-/*
- * This can be used to get a rough idea of the HF propagation delay
- * between two points (usually between you and the radio station).
- * The usage is
- *
- * propdelay latitudeA longitudeA latitudeB longitudeB
- *
- * where points A and B are the locations in question. You obviously
- * need to know the latitude and longitude of each of the places.
- * The program expects the latitude to be preceded by an 'n' or 's'
- * and the longitude to be preceded by an 'e' or 'w'. It understands
- * either decimal degrees or degrees:minutes:seconds. Thus to compute
- * the delay between the WWVH (21:59:26N, 159:46:00W) and WWV (40:40:49N,
- * 105:02:27W) you could use:
- *
- * propdelay n21:59:26 w159:46 n40:40:49 w105:02:27
- *
- * By default it prints out a summer (F2 average virtual height 350 km) and
- * winter (F2 average virtual height 250 km) number. The results will be
- * quite approximate but are about as good as you can do with HF time anyway.
- * You might pick a number between the values to use, or use the summer
- * value in the summer and switch to the winter value when the static
- * above 10 MHz starts to drop off in the fall. You can also use the
- * -h switch if you want to specify your own virtual height.
- *
- * You can also do a
- *
- * propdelay -W n45:17:47 w75:45:22
- *
- * to find the propagation delays to WWV and WWVH (from CHU in this
- * case), a
- *
- * propdelay -C n40:40:49 w105:02:27
- *
- * to find the delays to CHU, and a
- *
- * propdelay -G n52:03:17 w98:34:18
- *
- * to find delays to GOES via each of the three satellites.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "ntp_stdlib.h"
-
-extern double sin (double);
-extern double cos (double);
-extern double acos (double);
-extern double tan (double);
-extern double atan (double);
-extern double sqrt (double);
-
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-/*
- * Program constants
- */
-#define EARTHRADIUS (6370.0) /* raduis of earth (km) */
-#define LIGHTSPEED (299800.0) /* speed of light, km/s */
-#define PI (3.1415926536)
-#define RADPERDEG (PI/180.0) /* radians per degree */
-#define MILE (1.609344) /* km in a mile */
-
-#define SUMMERHEIGHT (350.0) /* summer height in km */
-#define WINTERHEIGHT (250.0) /* winter height in km */
-
-#define SATHEIGHT (6.6110 * 6378.0) /* geosync satellite height in km
- from centre of earth */
-
-#define WWVLAT "n40:40:49"
-#define WWVLONG "w105:02:27"
-
-#define WWVHLAT "n21:59:26"
-#define WWVHLONG "w159:46:00"
-
-#define CHULAT "n45:17:47"
-#define CHULONG "w75:45:22"
-
-#define GOES_UP_LAT "n37:52:00"
-#define GOES_UP_LONG "w75:27:00"
-#define GOES_EAST_LONG "w75:00:00"
-#define GOES_STBY_LONG "w105:00:00"
-#define GOES_WEST_LONG "w135:00:00"
-#define GOES_SAT_LAT "n00:00:00"
-
-char *wwvlat = WWVLAT;
-char *wwvlong = WWVLONG;
-
-char *wwvhlat = WWVHLAT;
-char *wwvhlong = WWVHLONG;
-
-char *chulat = CHULAT;
-char *chulong = CHULONG;
-
-char *goes_up_lat = GOES_UP_LAT;
-char *goes_up_long = GOES_UP_LONG;
-char *goes_east_long = GOES_EAST_LONG;
-char *goes_stby_long = GOES_STBY_LONG;
-char *goes_west_long = GOES_WEST_LONG;
-char *goes_sat_lat = GOES_SAT_LAT;
-
-int hflag = 0;
-int Wflag = 0;
-int Cflag = 0;
-int Gflag = 0;
-int height;
-
-char *progname;
-int debug;
-
-static void doit (double, double, double, double, double, char *);
-static double latlong (char *, int);
-static double greatcircle (double, double, double, double);
-static double waveangle (double, double, int);
-static double propdelay (double, double, int);
-static int finddelay (double, double, double, double, double, double *);
-static void satdoit (double, double, double, double, double, double, char *);
-static void satfinddelay (double, double, double, double, double *);
-static double satpropdelay (double);
-
-/*
- * main - parse arguments and handle options
- */
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int c;
- int errflg = 0;
- double lat1, long1;
- double lat2, long2;
- double lat3, long3;
-
- progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "dh:CWG")) != EOF)
- switch (c) {
- case 'd':
- ++debug;
- break;
- case 'h':
- hflag++;
- height = atof(ntp_optarg);
- if (height <= 0.0) {
- (void) fprintf(stderr, "height %s unlikely\n",
- ntp_optarg);
- errflg++;
- }
- break;
- case 'C':
- Cflag++;
- break;
- case 'W':
- Wflag++;
- break;
- case 'G':
- Gflag++;
- break;
- default:
- errflg++;
- break;
- }
- if (errflg || (!(Cflag || Wflag || Gflag) && ntp_optind+4 != argc) ||
- ((Cflag || Wflag || Gflag) && ntp_optind+2 != argc)) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-h height] lat1 long1 lat2 long2\n",
- progname);
- (void) fprintf(stderr," - or -\n");
- (void) fprintf(stderr,
- "usage: %s -CWG [-d] lat long\n",
- progname);
- exit(2);
- }
-
-
- if (!(Cflag || Wflag || Gflag)) {
- lat1 = latlong(argv[ntp_optind], 1);
- long1 = latlong(argv[ntp_optind + 1], 0);
- lat2 = latlong(argv[ntp_optind + 2], 1);
- long2 = latlong(argv[ntp_optind + 3], 0);
- if (hflag) {
- doit(lat1, long1, lat2, long2, height, "");
- } else {
- doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
- "summer propagation, ");
- doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
- "winter propagation, ");
- }
- } else if (Wflag) {
- /*
- * Compute delay from WWV
- */
- lat1 = latlong(argv[ntp_optind], 1);
- long1 = latlong(argv[ntp_optind + 1], 0);
- lat2 = latlong(wwvlat, 1);
- long2 = latlong(wwvlong, 0);
- if (hflag) {
- doit(lat1, long1, lat2, long2, height, "WWV ");
- } else {
- doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
- "WWV summer propagation, ");
- doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
- "WWV winter propagation, ");
- }
-
- /*
- * Compute delay from WWVH
- */
- lat2 = latlong(wwvhlat, 1);
- long2 = latlong(wwvhlong, 0);
- if (hflag) {
- doit(lat1, long1, lat2, long2, height, "WWVH ");
- } else {
- doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
- "WWVH summer propagation, ");
- doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
- "WWVH winter propagation, ");
- }
- } else if (Cflag) {
- lat1 = latlong(argv[ntp_optind], 1);
- long1 = latlong(argv[ntp_optind + 1], 0);
- lat2 = latlong(chulat, 1);
- long2 = latlong(chulong, 0);
- if (hflag) {
- doit(lat1, long1, lat2, long2, height, "CHU ");
- } else {
- doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
- "CHU summer propagation, ");
- doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
- "CHU winter propagation, ");
- }
- } else if (Gflag) {
- lat1 = latlong(goes_up_lat, 1);
- long1 = latlong(goes_up_long, 0);
- lat3 = latlong(argv[ntp_optind], 1);
- long3 = latlong(argv[ntp_optind + 1], 0);
-
- lat2 = latlong(goes_sat_lat, 1);
-
- long2 = latlong(goes_west_long, 0);
- satdoit(lat1, long1, lat2, long2, lat3, long3,
- "GOES Delay via WEST");
-
- long2 = latlong(goes_stby_long, 0);
- satdoit(lat1, long1, lat2, long2, lat3, long3,
- "GOES Delay via STBY");
-
- long2 = latlong(goes_east_long, 0);
- satdoit(lat1, long1, lat2, long2, lat3, long3,
- "GOES Delay via EAST");
-
- }
- exit(0);
-}
-
-
-/*
- * doit - compute a delay and print it
- */
-static void
-doit(
- double lat1,
- double long1,
- double lat2,
- double long2,
- double h,
- char *str
- )
-{
- int hops;
- double delay;
-
- hops = finddelay(lat1, long1, lat2, long2, h, &delay);
- printf("%sheight %g km, hops %d, delay %g seconds\n",
- str, h, hops, delay);
-}
-
-
-/*
- * latlong - decode a latitude/longitude value
- */
-static double
-latlong(
- char *str,
- int islat
- )
-{
- register char *cp;
- register char *bp;
- double arg;
- double div;
- int isneg;
- char buf[32];
- char *colon;
-
- if (islat) {
- /*
- * Must be north or south
- */
- if (*str == 'N' || *str == 'n')
- isneg = 0;
- else if (*str == 'S' || *str == 's')
- isneg = 1;
- else
- isneg = -1;
- } else {
- /*
- * East is positive, west is negative
- */
- if (*str == 'E' || *str == 'e')
- isneg = 0;
- else if (*str == 'W' || *str == 'w')
- isneg = 1;
- else
- isneg = -1;
- }
-
- if (isneg >= 0)
- str++;
-
- colon = strchr(str, ':');
- if (colon != NULL) {
- /*
- * in hhh:mm:ss form
- */
- cp = str;
- bp = buf;
- while (cp < colon)
- *bp++ = *cp++;
- *bp = '\0';
- cp++;
- arg = atof(buf);
- div = 60.0;
- colon = strchr(cp, ':');
- if (colon != NULL) {
- bp = buf;
- while (cp < colon)
- *bp++ = *cp++;
- *bp = '\0';
- cp++;
- arg += atof(buf) / div;
- div = 3600.0;
- }
- if (*cp != '\0')
- arg += atof(cp) / div;
- } else {
- arg = atof(str);
- }
-
- if (isneg == 1)
- arg = -arg;
-
- if (debug > 2)
- (void) printf("latitude/longitude %s = %g\n", str, arg);
-
- return arg;
-}
-
-
-/*
- * greatcircle - compute the great circle distance in kilometers
- */
-static double
-greatcircle(
- double lat1,
- double long1,
- double lat2,
- double long2
- )
-{
- double dg;
- double l1r, l2r;
-
- l1r = lat1 * RADPERDEG;
- l2r = lat2 * RADPERDEG;
- dg = EARTHRADIUS * acos(
- (cos(l1r) * cos(l2r) * cos((long2-long1)*RADPERDEG))
- + (sin(l1r) * sin(l2r)));
- if (debug >= 2)
- printf(
- "greatcircle lat1 %g long1 %g lat2 %g long2 %g dist %g\n",
- lat1, long1, lat2, long2, dg);
- return dg;
-}
-
-
-/*
- * waveangle - compute the wave angle for the given distance, virtual
- * height and number of hops.
- */
-static double
-waveangle(
- double dg,
- double h,
- int n
- )
-{
- double theta;
- double delta;
-
- theta = dg / (EARTHRADIUS * (double)(2 * n));
- delta = atan((h / (EARTHRADIUS * sin(theta))) + tan(theta/2)) - theta;
- if (debug >= 2)
- printf("waveangle dist %g height %g hops %d angle %g\n",
- dg, h, n, delta / RADPERDEG);
- return delta;
-}
-
-
-/*
- * propdelay - compute the propagation delay
- */
-static double
-propdelay(
- double dg,
- double h,
- int n
- )
-{
- double phi;
- double theta;
- double td;
-
- theta = dg / (EARTHRADIUS * (double)(2 * n));
- phi = (PI/2.0) - atan((h / (EARTHRADIUS * sin(theta))) + tan(theta/2));
- td = dg / (LIGHTSPEED * sin(phi));
- if (debug >= 2)
- printf("propdelay dist %g height %g hops %d time %g\n",
- dg, h, n, td);
- return td;
-}
-
-
-/*
- * finddelay - find the propagation delay
- */
-static int
-finddelay(
- double lat1,
- double long1,
- double lat2,
- double long2,
- double h,
- double *delay
- )
-{
- double dg; /* great circle distance */
- double delta; /* wave angle */
- int n; /* number of hops */
-
- dg = greatcircle(lat1, long1, lat2, long2);
- if (debug)
- printf("great circle distance %g km %g miles\n", dg, dg/MILE);
-
- n = 1;
- while ((delta = waveangle(dg, h, n)) < 0.0) {
- if (debug)
- printf("tried %d hop%s, no good\n", n, n>1?"s":"");
- n++;
- }
- if (debug)
- printf("%d hop%s okay, wave angle is %g\n", n, n>1?"s":"",
- delta / RADPERDEG);
-
- *delay = propdelay(dg, h, n);
- return n;
-}
-
-/*
- * satdoit - compute a delay and print it
- */
-static void
-satdoit(
- double lat1,
- double long1,
- double lat2,
- double long2,
- double lat3,
- double long3,
- char *str
- )
-{
- double up_delay,down_delay;
-
- satfinddelay(lat1, long1, lat2, long2, &up_delay);
- satfinddelay(lat3, long3, lat2, long2, &down_delay);
-
- printf("%s, delay %g seconds\n", str, up_delay + down_delay);
-}
-
-/*
- * satfinddelay - calculate the one-way delay time between a ground station
- * and a satellite
- */
-static void
-satfinddelay(
- double lat1,
- double long1,
- double lat2,
- double long2,
- double *delay
- )
-{
- double dg; /* great circle distance */
-
- dg = greatcircle(lat1, long1, lat2, long2);
-
- *delay = satpropdelay(dg);
-}
-
-/*
- * satpropdelay - calculate the one-way delay time between a ground station
- * and a satellite
- */
-static double
-satpropdelay(
- double dg
- )
-{
- double k1, k2, dist;
- double theta;
- double td;
-
- theta = dg / (EARTHRADIUS);
- k1 = EARTHRADIUS * sin(theta);
- k2 = SATHEIGHT - (EARTHRADIUS * cos(theta));
- if (debug >= 2)
- printf("Theta %g k1 %g k2 %g\n", theta, k1, k2);
- dist = sqrt(k1*k1 + k2*k2);
- td = dist / LIGHTSPEED;
- if (debug >= 2)
- printf("propdelay dist %g height %g time %g\n", dg, dist, td);
- return td;
-}
diff --git a/contrib/ntp/compile b/contrib/ntp/compile
deleted file mode 100755
index 9bb997a..0000000
--- a/contrib/ntp/compile
+++ /dev/null
@@ -1,99 +0,0 @@
-#! /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
deleted file mode 100644
index 327f716..0000000
--- a/contrib/ntp/conf/README
+++ /dev/null
@@ -1,13 +0,0 @@
-README file for directory ./conf of the NTP Version 4 distribution
-
-This directory contains example run-time configuration files for the
-NTP Version 4 daemon ntpd. These files illustrate some of the more
-obtuse configurations you may run into. They are not likely to do
-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.
-
-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
deleted file mode 100644
index 1238ba1..0000000
--- a/contrib/ntp/conf/baldwin.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# NTP manycast configuration file (ntp.conf) for DCnet hosts
-#
-# Note that the .rnd random seed file must pe in the root
-# directory and the public and private keys in /usr/local/etc.
-#
-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/beauregard.conf b/contrib/ntp/conf/beauregard.conf
deleted file mode 100644
index 72f735b..0000000
--- a/contrib/ntp/conf/beauregard.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# NTP configuration file (ntp.conf)
-# bearegard.udel.edu
-#
-server 127.127.18.1 # NIST ACTS modem driver
-fudge 127.127.18.1 time1 .0035
-phone atdt913034944774 atdt913034944785 atdt913034944774
-#phone atdt913034944812 atdt913034948497 atdt913034948022
-#
-# Miscellaneous stuff
-#
-driftfile /etc/ntp.drift # path for drift file
-statsdir /beauregard/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
diff --git a/contrib/ntp/conf/dewey.conf b/contrib/ntp/conf/dewey.conf
deleted file mode 100644
index ea4f3d4..0000000
--- a/contrib/ntp/conf/dewey.conf
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# NTP configuration file (ntp.conf)
-#
-# Generic configuration file for UDel NTP stratum-2 time servers. Don't
-# forget each server should have a /etc/ntp.drift and /etc/ntp.keys file.
-#
-# Stratum-1 peers. Each server should chime two different stratum-1
-# servers from the following list. Each stratum-1 server should be used
-# only once.
-#
-#peer 128.8.10.1 # umd1.umd.edu
-#peer 18.72.0.3 version 2 # bitsy.mit.edu
-peer 132.249.16.1 # fuzz.sdsc.edu
-peer 128.118.46.3 version 2 # otc1.psu.edu
-#peer 128.9.2.129 # wwvb.isi.edu
-#peer 130.43.2.2 version 2 # apple.com
-#peer 16.1.0.22 # clepsydra.dec.com
-#peer 130.105.1.156 version 2 # clock.osf.orga
-#peer 128.96.60.5 version 2 # pi.bellcore.com
-#peer 128.4.1.1 # rackety.udel.edu
-#peer 129.116.3.5 # shorty.chpc.utexas.edu
-#
-# Stratum-2 peers. Each server should chime all of the others in this
-# list except itself.
-#
-peer 128.175.1.1 # huey.udel.edu (VAX)
-#peer 128.175.1.2 # dewey.udel.edu (VAX)
-peer 128.175.1.3 # louie.udel.edu (SPARC)
-peer 128.175.2.15 # snow-white.ee.udel.edu (SPARC)
-peer 128.175.7.4 # sol.cis.udel.edu (SPARC)
-#
-# Miscellaneous stuff
-#
-driftfile /etc/ntp.drift # path for drift file
-#
-# Authentication stuff. Note the different authentication delay on
-# VAX and SPARC.
-#
-keys /usr/local/etc/ntp.keys # path for key file
-trustedkey 1 2 15 # define trusted keys
-requestkey 15 # key (7) for accessing server variables
-controlkey 15 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/grundoon.conf b/contrib/ntp/conf/grundoon.conf
deleted file mode 100644
index eb18b3f..0000000
--- a/contrib/ntp/conf/grundoon.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# NTP configuration file (ntp.conf)
-# grundoon.udel.edu
-#
-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 # 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
-
-manycastclient 239.1.1.1 autokey maxpoll 12 ttl 7
-manycastserver 239.1.1.1
-#
-# Access control stuff
-#
-restrict default noserve # default deny
-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 UDel clients
-restrict 140.173.0.0 mask 255.255.0.0 # allow DARTnet/CAIRN clients
-#
-# Authentication stuff
-#
-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
-controlkey 14 # key (6) for accessing server variables
-#
-# Miscellaneous stuff
-#
-driftfile /etc/ntp.drift # path for drift file
-statsdir /var/spool/ntpstats/ # directory for statistics files
-filegen loopstats file loopstats type day enable
diff --git a/contrib/ntp/conf/malarky.conf b/contrib/ntp/conf/malarky.conf
deleted file mode 100644
index 1475e1e..0000000
--- a/contrib/ntp/conf/malarky.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# NTP configuration file (ntp.conf)
-#
-# 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/ntpd -a -k /usr/local/bin/ntp.keys -m -t 3
-#
-multicastclient # listen on default 224.0.1.1
-#
-# Miscellaneous stuff
-#
-driftfile /etc/ntp.drift # path for drift file
-statsdir /malarky/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 key file
-trustedkey 3 4 5 6 14 # define trusted keys
-requestkey 14 # key (7) for accessing server variables
-controlkey 14 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/pogo.conf b/contrib/ntp/conf/pogo.conf
deleted file mode 100644
index 0dbc58a..0000000
--- a/contrib/ntp/conf/pogo.conf
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# NTP configuration file (ntp.conf)
-# SunOS pogo.udel.edu 5.8 Generic sun4u sparc SUNW,Ultra-1
-#
-server 127.127.6.1 prefer # IRIG from GPS1
-fudge 127.127.6.1 refid GPS1 time1 -.002777 flag2 1
-server 127.127.4.1 # spectracom GPS receiver
-# delays: prop 0.0088 ant .0002 rcvr .0173 = 26.3 ms; os .0035
-fudge 127.127.4.1 refid GPS2 time1 .000221
-server 127.127.22.0 # PPS from GPS2
-fudge 127.127.22.0 flag3 1 # kernel PPS
-#
-# Backups
-#
-server 128.4.1.2 # mizbeaver
-server 128.175.60.175 version 3 # ntp1.nss
-#
-# Services
-#
-manycastclient 239.1.1.1 autokey maxpoll 12 ttl 7
-manycastserver 239.1.1.1
-#
-# Access control stuff
-#
-restrict default noserve # default deny
-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 UDel clients
-restrict 140.173.0.0 mask 255.255.0.0 # allow DARTnet/CAIRN clients
-#
-# Authentication stuff
-#
-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
-controlkey 14 # key (6) for accessing server variables
-#
-# Miscellaneous stuff
-#
-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
deleted file mode 100644
index 684e4b7..0000000
--- a/contrib/ntp/conf/rackety.conf
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-fudge 127.127.4.1 refid GPS2 time1 -.000097 flag1 1
-server 127.127.4.2 # Spectracom WWVB receiver #1
-# delays: prop 0.0088 ant .0002 rcvr .0173 = 26.3 ms; os .0035
-fudge 127.127.4.2 refid WVB1 time1 .0021 flag4 1 flag1 1
-server 127.127.4.3 # Spectracom WWVB receiver #2
-# delays: prop 0.0088 ant .0002 rcvr .0173 = 26.3 ms; os .0035
-fudge 127.127.4.3 refid WVB2 time1 .0021 flag4 1 flag1 1
-server 127.127.22.1 # PPS
-fudge 127.127.22.1 flag3 1 # kernel PPS
-#
-# Services
-#
-broadcast 224.0.1.1 autokey # multicast
-broadcast 128.4.1.255 autokey # local subnet broadcast
-manycastclient 239.1.1.1 autokey maxpoll 12 ttl 7 # manycast
-manycastserver 239.1.1.1 # manycast
-#
-# Access controls
-#
-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
-restrict 140.173.0.0 mask 255.255.0.0 # allow DARTnet/CAIRN clients
-#
-# Authentication stuff
-#
-crypto # enable public key
-keys /usr/local/etc/ntp.keys # symmetric keys file
-trustedkey 3 4 5 14 # define trusted keys
-requestkey 14 # key (7) for accessing server variables
-controlkey 14 # key (6) for accessing server variables
-#
-# Miscellaneous stuff
-#
-driftfile /etc/ntp.drift # frequency offset
-statsdir /rackety/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
-
diff --git a/contrib/ntp/config.guess b/contrib/ntp/config.guess
deleted file mode 100755
index 0e30d56..0000000
--- a/contrib/ntp/config.guess
+++ /dev/null
@@ -1,1407 +0,0 @@
-#! /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/config.h.in b/contrib/ntp/config.h.in
deleted file mode 100644
index b7f95a4..0000000
--- a/contrib/ntp/config.h.in
+++ /dev/null
@@ -1,1129 +0,0 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-
-/* Is adjtime() accurate? */
-#undef ADJTIME_IS_ACCURATE
-
-/* CHU audio/decoder? */
-#undef AUDIO_CHU
-
-/* Declare char *sys_errlist array */
-#undef CHAR_SYS_ERRLIST
-
-/* ACTS modem service */
-#undef CLOCK_ACTS
-
-/* Arbiter 1088A/B GPS receiver */
-#undef CLOCK_ARBITER
-
-/* ARCRON support? */
-#undef CLOCK_ARCRON_MSF
-
-/* Austron 2200A/2201A GPS receiver? */
-#undef CLOCK_AS2201
-
-/* PPS interface? */
-#undef CLOCK_ATOM
-
-/* Datum/Bancomm bc635/VME interface? */
-#undef CLOCK_BANC
-
-/* Chronolog K-series WWVB receiver? */
-#undef CLOCK_CHRONOLOG
-
-/* CHU modem/decoder */
-#undef CLOCK_CHU
-
-/* Diems Computime Radio Clock? */
-#undef CLOCK_COMPUTIME
-
-/* Datum Programmable Time System? */
-#undef CLOCK_DATUM
-
-/* ELV/DCF7000 clock? */
-#undef CLOCK_DCF7000
-
-/* Dumb generic hh:mm:ss local clock? */
-#undef CLOCK_DUMBCLOCK
-
-/* Forum Graphic GPS datating station driver? */
-#undef CLOCK_FG
-
-/* TrueTime GPS receiver/VME interface? */
-#undef CLOCK_GPSVME
-
-/* Heath GC-1000 WWV/WWVH receiver? */
-#undef CLOCK_HEATH
-
-/* HOPF 6021 clock? */
-#undef CLOCK_HOPF6021
-
-/* HOPF PCI clock device? */
-#undef CLOCK_HOPF_PCI
-
-/* HOPF serial clock device? */
-#undef CLOCK_HOPF_SERIAL
-
-/* HP 58503A GPS receiver? */
-#undef CLOCK_HPGPS
-
-/* IRIG audio decoder? */
-#undef CLOCK_IRIG
-
-/* JJY receiver? */
-#undef CLOCK_JJY
-
-/* Rockwell Jupiter GPS clock? */
-#undef CLOCK_JUPITER
-
-/* Leitch CSD 5300 Master Clock System Driver? */
-#undef CLOCK_LEITCH
-
-/* local clock reference? */
-#undef CLOCK_LOCAL
-
-/* Meinberg clocks */
-#undef CLOCK_MEINBERG
-
-/* EES M201 MSF receiver */
-#undef CLOCK_MSFEES
-
-/* Magnavox MX4200 GPS receiver */
-#undef CLOCK_MX4200
-
-/* NeoClock4X */
-#undef CLOCK_NEOCLOCK4X
-
-/* NMEA GPS receiver */
-#undef CLOCK_NMEA
-
-/* Motorola UT Oncore GPS */
-#undef CLOCK_ONCORE
-
-/* Palisade clock */
-#undef CLOCK_PALISADE
-
-/* PARSE driver interface */
-#undef CLOCK_PARSE
-
-/* Conrad parallel port radio clock */
-#undef CLOCK_PCF
-
-/* PCL 720 clock support */
-#undef CLOCK_PPS720
-
-/* PST/Traconex 1020 WWV/WWVH receiver */
-#undef CLOCK_PST
-
-/* PTB modem service */
-#undef CLOCK_PTBACTS
-
-/* DCF77 raw time code */
-#undef CLOCK_RAWDCF
-
-/* RCC 8000 clock */
-#undef CLOCK_RCC8000
-
-/* RIPE NCC Trimble clock */
-#undef CLOCK_RIPENCC
-
-/* Schmid DCF77 clock */
-#undef CLOCK_SCHMID
-
-/* clock thru shared memory */
-#undef CLOCK_SHM
-
-/* Spectracom 8170/Netclock/2 WWVB receiver */
-#undef CLOCK_SPECTRACOM
-
-/* KSI/Odetics TPRO/S GPS receiver/IRIG interface */
-#undef CLOCK_TPRO
-
-/* TRAK 8810 GPS receiver */
-#undef CLOCK_TRAK
-
-/* Trimble GPS receiver/TAIP protocol */
-#undef CLOCK_TRIMTAIP
-
-/* Trimble GPS receiver/TSIP protocol */
-#undef CLOCK_TRIMTSIP
-
-/* Kinemetrics/TrueTime receivers */
-#undef CLOCK_TRUETIME
-
-/* TrueTime 560 IRIG-B decoder? */
-#undef CLOCK_TT560
-
-/* Ultralink M320 WWVB receiver? */
-#undef CLOCK_ULINK
-
-/* USNO modem service */
-#undef CLOCK_USNO
-
-/* VARITEXT protocol */
-#undef CLOCK_VARITEXT
-
-/* WHARTON 400A Series protocol */
-#undef CLOCK_WHARTON_400A
-
-/* WWV audio driver */
-#undef CLOCK_WWV
-
-/* Zyfer GPStarplus */
-#undef CLOCK_ZYFER
-
-/* Enable debugging? */
-#undef DEBUG
-
-/* Declaration style */
-#undef DECL_ADJTIME_0
-
-/* Declaration style */
-#undef DECL_BCOPY_0
-
-/* Declaration style */
-#undef DECL_BZERO_0
-
-/* Declaration style */
-#undef DECL_CFSETISPEED_0
-
-/* Declare errno? */
-#undef DECL_ERRNO
-
-/* Declaration style */
-#undef DECL_HSTRERROR_0
-
-/* Declare h_errno? */
-#undef DECL_H_ERRNO
-
-/* Declaration style */
-#undef DECL_INET_NTOA_0
-
-/* Declaration style */
-#undef DECL_IOCTL_0
-
-/* Declaration style */
-#undef DECL_IPC_0
-
-/* Declaration style */
-#undef DECL_MEMMOVE_0
-
-/* Declaration style */
-#undef DECL_MKSTEMP_0
-
-/* Declaration style */
-#undef DECL_MKTEMP_0
-
-/* Declaration style */
-#undef DECL_MRAND48_0
-
-/* Declaration style */
-#undef DECL_NLIST_0
-
-/* Declaration style */
-#undef DECL_PLOCK_0
-
-/* Declaration style */
-#undef DECL_RENAME_0
-
-/* Declaration style */
-#undef DECL_SELECT_0
-
-/* Declaration style */
-#undef DECL_SETITIMER_0
-
-/* Declaration style */
-#undef DECL_SETPRIORITY_0
-
-/* Declaration style */
-#undef DECL_SETPRIORITY_1
-
-/* Declaration style */
-#undef DECL_SIGVEC_0
-
-/* Declaration style */
-#undef DECL_SRAND48_0
-
-/* Declaration style */
-#undef DECL_STDIO_0
-
-/* Declaration style */
-#undef DECL_STIME_0
-
-/* Declaration style */
-#undef DECL_STIME_1
-
-/* Declaration style */
-#undef DECL_STRERROR_0
-
-/* Declaration style */
-#undef DECL_STRTOL_0
-
-/* Declare syscall()? */
-#undef DECL_SYSCALL
-
-/* Declaration style */
-#undef DECL_SYSLOG_0
-
-/* Declaration style */
-#undef DECL_TIMEOFDAY_0
-
-/* Declaration style */
-#undef DECL_TIME_0
-
-/* Declaration style */
-#undef DECL_TOLOWER_0
-
-/* Declaration style */
-#undef DECL_TOUPPER_0
-
-/* What is the fallback value for HZ? */
-#undef DEFAULT_HZ
-
-/* synch TODR hourly? */
-#undef DOSYNCTODR
-
-/* The number of minutes in a DST adjustment */
-#undef DSTMINUTES
-
-/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */
-#undef FORCE_NTPDATE_STEP
-
-/* Define to 1 if you have the <arpa/nameser.h> header file. */
-#undef HAVE_ARPA_NAMESER_H
-
-/* Do we have audio support? */
-#undef HAVE_AUDIO
-
-/* Define to 1 if you have the <bstring.h> header file. */
-#undef HAVE_BSTRING_H
-
-/* 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
-
-/* Define to 1 if you have the `clock_settime' function. */
-#undef HAVE_CLOCK_SETTIME
-
-/* Define to 1 if you have the `daemon' function. */
-#undef HAVE_DAEMON
-
-/* 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
-
-/* Define to 1 if you have the `finite' function. */
-#undef HAVE_FINITE
-
-/* Define to 1 if you have the `getbootfile' function. */
-#undef HAVE_GETBOOTFILE
-
-/* Define to 1 if you have the `getclock' function. */
-#undef HAVE_GETCLOCK
-
-/* Define to 1 if you have the `getdtablesize' function. */
-#undef HAVE_GETDTABLESIZE
-
-/* Define to 1 if you have the `getrusage' function. */
-#undef HAVE_GETRUSAGE
-
-/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
-
-/* Define to 1 if you have the `hstrerror' function. */
-#undef HAVE_HSTRERROR
-
-/* Obvious... */
-#undef HAVE_HZ_IN_STRUCT_CLOCKINFO
-
-/* 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
-
-/* Define to 1 if you have the `isfinite' function. */
-#undef HAVE_ISFINITE
-
-/* Define to 1 if you have the `kvm_open' function. */
-#undef HAVE_KVM_OPEN
-
-/* Define to 1 if you have the `K_open' function. */
-#undef HAVE_K_OPEN
-
-/* Define to 1 if you have the `advapi32' library (-ladvapi32). */
-#undef HAVE_LIBADVAPI32
-
-/* 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
-
-/* Define to 1 if you have the `gen' library (-lgen). */
-#undef HAVE_LIBGEN
-
-/* Define to 1 if you have the `kvm' library (-lkvm). */
-#undef HAVE_LIBKVM
-
-/* 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
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define to 1 if you have the `posix4' library (-lposix4). */
-#undef HAVE_LIBPOSIX4
-
-/* Define to 1 if you have the `readline' library (-lreadline). */
-#undef HAVE_LIBREADLINE
-
-/* Define to 1 if you have the `rt' library (-lrt). */
-#undef HAVE_LIBRT
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define to 1 if you have the `syslog' library (-lsyslog). */
-#undef HAVE_LIBSYSLOG
-
-/* Define to 1 if you have the <machine/inline.h> header file. */
-#undef HAVE_MACHINE_INLINE_H
-
-/* Define to 1 if you have the <machine/soundcard.h> header file. */
-#undef HAVE_MACHINE_SOUNDCARD_H
-
-/* 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
-
-/* Define to 1 if you have the `memlk' function. */
-#undef HAVE_MEMLK
-
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if you have the `mktime' function. */
-#undef HAVE_MKTIME
-
-/* Define to 1 if you have the `mlockall' function. */
-#undef HAVE_MLOCKALL
-
-/* Define to 1 if you have the `mrand48' function. */
-#undef HAVE_MRAND48
-
-/* Define to 1 if you have the <netdb.h> header file. */
-#undef HAVE_NETDB_H
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <netinet/in_system.h> header file. */
-#undef HAVE_NETINET_IN_SYSTEM_H
-
-/* Define to 1 if you have the <netinet/in_systm.h> header file. */
-#undef HAVE_NETINET_IN_SYSTM_H
-
-/* Define to 1 if you have the <netinet/ip.h> header file. */
-#undef HAVE_NETINET_IP_H
-
-/* NetInfo support? */
-#undef HAVE_NETINFO
-
-/* 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
-
-/* Define to 1 if you have the `nice' function. */
-#undef HAVE_NICE
-
-/* Define to 1 if you have the `nlist' function. */
-#undef HAVE_NLIST
-
-/* Define to 1 if you have the `ntp_adjtime' function. */
-#undef HAVE_NTP_ADJTIME
-
-/* Define to 1 if you have the `ntp_gettime' function. */
-#undef HAVE_NTP_GETTIME
-
-/* Define to 1 if you have the `plock' function. */
-#undef HAVE_PLOCK
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Do we have the PPS API per the Draft RFC? */
-#undef HAVE_PPSAPI
-
-/* Are function prototypes OK? */
-#undef HAVE_PROTOTYPES
-
-/* Define to 1 if you have the `pututline' function. */
-#undef HAVE_PUTUTLINE
-
-/* Define to 1 if you have the `pututxline' function. */
-#undef HAVE_PUTUTXLINE
-
-/* Define to 1 if you have the `random' function. */
-#undef HAVE_RANDOM
-
-/* Define to 1 if you have the <readline/history.h> header file. */
-#undef HAVE_READLINE_HISTORY_H
-
-/* Define to 1 if you have the <readline/readline.h> header file. */
-#undef HAVE_READLINE_READLINE_H
-
-/* Define to 1 if you have the `readlink' function. */
-#undef HAVE_READLINK
-
-/* Define to 1 if you have the <resolv.h> header file. */
-#undef HAVE_RESOLV_H
-
-/* Define to 1 if you have the `rtprio' function. */
-#undef HAVE_RTPRIO
-
-/* Should be obvious... */
-#undef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
-
-/* Obvious... */
-#undef HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION
-
-/* Define to 1 if you have the <sched.h> header file. */
-#undef HAVE_SCHED_H
-
-/* Define to 1 if you have the `sched_setscheduler' function. */
-#undef HAVE_SCHED_SETSCHEDULER
-
-/* Define to 1 if you have the `setlinebuf' function. */
-#undef HAVE_SETLINEBUF
-
-/* Define to 1 if you have the `setpgid' function. */
-#undef HAVE_SETPGID
-
-/* define if setpgrp takes 0 arguments */
-#undef HAVE_SETPGRP_0
-
-/* 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
-
-/* Define to 1 if you have the `settimeofday' function. */
-#undef HAVE_SETTIMEOFDAY
-
-/* Define to 1 if you have the `setvbuf' function. */
-#undef HAVE_SETVBUF
-
-/* Define to 1 if you have the <sgtty.h> header file. */
-#undef HAVE_SGTTY_H
-
-/* Define to 1 if you have the `sigaction' function. */
-#undef HAVE_SIGACTION
-
-/* Can we use SIGIO for tcp and udp IO? */
-#undef HAVE_SIGNALED_IO
-
-/* Define to 1 if you have the `sigset' function. */
-#undef HAVE_SIGSET
-
-/* Define to 1 if you have the `sigsuspend' function. */
-#undef HAVE_SIGSUSPEND
-
-/* Define to 1 if you have the `sigvec' function. */
-#undef HAVE_SIGVEC
-
-/* Define to 1 if you have the `snprintf' function. */
-#undef HAVE_SNPRINTF
-
-/* 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
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `stime' function. */
-#undef HAVE_STIME
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
-
-/* Do we have struct ntptimeval? */
-#undef HAVE_STRUCT_NTPTIMEVAL
-
-/* Define to 1 if `time.tv_nsec' is member of `struct ntptimeval'. */
-#undef HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC
-
-/* Does a system header define struct ppsclockev? */
-#undef HAVE_STRUCT_PPSCLOCKEV
-
-/* Do we have struct snd_size? */
-#undef HAVE_STRUCT_SND_SIZE
-
-/* Do we have struct timespec? */
-#undef HAVE_STRUCT_TIMESPEC
-
-/* Define to 1 if you have the <sun/audioio.h> header file. */
-#undef HAVE_SUN_AUDIOIO_H
-
-/* Define to 1 if you have the `sysconf' function. */
-#undef HAVE_SYSCONF
-
-/* Define to 1 if you have the `sysctl' function. */
-#undef HAVE_SYSCTL
-
-/* Define to 1 if you have the <sys/audioio.h> header file. */
-#undef HAVE_SYS_AUDIOIO_H
-
-/* 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
-
-/* Define to 1 if you have the <sys/i8253.h> header file. */
-#undef HAVE_SYS_I8253_H
-
-/* 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
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
-/* Define to 1 if you have the <sys/modem.h> header file. */
-#undef HAVE_SYS_MODEM_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/pcl720.h> header file. */
-#undef HAVE_SYS_PCL720_H
-
-/* Define to 1 if you have the <sys/ppsclock.h> header file. */
-#undef HAVE_SYS_PPSCLOCK_H
-
-/* Define to 1 if you have the <sys/ppstime.h> header file. */
-#undef HAVE_SYS_PPSTIME_H
-
-/* Define to 1 if you have the <sys/proc.h> header file. */
-#undef HAVE_SYS_PROC_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/sched.h> header file. */
-#undef HAVE_SYS_SCHED_H
-
-/* 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
-
-/* Define to 1 if you have the <sys/sio.h> header file. */
-#undef HAVE_SYS_SIO_H
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* Define to 1 if you have the <sys/soundcard.h> header file. */
-#undef HAVE_SYS_SOUNDCARD_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/stream.h> header file. */
-#undef HAVE_SYS_STREAM_H
-
-/* Define to 1 if you have the <sys/stropts.h> header file. */
-#undef HAVE_SYS_STROPTS_H
-
-/* Define to 1 if you have the <sys/sysctl.h> header file. */
-#undef HAVE_SYS_SYSCTL_H
-
-/* 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
-
-/* Define to 1 if you have the <sys/timepps.h> header file. */
-#undef HAVE_SYS_TIMEPPS_H
-
-/* Define to 1 if you have the <sys/timers.h> header file. */
-#undef HAVE_SYS_TIMERS_H
-
-/* Define to 1 if you have the <sys/timex.h> header file. */
-#undef HAVE_SYS_TIMEX_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/tpro.h> header file. */
-#undef HAVE_SYS_TPRO_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/wait.h> header file. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if the system has the type `s_char'. */
-#undef HAVE_S_CHAR
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define to 1 if you have the <termio.h> header file. */
-#undef HAVE_TERMIO_H
-
-/* Obvious... */
-#undef HAVE_TICKADJ_IN_STRUCT_CLOCKINFO
-
-/* Define to 1 if you have the `timegm' function. */
-#undef HAVE_TIMEGM
-
-/* Define to 1 if you have the <timepps.h> header file. */
-#undef HAVE_TIMEPPS_H
-
-/* Define to 1 if you have the `timer_create' function. */
-#undef HAVE_TIMER_CREATE
-
-/* Define to 1 if you have the `timer_settime' function. */
-#undef HAVE_TIMER_SETTIME
-
-/* Define to 1 if you have the <timex.h> header file. */
-#undef HAVE_TIMEX_H
-
-/* Do we have the TIOCGPPSEV ioctl (Solaris)? */
-#undef HAVE_TIOCGPPSEV
-
-/* Do we have the TIOCSPPS ioctl (Solaris)? */
-#undef HAVE_TIOCSPPS
-
-/* 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
-
-/* Define to 1 if you have the `uname' function. */
-#undef HAVE_UNAME
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `updwtmp' function. */
-#undef HAVE_UPDWTMP
-
-/* Define to 1 if you have the `updwtmpx' function. */
-#undef HAVE_UPDWTMPX
-
-/* Define to 1 if you have the <utmpx.h> header file. */
-#undef HAVE_UTMPX_H
-
-/* Define to 1 if you have the <utmp.h> header file. */
-#undef HAVE_UTMP_H
-
-/* Define to 1 if you have the `vsprintf' function. */
-#undef HAVE_VSPRINTF
-
-/* Define to 1 if you have the </sys/sync/queue.h> header file. */
-#undef HAVE__SYS_SYNC_QUEUE_H
-
-/* Define to 1 if you have the </sys/sync/sema.h> header file. */
-#undef HAVE__SYS_SYNC_SEMA_H
-
-/* Define to 1 if you have the `__adjtimex' function. */
-#undef HAVE___ADJTIMEX
-
-/* 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
-
-/* Does the kernel support precision time discipline? */
-#undef KERNEL_PLL
-
-/* What is (probably) the name of DOSYNCTODR in the kernel? */
-#undef K_DOSYNCTODR_NAME
-
-/* What is (probably) the name of NOPRINTF in the kernel? */
-#undef K_NOPRINTF_NAME
-
-/* What is the name of TICKADJ in the kernel? */
-#undef K_TICKADJ_NAME
-
-/* 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
-
-/* Should we recommend a minimum value for tickadj? */
-#undef MIN_REC_TICKADJ
-
-/* Do we need HPUX adjtime() library support? */
-#undef NEED_HPUX_ADJTIME
-
-/* Do we want the HPUX FindConfig()? */
-#undef NEED_HPUX_FINDCONFIG
-
-/* Do we need the qnx adjtime call? */
-#undef NEED_QNX_ADJTIME
-
-/* Do we need extra room for SO_RCVBUF? (HPUX <8) */
-#undef NEED_RCVBUF_SLOP
-
-/* Do we need an s_char typedef? */
-#undef NEED_S_CHAR_TYPEDEF
-
-/* Might nlist() values require an extra level of indirection (AIX)? */
-#undef NLIST_EXTRA_INDIRECTION
-
-/* does struct nlist use a name union? */
-#undef NLIST_NAME_UNION
-
-/* nlist stuff */
-#undef NLIST_STRUCT
-
-/* Should we NOT read /dev/kmem? */
-#undef NOKMEM
-
-/* Is there a problem using PARENB and IGNPAR (IRIX)? */
-#undef NO_PARENB_IGNPAR
-
-/* Default location of crypto key info */
-#undef NTP_KEYSDIR
-
-/* Do we have ntp_{adj,get}time in libc? */
-#undef NTP_SYSCALLS_LIBC
-
-/* Do we have ntp_{adj,get}time in the kernel? */
-#undef NTP_SYSCALLS_STD
-
-/* Do we have support for SHMEM_STATUS? */
-#undef ONCORE_SHMEM_STATUS
-
-/* Use OpenSSL? */
-#undef OPENSSL
-
-/* Should we open the broadcast socket? */
-#undef OPEN_BCAST_SOCKET
-
-/* Do we need to override the system's idea of HZ? */
-#undef OVERRIDE_HZ
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Do we have the ppsclock streams module? */
-#undef PPS
-
-/* PPS auxiliary interface for ATOM? */
-#undef PPS_SAMPLE
-
-/* PARSE kernel PLL PPS support */
-#undef PPS_SYNC
-
-/* Preset a value for 'tick'? */
-#undef PRESET_TICK
-
-/* Preset a value for 'tickadj'? */
-#undef PRESET_TICKADJ
-
-/* Define if compiler has function prototypes */
-#undef PROTOTYPES
-
-/* Does qsort expect to work on "void *" stuff? */
-#undef QSORT_USES_VOID_P
-
-/* Should we not IGNPAR (Linux)? */
-#undef RAWDCF_NO_IGNPAR
-
-/* Basic refclock support? */
-#undef REFCLOCK
-
-/* Do we want the ReliantUNIX clock hacks? */
-#undef RELIANTUNIX_CLOCK
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Do we want the SCO clock hacks? */
-#undef SCO5_CLOCK
-
-/* The size of a `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of a `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of a `signed char', as computed by sizeof. */
-#undef SIZEOF_SIGNED_CHAR
-
-/* Does SIOCGIFCONF return size in the buffer? */
-#undef SIZE_RETURNED_IN_BUFFER
-
-/* 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
-
-/* Step, then slew the clock? */
-#undef STEP_SLEW
-
-/* Do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H?) */
-#undef STREAMS_TLI
-
-/* canonical system (cpu-vendor-os) string */
-#undef STR_SYSTEM
-
-/* Buggy syscall() (Solaris2.4)? */
-#undef SYSCALL_BUG
-
-/* Does Xettimeofday take 1 arg? */
-#undef SYSV_TIMEOFDAY
-
-/* Do we need to #define _SVID3 when we #include <termios.h>? */
-#undef TERMIOS_NEEDS__SVID3
-
-/* Is K_TICKADJ_NAME in nanoseconds? */
-#undef TICKADJ_NANO
-
-/* Is K_TICK_NAME in nanoseconds? */
-#undef TICK_NANO
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-#undef TM_IN_SYS_TIME
-
-/* Do we have the tty_clk line discipline/streams module? */
-#undef TTYCLK
-
-/* Do we set process groups with -pid? */
-#undef UDP_BACKWARDS_SETOWN
-
-/* 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
-
-/* Can we use SIGPOLL for tty IO? */
-#undef USE_TTY_SIGPOLL
-
-/* Can we use SIGPOLL for UDP? */
-#undef USE_UDP_SIGPOLL
-
-/* 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. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define to 1 if type `char' is unsigned and you are not using gcc. */
-#ifndef __CHAR_UNSIGNED__
-# undef __CHAR_UNSIGNED__
-#endif
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef gid_t
-
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
- if it is not supported. */
-#undef inline
-
-/* Define to `long' if <sys/types.h> does not define. */
-#undef off_t
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `long' if <sys/types.h> does not define. */
-#undef time_t
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef uid_t
-
-/* Does the compiler like "volatile"? */
-#undef volatile
diff --git a/contrib/ntp/config.sub b/contrib/ntp/config.sub
deleted file mode 100755
index c8a01be..0000000
--- a/contrib/ntp/config.sub
+++ /dev/null
@@ -1,1504 +0,0 @@
-#! /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/configure b/contrib/ntp/configure
deleted file mode 100755
index 64f6df8..0000000
--- a/contrib/ntp/configure
+++ /dev/null
@@ -1,24769 +0,0 @@
-#! /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="ntpd/ntp_refclock.c"
-# 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_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=
-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
- --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-all-clocks + include all suitable non-PARSE clocks:
- --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-AUDIO-CHU s CHU audio/decoder
- --enable-DATUM s Datum Programmable Time System
- --enable-DUMBCLOCK + Dumb generic hh:mm:ss local clock
- --enable-FG + Forum Graphic GPS
- --enable-HEATH s Heath GC-1000 WWV/WWVH receiver
- --enable-HOPFSERIAL + hopf serial clock device
- --enable-HOPFPCI + hopf 6039 PCI board
- --enable-HPGPS + HP 58503A GPS receiver
- --enable-IRIG s IRIG audio decoder
- --enable-JJY + JJY receiver
- --enable-JUPITER s Rockwell Jupiter GPS receiver
- --enable-LEITCH + Leitch CSD 5300 Master Clock System Driver
- --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-NMEA + NMEA GPS receiver
- --enable-ONCORE s Motorola VP/UT Oncore GPS receiver
- --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
- --enable-TRUETIME s Kinemetrics/TrueTime receivers
- --enable-TT560 - TrueTime 560 IRIG-B decoder
- --enable-ULINK + Ultralink WWVB receiver
- --enable-USNO s USNO modem service
- --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
- --enable-DCF7000 s ELV/DCF7000 clock
- --enable-HOPF6021 s HOPF 6021 clock
- --enable-MEINBERG s Meinberg clocks
- --enable-RAWDCF s DCF77 raw time code
- --enable-RCC8000 s RCC 8000 clock
- --enable-SCHMID s Schmid DCF77 clock
- --enable-TRIMTAIP s Trimble GPS receiver/TAIP protocol
- --enable-TRIMTSIP s Trimble GPS receiver/TSIP protocol
- --enable-WHARTON s WHARTON 400A Series clock
- --enable-VARITEXT s VARITEXT clock
- --enable-kmem s read /dev/kmem for tick and/or tickadj
- --enable-accurate-adjtime
- 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
- --enable-ntpdate-step s if ntpdate should step the time
- --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 + =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
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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.
-
-# 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}-
-
-cat >>confdefs.h <<_ACEOF
-#define STR_SYSTEM "$host"
-_ACEOF
-
- ac_config_headers="$ac_config_headers config.h"
-
-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
-
-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:
-# 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
-
-# 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=ntp
- VERSION=4.2.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.
-
-
-
-
-
-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'
-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
-
-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'
-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
- 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
-
-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'
-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
-
-
-case "$host" in
- *-*-amigaos)
- CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
- ;;
- *-pc-cygwin*)
- CFLAGS="$CFLAGS -DSYS_CYGWIN32"
- ;;
- i386-sequent-sysv4)
- case "$CC" in
- cc)
- CFLAGS="$CFLAGS -Wc,+abi-socket"
- ;;
- esac
- ;;
- *-*-mpeix*)
- CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
- LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
- LIBS="$LIBS -lcurses"
- ;;
-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)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- # Quick and dirty sanity check
- case "$VX_KERNEL" in
- '') { { echo "$as_me:$LINENO: error: Please follow the directions in html/vxworks.html!" >&5
-echo "$as_me: error: Please follow the directions in html/vxworks.html!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
- CFLAGS="$CFLAGS -DSYS_VXWORKS"
- ;;
- esac
- ;;
-esac
-
-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 -f conftest*
-
-case "$GCC" in
- yes)
- CFLAGS="$CFLAGS -Wall"
- # CFLAGS="$CFLAGS -Wcast-align"
- CFLAGS="$CFLAGS -Wcast-qual"
- # CFLAGS="$CFLAGS -Wconversion"
- # CFLAGS="$CFLAGS -Werror"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
-
- ;;
-esac
-
-ac_busted_vpath_in_make=no
-
-case "$host" in
- *-next-nextstep3)
- CFLAGS="$CFLAGS -posix"
- ;;
- *-*-irix6.1*) # 64 bit only
- # busted vpath?
- ;;
- *-*-irix6*) # 6.2 (and later?)
- ac_busted_vpath_in_make=yes
- # don't pass -n32 to gcc, it cannot handle and doesn't need it
- if test "$GCC" != yes; then
- case "$CFLAGS" in
- *-n32*) ;;
- *-n64*) ;;
- *-64*) ;;
- *) case "$iCFLAGS" in
- '') CFLAGS="-O2 -g3 -n32" ;;
- *) CFLAGS="$CFLAGS -n32" ;;
- esac
- ;;
- esac
- case "$LDFLAGS" in
- *-n32*) ;;
- *-n64*) ;;
- *-64*) ;;
- *) LDFLAGS="$LDFLAGS -n32" ;;
- esac
- fi
- ;;
- *-*-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
- no*) ;;
- yes.) ;;
- *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
- '')
- { { echo "$as_me:$LINENO: error: building outside of the main directory requires GNU make" >&5
-echo "$as_me: error: building outside of the main directory requires GNU make" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- *) ;;
- esac
- ;;
-esac
-
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-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
-if test "${ac_cv_prog_gcc_traditional+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_pattern="Autoconf.*'x'"
- 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 <sgtty.h>
-Autoconf TIOCGETP
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then
- ac_cv_prog_gcc_traditional=yes
-else
- ac_cv_prog_gcc_traditional=no
-fi
-rm -f conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; 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 <termio.h>
-Autoconf TCGETA
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "$ac_pattern" >/dev/null 2>&1; then
- ac_cv_prog_gcc_traditional=yes
-fi
-rm -f conftest*
-
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
-echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
-fi
-
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
-volatile int x;
-int * volatile y;
- ;
- 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_volatile=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_volatile=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-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 volatile
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for library containing strerror" >&5
-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
-if test "${ac_cv_search_strerror+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_strerror=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. */
-
-/* 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 strerror ();
-int
-main ()
-{
-strerror ();
- ;
- 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_search_strerror="none required"
-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
-if test "$ac_cv_search_strerror" = no; then
- for ac_lib in cposix; do
- LIBS="-l$ac_lib $ac_func_search_save_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 strerror ();
-int
-main ()
-{
-strerror ();
- ;
- 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_search_strerror="-l$ac_lib"
-break
-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
- done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
-echo "${ECHO_T}$ac_cv_search_strerror" >&6
-if test "$ac_cv_search_strerror" != no; then
- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-
-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
-
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; 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_path_PATH_SH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PATH_SH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PATH_SH="$PATH_SH" # Let the user override the test with a path.
- ;;
- *)
- 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_path_PATH_SH="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-PATH_SH=$ac_cv_path_PATH_SH
-
-if test -n "$PATH_SH"; then
- echo "$as_me:$LINENO: result: $PATH_SH" >&5
-echo "${ECHO_T}$PATH_SH" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; 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_path_PATH_PERL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PATH_PERL in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PATH_PERL="$PATH_PERL" # Let the user override the test with a path.
- ;;
- *)
- 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_path_PATH_PERL="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-PATH_PERL=$ac_cv_path_PATH_PERL
-
-if test -n "$PATH_PERL"; then
- echo "$as_me:$LINENO: result: $PATH_PERL" >&5
-echo "${ECHO_T}$PATH_PERL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-
-
-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. */
-#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
- cat >>confdefs.h <<\_ACEOF
-#define ULONG_CONST(a) a ## UL
-_ACEOF
-
-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. */
-#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
- cat >>confdefs.h <<\_ACEOF
-#define ULONG_CONST(a) a/**/L
-_ACEOF
-
-else
- { { echo "$as_me:$LINENO: error: How do we create an unsigned long constant?" >&5
-echo "$as_me: error: How do we create an unsigned long constant?" >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f conftest*
-
-fi
-rm -f conftest*
-
-
-case "$host" in
- *-*-vxworks*)
- ac_link="$ac_link $VX_KERNEL"
- ;;
-esac
-
-# 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'
-
-
-case "$host" in
- *-pc-cygwin*)
-
-echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5
-echo $ECHO_N "checking for main in -ladvapi32... $ECHO_C" >&6
-if test "${ac_cv_lib_advapi32_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ladvapi32 $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. */
-
-
-int
-main ()
-{
-main ();
- ;
- 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_advapi32_main=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_advapi32_main" >&5
-echo "${ECHO_T}$ac_cv_lib_advapi32_main" >&6
-if test $ac_cv_lib_advapi32_main = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBADVAPI32 1
-_ACEOF
-
- LIBS="-ladvapi32 $LIBS"
-
-fi
-
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for nlist in -lelf" >&5
-echo $ECHO_N "checking for nlist in -lelf... $ECHO_C" >&6
-if test "${ac_cv_lib_elf_nlist+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lelf $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 nlist ();
-int
-main ()
-{
-nlist ();
- ;
- 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_elf_nlist=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_elf_nlist" >&5
-echo "${ECHO_T}$ac_cv_lib_elf_nlist" >&6
-if test $ac_cv_lib_elf_nlist = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBELF 1
-_ACEOF
-
- LIBS="-lelf $LIBS"
-
-fi
-
-echo "$as_me:$LINENO: checking for main in -lkvm" >&5
-echo $ECHO_N "checking for main in -lkvm... $ECHO_C" >&6
-if test "${ac_cv_lib_kvm_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkvm $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. */
-
-
-int
-main ()
-{
-main ();
- ;
- 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_kvm_main=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_main" >&5
-echo "${ECHO_T}$ac_cv_lib_kvm_main" >&6
-if test $ac_cv_lib_kvm_main = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKVM 1
-_ACEOF
-
- LIBS="-lkvm $LIBS"
-
-fi
-
-echo "$as_me:$LINENO: checking for nlist in -lld" >&5
-echo $ECHO_N "checking for nlist in -lld... $ECHO_C" >&6
-if test "${ac_cv_lib_ld_nlist+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lld $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 nlist ();
-int
-main ()
-{
-nlist ();
- ;
- 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_ld_nlist=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ld_nlist" >&5
-echo "${ECHO_T}$ac_cv_lib_ld_nlist" >&6
-if test $ac_cv_lib_ld_nlist = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBLD 1
-_ACEOF
-
- LIBS="-lld $LIBS"
-
-fi
-
-
-echo "$as_me:$LINENO: checking for nlist in -lmld" >&5
-echo $ECHO_N "checking for nlist in -lmld... $ECHO_C" >&6
-if test "${ac_cv_lib_mld_nlist+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmld $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 nlist ();
-int
-main ()
-{
-nlist ();
- ;
- 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_mld_nlist=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mld_nlist" >&5
-echo "${ECHO_T}$ac_cv_lib_mld_nlist" >&6
-if test $ac_cv_lib_mld_nlist = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBMLD 1
-_ACEOF
-
- LIBS="-lmld $LIBS"
-
-fi
-
-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 openlog" >&5
-echo $ECHO_N "checking for openlog... $ECHO_C" >&6
-if test "${ac_cv_func_openlog+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 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 ();
-/* 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
-char (*f) () = openlog;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != openlog;
- ;
- 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_openlog=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_openlog=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
-echo "${ECHO_T}$ac_cv_func_openlog" >&6
-if test $ac_cv_func_openlog = yes; then
- :
-else
-
-echo "$as_me:$LINENO: checking for openlog in -lgen" >&5
-echo $ECHO_N "checking for openlog in -lgen... $ECHO_C" >&6
-if test "${ac_cv_lib_gen_openlog+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgen $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 openlog ();
-int
-main ()
-{
-openlog ();
- ;
- 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_gen_openlog=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_gen_openlog" >&5
-echo "${ECHO_T}$ac_cv_lib_gen_openlog" >&6
-if test $ac_cv_lib_gen_openlog = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGEN 1
-_ACEOF
-
- LIBS="-lgen $LIBS"
-
-else
-
-echo "$as_me:$LINENO: checking for openlog in -lsyslog" >&5
-echo $ECHO_N "checking for openlog in -lsyslog... $ECHO_C" >&6
-if test "${ac_cv_lib_syslog_openlog+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsyslog -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 openlog ();
-int
-main ()
-{
-openlog ();
- ;
- 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_syslog_openlog=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_syslog_openlog" >&5
-echo "${ECHO_T}$ac_cv_lib_syslog_openlog" >&6
-if test $ac_cv_lib_syslog_openlog = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSYSLOG 1
-_ACEOF
-
- LIBS="-lsyslog $LIBS"
-
-fi
-
-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
-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_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
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $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_readline_readline=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
-echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
-if test $ac_cv_lib_readline_readline = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBREADLINE 1
-_ACEOF
-
- LIBS="-lreadline $LIBS"
-
-else
- { echo "$as_me:$LINENO: Trying again with -lcurses" >&5
-echo "$as_me: Trying again with -lcurses" >&6;}
- unset ac_cv_lib_readline_readline
- 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
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline -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_readline_readline=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
-echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
-if test $ac_cv_lib_readline_readline = yes; then
- LIBS="-lreadline -lcurses $LIBS"
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBREADLINE 1
-_ACEOF
-
-
-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
-
-
-case "$host" in
- *-*-linux*) ;;
- *)
-
-echo "$as_me:$LINENO: checking for sched_setscheduler in -lrt" >&5
-echo $ECHO_N "checking for sched_setscheduler in -lrt... $ECHO_C" >&6
-if test "${ac_cv_lib_rt_sched_setscheduler+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt $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 sched_setscheduler ();
-int
-main ()
-{
-sched_setscheduler ();
- ;
- 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_rt_sched_setscheduler=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_setscheduler" >&5
-echo "${ECHO_T}$ac_cv_lib_rt_sched_setscheduler" >&6
-if test $ac_cv_lib_rt_sched_setscheduler = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
-
- LIBS="-lrt $LIBS"
-
-else
-
-echo "$as_me:$LINENO: checking for sched_setscheduler in -lposix4" >&5
-echo $ECHO_N "checking for sched_setscheduler in -lposix4... $ECHO_C" >&6
-if test "${ac_cv_lib_posix4_sched_setscheduler+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix4 $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 sched_setscheduler ();
-int
-main ()
-{
-sched_setscheduler ();
- ;
- 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_posix4_sched_setscheduler=yes
-else
- echo "$as_me: failed program was:" >&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
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_posix4_sched_setscheduler" >&5
-echo "${ECHO_T}$ac_cv_lib_posix4_sched_setscheduler" >&6
-if test $ac_cv_lib_posix4_sched_setscheduler = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPOSIX4 1
-_ACEOF
-
- LIBS="-lposix4 $LIBS"
-
-fi
-
-fi
-
- ;;
-esac
-
-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 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
-
-
-
-
-
-
-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 md5.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
-
-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
-
-# 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
- 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 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 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
-
-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_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
-
-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
- 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 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
-
-
-#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
- 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_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`
-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
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NETINFO 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in sun/audioio.h sys/audioio.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 sys/clkdefs.h sys/file.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
- *-*-sunos4*) ;;
- *)
-for ac_header in sys/ioctl.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 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
-
-
-
-
-
-
-for ac_header in sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.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 sys/ppstime.h sys/proc.h sys/resource.h sys/sched.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
- *-*-sco*)
-
-for ac_header in sys/sio.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 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
- 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 machine/soundcard.h sys/soundcard.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 sys/stat.h sys/stream.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 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
- 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 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
- 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
-
-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/timepps.h>
-#ifdef PPS_API_VERS_1
-yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
-
-for ac_header in sys/timepps.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
-
-fi
-rm -f conftest*
-
-
-
-
-
-
-for ac_header in sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.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
-
-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
-
-case "$host" in
-*-convex-*)
-
-
-for ac_header in /sys/sync/queue.h /sys/sync/sema.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
-
- ;;
-*-*-bsdi*)
-
-
-
-for ac_header in machine/inline.h sys/pcl720.h sys/i8253.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
-
-if test "${ac_cv_header_nlist_h+set}" = set; then
- echo "$as_me:$LINENO: checking for nlist.h" >&5
-echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6
-if test "${ac_cv_header_nlist_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5
-echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
-else
- # Is the header compilable?
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <nlist.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 nlist.h presence" >&5
-echo $ECHO_N "checking nlist.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 <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=$?
- 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: 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;}
- (
- 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;}
- (
- 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
-if test "${ac_cv_header_nlist_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_nlist_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5
-echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
-
-fi
-if test $ac_cv_header_nlist_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NLIST_STRUCT 1
-_ACEOF
-
-echo "$as_me:$LINENO: checking for n_un in struct nlist" >&5
-echo $ECHO_N "checking for n_un in struct nlist... $ECHO_C" >&6
-if test "${ac_cv_struct_nlist_n_un+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 <nlist.h>
-int
-main ()
-{
-struct nlist n; n.n_un.n_name = 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_struct_nlist_n_un=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_nlist_n_un=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_nlist_n_un" >&5
-echo "${ECHO_T}$ac_cv_struct_nlist_n_un" >&6
-if test $ac_cv_struct_nlist_n_un = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NLIST_NAME_UNION 1
-_ACEOF
-
-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
- 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 ()
-{
-
-volatile int x;
- ;
- 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_volatile=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_volatile=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
-echo "${ECHO_T}$ac_cv_c_volatile" >&6
-case "$ac_cv_c_volatile" in
- yes)
- ;;
- *)
-cat >>confdefs.h <<\_ACEOF
-#define volatile
-_ACEOF
-
- ;;
-esac
-
-case "$host" in
- sparc-*-solaris2*)
- # Assume that solaris2 is Ansi C...
- ;;
- *)
-
-
-
-echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
-echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
-if test "${am_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# 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"
- 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
-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
- am_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 conftest.$ac_ext
-done
-CC="$ac_save_CC"
-
-fi
-
-if test -z "$am_cv_prog_cc_stdc"; then
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6
-else
- echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
-fi
-case "x$am_cv_prog_cc_stdc" in
- x|xno) ;;
- *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-
-
-
-echo "$as_me:$LINENO: checking for function prototypes" >&5
-echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
-if test "$am_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
-
- U= ANSI2KNR=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- U=_ ANSI2KNR=./ansi2knr
-fi
-# Ensure some checks needed by ansi2knr itself.
-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
-
-
-for ac_header in string.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
-echo "$as_me:$LINENO: checking if C compiler permits function prototypes" >&5
-echo $ECHO_N "checking if C compiler permits function prototypes... $ECHO_C" >&6
-if test "${ac_cv_have_prototypes+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. */
-
-extern int foo (short);
-int foo(short i) { return i; }
-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_have_prototypes=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_have_prototypes=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_have_prototypes" >&5
-echo "${ECHO_T}$ac_cv_have_prototypes" >&6
-if test "$ac_cv_have_prototypes" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PROTOTYPES 1
-_ACEOF
-
-fi
-
-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 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
-else
- # See if sys/param.h defines the BYTE_ORDER macro.
-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/param.h>
-
-int
-main ()
-{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#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
- # It does; now see whether it defined to BIG_ENDIAN or not.
-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/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#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_bigendian=yes
-else
- echo "$as_me: failed program was:" >&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
-sed 's/^/| /' conftest.$ac_ext >&5
-
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # 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"
-/* 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; }
-int
-main ()
-{
- _ascii (); _ebcdic ();
- ;
- 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
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
- ac_cv_c_bigendian=yes
-fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
-fi
-else
- echo "$as_me: failed program was:" >&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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-_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_c_bigendian=no
-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_c_bigendian=yes
-fi
-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
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
-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
- 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
-
-
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_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 ((off_t *) 0)
- return 0;
-if (sizeof (off_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_off_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_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 for time_t" >&5
-echo $ECHO_N "checking for time_t... $ECHO_C" >&6
-if test "${ac_cv_type_time_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 ((time_t *) 0)
- return 0;
-if (sizeof (time_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_time_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_time_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
-echo "${ECHO_T}$ac_cv_type_time_t" >&6
-if test $ac_cv_type_time_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define time_t long
-_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 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
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_var_default_hz=100
-case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ac_cv_var_default_hz=1024
- ;;
- mips-dec-ultrix4*)
- ac_cv_var_default_hz=256
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_default_hz" >&5
-echo "${ECHO_T}$ac_cv_var_default_hz" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_HZ $ac_cv_var_default_hz
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking if we need to override the system's value for HZ" >&5
-echo $ECHO_N "checking if we need to override the system's value for HZ... $ECHO_C" >&6
-if test "${ac_cv_var_override_hz+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_var_override_hz=no
-case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ac_cv_var_override_hz=yes
- ;;
- mips-dec-ultrix4*)
- ac_cv_var_override_hz=yes
- ;;
- *-*-freebsd*)
- ac_cv_var_override_hz=yes
- ;;
- *-*-sunos4*)
- ac_cv_var_override_hz=yes
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_override_hz" >&5
-echo "${ECHO_T}$ac_cv_var_override_hz" >&6
-case "$ac_cv_var_override_hz" in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define OVERRIDE_HZ 1
-_ACEOF
-
- ;;
-esac
-
-
-
-echo "$as_me:$LINENO: checking struct sigaction for sa_sigaction" >&5
-echo $ECHO_N "checking struct sigaction for sa_sigaction... $ECHO_C" >&6
-if test "${ac_cv_struct_sigaction_has_sa_sigaction+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 <signal.h>
-int
-main ()
-{
-struct sigaction act; act.sa_sigaction = 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_struct_sigaction_has_sa_sigaction=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_sigaction_has_sa_sigaction=no
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_sigaction_has_sa_sigaction" >&5
-echo "${ECHO_T}$ac_cv_struct_sigaction_has_sa_sigaction" >&6
-if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for struct ppsclockev" >&5
-echo $ECHO_N "checking for struct ppsclockev... $ECHO_C" >&6
-if test "${ac_cv_struct_ppsclockev+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>
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif
-int
-main ()
-{
-
-extern struct ppsclockev *pce;
-return pce->serial;
- ;
- 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_ppsclockev=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_ppsclockev=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_ppsclockev" >&5
-echo "${ECHO_T}$ac_cv_struct_ppsclockev" >&6
-if test $ac_cv_struct_ppsclockev = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_PPSCLOCKEV 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking struct sockaddr for sa_len" >&5
-echo $ECHO_N "checking struct sockaddr for sa_len... $ECHO_C" >&6
-if test "${ac_cv_struct_sockaddr_has_sa_len+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 ()
-{
-
-extern struct sockaddr *ps;
-return ps->sa_len;
- ;
- 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_sockaddr_has_sa_len=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_sockaddr_has_sa_len=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_has_sa_len" >&5
-echo "${ECHO_T}$ac_cv_struct_sockaddr_has_sa_len" >&6
-if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SA_LEN_IN_STRUCT_SOCKADDR 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
-
-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
-echo $ECHO_N "checking for struct snd_size... $ECHO_C" >&6
-if test "${ac_cv_struct_snd_size+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. */
-
-#ifdef HAVE_MACHINE_SOUNDCARD_H
-# include <machine/soundcard.h>
-#endif
-#ifdef HAVE_SYS_SOUNDCARD_H
-# include <sys/soundcard.h>
-#endif
-int
-main ()
-{
-
-extern struct snd_size *ss;
-return ss->rec_size;
- ;
- 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_snd_size=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_snd_size=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_snd_size" >&5
-echo "${ECHO_T}$ac_cv_struct_snd_size" >&6
- case "$ac_cv_struct_snd_size" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_SND_SIZE 1
-_ACEOF
- ;;
- esac
- ;;
-esac
-
-echo "$as_me:$LINENO: checking struct clockinfo for hz" >&5
-echo $ECHO_N "checking struct clockinfo for hz... $ECHO_C" >&6
-if test "${ac_cv_struct_clockinfo_has_hz+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/time.h>
-int
-main ()
-{
-
-extern struct clockinfo *pc;
-return pc->hz;
- ;
- 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_clockinfo_has_hz=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_clockinfo_has_hz=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_clockinfo_has_hz" >&5
-echo "${ECHO_T}$ac_cv_struct_clockinfo_has_hz" >&6
-if test $ac_cv_struct_clockinfo_has_hz = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking struct clockinfo for tickadj" >&5
-echo $ECHO_N "checking struct clockinfo for tickadj... $ECHO_C" >&6
-if test "${ac_cv_struct_clockinfo_has_tickadj+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/time.h>
-int
-main ()
-{
-
-extern struct clockinfo *pc;
-return pc->tickadj;
- ;
- 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_clockinfo_has_tickadj=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_clockinfo_has_tickadj=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_clockinfo_has_tickadj" >&5
-echo "${ECHO_T}$ac_cv_struct_clockinfo_has_tickadj" >&6
-if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for struct timespec" >&5
-echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6
-if test "${ac_cv_struct_timespec+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/time.h>
-/* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
-#ifdef HAVE_SYS_TIMEPPS_H
-# define FRAC 4294967296
-# include <sys/timepps.h>
-#endif
-int
-main ()
-{
-struct timespec n;
- ;
- 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_timespec=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_timespec=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_timespec" >&5
-echo "${ECHO_T}$ac_cv_struct_timespec" >&6
-if test $ac_cv_struct_timespec = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_TIMESPEC 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for struct ntptimeval" >&5
-echo $ECHO_N "checking for struct ntptimeval... $ECHO_C" >&6
-if test "${ac_cv_struct_ntptimeval+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/time.h>
-#include <sys/timex.h>
-int
-main ()
-{
-struct ntptimeval n;
- ;
- 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_ntptimeval=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_struct_ntptimeval=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_ntptimeval" >&5
-echo "${ECHO_T}$ac_cv_struct_ntptimeval" >&6
-if test $ac_cv_struct_ntptimeval = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_NTPTIMEVAL 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for struct ntptimeval.time.tv_nsec" >&5
-echo $ECHO_N "checking for struct ntptimeval.time.tv_nsec... $ECHO_C" >&6
-if test "${ac_cv_member_struct_ntptimeval_time_tv_nsec+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. */
-#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 (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
-
-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
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1
-_ACEOF
-
-
-fi
-
-
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; 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. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#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
- ac_cv_c_inline=$ac_kw; 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
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-case $ac_cv_c_inline in
- inline | yes) ;;
- no)
-cat >>confdefs.h <<\_ACEOF
-#define inline
-_ACEOF
- ;;
- *) cat >>confdefs.h <<_ACEOF
-#define inline $ac_cv_c_inline
-_ACEOF
- ;;
-esac
-
-
-echo "$as_me:$LINENO: checking whether char is unsigned" >&5
-echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
-if test "${ac_cv_c_char_unsigned+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 ()
-{
-static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 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_c_char_unsigned=no
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_char_unsigned=yes
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
-echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- cat >>confdefs.h <<\_ACEOF
-#define __CHAR_UNSIGNED__ 1
-_ACEOF
-
-fi
- echo "$as_me:$LINENO: checking for signed char" >&5
-echo $ECHO_N "checking for signed char... $ECHO_C" >&6
-if test "${ac_cv_type_signed_char+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 ((signed char *) 0)
- return 0;
-if (sizeof (signed char))
- 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_signed_char=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_signed_char=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_signed_char" >&5
-echo "${ECHO_T}$ac_cv_type_signed_char" >&6
-
-echo "$as_me:$LINENO: checking size of signed char" >&5
-echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
-if test "${ac_cv_sizeof_signed_char+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_signed_char" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-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 ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (signed char))) >= 0)];
-test_array [0] = 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_lo=0 ac_mid=0
- while :; 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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (signed char))) <= $ac_mid)];
-test_array [0] = 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_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&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=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (signed char))) < 0)];
-test_array [0] = 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_hi=-1 ac_mid=-1
- while :; 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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (signed char))) >= $ac_mid)];
-test_array [0] = 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_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&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=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (signed char))) <= $ac_mid)];
-test_array [0] = 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_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&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
-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
-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"
-/* 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>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (signed char))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (signed char))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (signed char))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 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_sizeof_signed_char=`cat conftest.val`
-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 )
-{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_signed_char=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_signed_char" >&5
-echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking for int" >&5
-echo $ECHO_N "checking for int... $ECHO_C" >&6
-if test "${ac_cv_type_int+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 ((int *) 0)
- return 0;
-if (sizeof (int))
- 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_int=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_int=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
-echo "${ECHO_T}$ac_cv_type_int" >&6
-
-echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6
-if test "${ac_cv_sizeof_int+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_int" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-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 ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
-test_array [0] = 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_lo=0 ac_mid=0
- while :; 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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 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_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&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=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
-test_array [0] = 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_hi=-1 ac_mid=-1
- while :; 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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
-test_array [0] = 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_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&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=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
-test_array [0] = 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_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&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
-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
-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"
-/* 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>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (int))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (int))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (int))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 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_sizeof_int=`cat conftest.val`
-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 )
-{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_int=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking for long" >&5
-echo $ECHO_N "checking for long... $ECHO_C" >&6
-if test "${ac_cv_type_long+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 ((long *) 0)
- return 0;
-if (sizeof (long))
- 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_long=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_long=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-echo "${ECHO_T}$ac_cv_type_long" >&6
-
-echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$ac_cv_type_long" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-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 ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
-test_array [0] = 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_lo=0 ac_mid=0
- while :; 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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 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_hi=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&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=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
-test_array [0] = 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_hi=-1 ac_mid=-1
- while :; 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. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
-test_array [0] = 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_lo=$ac_mid; break
-else
- echo "$as_me: failed program was:" >&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=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_lo= ac_hi=
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
-test_array [0] = 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_hi=$ac_mid
-else
- echo "$as_me: failed program was:" >&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
-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
-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"
-/* 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>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- exit (1);
- if (((long) (sizeof (long))) < 0)
- {
- long i = longval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%ld\n", i);
- }
- else
- {
- unsigned long i = ulongval ();
- if (i != ((long) (sizeof (long))))
- exit (1);
- fprintf (f, "%lu\n", i);
- }
- exit (ferror (f) || fclose (f) != 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_sizeof_long=`cat conftest.val`
-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 )
-{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.val
-else
- ac_cv_sizeof_long=0
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-
-echo "$as_me:$LINENO: checking for s_char" >&5
-echo $ECHO_N "checking for s_char... $ECHO_C" >&6
-if test "${ac_cv_type_s_char+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 ((s_char *) 0)
- return 0;
-if (sizeof (s_char))
- 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_s_char=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_s_char=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_s_char" >&5
-echo "${ECHO_T}$ac_cv_type_s_char" >&6
-if test $ac_cv_type_s_char = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_S_CHAR 1
-_ACEOF
-
-
-fi
-
-case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
- *yes)
- # We have a typedef for s_char. Might as well believe it...
- ;;
- no0no)
- # We have signed chars, can't say 'signed char', no s_char typedef.
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_S_CHAR_TYPEDEF 1
-_ACEOF
-
- ;;
- no1no)
- # We have signed chars, can say 'signed char', no s_char typedef.
- cat >>confdefs.h <<\_ACEOF
-#define NEED_S_CHAR_TYPEDEF 1
-_ACEOF
-
- ;;
- yes0no)
- # We have unsigned chars, can't say 'signed char', no s_char typedef.
- { { echo "$as_me:$LINENO: error: No way to specify a signed character!" >&5
-echo "$as_me: error: No way to specify a signed character!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- yes1no)
- # We have unsigned chars, can say 'signed char', no s_char typedef.
- cat >>confdefs.h <<\_ACEOF
-#define NEED_S_CHAR_TYPEDEF 1
-_ACEOF
-
- ;;
-esac
-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
-if test "${ac_cv_type_uid_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>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then
- ac_cv_type_uid_t=yes
-else
- ac_cv_type_uid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
-if test $ac_cv_type_uid_t = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define uid_t int
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define gid_t int
-_ACEOF
-
-fi
-
-
-case "$host" in
- *-*-linux*)
-
-
-for ac_func in __adjtimex __ntp_gettime
-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
-
- ;;
-esac
-case "$host" in
- *-*-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,
- # this conditional will need to change. Maybe use AC_TRY_RUN
- # instead to try to set the time to itself and check errno.
- ;;
- *)
-
-for ac_func in clock_gettime clock_settime
-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
-
- ;;
-esac
-
-for ac_func in daemon
-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 finite
-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
-
-for ac_func in isfinite
-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 isfinite with <math.h>" >&5
-echo $ECHO_N "checking for isfinite with <math.h>... $ECHO_C" >&6
- _libs=$LIBS
- LIBS="$LIBS -lm"
- 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 <math.h>
-int
-main ()
-{
-float f = 0.0; isfinite(f)
- ;
- 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 HAVE_ISFINITE 1
-_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
- LIBS=$_libs
-fi
-done
-
-fi
-done
-
-
-
-
-
-for ac_func in getbootfile getclock getdtablesize getrusage
-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 gettimeofday" >&5
-echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
-if test "${ac_cv_func_gettimeofday+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 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 ();
-/* 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
-char (*f) () = gettimeofday;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != gettimeofday;
- ;
- 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_gettimeofday=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_gettimeofday=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5
-echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
-if test $ac_cv_func_gettimeofday = yes; then
- :
-else
-
-case "$host" in
- *-*-mpeix*) ac_cv_func_gettimeofday=yes
- ;;
-esac
-fi
-
-case "$host" in
- *-pc-cygwin*)
- ;;
- *)
-for ac_func in getuid
-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
-
- ;;
-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
-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 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 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
-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
- *-*-sco3.2v5.0.*)
- # Just stubs. Idiots.
- ;;
- *)
-for ac_func in mkstemp
-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
-
- ;;
-esac
-
-for ac_func in mktime
-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
- *-*-aix[45]*)
- # Just a stub. Idiots.
- ;;
- *-*-irix[45]*)
- # Just a stub in "old" Irix. Idiots.
- ;;
- *-*-qnx*)
- # Apparently there but not working in QNX. Idiots?
- ;;
- *-*-sco3.2v5.0.*)
- # Just a stub. Idiots.
- ;;
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- # mlockall is there, as a #define calling memlk via <sys/mman.h>
- # Not easy to test for - cheat.
-
-for ac_func in memlk
-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
- ac_cv_func_mlockall='yes'
-fi
-done
-
-
-for ac_func in mlockall
-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 mlockall
-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
-
- ;;
-esac
-
-
-
-
-for ac_func in mrand48 srand48 nice nlist
-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
- *-*-solaris2.6)
- # Broken...
- ;;
- *)
-
-for ac_func in ntp_adjtime ntp_gettime
-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
-
- ;;
-esac
-
-
-
-
-
-for ac_func in plock pututline pututxline readlink rtprio
-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 "$ac_cv_func_mrand48" in
- yes) ;;
- *)
-for ac_func in random
-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
- LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
-fi
-done
-
- ;;
-esac
-case "$host" in
- *-*-aix[45]*)
- # Just a stub in AIX 4. Idiots.
- ;;
- *-*-solaris2.5*)
- # Just stubs in solaris2.5. Idiots.
- ;;
- *)
-for ac_func in sched_setscheduler
-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
-
- ;;
-esac
-
-
-
-
-for ac_func in setlinebuf setpgid setpriority setsid
-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 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
-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 settimeofday
-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
-
-case "$host" in
- *-*-mpeix*) ac_cv_func_settimeofday=yes
- ;;
-esac
-fi
-done
-
-
-
-for ac_func in setvbuf sigaction
-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 sigvec sigset sigsuspend stime strchr sysconf sysctl
-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 snprintf strdup strerror strstr
-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 timegm
-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
- *-*-aix[45]*)
- # Just stubs. Idiots.
- ;;
- *-*-netbsd1*)
- # Just stubs. Idiots.
- ;;
- *-*-netbsdelf1*)
- # Just stubs. Idiots.
- ;;
- *-*-openbsd*)
- # Just stubs. Idiots.
- ;;
- *)
-
-for ac_func in timer_create timer_settime
-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
-
- ;;
-esac
-case "$host" in
- *-pc-cygwin*)
- # I have no idea...
- ;;
- *)
-for ac_func in umask
-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
-
- ;;
-esac
-
-
-
-
-for ac_func in uname updwtmp updwtmpx vsprintf
-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
- *-*-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
- 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/time.h>
-int
-main ()
-{
-
-gettimeofday((struct timeval*)0,(struct timezone*)0);
-settimeofday((struct timeval*)0,(struct timezone*)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_func_Xettimeofday_nargs=2
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_Xettimeofday_nargs=1
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_Xettimeofday_nargs" >&5
-echo "${ECHO_T}$ac_cv_func_Xettimeofday_nargs" >&6
-if test $ac_cv_func_Xettimeofday_nargs = 1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SYSV_TIMEOFDAY 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking number of arguments taken by setpgrp()" >&5
-echo $ECHO_N "checking number of arguments taken by setpgrp()... $ECHO_C" >&6
-if test "${ac_cv_func_setpgrp_nargs+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. */
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-int
-main ()
-{
-setpgrp(0,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_func_setpgrp_nargs=2
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_setpgrp_nargs=0
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_nargs" >&5
-echo "${ECHO_T}$ac_cv_func_setpgrp_nargs" >&6
-if test $ac_cv_func_setpgrp_nargs = 0; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SETPGRP_0 1
-_ACEOF
-
-fi
-
-save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -I$srcdir/include"
-
-echo "$as_me:$LINENO: checking argument pointer type of qsort()'s compare function and base" >&5
-echo $ECHO_N "checking argument pointer type of qsort()'s compare function and base... $ECHO_C" >&6
-if test "${ac_cv_func_qsort_argtype+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 "l_stdlib.h"
-
-#ifdef HAVE_PROTOTYPES
-#define P(x) x
-#else
-#define P(x) ()
-#endif
-
-extern void *base;
-extern sortfunc P((const void *, const void *));
-int sortfunc(a, b)
- const void *a;
- const void *b; { return 0; }
-
-int
-main ()
-{
-
-qsort(base, 2, sizeof(char *), sortfunc);
-
- ;
- 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_func_qsort_argtype=void
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_qsort_argtype=char
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_qsort_argtype" >&5
-echo "${ECHO_T}$ac_cv_func_qsort_argtype" >&6
-case "$ac_cv_func_qsort_argtype" in
- void)
-
-cat >>confdefs.h <<\_ACEOF
-#define QSORT_USES_VOID_P 1
-_ACEOF
-
- ;;
-esac
-
-CFLAGS=$save_CFLAGS
-
-echo "$as_me:$LINENO: checking if we need to declare 'errno'" >&5
-echo $ECHO_N "checking if we need to declare 'errno'... $ECHO_C" >&6
-if test "${ac_cv_decl_errno+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. */
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-int
-main ()
-{
-errno = 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_decl_errno=no
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_decl_errno=yes
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_decl_errno" >&5
-echo "${ECHO_T}$ac_cv_decl_errno" >&6
-case "$ac_cv_decl_errno" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define DECL_ERRNO 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we may declare 'h_errno'" >&5
-echo $ECHO_N "checking if we may declare 'h_errno'... $ECHO_C" >&6
-if test "${ac_cv_decl_h_errno+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>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
-#endif
-int
-main ()
-{
-extern int h_errno;
- ;
- 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_decl_h_errno=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_decl_h_errno=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_decl_h_errno" >&5
-echo "${ECHO_T}$ac_cv_decl_h_errno" >&6
-case "$ac_cv_decl_h_errno" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define DECL_H_ERRNO 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if declaring 'char *sys_errlist[]' is ok" >&5
-echo $ECHO_N "checking if declaring 'char *sys_errlist[]' is ok... $ECHO_C" >&6
-if test "${ac_cv_decl_sys_errlist+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 <stdio.h>
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-int
-main ()
-{
-extern char *sys_errlist[];
-
- ;
- 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_decl_sys_errlist=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_decl_sys_errlist=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_decl_sys_errlist" >&5
-echo "${ECHO_T}$ac_cv_decl_sys_errlist" >&6
-case "$ac_cv_decl_sys_errlist" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define CHAR_SYS_ERRLIST 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if declaring 'syscall()' is ok" >&5
-echo $ECHO_N "checking if declaring 'syscall()' is ok... $ECHO_C" >&6
-if test "${ac_cv_decl_syscall+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. */
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_PROTOTYPES
-#define P(x) x
-#else
-#define P(x) ()
-#endif
-
-int
-main ()
-{
-extern int syscall P((int, ...));
- ;
- 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_decl_syscall=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_decl_syscall=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_decl_syscall" >&5
-echo "${ECHO_T}$ac_cv_decl_syscall" >&6
-case "$ac_cv_decl_syscall" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SYSCALL 1
-_ACEOF
- ;;
-esac
-
-case "$host" in
- *-*-aix4.3.*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_HSTRERROR_0 1
-_ACEOF
- # Needed for XLC under AIX 4.3.2
- ;;
- *-*-mpeix*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_ADJTIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_INET_NTOA_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MKTEMP_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MRAND48_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SELECT_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETITIMER_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SRAND48_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SYSLOG_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIMEOFDAY_0 1
-_ACEOF
-
- ;;
- *-*-osf[45]*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_PLOCK_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STIME_1 1
-_ACEOF
-
- ;;
- *-*-qnx*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_ADJTIME_0 1
-_ACEOF
-
- ;;
- *-*-riscos4*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_ADJTIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_BZERO_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_IOCTL_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_IPC_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MEMMOVE_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MKTEMP_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_RENAME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SELECT_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETITIMER_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETPRIORITY_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STDIO_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STRTOL_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SYSLOG_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIMEOFDAY_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TOLOWER_0 1
-_ACEOF
-
- ;;
- *-*-solaris2*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MKSTEMP_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETPRIORITY_1 1
-_ACEOF
-
- case "$host" in
- *-*-solaris2.4)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIMEOFDAY_0 1
-_ACEOF
-
- ;;
- esac
- ;;
- *-*-sunos4*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_ADJTIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_BCOPY_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_BZERO_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_IOCTL_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_IPC_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MEMMOVE_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MKTEMP_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MKSTEMP_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MRAND48_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_RENAME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SELECT_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETITIMER_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETPRIORITY_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SIGVEC_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SRAND48_0 1
-_ACEOF
-
- case "`basename $ac_cv_prog_CC`" in
- acc*) ;;
- *)
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STDIO_0 1
-_ACEOF
-
- ;;
- esac
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STRTOL_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SYSLOG_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIMEOFDAY_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TOLOWER_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TOUPPER_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STRERROR_0 1
-_ACEOF
-
- ;;
- *-*-ultrix4*)
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_ADJTIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_BZERO_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_CFSETISPEED_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_IOCTL_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_IPC_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MKTEMP_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_MRAND48_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_NLIST_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_PLOCK_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SELECT_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETITIMER_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SETPRIORITY_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SRAND48_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_STIME_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SYSLOG_0 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define DECL_TIMEOFDAY_0 1
-_ACEOF
-
- ;;
-esac
-
-case "$host" in
- *-*-sco3.2*)
-
-cat >>confdefs.h <<\_ACEOF
-#define TERMIOS_NEEDS__SVID3 1
-_ACEOF
-
- ;;
-esac
-
-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
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$host" in
- *-*-hpux[567]*)
- ans=yes
- ;;
-esac
-ac_cv_var_rcvbuf_slop=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_rcvbuf_slop" >&5
-echo "${ECHO_T}$ac_cv_var_rcvbuf_slop" >&6
-case "$ac_cv_var_rcvbuf_slop" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define NEED_RCVBUF_SLOP 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we will open the broadcast socket" >&5
-echo $ECHO_N "checking if we will open the broadcast socket... $ECHO_C" >&6
-if test "${ac_cv_var_open_bcast_socket+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=yes
-case "$host" in
- *-*-domainos)
- ans=no
- ;;
-esac
-ac_cv_var_open_bcast_socket=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_open_bcast_socket" >&5
-echo "${ECHO_T}$ac_cv_var_open_bcast_socket" >&6
-case "$ac_cv_var_open_bcast_socket" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define OPEN_BCAST_SOCKET 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we want the HPUX version of FindConfig()" >&5
-echo $ECHO_N "checking if we want the HPUX version of FindConfig()... $ECHO_C" >&6
-if test "${ac_cv_var_hpux_findconfig+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$host" in
- *-*-hpux*)
- ans=yes
- ;;
-esac
-ac_cv_var_hpux_findconfig=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_hpux_findconfig" >&5
-echo "${ECHO_T}$ac_cv_var_hpux_findconfig" >&6
-case "$ac_cv_var_hpux_findconfig" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define NEED_HPUX_FINDCONFIG 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if process groups are set with -pid" >&5
-echo $ECHO_N "checking if process groups are set with -pid... $ECHO_C" >&6
-if test "${ac_cv_arg_setpgrp_negpid+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *-*-hpux[567]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=yes
- ;;
- *-*-linux*)
- ans=yes
- ;;
- *-*-sunos3*)
- ans=yes
- ;;
- *-*-ultrix2*)
- ans=yes
- ;;
- *)
- ans=no
- ;;
-esac
-ac_cv_arg_setpgrp_negpid=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_arg_setpgrp_negpid" >&5
-echo "${ECHO_T}$ac_cv_arg_setpgrp_negpid" >&6
-case "$ac_cv_arg_setpgrp_negpid" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define UDP_BACKWARDS_SETOWN 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we need a ctty for F_SETOWN" >&5
-echo $ECHO_N "checking if we need a ctty for F_SETOWN... $ECHO_C" >&6
-if test "${ac_cv_func_ctty_for_f_setown+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *-*-bsdi[23]*)
- ans=yes
- ;;
- *-*-freebsd*)
- ans=yes
- ;;
- *-*-netbsd*)
- ans=yes
- ;;
- *-*-openbsd*)
- ans=yes
- ;;
- *-*-osf*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-ac_cv_func_ctty_for_f_setown=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_ctty_for_f_setown" >&5
-echo "${ECHO_T}$ac_cv_func_ctty_for_f_setown" >&6
-case "$ac_cv_func_ctty_for_f_setown" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define USE_FSETOWNCTTY 1
-_ACEOF
- ;;
-esac
-
-ntp_warning='GRONK'
-echo "$as_me:$LINENO: checking if we'll use clock_settime or settimeofday or stime" >&5
-echo $ECHO_N "checking if we'll use clock_settime or settimeofday or stime... $ECHO_C" >&6
-case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
- yes*)
- ntp_warning=''
- ans='clock_settime()'
- ;;
- noyes*)
- ntp_warning='But clock_settime() would be better (if we had it)'
- ans='settimeofday()'
- ;;
- nonoyes)
- ntp_warning='Which is the worst of the three'
- ans='stime()'
- ;;
- *)
- case "$build" in
- $host) ntp_warning='Which leaves us with nothing to use!'
- ans=none
- ;;
-esac
-esac
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-case "$ntp_warning" in
- '') ;;
- *) { echo "$as_me:$LINENO: WARNING: *** $ntp_warning ***" >&5
-echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we have a losing syscall()" >&5
-echo $ECHO_N "checking if we have a losing syscall()... $ECHO_C" >&6
-if test "${ac_cv_var_syscall_bug+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *-*-solaris2.4*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-ac_cv_var_syscall_bug=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_syscall_bug" >&5
-echo "${ECHO_T}$ac_cv_var_syscall_bug" >&6
-case "$ac_cv_var_syscall_bug" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define SYSCALL_BUG 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for Streams/TLI" >&5
-echo $ECHO_N "checking for Streams/TLI... $ECHO_C" >&6
-if test "${ac_cv_var_streams_tli+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$ac_cv_header_sys_stropts_h" in
- yes)
- ans=no
- # There must be a better way...
- case "$host" in
- *-*-ptx*)
- ans=yes
- ;;
- esac
- ;;
- esac
- ac_cv_var_streams_tli=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_streams_tli" >&5
-echo "${ECHO_T}$ac_cv_var_streams_tli" >&6
-case "$ac_cv_var_streams_tli" in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define STREAMS_TLI 1
-_ACEOF
-
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for SIGIO" >&5
-echo $ECHO_N "checking for SIGIO... $ECHO_C" >&6
-if test "${ac_cv_hdr_def_sigio+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 <signal.h>
-#ifdef SIGIO
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_hdr_def_sigio=yes
-else
- ac_cv_hdr_def_sigio=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_hdr_def_sigio" >&5
-echo "${ECHO_T}$ac_cv_hdr_def_sigio" >&6
-
-echo "$as_me:$LINENO: checking if we want to use signalled IO" >&5
-echo $ECHO_N "checking if we want to use signalled IO... $ECHO_C" >&6
-if test "${ac_cv_var_signalled_io+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$ac_cv_hdr_def_sigio" in
- yes)
- ans=yes
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ans=no
- ;;
- *-convex-*)
- ans=no
- ;;
- *-dec-*)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-univel-sysv*)
- ans=no
- ;;
- *-*-irix6*)
- ans=no
- ;;
- *-*-freebsd*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- esac
- ;;
-esac
-ac_cv_var_signalled_io=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_signalled_io" >&5
-echo "${ECHO_T}$ac_cv_var_signalled_io" >&6
-case "$ac_cv_var_signalled_io" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SIGNALED_IO 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for SIGPOLL" >&5
-echo $ECHO_N "checking for SIGPOLL... $ECHO_C" >&6
-if test "${ac_cv_hdr_def_sigpoll+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 <signal.h>
-#ifdef SIGPOLL
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_hdr_def_sigpoll=yes
-else
- ac_cv_hdr_def_sigpoll=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_hdr_def_sigpoll" >&5
-echo "${ECHO_T}$ac_cv_hdr_def_sigpoll" >&6
-
-echo "$as_me:$LINENO: checking for SIGSYS" >&5
-echo $ECHO_N "checking for SIGSYS... $ECHO_C" >&6
-if test "${ac_cv_hdr_def_sigsys+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 <signal.h>
-#ifdef SIGSYS
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_hdr_def_sigsys=yes
-else
- ac_cv_hdr_def_sigsys=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_hdr_def_sigsys" >&5
-echo "${ECHO_T}$ac_cv_hdr_def_sigsys" >&6
-
-echo "$as_me:$LINENO: checking if we can use SIGPOLL for UDP I/O" >&5
-echo $ECHO_N "checking if we can use SIGPOLL for UDP I/O... $ECHO_C" >&6
-if test "${ac_cv_var_use_udp_sigpoll+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$ac_cv_hdr_def_sigpoll" in
- yes)
- case "$host" in
- mips-sgi-irix*)
- ans=no
- ;;
- vax-dec-bsd)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-*-aix[45]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
-esac
-ac_cv_var_use_udp_sigpoll=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_use_udp_sigpoll" >&5
-echo "${ECHO_T}$ac_cv_var_use_udp_sigpoll" >&6
-case "$ac_cv_var_use_udp_sigpoll" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define USE_UDP_SIGPOLL 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we can use SIGPOLL for TTY I/O" >&5
-echo $ECHO_N "checking if we can use SIGPOLL for TTY I/O... $ECHO_C" >&6
-if test "${ac_cv_var_use_tty_sigpoll+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$ac_cv_hdr_def_sigpoll" in
- yes)
- case "$host" in
- mips-sgi-irix*)
- ans=no
- ;;
- vax-dec-bsd)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-*-aix[45]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
-esac
-ac_cv_var_use_tty_sigpoll=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_use_tty_sigpoll" >&5
-echo "${ECHO_T}$ac_cv_var_use_tty_sigpoll" >&6
-case "$ac_cv_var_use_tty_sigpoll" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define USE_TTY_SIGPOLL 1
-_ACEOF
- ;;
-esac
-
-case "$ac_cv_header_sys_sio_h" in
- yes)
- echo "$as_me:$LINENO: checking sys/sio.h for TIOCDCDTIMESTAMP" >&5
-echo $ECHO_N "checking sys/sio.h for TIOCDCDTIMESTAMP... $ECHO_C" >&6
-if test "${ac_cv_hdr_def_tiocdcdtimestamp+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/sio.h>
-#ifdef TIOCDCDTIMESTAMP
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_hdr_def_tiocdcdtimestamp=yes
-else
- ac_cv_hdr_def_tiocdcdtimestamp=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_hdr_def_tiocdcdtimestamp" >&5
-echo "${ECHO_T}$ac_cv_hdr_def_tiocdcdtimestamp" >&6
- ;;
-esac
-
-case "$ac_cv_hdr_def_tiocdcdtimestamp" in
- yes)
- ac_cv_var_oncore_ok=yes
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if nlist() values might require extra indirection" >&5
-echo $ECHO_N "checking if nlist() values might require extra indirection... $ECHO_C" >&6
-if test "${ac_cv_var_nlist_extra_indirection+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$host" in
- *-*-aix*)
- ans=yes
- ;;
-esac
-ac_cv_var_nlist_extra_indirection=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_nlist_extra_indirection" >&5
-echo "${ECHO_T}$ac_cv_var_nlist_extra_indirection" >&6
-case "$ac_cv_var_nlist_extra_indirection" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define NLIST_EXTRA_INDIRECTION 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for a minimum recommended value of tickadj" >&5
-echo $ECHO_N "checking for a minimum recommended value of tickadj... $ECHO_C" >&6
-if test "${ac_cv_var_min_rec_tickadj+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$host" in
- *-*-aix*)
- ans=40
- ;;
-esac
-ac_cv_var_min_rec_tickadj=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_min_rec_tickadj" >&5
-echo "${ECHO_T}$ac_cv_var_min_rec_tickadj" >&6
-case "$ac_cv_var_min_rec_tickadj" in
- ''|no) ;;
- *)
-cat >>confdefs.h <<_ACEOF
-#define MIN_REC_TICKADJ $ac_cv_var_min_rec_tickadj
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if the TTY code permits PARENB and IGNPAR" >&5
-echo $ECHO_N "checking if the TTY code permits PARENB and IGNPAR... $ECHO_C" >&6
-if test "${ac_cv_var_no_parenb_ignpar+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
-case "$host" in
- i?86-*-linux*)
- ans=yes
- ;;
- mips-sgi-irix*)
- ans=yes
- ;;
- i?86-*-freebsd[123].*)
- ;;
- i?86-*-freebsd*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
-esac
-ac_cv_var_no_parenb_ignpar=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_no_parenb_ignpar" >&5
-echo "${ECHO_T}$ac_cv_var_no_parenb_ignpar" >&6
-case "$ac_cv_var_no_parenb_ignpar" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define NO_PARENB_IGNPAR 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we're including debugging code" >&5
-echo $ECHO_N "checking if we're including debugging code... $ECHO_C" >&6
-# Check whether --enable-debugging or --disable-debugging was given.
-if test "${enable_debugging+set}" = set; then
- enableval="$enable_debugging"
- ntp_ok=$enableval
-else
- ntp_ok=yes
-fi;
-if test "$ntp_ok" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define DEBUG 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking for a the number of minutes in a DST adjustment" >&5
-echo $ECHO_N "checking for a the number of minutes in a DST adjustment... $ECHO_C" >&6
-# Check whether --enable-dst_minutes or --disable-dst_minutes was given.
-if test "${enable_dst_minutes+set}" = set; then
- enableval="$enable_dst_minutes"
- ans=$enableval
-else
- ans=60
-fi;
-
-cat >>confdefs.h <<_ACEOF
-#define DSTMINUTES $ans
-_ACEOF
-
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-echo "$as_me:$LINENO: checking if we have the tty_clk line discipline/streams module" >&5
-echo $ECHO_N "checking if we have the tty_clk line discipline/streams module... $ECHO_C" >&6
-if test "${ac_cv_var_tty_clk+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
- *yes*) ac_cv_var_tty_clk=yes ;;
- esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_tty_clk" >&5
-echo "${ECHO_T}$ac_cv_var_tty_clk" >&6
-case "$ac_cv_var_tty_clk" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define TTYCLK 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for the ppsclock streams module" >&5
-echo $ECHO_N "checking for the ppsclock streams module... $ECHO_C" >&6
-if test "${ac_cv_var_ppsclock+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_ppsclock" >&5
-echo "${ECHO_T}$ac_cv_var_ppsclock" >&6
-case "$ac_cv_var_ppsclock" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define PPS 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for kernel multicast support" >&5
-echo $ECHO_N "checking for kernel multicast support... $ECHO_C" >&6
-if test "${ac_cv_var_mcast+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_var_mcast=no
- case "$host" in
- i386-sequent-sysv4) ;;
- *) 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 <netinet/in.h>
-#ifdef IP_ADD_MEMBERSHIP
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_var_mcast=yes
-fi
-rm -f conftest*
- ;;
- esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_mcast" >&5
-echo "${ECHO_T}$ac_cv_var_mcast" >&6
-case "$ac_cv_var_mcast" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define MCAST 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking availability of ntp_{adj,get}time()" >&5
-echo $ECHO_N "checking availability of ntp_{adj,get}time()... $ECHO_C" >&6
-if test "${ac_cv_var_ntp_syscalls+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_var_ntp_syscalls=no
- case "$ac_cv_func___adjtimex" in
- yes)
- ac_cv_var_ntp_syscalls=libc
- ;;
- *) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in
- yesyes)
- ac_cv_var_ntp_syscalls=libc
- ;;
- *) 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/syscall.h>
-#if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_var_ntp_syscalls=kernel
-fi
-rm -f conftest*
-
- ;;
- esac
- ;;
- esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_ntp_syscalls" >&5
-echo "${ECHO_T}$ac_cv_var_ntp_syscalls" >&6
-case "$ac_cv_var_ntp_syscalls" in
- libc)
-
-cat >>confdefs.h <<\_ACEOF
-#define NTP_SYSCALLS_LIBC 1
-_ACEOF
-
- ;;
- kernel)
-
-cat >>confdefs.h <<\_ACEOF
-#define NTP_SYSCALLS_STD 1
-_ACEOF
-
- ;;
- *)
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if sys/timex.h has STA_FLL" >&5
-echo $ECHO_N "checking if sys/timex.h has STA_FLL... $ECHO_C" >&6
-if test "${ac_cv_var_sta_fll+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/timex.h>
-#ifdef STA_FLL
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ac_cv_var_sta_fll=yes
-else
- ac_cv_var_sta_fll=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_sta_fll" >&5
-echo "${ECHO_T}$ac_cv_var_sta_fll" >&6
-
-echo "$as_me:$LINENO: checking if we have kernel PLL support" >&5
-echo $ECHO_N "checking if we have kernel PLL support... $ECHO_C" >&6
-if test "${ac_cv_var_kernel_pll+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in
- *no*)
- ac_cv_var_kernel_pll=no
- ;;
- *) ac_cv_var_kernel_pll=yes
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_kernel_pll" >&5
-echo "${ECHO_T}$ac_cv_var_kernel_pll" >&6
-case "$ac_cv_var_kernel_pll" in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define KERNEL_PLL 1
-_ACEOF
-
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if SIOCGIFCONF returns buffer size in the buffer" >&5
-echo $ECHO_N "checking if SIOCGIFCONF returns buffer size in the buffer... $ECHO_C" >&6
-if test "${ac_cv_var_size_returned_in_buffer+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
- case "$host" in
- *-fujitsu-uxp*)
- ans=yes
- ;;
- *-ncr-sysv4*)
- ans=yes
- ;;
- *-univel-sysv*)
- ans=yes
- ;;
- esac
- ac_cv_var_size_returned_in_buffer=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_size_returned_in_buffer" >&5
-echo "${ECHO_T}$ac_cv_var_size_returned_in_buffer" >&6
-case "$ac_cv_var_size_returned_in_buffer" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define SIZE_RETURNED_IN_BUFFER 1
-_ACEOF
- ;;
-esac
-
-
-# Check for ioctls TIOCGPPSEV
-echo "$as_me:$LINENO: checking ioctl TIOCGPPSEV" >&5
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <termios.h>
-#ifdef TIOCGPPSEV
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=yes
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-else
-ntp_ok=no
-fi
-if test "$ntp_ok" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIOCGPPSEV 1
-_ACEOF
-
- ac_cv_var_oncore_ok=yes
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Check for ioctls TIOCSPPS
-echo "$as_me:$LINENO: checking ioctl TIOCSPPS" >&5
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <termios.h>
-#ifdef TIOCSPPS
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=yes
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-else
- ntp_ok=no
-fi
-
-if test "$ntp_ok" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIOCSPPS 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Check for ioctls CIOGETEV
-echo "$as_me:$LINENO: checking ioctl CIOGETEV" >&5
-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"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/ppsclock.h>
-#ifdef CIOGETEV
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=yes
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-else
-ntp_ok=no
-fi
-if test "$ntp_ok" = "yes"; then
- ac_cv_var_oncore_ok=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CIOGETEV 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-
-# ATOM/PPSAPI stuff.
-
-# ATOM used to require struct timespec, but that's been fixed now.
-
-# case "$ac_cv_struct_timespec" in
-# 'yes')
-# ac_cv_var_atom_ok=yes
-# ;;
-# esac
-ac_cv_var_atom_ok=yes
-
-# Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
-
-# The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
-
-# The PPSAPI needs ATOM
-
-# The PPSAPI needs struct timespec.
-
-case "$ac_cv_c_inline$ac_cv_struct_timespec$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
- inlineyes*yes*)
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PPSAPI 1
-_ACEOF
-
- ac_cv_var_oncore_ok=yes
- ac_cv_var_ripe_ncc_ok=yes
- ac_cv_var_jupiter_ok=yes
- ;;
-esac
-
-# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
-if test "${ac_cv_header_linux_serial_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/serial.h" >&5
-echo $ECHO_N "checking for linux/serial.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_serial_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_serial_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_serial_h" >&6
-else
- # Is the header compilable?
-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"
-/* 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
-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 linux/serial.h presence" >&5
-echo $ECHO_N "checking linux/serial.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 <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=$?
- 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: 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;}
- (
- 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;}
- (
- 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
-if test "${ac_cv_header_linux_serial_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_serial_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_serial_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_serial_h" >&6
-
-fi
-
-
-echo "$as_me:$LINENO: checking ioctl TIOCGSERIAL" >&5
-echo $ECHO_N "checking ioctl TIOCGSERIAL... $ECHO_C" >&6
-case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
- yesyes)
- 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/time.h>
-typedef int u_int;
-
-#include <sys/ppsclock.h>
-#include <linux/serial.h>
-
-#ifdef TIOCGSERIAL
-#ifdef TIOCSSERIAL
-#ifdef ASYNC_PPS_CD_POS
-#ifdef ASYNC_PPS_CD_NEG
-#ifdef CIOGETEV
- yes
-#endif
-#endif
-#endif
-#endif
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=yes
-fi
-rm -f conftest*
-
- ;;
- *)
- ntp_ok=no
- ;;
-esac
-if test "$ntp_ok" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TIO_SERIAL_STUFF 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Check for SHMEM_STATUS support
-echo "$as_me:$LINENO: checking SHMEM_STATUS support" >&5
-echo $ECHO_N "checking SHMEM_STATUS support... $ECHO_C" >&6
-case "$ac_cv_header_sys_mman_h" in
- yes) ntp_ok=yes ;;
- *) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ONCORE_SHMEM_STATUS 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-
-ntp_refclock=no
-
-# HPUX only, and by explicit request
-echo "$as_me:$LINENO: checking Datum/Bancomm bc635/VME interface" >&5
-echo $ECHO_N "checking Datum/Bancomm bc635/VME interface... $ECHO_C" >&6
-# Check whether --enable-BANCOMM or --disable-BANCOMM was given.
-if test "${enable_BANCOMM+set}" = set; then
- enableval="$enable_BANCOMM"
- ntp_ok=$enableval
-else
- ntp_ok=no
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_BANC 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$host" in
- yes*-*-hpux*) ;;
- yes*) { echo "$as_me:$LINENO: WARNING: *** But the expected answer is... no ***" >&5
-echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
-esac
-
-#HPUX only, and only by explicit request
-echo "$as_me:$LINENO: checking TrueTime GPS receiver/VME interface" >&5
-echo $ECHO_N "checking TrueTime GPS receiver/VME interface... $ECHO_C" >&6
-# Check whether --enable-GPSVME or --disable-GPSVME was given.
-if test "${enable_GPSVME+set}" = set; then
- enableval="$enable_GPSVME"
- ntp_ok=$enableval
-else
- ntp_ok=no
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_GPSVME 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$host" in
- yes*-*-hpux*) ;;
- yes*) { 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 for PCL720 clock support" >&5
-echo $ECHO_N "checking for PCL720 clock support... $ECHO_C" >&6
-case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
- yesyesyes)
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_PPS720 1
-_ACEOF
-
- ans=yes
- ;;
- *)
- ans=no
- ;;
-esac
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&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.
-if test "${enable_all_clocks+set}" = set; then
- enableval="$enable_all_clocks"
- ntp_eac=$enableval
-else
- ntp_eac=yes
-fi;
-echo "$as_me:$LINENO: result: $ntp_eac" >&5
-echo "${ECHO_T}$ntp_eac" >&6
-
-echo "$as_me:$LINENO: checking if we have support for PARSE clocks" >&5
-echo $ECHO_N "checking if we have support for PARSE clocks... $ECHO_C" >&6
-case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
- yes*yes*)
- ntp_canparse=yes
- ;;
- *) ntp_canparse=no
- ;;
-esac
-echo "$as_me:$LINENO: result: $ntp_canparse" >&5
-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$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
- *yes*)
- ntp_canaudio=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_AUDIO
-_ACEOF
-
- ;;
- *) ntp_canaudio=no ;;
-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
-# Check whether --enable-ACTS or --disable-ACTS was given.
-if test "${enable_ACTS+set}" = set; then
- enableval="$enable_ACTS"
- ntp_ok=$enableval
-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 <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=$ntp_eac
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ACTS 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Arbiter 1088A/B GPS receiver" >&5
-echo $ECHO_N "checking Arbiter 1088A/B GPS receiver... $ECHO_C" >&6
-# Check whether --enable-ARBITER or --disable-ARBITER was given.
-if test "${enable_ARBITER+set}" = set; then
- enableval="$enable_ARBITER"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ARBITER 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Arcron MSF receiver" >&5
-echo $ECHO_N "checking Arcron MSF receiver... $ECHO_C" >&6
-# Check whether --enable-ARCRON_MSF or --disable-ARCRON_MSF was given.
-if test "${enable_ARCRON_MSF+set}" = set; then
- enableval="$enable_ARCRON_MSF"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ARCRON_MSF 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Austron 2200A/2201A GPS receiver" >&5
-echo $ECHO_N "checking Austron 2200A/2201A GPS receiver... $ECHO_C" >&6
-# Check whether --enable-AS2201 or --disable-AS2201 was given.
-if test "${enable_AS2201+set}" = set; then
- enableval="$enable_AS2201"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_AS2201 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking ATOM PPS interface" >&5
-echo $ECHO_N "checking ATOM PPS interface... $ECHO_C" >&6
-# Check whether --enable-ATOM or --disable-ATOM was given.
-if test "${enable_ATOM+set}" = set; then
- enableval="$enable_ATOM"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-case "$ac_cv_var_atom_ok" in
- no) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ATOM 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Chrono-log K-series WWVB receiver" >&5
-echo $ECHO_N "checking Chrono-log K-series WWVB receiver... $ECHO_C" >&6
-# Check whether --enable-CHRONOLOG or --disable-CHRONOLOG was given.
-if test "${enable_CHRONOLOG+set}" = set; then
- enableval="$enable_CHRONOLOG"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_CHRONOLOG 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking CHU modem/decoder" >&5
-echo $ECHO_N "checking CHU modem/decoder... $ECHO_C" >&6
-# Check whether --enable-CHU or --disable-CHU was given.
-if test "${enable_CHU+set}" = set; then
- enableval="$enable_CHU"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_CHU 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-ac_refclock_chu=$ntp_ok
-
-echo "$as_me:$LINENO: checking CHU audio/decoder" >&5
-echo $ECHO_N "checking CHU audio/decoder... $ECHO_C" >&6
-# Check whether --enable-AUDIO-CHU or --disable-AUDIO-CHU was given.
-if test "${enable_AUDIO_CHU+set}" = set; then
- enableval="$enable_AUDIO_CHU"
- ntp_ok=$enableval
-else
- case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in
- *no*) ntp_ok=no ;;
- *) ntp_ok=yes ;;
-esac
-fi;
-if test "$ntp_ok" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define AUDIO_CHU 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-# We used to check for sunos/solaris target...
-case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in
- yes*no*) { echo "$as_me:$LINENO: WARNING: *** But the expected answer is...no ***" >&5
-echo "$as_me: WARNING: *** But the expected answer is...no ***" >&2;} ;;
-esac
-
-# Not under HP-UX
-echo "$as_me:$LINENO: checking Datum Programmable Time System" >&5
-echo $ECHO_N "checking Datum Programmable Time System... $ECHO_C" >&6
-# Check whether --enable-DATUM or --disable-DATUM was given.
-if test "${enable_DATUM+set}" = set; then
- enableval="$enable_DATUM"
- ntp_ok=$enableval
-else
- case "$ac_cv_header_termios_h" in
- yes)
- ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_DATUM 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Dumb generic hh:mm:ss local clock" >&5
-echo $ECHO_N "checking Dumb generic hh:mm:ss local clock... $ECHO_C" >&6
-# Check whether --enable-DUMBCLOCK or --disable-DUMBCLOCK was given.
-if test "${enable_DUMBCLOCK+set}" = set; then
- enableval="$enable_DUMBCLOCK"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_DUMBCLOCK 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Forum Graphic GPS" >&5
-echo $ECHO_N "checking Forum Graphic GPS... $ECHO_C" >&6
-# Check whether --enable-FG or --disable-FG was given.
-if test "${enable_FG+set}" = set; then
- enableval="$enable_FG"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_FG 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Requires modem control
-echo "$as_me:$LINENO: checking Heath GC-1000 WWV/WWVH receiver" >&5
-echo $ECHO_N "checking Heath GC-1000 WWV/WWVH receiver... $ECHO_C" >&6
-# Check whether --enable-HEATH or --disable-HEATH was given.
-if test "${enable_HEATH+set}" = set; then
- enableval="$enable_HEATH"
- ntp_ok=$enableval
-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 <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=$ntp_eac
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_HEATH 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking for hopf serial clock device" >&5
-echo $ECHO_N "checking for hopf serial clock device... $ECHO_C" >&6
-# Check whether --enable-HOPFSERIAL or --disable-HOPFSERIAL was given.
-if test "${enable_HOPFSERIAL+set}" = set; then
- enableval="$enable_HOPFSERIAL"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_HOPF_SERIAL 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking for hopf PCI clock 6039" >&5
-echo $ECHO_N "checking for hopf PCI clock 6039... $ECHO_C" >&6
-# Check whether --enable-HOPFPCI or --disable-HOPFPCI was given.
-if test "${enable_HOPFPCI+set}" = set; then
- enableval="$enable_HOPFPCI"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_HOPF_PCI 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking HP 58503A GPS receiver" >&5
-echo $ECHO_N "checking HP 58503A GPS receiver... $ECHO_C" >&6
-# Check whether --enable-HPGPS or --disable-HPGPS was given.
-if test "${enable_HPGPS+set}" = set; then
- enableval="$enable_HPGPS"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_HPGPS 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking IRIG audio decoder" >&5
-echo $ECHO_N "checking IRIG audio decoder... $ECHO_C" >&6
-# Check whether --enable-IRIG or --disable-IRIG was given.
-if test "${enable_IRIG+set}" = set; then
- enableval="$enable_IRIG"
- ntp_ok=$enableval
-else
- case "$ntp_eac$ntp_canaudio" 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_IRIG 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canaudio" in
- yesno) { 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 for JJY receiver" >&5
-echo $ECHO_N "checking for JJY receiver... $ECHO_C" >&6
-# Check whether --enable-JJY or --disable-JJY was given.
-if test "${enable_JJY+set}" = set; then
- enableval="$enable_JJY"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_JJY 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-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.
-if test "${enable_JUPITER+set}" = set; then
- enableval="$enable_JUPITER"
- ntp_ok=$enableval
-else
- 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
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_JUPITER 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-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
-# Check whether --enable-LEITCH or --disable-LEITCH was given.
-if test "${enable_LEITCH+set}" = set; then
- enableval="$enable_LEITCH"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_LEITCH 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking local clock reference" >&5
-echo $ECHO_N "checking local clock reference... $ECHO_C" >&6
-# Check whether --enable-LOCAL-CLOCK or --disable-LOCAL-CLOCK was given.
-if test "${enable_LOCAL_CLOCK+set}" = set; then
- enableval="$enable_LOCAL_CLOCK"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_LOCAL 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking EES M201 MSF receiver" >&5
-echo $ECHO_N "checking EES M201 MSF receiver... $ECHO_C" >&6
-# Check whether --enable-MSFEES or --disable-MSFEES was given.
-if test "${enable_MSFEES+set}" = set; then
- enableval="$enable_MSFEES"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_MSFEES 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Not Ultrix
-echo "$as_me:$LINENO: checking Magnavox MX4200 GPS receiver" >&5
-echo $ECHO_N "checking Magnavox MX4200 GPS receiver... $ECHO_C" >&6
-# Check whether --enable-MX4200 or --disable-MX4200 was given.
-if test "${enable_MX4200+set}" = set; then
- enableval="$enable_MX4200"
- ntp_ok=$enableval
-else
- case "$ac_cv_var_ppsclock" in
- yes) ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_MX4200 1
-_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 for NeoClock4X receiver" >&5
-echo $ECHO_N "checking for NeoClock4X receiver... $ECHO_C" >&6
-# Check whether --enable-NEOCLOCK4X or --disable-NEOCLOCK4X was given.
-if test "${enable_NEOCLOCK4X+set}" = set; then
- enableval="$enable_NEOCLOCK4X"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_NEOCLOCK4X 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking NMEA GPS receiver" >&5
-echo $ECHO_N "checking NMEA GPS receiver... $ECHO_C" >&6
-# Check whether --enable-NMEA or --disable-NMEA was given.
-if test "${enable_NMEA+set}" = set; then
- enableval="$enable_NMEA"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_NMEA 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking for ONCORE Motorola VP/UT Oncore GPS" >&5
-echo $ECHO_N "checking for ONCORE Motorola VP/UT Oncore GPS... $ECHO_C" >&6
-# Check whether --enable-ONCORE or --disable-ONCORE was given.
-if test "${enable_ONCORE+set}" = set; then
- enableval="$enable_ONCORE"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-case "$ac_cv_var_oncore_ok" in
- no) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ONCORE 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking for Palisade clock" >&5
-echo $ECHO_N "checking for Palisade clock... $ECHO_C" >&6
-# Check whether --enable-PALISADE or --disable-PALISADE was given.
-if test "${enable_PALISADE+set}" = set; then
- enableval="$enable_PALISADE"
- ntp_ok=$enableval
-else
- case "$ac_cv_header_termios_h" in
- yes)
- ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac
-fi;
-
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_PALISADE 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Conrad parallel port radio clock" >&5
-echo $ECHO_N "checking Conrad parallel port radio clock... $ECHO_C" >&6
-# Check whether --enable-PCF or --disable-PCF was given.
-if test "${enable_PCF+set}" = set; then
- enableval="$enable_PCF"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_PCF 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking PST/Traconex 1020 WWV/WWVH receiver" >&5
-echo $ECHO_N "checking PST/Traconex 1020 WWV/WWVH receiver... $ECHO_C" >&6
-# Check whether --enable-PST or --disable-PST was given.
-if test "${enable_PST+set}" = set; then
- enableval="$enable_PST"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_PST 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Requires modem control
-echo "$as_me:$LINENO: checking PTB modem service" >&5
-echo $ECHO_N "checking PTB modem service... $ECHO_C" >&6
-# Check whether --enable-PTBACTS or --disable-PTBACTS was given.
-if test "${enable_PTBACTS+set}" = set; then
- enableval="$enable_PTBACTS"
- ntp_ok=$enableval
-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 <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=$ntp_eac
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_PTBACTS 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking RIPENCC specific Trimble driver" >&5
-echo $ECHO_N "checking RIPENCC specific Trimble driver... $ECHO_C" >&6
-# Check whether --enable-RIPENCC or --disable-RIPENCC was given.
-if test "${enable_RIPENCC+set}" = set; then
- enableval="$enable_RIPENCC"
- ntp_ok=$enableval
-else
- ntp_ok=no
-fi;
-# 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
-case "$ac_cv_var_ripe_ncc_ok" in
- no) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_RIPENCC
-_ACEOF
-
-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.
-if test "${enable_SPECTRACOM+set}" = set; then
- enableval="$enable_SPECTRACOM"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_SPECTRACOM 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" >&5
-echo $ECHO_N "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... $ECHO_C" >&6
-# Check whether --enable-TPRO or --disable-TPRO was given.
-if test "${enable_TPRO+set}" = set; then
- enableval="$enable_TPRO"
- ntp_ok=$enableval
-else
- case "$ac_cv_header_sys_tpro_h" in
- yes)
- ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_TPRO 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ac_cv_header_sys_tpro" in
- yesno) { 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 TRAK 8810 GPS receiver" >&5
-echo $ECHO_N "checking TRAK 8810 GPS receiver... $ECHO_C" >&6
-# Check whether --enable-TRAK or --disable-TRAK was given.
-if test "${enable_TRAK+set}" = set; then
- enableval="$enable_TRAK"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_TRAK 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Not on a vax-dec-bsd
-echo "$as_me:$LINENO: checking Kinemetrics/TrueTime receivers" >&5
-echo $ECHO_N "checking Kinemetrics/TrueTime receivers... $ECHO_C" >&6
-# Check whether --enable-TRUETIME or --disable-TRUETIME was given.
-if test "${enable_TRUETIME+set}" = set; then
- enableval="$enable_TRUETIME"
- ntp_ok=$enableval
-else
- case "$host" in
- vax-dec-bsd)
- ntp_ok=no
- ;;
- *)
- ntp_ok=$ntp_eac
- ;;
- esac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_TRUETIME 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$host" in
- yesvax-dec-bsd) { 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 TrueTime 560 IRIG-B decoder" >&5
-echo $ECHO_N "checking TrueTime 560 IRIG-B decoder... $ECHO_C" >&6
-# Check whether --enable-TT560 or --disable-TT560 was given.
-if test "${enable_TT560+set}" = set; then
- enableval="$enable_TT560"
- ntp_ok=$enableval
-else
- ntp_ok=no
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_TT560
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking Ultralink M320 WWVB receiver" >&5
-echo $ECHO_N "checking Ultralink M320 WWVB receiver... $ECHO_C" >&6
-# Check whether --enable-ULINK or --disable-ULINK was given.
-if test "${enable_ULINK+set}" = set; then
- enableval="$enable_ULINK"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ULINK 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-# Requires modem control
-echo "$as_me:$LINENO: checking USNO modem service" >&5
-echo $ECHO_N "checking USNO modem service... $ECHO_C" >&6
-# Check whether --enable-USNO or --disable-USNO was given.
-if test "${enable_USNO+set}" = set; then
- enableval="$enable_USNO"
- ntp_ok=$enableval
-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 <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- ntp_ok=$ntp_eac
-else
- ntp_ok=no
-fi
-rm -f conftest*
-
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_USNO 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-
-echo "$as_me:$LINENO: checking WWV receiver" >&5
-echo $ECHO_N "checking WWV receiver... $ECHO_C" >&6
-# Check whether --enable-WWV or --disable-WWV was given.
-if test "${enable_WWV+set}" = set; then
- enableval="$enable_WWV"
- ntp_ok=$enableval
-else
- case "$ntp_eac$ntp_canaudio" 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_WWV 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canaudio" in
- yesno) { 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 for Zyfer receiver" >&5
-echo $ECHO_N "checking for Zyfer receiver... $ECHO_C" >&6
-# Check whether --enable-ZYFER or --disable-ZYFER was given.
-if test "${enable_ZYFER+set}" = set; then
- enableval="$enable_ZYFER"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eac
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ZYFER 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 PARSE clocks" >&5
-echo $ECHO_N "checking for default inclusion of all suitable PARSE clocks... $ECHO_C" >&6
-# Check whether --enable-parse-clocks or --disable-parse-clocks was given.
-if test "${enable_parse_clocks+set}" = set; then
- enableval="$enable_parse_clocks"
- ntp_eapc=$enableval
-else
- case "$ntp_eac" in
- yes) ntp_eapc=$ntp_canparse ;;
- *) ntp_eapc=no ;;
- esac
- ntp_eapc=no
-fi;
-echo "$as_me:$LINENO: result: $ntp_eapc" >&5
-echo "${ECHO_T}$ntp_eapc" >&6
-
-case "$ntp_eac$ntp_eapc$ntp_canparse" in
- noyes*)
- { { echo "$as_me:$LINENO: error: \"--enable-parse-clocks\" requires \"--enable-all-clocks\"." >&5
-echo "$as_me: error: \"--enable-parse-clocks\" requires \"--enable-all-clocks\"." >&2;}
- { (exit 1); exit 1; }; }
- ;;
- yesyesno)
- { { echo "$as_me:$LINENO: error: You said \"--enable-parse-clocks\" but PARSE isn't supported on this platform!" >&5
-echo "$as_me: error: You said \"--enable-parse-clocks\" but PARSE isn't supported on this platform!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- *) ;;
-esac
-
-ntp_libparse=no
-ntp_parseutil=no
-ntp_rawdcf=no
-
-echo "$as_me:$LINENO: checking Diem Computime Radio Clock" >&5
-echo $ECHO_N "checking Diem Computime Radio Clock... $ECHO_C" >&6
-# Check whether --enable-COMPUTIME or --disable-COMPUTIME was given.
-if test "${enable_COMPUTIME+set}" = set; then
- enableval="$enable_COMPUTIME"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_COMPUTIME 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking ELV/DCF7000 clock" >&5
-echo $ECHO_N "checking ELV/DCF7000 clock... $ECHO_C" >&6
-# Check whether --enable-DCF7000 or --disable-DCF7000 was given.
-if test "${enable_DCF7000+set}" = set; then
- enableval="$enable_DCF7000"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_DCF7000 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking HOPF 6021 clock" >&5
-echo $ECHO_N "checking HOPF 6021 clock... $ECHO_C" >&6
-# Check whether --enable-HOPF6021 or --disable-HOPF6021 was given.
-if test "${enable_HOPF6021+set}" = set; then
- enableval="$enable_HOPF6021"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_HOPF6021 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking Meinberg clocks" >&5
-echo $ECHO_N "checking Meinberg clocks... $ECHO_C" >&6
-# Check whether --enable-MEINBERG or --disable-MEINBERG was given.
-if test "${enable_MEINBERG+set}" = set; then
- enableval="$enable_MEINBERG"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_MEINBERG 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking DCF77 raw time code" >&5
-echo $ECHO_N "checking DCF77 raw time code... $ECHO_C" >&6
-# Check whether --enable-RAWDCF or --disable-RAWDCF was given.
-if test "${enable_RAWDCF+set}" = set; then
- enableval="$enable_RAWDCF"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_parseutil=yes
- ntp_refclock=yes
- ntp_rawdcf=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_RAWDCF 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-case "$ntp_rawdcf" in
- yes)
- echo "$as_me:$LINENO: checking if we must enable parity for RAWDCF" >&5
-echo $ECHO_N "checking if we must enable parity for RAWDCF... $ECHO_C" >&6
-if test "${ac_cv_var_rawdcf_parity+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=no
- case "$host" in
- *-*-linux*)
- ans=yes
- ;;
- esac
- ac_cv_var_rawdcf_parity=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_rawdcf_parity" >&5
-echo "${ECHO_T}$ac_cv_var_rawdcf_parity" >&6
- case "$ac_cv_var_rawdcf_parity" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define RAWDCF_NO_IGNPAR 1
-_ACEOF
- ;;
- esac
- ;;
-
- *) # HMS: Is this a good idea?
- ac_cv_var_rawdcf_parity=no
- ;;
-esac
-
-echo "$as_me:$LINENO: checking RCC 8000 clock" >&5
-echo $ECHO_N "checking RCC 8000 clock... $ECHO_C" >&6
-# Check whether --enable-RCC8000 or --disable-RCC8000 was given.
-if test "${enable_RCC8000+set}" = set; then
- enableval="$enable_RCC8000"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_RCC8000 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking Schmid DCF77 clock" >&5
-echo $ECHO_N "checking Schmid DCF77 clock... $ECHO_C" >&6
-# Check whether --enable-SCHMID or --disable-SCHMID was given.
-if test "${enable_SCHMID+set}" = set; then
- enableval="$enable_SCHMID"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_SCHMID 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking Trimble GPS receiver/TAIP protocol" >&5
-echo $ECHO_N "checking Trimble GPS receiver/TAIP protocol... $ECHO_C" >&6
-# Check whether --enable-TRIMTAIP or --disable-TRIMTAIP was given.
-if test "${enable_TRIMTAIP+set}" = set; then
- enableval="$enable_TRIMTAIP"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_TRIMTAIP 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking Trimble GPS receiver/TSIP protocol" >&5
-echo $ECHO_N "checking Trimble GPS receiver/TSIP protocol... $ECHO_C" >&6
-# Check whether --enable-TRIMTSIP or --disable-TRIMTSIP was given.
-if test "${enable_TRIMTSIP+set}" = set; then
- enableval="$enable_TRIMTSIP"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_TRIMTSIP 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking WHARTON 400A Series clock" >&5
-echo $ECHO_N "checking WHARTON 400A Series clock... $ECHO_C" >&6
-# Check whether --enable-WHARTON or --disable-WHARTON was given.
-if test "${enable_WHARTON+set}" = set; then
- enableval="$enable_WHARTON"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_WHARTON_400A 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-echo "$as_me:$LINENO: checking VARITEXT clock" >&5
-echo $ECHO_N "checking VARITEXT clock... $ECHO_C" >&6
-# Check whether --enable-VARITEXT or --disable-VARITEXT was given.
-if test "${enable_VARITEXT+set}" = set; then
- enableval="$enable_VARITEXT"
- ntp_ok=$enableval
-else
- ntp_ok=$ntp_eapc
-fi;
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_VARITEXT 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_ok" >&5
-echo "${ECHO_T}$ntp_ok" >&6
-case "$ntp_ok$ntp_canparse" in
- yesno)
- { { echo "$as_me:$LINENO: error: That's a parse clock and this system doesn't support it!" >&5
-echo "$as_me: error: That's a parse clock and this system doesn't support it!" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-
-
-
-echo "$as_me:$LINENO: checking if we need to make and use the parse libraries" >&5
-echo $ECHO_N "checking if we need to make and use the parse libraries... $ECHO_C" >&6
-ans=no
-case "$ntp_libparse" in
- yes)
- ans=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define CLOCK_PARSE 1
-_ACEOF
-
- LIBPARSE=../libparse/libparse.a
- MAKE_LIBPARSE=libparse.a
- MAKE_CHECK_Y2K=check_y2k
-
-cat >>confdefs.h <<\_ACEOF
-#define PPS_SAMPLE 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define CLOCK_ATOM 1
-_ACEOF
-
- ;;
-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)
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking for openssl library directory" >&5
-echo $ECHO_N "checking for openssl library directory... $ECHO_C" >&6
-
-# Check whether --with-openssl-libdir or --without-openssl-libdir was given.
-if test "${with_openssl_libdir+set}" = set; then
- withval="$with_openssl_libdir"
- ans=$withval
-else
- ans=yes
-fi;
-case "$ans" in
- no) ;;
- yes) # Look in:
- ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
- ;;
- *) # Look where they said
- ;;
-esac
-case "$ans" in
- no) ;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $ans no
- do
- 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)
- ans=no
- OPENSSL_LIB=
- ;;
- *) ans=$i
- OPENSSL_LIB=$ans
- ;;
- esac
- ;;
-esac
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-echo "$as_me:$LINENO: checking for openssl include directory" >&5
-echo $ECHO_N "checking for openssl include directory... $ECHO_C" >&6
-
-# Check whether --with-openssl-incdir or --without-openssl-incdir was given.
-if test "${with_openssl_incdir+set}" = set; then
- withval="$with_openssl_incdir"
- ans=$withval
-else
- ans=yes
-fi;
-case "$ans" in
- no) ;;
- yes) # look in:
- ans="/usr/include /usr/local/include /usr/local/ssl/include"
- ;;
- *) # Look where they said
- ;;
-esac
-case "$ans" in
- no) ;;
- *) # look for openssl/opensslconf.h:
- for i in $ans no
- do
- test -f $i/openssl/opensslconf.h && break
- done
- case "$i" in
- no)
- ans=no
- OPENSSL_INC=
- ;;
- *) ans=$i
- OPENSSL_INC=$ans
- ;;
- esac
- ;;
-esac
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-
-# Check whether --with-crypto or --without-crypto was given.
-if test "${with_crypto+set}" = set; then
- withval="$with_crypto"
- ans=$withval
-else
- ans=yes
-fi;
-case "$ans" in
- no) ;;
- yes|openssl)
- 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"
- LCRYPTO=-lcrypto
-
- MAKE_NTP_KEYGEN=ntp-keygen
-
-cat >>confdefs.h <<\_ACEOF
-#define OPENSSL
-_ACEOF
-
-
-
-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
-
-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
-
- fi
- ;;
-esac
-echo "$as_me:$LINENO: checking for the level of crypto support" >&5
-echo $ECHO_N "checking for the level of crypto support... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-echo "$as_me:$LINENO: checking if we want to compile with ElectricFence" >&5
-echo $ECHO_N "checking if we want to compile with ElectricFence... $ECHO_C" >&6
-
-# Check whether --with-electricfence or --without-electricfence was given.
-if test "${with_electricfence+set}" = set; then
- withval="$with_electricfence"
- ans=$withval
-else
- ans=no
-fi;
-case "$ans" in
- no) ;;
- *)
- LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
- EF_PROGS="eftest tstheap"
-
- EF_LIBS=libefence.a
-
- ans=yes
- ;;
-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
-
-
-
-
-echo "$as_me:$LINENO: checking if we can make dcf parse utilities" >&5
-echo $ECHO_N "checking if we can make dcf parse utilities... $ECHO_C" >&6
-ans=no
-if test "$ntp_parseutil" = "yes"; then
- case "$host" in
- *-*-sunos4*|*-*-solaris2*|*-*-linux*)
- ans="dcfd testdcf"
- DCFD=dcfd
- TESTDCF=testdcf
- ;;
- esac
-fi
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-
-echo "$as_me:$LINENO: checking if we can build kernel streams modules for parse" >&5
-echo $ECHO_N "checking if we can build kernel streams modules for parse... $ECHO_C" >&6
-ans=no
-case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
- yesyes)
- case "$host" in
- sparc-*-sunos4*)
- case "$ac_cv_var_kernel_pll" in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define PPS_SYNC 1
-_ACEOF
-
- ;;
- esac
- ans=parsestreams
- MAKE_PARSEKMODULE=parsestreams.loadable_module.o
- ;;
- sparc-*-solaris2*)
- ans=parsesolaris
- MAKE_PARSEKMODULE=parse
- ;;
- esac
- ;;
-esac
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-echo "$as_me:$LINENO: checking if we need basic refclock support" >&5
-echo $ECHO_N "checking if we need basic refclock support... $ECHO_C" >&6
-if test "$ntp_refclock" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define REFCLOCK 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ntp_refclock" >&5
-echo "${ECHO_T}$ntp_refclock" >&6
-
-
-
-echo "$as_me:$LINENO: checking if we want HP-UX adjtimed support" >&5
-echo $ECHO_N "checking if we want HP-UX adjtimed support... $ECHO_C" >&6
-case "$host" in
- *-*-hpux[56789]*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-if test "$ans" = "yes"; then
- MAKE_ADJTIMED=adjtimed
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_HPUX_ADJTIME 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-echo "$as_me:$LINENO: checking if we want QNX adjtime support" >&5
-echo $ECHO_N "checking if we want QNX adjtime support... $ECHO_C" >&6
-case "$host" in
- *-*-qnx*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-if test "$ans" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_QNX_ADJTIME 1
-_ACEOF
-
-fi
-echo "$as_me:$LINENO: result: $ans" >&5
-echo "${ECHO_T}$ans" >&6
-
-echo "$as_me:$LINENO: checking if we can read kmem" >&5
-echo $ECHO_N "checking if we can read kmem... $ECHO_C" >&6
-if test "${ac_cv_var_can_kmem+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-kmem or --disable-kmem was given.
-if test "${enable_kmem+set}" = set; then
- enableval="$enable_kmem"
- ans=$enableval
-else
- case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
- *yes*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- case "$host" in
- *-*-aix*)
- #ans=no
- ;;
- *-*-domainos) # Won't be found...
- ans=no
- ;;
- *-*-hpux*)
- #ans=no
- ;;
- *-*-irix[456]*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-winnt3.5)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- esac
-
-fi;
-ac_cv_var_can_kmem=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_can_kmem" >&5
-echo "${ECHO_T}$ac_cv_var_can_kmem" >&6
-
-case "$ac_cv_var_can_kmem" in
- *yes*) ;;
- *)
-cat >>confdefs.h <<\_ACEOF
-#define NOKMEM 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if adjtime is accurate" >&5
-echo $ECHO_N "checking if adjtime is accurate... $ECHO_C" >&6
-if test "${ac_cv_var_adjtime_is_accurate+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-accurate-adjtime or --disable-accurate-adjtime was given.
-if test "${enable_accurate_adjtime+set}" = set; then
- enableval="$enable_accurate_adjtime"
- ans=$enableval
-else
- case "$host" in
- i386-sequent-ptx*)
- ans=no
- ;;
- i386-unknown-osf1*)
- ans=yes
- ;;
- mips-sgi-irix[456]*)
- ans=yes
- ;;
- *-fujitsu-uxp*)
- ans=yes
- ;;
- *-ibm-aix[45]*)
- ans=yes
- ;;
- *-*-linux*)
- ans=yes
- ;;
- *-*-solaris2.[01])
- ans=no
- ;;
- *-*-solaris2*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
-
-fi;
-ac_cv_var_adjtime_is_accurate=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_adjtime_is_accurate" >&5
-echo "${ECHO_T}$ac_cv_var_adjtime_is_accurate" >&6
-case "$ac_cv_var_adjtime_is_accurate" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define ADJTIME_IS_ACCURATE 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking the name of 'tick' in the kernel" >&5
-echo $ECHO_N "checking the name of 'tick' in the kernel... $ECHO_C" >&6
-if test "${ac_cv_var_nlist_tick+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=_tick
-case "$host" in
- m68*-hp-hpux*) # HP9000/300?
- ans=_old_tick
- ;;
- *-apple-aux[23]*)
- ans=tick
- ;;
- *-hp-hpux*)
- ans=old_tick
- ;;
- *-ibm-aix[345]*)
- ans=no
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-ptx*)
- ans=tick
- ;;
- *-*-sco3.2v[45]*)
- ans=no
- ;;
- *-*-solaris2*)
- ans=nsec_per_tick
- ;;
- *-*-sysv4*)
- ans=tick
- ;;
-esac
-ac_cv_var_nlist_tick=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_nlist_tick" >&5
-echo "${ECHO_T}$ac_cv_var_nlist_tick" >&6
-case "$ac_cv_var_nlist_tick" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *)
-cat >>confdefs.h <<_ACEOF
-#define K_TICK_NAME "$ac_cv_var_nlist_tick"
-_ACEOF
- ;;
-esac
-#
-echo "$as_me:$LINENO: checking for the units of 'tick'" >&5
-echo $ECHO_N "checking for the units of 'tick'... $ECHO_C" >&6
-if test "${ac_cv_var_tick_nano+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=usec
-case "$host" in
- *-*-solaris2*)
- ans=nsec
- ;;
-esac
-ac_cv_var_tick_nano=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_tick_nano" >&5
-echo "${ECHO_T}$ac_cv_var_tick_nano" >&6
-case "$ac_cv_var_tick_nano" in
- nsec)
-
-cat >>confdefs.h <<\_ACEOF
-#define TICK_NANO 1
-_ACEOF
-
- ;;
-esac
-#
-echo "$as_me:$LINENO: checking the name of 'tickadj' in the kernel" >&5
-echo $ECHO_N "checking the name of 'tickadj' in the kernel... $ECHO_C" >&6
-if test "${ac_cv_var_nlist_tickadj+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=_tickadj
-case "$host" in
- m68*-hp-hpux*) # HP9000/300?
- ans=_tickadj
- ;;
- *-apple-aux[23]*)
- ans=tickadj
- ;;
- *-hp-hpux10*)
- ans=no
- ;;
- *-hp-hpux9*)
- ans=no
- ;;
- *-hp-hpux*)
- ans=tickadj
- ;;
- *-*-aix*)
- ans=tickadj
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-ptx*)
- ans=tickadj
- ;;
- *-*-sco3.2v4*)
- ans=no
- ;;
- *-*-sco3.2v5.0*)
- ans=clock_drift
- ;;
- *-*-solaris2*)
- ans=no # hrestime_adj
- ;;
- *-*-sysv4*)
- ans=tickadj
- ;;
-esac
-ac_cv_var_nlist_tickadj=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_nlist_tickadj" >&5
-echo "${ECHO_T}$ac_cv_var_nlist_tickadj" >&6
-case "$ac_cv_var_nlist_tickadj" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *)
-cat >>confdefs.h <<_ACEOF
-#define K_TICKADJ_NAME "$ac_cv_var_nlist_tickadj"
-_ACEOF
- ;;
-esac
-#
-echo "$as_me:$LINENO: checking for the units of 'tickadj'" >&5
-echo $ECHO_N "checking for the units of 'tickadj'... $ECHO_C" >&6
-if test "${ac_cv_var_tickadj_nano+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ans=usec
-case "$host" in
- *-*-solaris2*)
- ans=nsec
- ;;
-esac
-ac_cv_var_tickadj_nano=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_tickadj_nano" >&5
-echo "${ECHO_T}$ac_cv_var_tickadj_nano" >&6
-case "$ac_cv_var_tickadj_nano" in
- nsec)
-
-cat >>confdefs.h <<\_ACEOF
-#define TICKADJ_NANO 1
-_ACEOF
-
- ;;
-esac
-#
-echo "$as_me:$LINENO: checking half-heartedly for 'dosynctodr' in the kernel" >&5
-echo $ECHO_N "checking half-heartedly for 'dosynctodr' in the kernel... $ECHO_C" >&6
-if test "${ac_cv_var_nlist_dosynctodr+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *-apple-aux[23]*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=dosynctodr
- ;;
- *-*-aix*)
- ans=dosynctodr
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-nextstep*)
- ans=_dosynctodr
- ;;
- *-*-ptx*)
- ans=doresettodr
- ;;
- *-*-sco3.2v4*)
- ans=no
- ;;
- *-*-sco3.2v5*)
- ans=track_rtc
- ;;
- *-*-solaris2*)
- ans=dosynctodr
- ;;
- *-*-sysv4*)
- ans=doresettodr
- ;;
- *)
- ans=_dosynctodr
- ;;
-esac
-ac_cv_var_nlist_dosynctodr=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_nlist_dosynctodr" >&5
-echo "${ECHO_T}$ac_cv_var_nlist_dosynctodr" >&6
-case "$ac_cv_var_nlist_dosynctodr" in
- no) ;;
- *)
-cat >>confdefs.h <<_ACEOF
-#define K_DOSYNCTODR_NAME "$ac_cv_var_nlist_dosynctodr"
-_ACEOF
-
- ;;
-esac
-#
-echo "$as_me:$LINENO: checking half-heartedly for 'noprintf' in the kernel" >&5
-echo $ECHO_N "checking half-heartedly for 'noprintf' in the kernel... $ECHO_C" >&6
-if test "${ac_cv_var_nlist_noprintf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *-apple-aux[23]*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=noprintf
- ;;
- *-*-aix*)
- ans=noprintf
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-ptx*)
- ans=noprintf
- ;;
- *-*-nextstep*)
- ans=_noprintf
- ;;
- *-*-solaris2*)
- ans=noprintf
- ;;
- *-*-sysv4*)
- ans=noprintf
- ;;
- *)
- ans=_noprintf
- ;;
-esac
-ac_cv_var_nlist_noprintf=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_nlist_noprintf" >&5
-echo "${ECHO_T}$ac_cv_var_nlist_noprintf" >&6
-case "$ac_cv_var_nlist_noprintf" in
- no) ;;
- *)
-cat >>confdefs.h <<_ACEOF
-#define K_NOPRINTF_NAME "$ac_cv_var_nlist_noprintf"
-_ACEOF
-
- ;;
-esac
-
-
-
-
-echo "$as_me:$LINENO: checking for a default value for 'tick'" >&5
-echo $ECHO_N "checking for a default value for 'tick'... $ECHO_C" >&6
-if test "${ac_cv_var_tick+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-tick or --disable-tick was given.
-if test "${enable_tick+set}" = set; then
- enableval="$enable_tick"
- ans=$enableval
-else
- ans=no
- case "$host" in
- XXX-*-pc-cygwin*)
- ;;
- *-univel-sysv*)
- ans=10000
- ;;
- *-*-irix*)
- ans=10000
- ;;
- *-*-linux*)
- ans=txc.tick
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-winnt3.5)
- ans='(every / 10)'
- ;;
- *-*-unicosmp*)
- ans=10000
- ;;
- *)
- ans='1000000L/hz'
- ;;
- esac
-fi;
-ac_cv_var_tick=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_tick" >&5
-echo "${ECHO_T}$ac_cv_var_tick" >&6
-case "$ac_cv_var_tick" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *)
-cat >>confdefs.h <<_ACEOF
-#define PRESET_TICK $ac_cv_var_tick
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking for a default value for 'tickadj'" >&5
-echo $ECHO_N "checking for a default value for 'tickadj'... $ECHO_C" >&6
-if test "${ac_cv_var_tickadj+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-tickadj or --disable-tickadj was given.
-if test "${enable_tickadj+set}" = set; then
- enableval="$enable_tickadj"
- ans=$enableval
-else
- ans='500/hz'
- case "$host" in
- *-fujitsu-uxp*)
- case "$ac_cv_var_adjtime_is_accurate" in
- yes) ans='tick/16' ;;
- esac
- ;;
- XXX-*-pc-cygwin*)
- ans=no
- ;;
- *-univel-sysv*)
- ans=80
- ;;
- *-*-aix*)
- case "$ac_cv_var_can_kmem" in
- no) ans=1000 ;;
- esac
- ;;
- *-*-domainos) # Skippy: won't be found...
- case "$ac_cv_var_can_kmem" in
- no) ans=668 ;;
- esac
- ;;
- *-*-hpux*)
- case "$ac_cv_var_adjtime_is_accurate" in
- yes) ans='tick/16' ;;
- esac
- ;;
- *-*-irix*)
- ans=150
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-sco3.2v5.0*)
- ans=10000L/hz
- ;;
- *-*-solaris2*)
- case "$ac_cv_var_adjtime_is_accurate" in
- yes)
- #ans='tick/16'
- ;;
- esac
- ;;
- *-*-winnt3.5)
- ans=50
- ;;
- *-*-unicosmp*)
- ans=150
- ;;
- esac
-fi;
-ac_cv_var_tickadj=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_tickadj" >&5
-echo "${ECHO_T}$ac_cv_var_tickadj" >&6
-case "$ac_cv_var_tickadj" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *)
-cat >>confdefs.h <<_ACEOF
-#define PRESET_TICKADJ $ac_cv_var_tickadj
-_ACEOF
- ;;
-esac
-
-# Newer versions of ReliantUNIX round adjtime() values down to
-# 1/100s (system tick). Sigh ...
-# Unfortunately, there is no easy way to know if particular release
-# has this "feature" or any obvious way to test for it.
-case "$host" in
- mips-sni-sysv4*)
-cat >>confdefs.h <<\_ACEOF
-#define RELIANTUNIX_CLOCK 1
-_ACEOF
- ;;
-esac
-
-case "$host" in
- *-*-sco3.2v5*)
-cat >>confdefs.h <<\_ACEOF
-#define SCO5_CLOCK 1
-_ACEOF
- ;;
-esac
-
-ac_cv_make_tickadj=yes
-case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in
- nonono) # Don't read KMEM, no presets. Bogus.
- { echo "$as_me:$LINENO: WARNING: Can't read kmem" >&5
-echo "$as_me: WARNING: Can't read kmem" >&2;}
- ac_cv_make_tickadj=no
- ;;
- nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
- { echo "$as_me:$LINENO: WARNING: Can't read kmem but no PRESET_TICK. No tickadj." >&5
-echo "$as_me: WARNING: Can't read kmem but no PRESET_TICK. No tickadj." >&2;}
- ac_cv_make_tickadj=no
- ;;
- no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
- { echo "$as_me:$LINENO: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj." >&5
-echo "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ. No tickadj." >&2;}
- ac_cv_make_tickadj=no
- ;;
- no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
- ;;
- yesnono) # Read KMEM, no presets. Cool.
- ;;
- yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
- { echo "$as_me:$LINENO: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Please report this." >&5
-echo "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK. Please report this." >&2;}
- ;;
- yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
- ;;
- yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
- ;;
- *) # Generally bogus.
- { { echo "$as_me:$LINENO: error: This shouldn't happen." >&5
-echo "$as_me: error: This shouldn't happen." >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-
-echo "$as_me:$LINENO: checking if we want and can make the ntptime utility" >&5
-echo $ECHO_N "checking if we want and can make the ntptime utility... $ECHO_C" >&6
-if test "${ac_cv_make_ntptime+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
- yesyes)
- ans=yes
- ;;
- *)
- ans=no
- ;;
- esac
- ;;
-esac
-ac_cv_make_ntptime=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_make_ntptime" >&5
-echo "${ECHO_T}$ac_cv_make_ntptime" >&6
-case "$ac_cv_make_ntptime" in
- yes)
- MAKE_NTPTIME=ntptime
- ;;
-esac
-
-
-case "$host" in
- mips-sni-sysv4*)
- # tickadj is pretty useless on newer versions of ReliantUNIX
- # Do not bother
- ac_cv_make_tickadj=no
- ;;
- *-*-irix*)
- ac_cv_make_tickadj=no
- ;;
- *-*-solaris2*)
- # DLM says tickadj is a no-no starting with solaris2.5
- case "$host" in
- *-*-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
-if test "${ac_cv_make_tickadj+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_make_tickadj=yes
-fi
-echo "$as_me:$LINENO: result: $ac_cv_make_tickadj" >&5
-echo "${ECHO_T}$ac_cv_make_tickadj" >&6
-case "$ac_cv_make_tickadj" in
- yes)
- MAKE_TICKADJ=tickadj
- ;;
-esac
-
-
-echo "$as_me:$LINENO: checking if we want and can make the timetrim utility" >&5
-echo $ECHO_N "checking if we want and can make the timetrim utility... $ECHO_C" >&6
-if test "${ac_cv_make_timetrim+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$host" in
- *-*-irix*)
- ac_cv_make_timetrim=yes
- ;;
- *-*-unicosmp*)
- ac_cv_make_timetrim=yes
- ;;
- *)
- ac_cv_make_timetrim=no
- ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $ac_cv_make_timetrim" >&5
-echo "${ECHO_T}$ac_cv_make_timetrim" >&6
-case "$ac_cv_make_timetrim" in
- yes)
- MAKE_TIMETRIM=timetrim
- ;;
-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
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-udp-wildcard or --disable-udp-wildcard was given.
-if test "${enable_udp_wildcard+set}" = set; then
- enableval="$enable_udp_wildcard"
- ans=$enableval
-else
- ans=no
- case "$host" in
- *-fujitsu-uxp*)
- ans=yes
- ;;
- *-univel-sysv*)
- ans=yes
- ;;
- *-*-aix3.2*)
- ans=yes
- ;;
- *-*-aix[45]*)
- ans=yes
- ;;
- *-*-bsdi*)
- ans=yes
- ;;
- *-*-domainos)
- ans=yes
- ;;
- *-*-freebsd*)
- ans=yes
- ;;
- *-*-hpux*)
- ans=yes
- ;;
- *-*-irix6*)
- ans=yes
- ;;
- *-*-linux*)
- ans=yes
- ;;
- *-*-mpeix*)
- ans=yes
- ;;
- *-*-osf*)
- ans=yes
- ;;
- *-*-ptx*)
- ans=yes
- ;;
- *-*-solaris2*)
- ans=yes
- ;;
- *-*-sunos4*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
- esac
-fi;
-ac_cv_var_udp_wildcard_delivery=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_udp_wildcard_delivery" >&5
-echo "${ECHO_T}$ac_cv_var_udp_wildcard_delivery" >&6
-case "$ac_cv_var_udp_wildcard_delivery" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define UDP_WILDCARD_DELIVERY 1
-_ACEOF
- ;;
-esac
-
-case "$build" in
- $host)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- LDFLAGS="$LDFLAGS -r"
- ;;
- esac
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we should always slew the time" >&5
-echo $ECHO_N "checking if we should always slew the time... $ECHO_C" >&6
-if test "${ac_cv_var_slew_always+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-slew-always or --disable-slew-always was given.
-if test "${enable_slew_always+set}" = set; then
- enableval="$enable_slew_always"
- ans=$enableval
-else
- case "$host" in
- *-apple-aux[23]*)
- ans=yes
- ;;
- *-*-bsdi[012]*)
- ans=no
- ;;
- *-*-bsdi*)
- ans=yes
- ;;
- *-*-openvms*) # HMS: won't be found
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
-
-fi;
-ac_cv_var_slew_always=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_slew_always" >&5
-echo "${ECHO_T}$ac_cv_var_slew_always" >&6
-case "$ac_cv_var_slew_always" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define SLEWALWAYS 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we should step and slew the time" >&5
-echo $ECHO_N "checking if we should step and slew the time... $ECHO_C" >&6
-if test "${ac_cv_var_step_slew+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-step-slew or --disable-step-slew was given.
-if test "${enable_step_slew+set}" = set; then
- enableval="$enable_step_slew"
- ans=$enableval
-else
- case "$host" in
- *-sni-sysv*)
- ans=yes
- ;;
- *-univel-sysv*)
- ans=no
- ;;
- *-*-ptx*)
- ans=yes
- ;;
- *-*-solaris2.1[0-9]*)
- ans-no
- ;;
- *-*-solaris2.[012]*)
- ans=yes
- ;;
- *-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
-
-fi;
-ac_cv_var_step_slew=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_step_slew" >&5
-echo "${ECHO_T}$ac_cv_var_step_slew" >&6
-case "$ac_cv_var_step_slew" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define STEP_SLEW 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if ntpdate should step the time" >&5
-echo $ECHO_N "checking if ntpdate should step the time... $ECHO_C" >&6
-if test "${ac_cv_var_ntpdate_step+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-ntpdate-step or --disable-ntpdate-step was given.
-if test "${enable_ntpdate_step+set}" = set; then
- enableval="$enable_ntpdate_step"
- ans=$enableval
-else
- case "$host" in
- *-apple-aux[23]*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
-
-fi;
-ac_cv_var_ntpdate_step=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_ntpdate_step" >&5
-echo "${ECHO_T}$ac_cv_var_ntpdate_step" >&6
-case "$ac_cv_var_ntpdate_step" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define FORCE_NTPDATE_STEP 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we should sync TODR clock every hour" >&5
-echo $ECHO_N "checking if we should sync TODR clock every hour... $ECHO_C" >&6
-if test "${ac_cv_var_sync_todr+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-hourly-todr-sync or --disable-hourly-todr-sync was given.
-if test "${enable_hourly_todr_sync+set}" = set; then
- enableval="$enable_hourly_todr_sync"
- ans=$enableval
-else
- case "$host" in
- *-*-nextstep*)
- ans=yes
- ;;
- *-*-openvms*) # HMS: won't be found
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
-fi;
-ac_cv_var_sync_todr=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_sync_todr" >&5
-echo "${ECHO_T}$ac_cv_var_sync_todr" >&6
-case "$ac_cv_var_sync_todr" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define DOSYNCTODR 1
-_ACEOF
- ;;
-esac
-
-echo "$as_me:$LINENO: checking if we should avoid kernel FLL bug" >&5
-echo $ECHO_N "checking if we should avoid kernel FLL bug... $ECHO_C" >&6
-if test "${ac_cv_var_kernel_fll_bug+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Check whether --enable-kernel-fll-bug or --disable-kernel-fll-bug was given.
-if test "${enable_kernel_fll_bug+set}" = set; then
- enableval="$enable_kernel_fll_bug"
- ans=$enableval
-else
- case "$host" in
- *-*-solaris2.6)
- unamev=`uname -v`
- case "$unamev" in
- Generic_105181-*)
- old_IFS="$IFS"
- IFS="-"
- set $unamev
- IFS="$old_IFS"
- if test "$2" -ge 17
- then
- # Generic_105181-17 and higher
- ans=no
- else
- ans=yes
- fi
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- *-*-solaris2.7)
- unamev=`uname -v`
- case "$unamev" in
- Generic_106541-*)
- old_IFS="$IFS"
- IFS="-"
- set $unamev
- IFS="$old_IFS"
- if test "$2" -ge 07
- then
- # Generic_106541-07 and higher
- ans=no
- else
- ans=yes
- fi
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- *) ans=no
- ;;
- esac
-
-fi;
-ac_cv_var_kernel_fll_bug=$ans
-fi
-echo "$as_me:$LINENO: result: $ac_cv_var_kernel_fll_bug" >&5
-echo "${ECHO_T}$ac_cv_var_kernel_fll_bug" >&6
-case "$ac_cv_var_kernel_fll_bug" in
- yes)
-cat >>confdefs.h <<\_ACEOF
-#define KERNEL_FLL_BUG 1
-_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)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- LDFLAGS="$LDFLAGS -r"
- ;;
- esac
- ;;
-esac
-
-
- ac_expanded=`(
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- eval echo \""$sysconfdir"\"
- )`
-
-cat >>confdefs.h <<_ACEOF
-#define NTP_KEYSDIR "$ac_expanded"
-_ACEOF
-
-
-
-
-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 include/Makefile"
-
- ac_config_files="$ac_config_files include/isc/Makefile"
-
- ac_config_files="$ac_config_files kernel/Makefile"
-
- ac_config_files="$ac_config_files kernel/sys/Makefile"
-
- ac_config_files="$ac_config_files libntp/Makefile"
-
- ac_config_files="$ac_config_files libparse/Makefile"
-
- ac_config_files="$ac_config_files ntpd/Makefile"
-
- ac_config_files="$ac_config_files ntpdate/Makefile"
-
- ac_config_files="$ac_config_files ntpdc/Makefile"
-
- ac_config_files="$ac_config_files ntpdc/nl.pl"
-
- ac_config_files="$ac_config_files ntpq/Makefile"
-
- ac_config_files="$ac_config_files parseutil/Makefile"
-
- ac_config_files="$ac_config_files scripts/Makefile"
-
- ac_config_files="$ac_config_files scripts/calc_tickadj"
-
- ac_config_files="$ac_config_files scripts/checktime"
-
- ac_config_files="$ac_config_files scripts/freq_adj"
-
- ac_config_files="$ac_config_files scripts/mkver"
-
- ac_config_files="$ac_config_files scripts/ntp-wait"
-
- ac_config_files="$ac_config_files scripts/ntpsweep"
-
- ac_config_files="$ac_config_files scripts/ntptrace"
-
- ac_config_files="$ac_config_files scripts/ntpver"
-
- ac_config_files="$ac_config_files scripts/plot_summary"
-
- ac_config_files="$ac_config_files scripts/summary"
-
- ac_config_files="$ac_config_files util/Makefile"
-
-
-case "$MAKE_SNTP" in
- '') ;;
- *)
-
-
-subdirs="$subdirs sntp"
-
- ;;
-esac
-
-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
-
-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
-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
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-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" ;;
- "ElectricFence/Makefile" ) CONFIG_FILES="$CONFIG_FILES ElectricFence/Makefile" ;;
- "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" ;;
- "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" ;;
- "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" ;;
- "scripts/checktime" ) CONFIG_FILES="$CONFIG_FILES scripts/checktime" ;;
- "scripts/freq_adj" ) CONFIG_FILES="$CONFIG_FILES scripts/freq_adj" ;;
- "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" ;;
- "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;}
- { (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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- 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,@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,@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,@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
-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,@OPENSSL@,$OPENSSL,;t t
-s,@OPENSSL_INC@,$OPENSSL_INC,;t t
-s,@OPENSSL_LIB@,$OPENSSL_LIB,;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
-s,@PROPDELAY@,$PROPDELAY,;t t
-s,@CHUTEST@,$CHUTEST,;t t
-s,@CLKTEST@,$CLKTEST,;t t
-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
-
- 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
-
- # 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
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; 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
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # 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; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_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 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
-while grep . conftest.defines >/dev/null
-do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs 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 #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
- # 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
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
- if test x"$ac_file" != x-; 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
- 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; }; }; }
-
- rm -f $ac_file
- mv $tmp/config.h $ac_file
- fi
- else
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-# 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
-
-#
-# 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
-
-#
-# 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
deleted file mode 100644
index 131d18f..0000000
--- a/contrib/ntp/configure.in
+++ /dev/null
@@ -1,3707 +0,0 @@
-dnl -*-fundamental-*-
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ntpd/ntp_refclock.c)
-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.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
-AC_PROG_CPP
-
-case "$host" in
- *-*-amigaos)
- CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
- ;;
- *-pc-cygwin*)
- CFLAGS="$CFLAGS -DSYS_CYGWIN32"
- ;;
- i386-sequent-sysv4)
- case "$CC" in
- cc)
- CFLAGS="$CFLAGS -Wc,+abi-socket"
- ;;
- esac
- ;;
- *-*-mpeix*)
- CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
- LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
- LIBS="$LIBS -lcurses"
- ;;
-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)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- # Quick and dirty sanity check
- case "$VX_KERNEL" in
- '') AC_MSG_ERROR(Please follow the directions in html/vxworks.html!)
- ;;
- esac
- CFLAGS="$CFLAGS -DSYS_VXWORKS"
- ;;
- esac
- ;;
-esac
-
-dnl we need to check for cross compile tools for vxWorks here
-AC_PROG_AWK
-AC_PROG_MAKE_SET
-
-rm -f conftest*
-
-case "$GCC" in
- yes)
- CFLAGS="$CFLAGS -Wall"
- # CFLAGS="$CFLAGS -Wcast-align"
- CFLAGS="$CFLAGS -Wcast-qual"
- # CFLAGS="$CFLAGS -Wconversion"
- # CFLAGS="$CFLAGS -Werror"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
-
- ;;
-esac
-
-ac_busted_vpath_in_make=no
-
-case "$host" in
- *-next-nextstep3)
- CFLAGS="$CFLAGS -posix"
- ;;
- *-*-irix6.1*) # 64 bit only
- # busted vpath?
- ;;
- *-*-irix6*) # 6.2 (and later?)
- ac_busted_vpath_in_make=yes
- # don't pass -n32 to gcc, it cannot handle and doesn't need it
- if test "$GCC" != yes; then
- case "$CFLAGS" in
- *-n32*) ;;
- *-n64*) ;;
- *-64*) ;;
- *) case "$iCFLAGS" in
- '') CFLAGS="-O2 -g3 -n32" ;;
- *) CFLAGS="$CFLAGS -n32" ;;
- esac
- ;;
- esac
- case "$LDFLAGS" in
- *-n32*) ;;
- *-n64*) ;;
- *-64*) ;;
- *) LDFLAGS="$LDFLAGS -n32" ;;
- esac
- fi
- ;;
- *-*-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.
-dnl So, I'd better not use additional flags.
-dnl I leave it here just in case anybody has better idea
-dnl mips-sni-sysv4* )
-dnl #
-dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
-dnl #
-dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
-dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
-dnl fi
-dnl ;;
-esac
-
-case "$ac_busted_vpath_in_make$srcdir" in
- no*) ;;
- yes.) ;;
- *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
- '')
- AC_MSG_ERROR(building outside of the main directory requires GNU make)
- ;;
- *) ;;
- esac
- ;;
-esac
-
-AC_SUBST(CFLAGS)dnl
-AC_SUBST(LDFLAGS)dnl
-
-AC_PROG_LN_S
-AC_PROG_GCC_TRADITIONAL
-AC_C_VOLATILE
-AC_ISC_POSIX
-AC_PROG_RANLIB
-AC_PATH_PROG(PATH_SH, sh)
-AC_PATH_PROG(PATH_PERL, perl)
-
-hs_ULONG_CONST
-
-case "$host" in
- *-*-vxworks*)
- ac_link="$ac_link $VX_KERNEL"
- ;;
-esac
-
-AC_PROG_INSTALL
-
-case "$host" in
- *-pc-cygwin*)
- AC_CHECK_LIB(advapi32, main)
- ;;
-esac
-AC_CHECK_LIB(elf, nlist) dnl Only needed for tickadj...
-dnl AC_CHECK_LIB(kvm, main, , , -lelf)
-AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here...
-AC_CHECK_LIB(ld, nlist)
-AC_CHECK_LIB(mld, nlist)
-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*) ;;
- *) 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?]),
- 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
-
-dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
-dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
-dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least)
-dnl does Strange Things with extra processes using the Posix-compatibility
-dnl real-time library, so we don't want to use it.
-
-case "$host" in
- *-*-linux*) ;;
- *)
- AC_CHECK_LIB(rt, sched_setscheduler, ,
- AC_CHECK_LIB(posix4, sched_setscheduler))
- ;;
-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)
-# 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)
-AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h)
-case "$host" in
- *-*-sunos4*) ;;
- *) 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
- *-*-sco*)
- AC_CHECK_HEADERS(sys/sio.h)
- ;;
-esac
-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/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
-yes
-#endif
-], [AC_CHECK_HEADERS(sys/timepps.h)])
-AC_CHECK_HEADERS(sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h)
-AC_HEADER_TIME
-case "$host" in
-*-convex-*)
- AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
- ;;
-*-*-bsdi*)
- AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h)
- ;;
-esac
-
-AC_CHECK_HEADER(nlist.h,
-[AC_DEFINE(NLIST_STRUCT, 1, [nlist stuff])
-AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
-[AC_TRY_COMPILE([#include <nlist.h>],
-[struct nlist n; n.n_un.n_name = 0;],
-ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
-if test $ac_cv_struct_nlist_n_un = yes; then
- AC_DEFINE(NLIST_NAME_UNION, 1, [does struct nlist use a name union?])
-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;],
- ac_cv_c_volatile=yes,
- ac_cv_c_volatile=no)
-])
-case "$ac_cv_c_volatile" in
- yes)
- ;;
- *) AC_DEFINE(volatile, , [Does the compiler like "volatile"?])
- ;;
-esac
-
-case "$host" in
- sparc-*-solaris2*)
- # Assume that solaris2 is Ansi C...
- ;;
- *)
- AM_C_PROTOTYPES
- ;;
-esac
-AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
-[AC_TRY_COMPILE([
-extern int foo (short);
-int foo(short i) { return i; }],[
-int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
-])
-if test "$ac_cv_have_prototypes" = yes; then
- AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
-fi
-
-AC_C_CONST
-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
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ac_cv_var_default_hz=1024
- ;;
- mips-dec-ultrix4*)
- ac_cv_var_default_hz=256
- ;;
-esac])
-AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
-
-AC_CACHE_CHECK(if we need to override the system's value for HZ, ac_cv_var_override_hz,
-[ac_cv_var_override_hz=no
-case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ac_cv_var_override_hz=yes
- ;;
- mips-dec-ultrix4*)
- ac_cv_var_override_hz=yes
- ;;
- *-*-freebsd*)
- ac_cv_var_override_hz=yes
- ;;
- *-*-sunos4*)
- ac_cv_var_override_hz=yes
- ;;
-esac])
-case "$ac_cv_var_override_hz" in
- yes)
- AC_DEFINE(OVERRIDE_HZ, 1, [Do we need to override the system's idea of HZ?])
- ;;
-esac
-
-dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
-dnl [AC_TRY_LINK([#include <sys/types.h>
-dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
-dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
-dnl if test $su_cv_func_ut_host_in_utmp = yes; then
-dnl AC_DEFINE(HAVE_UT_HOST)
-dnl fi
-
-dnl AC_MSG_CHECKING(if we can get the system boot time)
-dnl AC_CACHE_VAL(su_cv_have_boot_time,
-dnl [AC_EGREP_CPP(yes,
-dnl [#ifdef HAVE_UTMPX_H
-dnl #include <utmpx.h>
-dnl #else
-dnl #include <utmp.h>
-dnl #endif
-dnl #ifdef BOOT_TIME
-dnl yes
-dnl #endif
-dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
-dnl AC_MSG_RESULT($su_cv_have_boot_time)
-
-AC_CACHE_CHECK(
- struct sigaction for sa_sigaction,
- ac_cv_struct_sigaction_has_sa_sigaction,
- [
- AC_TRY_COMPILE(
- [#include <signal.h>],
- [struct sigaction act; act.sa_sigaction = 0;],
- ac_cv_struct_sigaction_has_sa_sigaction=yes,
- ac_cv_struct_sigaction_has_sa_sigaction=no
- )
- ]
-)
-if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
- AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION, 1, [Obvious...])
-fi
-
-AC_CACHE_CHECK(for struct ppsclockev, ac_cv_struct_ppsclockev,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif],[
-extern struct ppsclockev *pce;
-return pce->serial;],
- ac_cv_struct_ppsclockev=yes,
- ac_cv_struct_ppsclockev=no)
-])
-if test $ac_cv_struct_ppsclockev = yes; then
- AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
-fi
-
-AC_CACHE_CHECK(struct sockaddr for sa_len, ac_cv_struct_sockaddr_has_sa_len,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>],[
-extern struct sockaddr *ps;
-return ps->sa_len;],
- ac_cv_struct_sockaddr_has_sa_len=yes,
- ac_cv_struct_sockaddr_has_sa_len=no)
-])
-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,
-[AC_TRY_COMPILE([
-#ifdef HAVE_MACHINE_SOUNDCARD_H
-# include <machine/soundcard.h>
-#endif
-#ifdef HAVE_SYS_SOUNDCARD_H
-# include <sys/soundcard.h>
-#endif],[
-extern struct snd_size *ss;
-return ss->rec_size;],
- ac_cv_struct_snd_size=yes,
- ac_cv_struct_snd_size=no)
-])
- case "$ac_cv_struct_snd_size" in
- yes) AC_DEFINE(HAVE_STRUCT_SND_SIZE, 1,[Do we have struct snd_size?]) ;;
- esac
- ;;
-esac
-
-AC_CACHE_CHECK(struct clockinfo for hz, ac_cv_struct_clockinfo_has_hz,
-[AC_TRY_COMPILE([
-#include <sys/time.h>],[
-extern struct clockinfo *pc;
-return pc->hz;],
- ac_cv_struct_clockinfo_has_hz=yes,
- ac_cv_struct_clockinfo_has_hz=no)
-])
-if test $ac_cv_struct_clockinfo_has_hz = yes; then
- AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
-fi
-
-AC_CACHE_CHECK(struct clockinfo for tickadj, ac_cv_struct_clockinfo_has_tickadj,
-[AC_TRY_COMPILE([
-#include <sys/time.h>],[
-extern struct clockinfo *pc;
-return pc->tickadj;],
- ac_cv_struct_clockinfo_has_tickadj=yes,
- ac_cv_struct_clockinfo_has_tickadj=no)
-])
-if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
- AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
-fi
-
-AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec,
-[AC_TRY_COMPILE([
-#include <sys/time.h>
-/* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
-#ifdef HAVE_SYS_TIMEPPS_H
-# define FRAC 4294967296
-# include <sys/timepps.h>
-#endif],
-[struct timespec n;],
-ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)])
-if test $ac_cv_struct_timespec = yes; then
- AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?])
-fi
-
-AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
-[AC_TRY_COMPILE([
-#include <sys/time.h>
-#include <sys/timex.h>],
-[struct ntptimeval n;],
-ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
-if test $ac_cv_struct_ntptimeval = yes; then
- AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
-fi
-
-AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , ,
-[#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])
-
-AC_C_INLINE
-AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
-AC_CHECK_SIZEOF(signed char)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-
-AC_CHECK_TYPES([s_char])
-case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
- *yes)
- # We have a typedef for s_char. Might as well believe it...
- ;;
- no0no)
- # We have signed chars, can't say 'signed char', no s_char typedef.
- AC_DEFINE(NEED_S_CHAR_TYPEDEF, 1, [Do we need an s_char typedef?])
- ;;
- no1no)
- # We have signed chars, can say 'signed char', no s_char typedef.
- AC_DEFINE(NEED_S_CHAR_TYPEDEF)
- ;;
- yes0no)
- # We have unsigned chars, can't say 'signed char', no s_char typedef.
- AC_MSG_ERROR(No way to specify a signed character!)
- ;;
- yes1no)
- # We have unsigned chars, can say 'signed char', no s_char typedef.
- AC_DEFINE(NEED_S_CHAR_TYPEDEF)
- ;;
-esac
-AC_TYPE_UID_T
-
-case "$host" in
- *-*-linux*)
- AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
- ;;
-esac
-case "$host" in
- *-*-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,
- # this conditional will need to change. Maybe use AC_TRY_RUN
- # instead to try to set the time to itself and check errno.
- ;;
- *) AC_CHECK_FUNCS(clock_gettime clock_settime)
- ;;
-esac
-AC_CHECK_FUNCS(daemon)
-AC_CHECK_FUNCS(finite, ,
- [AC_CHECK_FUNCS(isfinite, ,
- [AC_MSG_CHECKING(for isfinite with <math.h>)
- _libs=$LIBS
- LIBS="$LIBS -lm"
- AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_ISFINITE)],
- AC_MSG_RESULT(no))
- LIBS=$_libs])])
-AC_CHECK_FUNCS(getbootfile getclock getdtablesize getrusage)
-AC_CHECK_FUNC(gettimeofday, ,[
-case "$host" in
- *-*-mpeix*) ac_cv_func_gettimeofday=yes
- ;;
-esac])
-case "$host" in
- *-pc-cygwin*)
- ;;
- *) AC_CHECK_FUNCS(getuid)
- ;;
-esac
-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.
- ;;
- *) AC_CHECK_FUNCS(mkstemp)
- ;;
-esac
-AC_CHECK_FUNCS(mktime)
-case "$host" in
- *-*-aix[[45]]*)
- # Just a stub. Idiots.
- ;;
- *-*-irix[[45]]*)
- # Just a stub in "old" Irix. Idiots.
- ;;
- *-*-qnx*)
- # Apparently there but not working in QNX. Idiots?
- ;;
- *-*-sco3.2v5.0.*)
- # Just a stub. Idiots.
- ;;
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- # mlockall is there, as a #define calling memlk via <sys/mman.h>
- # Not easy to test for - cheat.
- AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes'])
- AC_CHECK_FUNCS(mlockall)
- ;;
- *) AC_CHECK_FUNCS(mlockall)
- ;;
-esac
-AC_CHECK_FUNCS(mrand48 srand48 nice nlist)
-case "$host" in
- *-*-solaris2.6)
- # Broken...
- ;;
- *) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime)
- ;;
-esac
-AC_CHECK_FUNCS(plock pututline pututxline readlink rtprio)
-case "$ac_cv_func_mrand48" in
- yes) ;;
- *) AC_REPLACE_FUNCS(random) ;;
-esac
-case "$host" in
- *-*-aix[[45]]*)
- # Just a stub in AIX 4. Idiots.
- ;;
- *-*-solaris2.5*)
- # Just stubs in solaris2.5. Idiots.
- ;;
- *) AC_CHECK_FUNCS(sched_setscheduler)
- ;;
-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
- ;;
-esac])
-AC_CHECK_FUNCS(setvbuf sigaction)
-AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
-AC_CHECK_FUNCS(snprintf strdup strerror strstr)
-AC_CHECK_FUNCS(timegm)
-case "$host" in
- *-*-aix[[45]]*)
- # Just stubs. Idiots.
- ;;
- *-*-netbsd1*)
- # Just stubs. Idiots.
- ;;
- *-*-netbsdelf1*)
- # Just stubs. Idiots.
- ;;
- *-*-openbsd*)
- # Just stubs. Idiots.
- ;;
- *) AC_CHECK_FUNCS(timer_create timer_settime)
- ;;
-esac
-case "$host" in
- *-pc-cygwin*)
- # I have no idea...
- ;;
- *) AC_CHECK_FUNCS(umask)
- ;;
-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);
-settimeofday((struct timeval*)0,(struct timezone*)0);
-],
- ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
-])
-if test $ac_cv_func_Xettimeofday_nargs = 1; then
- AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
-fi
-
-AC_CACHE_CHECK(number of arguments taken by setpgrp(), ac_cv_func_setpgrp_nargs,
-[AC_TRY_COMPILE([
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-],[setpgrp(0,0);],
- ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
-])
-if test $ac_cv_func_setpgrp_nargs = 0; then
- AC_DEFINE(HAVE_SETPGRP_0, 1, [define if setpgrp takes 0 arguments])
-fi
-
-save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -I$srcdir/include"
-
-AC_CACHE_CHECK(argument pointer type of qsort()'s compare function and base,
-ac_cv_func_qsort_argtype,
-[AC_TRY_COMPILE([
-#include "l_stdlib.h"
-
-#ifdef HAVE_PROTOTYPES
-#define P(x) x
-#else
-#define P(x) ()
-#endif
-
-extern void *base;
-extern sortfunc P((const void *, const void *));
-int sortfunc(a, b)
- const void *a;
- const void *b; { return 0; }
-],[
-qsort(base, 2, sizeof(char *), sortfunc);
-],
- ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
-])
-case "$ac_cv_func_qsort_argtype" in
- void)
- AC_DEFINE(QSORT_USES_VOID_P, 1, [Does qsort expect to work on "void *" stuff?])
- ;;
-esac
-
-CFLAGS=$save_CFLAGS
-
-AC_CACHE_CHECK(if we need to declare 'errno', ac_cv_decl_errno,
-[AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif],
- [errno = 0;],
- ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
-case "$ac_cv_decl_errno" in
- yes) AC_DEFINE(DECL_ERRNO, 1, [Declare errno?]) ;;
-esac
-
-dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces
-dnl the clash. <resolv.h> isn't currently used.
-dnl
-dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
-dnl MT purposes. This makes the line "extern int h_errno" choke
-dnl the compiler. Hopefully adding !defined(h_errno) fixes this
-dnl without breaking any other platforms.
-dnl
-AC_CACHE_CHECK(if we may declare 'h_errno', ac_cv_decl_h_errno,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_RESOLV_H
-#include <resolv.h>
-#endif],
- [extern int h_errno;],
- ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
-case "$ac_cv_decl_h_errno" in
- yes) AC_DEFINE(DECL_H_ERRNO, 1, [Declare h_errno?]) ;;
-esac
-
-dnl See if char *sys_errlist[] is OK.
-AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist,
-[AC_TRY_COMPILE([#include <stdio.h>
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif],
- [extern char *sys_errlist[];
-],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
-case "$ac_cv_decl_sys_errlist" in
- yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
-esac
-
-AC_CACHE_CHECK(if declaring 'syscall()' is ok, ac_cv_decl_syscall,
-[AC_TRY_COMPILE([
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_PROTOTYPES
-#define P(x) x
-#else
-#define P(x) ()
-#endif
-],
- [extern int syscall P((int, ...));],
- ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
-case "$ac_cv_decl_syscall" in
- yes) AC_DEFINE(DECL_SYSCALL, 1, [Declare syscall()?]) ;;
-esac
-
-case "$host" in
- *-*-aix4.3.*)
- AC_DEFINE(DECL_HSTRERROR_0, 1, [Declaration style]) # Needed for XLC under AIX 4.3.2
- ;;
- *-*-mpeix*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_INET_NTOA_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- ;;
- *-*-osf[[45]]*)
- AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
- AC_DEFINE(DECL_STIME_1, 1, [Declaration style])
- ;;
- *-*-qnx*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- ;;
- *-*-riscos4*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
- AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
- AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
- AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
- AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
- AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
- ;;
- *-*-solaris2*)
- AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_1, 1, [Declaration style])
- case "$host" in
- *-*-solaris2.4)
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- ;;
- esac
- ;;
- *-*-sunos4*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_BCOPY_0, 1, [Declaration style])
- AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
- AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
- AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
- AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
- AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
- AC_DEFINE(DECL_SIGVEC_0, 1, [Declaration style])
- AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
- case "`basename $ac_cv_prog_CC`" in
- acc*) ;;
- *) AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
- ;;
- esac
- AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
- AC_DEFINE(DECL_TOUPPER_0, 1, [Declaration style])
- AC_DEFINE(DECL_STRERROR_0, 1, [Declaration style])
- ;;
- *-*-ultrix4*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
- AC_DEFINE(DECL_CFSETISPEED_0, 1, [Declaration style])
- AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
- AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_MRAND48_0, 1, [Declaration style])
- AC_DEFINE(DECL_NLIST_0, 1, [Declaration style])
- AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
- AC_DEFINE(DECL_SRAND48_0, 1, [Declaration style])
- AC_DEFINE(DECL_STIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- ;;
-esac
-
-case "$host" in
- *-*-sco3.2*)
- AC_DEFINE(TERMIOS_NEEDS__SVID3, 1, [Do we need to #define _SVID3 when we #include <termios.h>?])
- ;;
-esac
-
-AC_CACHE_CHECK(if we need extra room for SO_RCVBUF, ac_cv_var_rcvbuf_slop,
-[ans=no
-case "$host" in
- *-*-hpux[[567]]*)
- ans=yes
- ;;
-esac
-ac_cv_var_rcvbuf_slop=$ans])
-case "$ac_cv_var_rcvbuf_slop" in
- yes) AC_DEFINE(NEED_RCVBUF_SLOP, 1, [Do we need extra room for SO_RCVBUF? (HPUX <8)]) ;;
-esac
-
-AC_CACHE_CHECK(if we will open the broadcast socket, ac_cv_var_open_bcast_socket,
-[ans=yes
-case "$host" in
- *-*-domainos)
- ans=no
- ;;
-esac
-ac_cv_var_open_bcast_socket=$ans])
-case "$ac_cv_var_open_bcast_socket" in
- yes) AC_DEFINE(OPEN_BCAST_SOCKET, 1, [Should we open the broadcast socket?]) ;;
-esac
-
-AC_CACHE_CHECK(if we want the HPUX version of FindConfig(), ac_cv_var_hpux_findconfig,
-[ans=no
-case "$host" in
- *-*-hpux*)
- ans=yes
- ;;
-esac
-ac_cv_var_hpux_findconfig=$ans])
-case "$ac_cv_var_hpux_findconfig" in
- yes) AC_DEFINE(NEED_HPUX_FINDCONFIG, 1, [Do we want the HPUX FindConfig()?]) ;;
-esac
-
-AC_CACHE_CHECK(if process groups are set with -pid, ac_cv_arg_setpgrp_negpid,
-[case "$host" in
- *-*-hpux[[567]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=yes
- ;;
- *-*-linux*)
- ans=yes
- ;;
- *-*-sunos3*)
- ans=yes
- ;;
- *-*-ultrix2*)
- ans=yes
- ;;
- *)
- ans=no
- ;;
-esac
-ac_cv_arg_setpgrp_negpid=$ans])
-case "$ac_cv_arg_setpgrp_negpid" in
- yes) AC_DEFINE(UDP_BACKWARDS_SETOWN, 1, [Do we set process groups with -pid?]) ;;
-esac
-
-AC_CACHE_CHECK(if we need a ctty for F_SETOWN, ac_cv_func_ctty_for_f_setown,
-[case "$host" in
- *-*-bsdi[[23]]*)
- ans=yes
- ;;
- *-*-freebsd*)
- ans=yes
- ;;
- *-*-netbsd*)
- ans=yes
- ;;
- *-*-openbsd*)
- ans=yes
- ;;
- *-*-osf*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-ac_cv_func_ctty_for_f_setown=$ans])
-case "$ac_cv_func_ctty_for_f_setown" in
- yes) AC_DEFINE(USE_FSETOWNCTTY, 1, [Must we have a CTTY for fsetown?]) ;;
-esac
-
-ntp_warning='GRONK'
-AC_MSG_CHECKING(if we'll use clock_settime or settimeofday or stime)
-case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
- yes*)
- ntp_warning=''
- ans='clock_settime()'
- ;;
- noyes*)
- ntp_warning='But clock_settime() would be better (if we had it)'
- ans='settimeofday()'
- ;;
- nonoyes)
- ntp_warning='Which is the worst of the three'
- ans='stime()'
- ;;
- *)
- case "$build" in
- $host) ntp_warning='Which leaves us with nothing to use!'
- ans=none
- ;;
-esac
-esac
-AC_MSG_RESULT($ans)
-case "$ntp_warning" in
- '') ;;
- *) AC_MSG_WARN(*** $ntp_warning ***)
- ;;
-esac
-
-AC_CACHE_CHECK(if we have a losing syscall(), ac_cv_var_syscall_bug,
-[case "$host" in
- *-*-solaris2.4*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-ac_cv_var_syscall_bug=$ans])
-case "$ac_cv_var_syscall_bug" in
- yes) AC_DEFINE(SYSCALL_BUG, 1, [Buggy syscall() (Solaris2.4)?]) ;;
-esac
-
-AC_CACHE_CHECK(for Streams/TLI, ac_cv_var_streams_tli,
-[ case "$ac_cv_header_sys_stropts_h" in
- yes)
- ans=no
- # There must be a better way...
- case "$host" in
- *-*-ptx*)
- ans=yes
- ;;
- esac
- ;;
- esac
- ac_cv_var_streams_tli=$ans])
-case "$ac_cv_var_streams_tli" in
- yes)
- AC_DEFINE(STREAMS_TLI, 1, [Do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H?)])
- ;;
-esac
-
-AC_CACHE_CHECK(for SIGIO, ac_cv_hdr_def_sigio,
- AC_EGREP_CPP(yes,
- [#include <signal.h>
-#ifdef SIGIO
- yes
-#endif
- ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
-
-dnl Override those system that have a losing SIGIO
-AC_CACHE_CHECK(if we want to use signalled IO, ac_cv_var_signalled_io,
-[ans=no
-case "$ac_cv_hdr_def_sigio" in
- yes)
- ans=yes
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ans=no
- ;;
- *-convex-*)
- ans=no
- ;;
- *-dec-*)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-univel-sysv*)
- ans=no
- ;;
- *-*-irix6*)
- ans=no
- ;;
- *-*-freebsd*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- esac
- ;;
-esac
-ac_cv_var_signalled_io=$ans])
-case "$ac_cv_var_signalled_io" in
- yes) AC_DEFINE(HAVE_SIGNALED_IO, 1, [Can we use SIGIO for tcp and udp IO?]) ;;
-esac
-
-AC_CACHE_CHECK(for SIGPOLL, ac_cv_hdr_def_sigpoll,
- AC_EGREP_CPP(yes,
- [#include <signal.h>
-#ifdef SIGPOLL
- yes
-#endif
- ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
-
-AC_CACHE_CHECK(for SIGSYS, ac_cv_hdr_def_sigsys,
- AC_EGREP_CPP(yes,
- [#include <signal.h>
-#ifdef SIGSYS
- yes
-#endif
- ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
-
-AC_CACHE_CHECK(if we can use SIGPOLL for UDP I/O, ac_cv_var_use_udp_sigpoll,
-[ans=no
-case "$ac_cv_hdr_def_sigpoll" in
- yes)
- case "$host" in
- mips-sgi-irix*)
- ans=no
- ;;
- vax-dec-bsd)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-*-aix[[45]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
-esac
-ac_cv_var_use_udp_sigpoll=$ans])
-case "$ac_cv_var_use_udp_sigpoll" in
- yes) AC_DEFINE(USE_UDP_SIGPOLL, 1, [Can we use SIGPOLL for UDP?]) ;;
-esac
-
-AC_CACHE_CHECK(if we can use SIGPOLL for TTY I/O, ac_cv_var_use_tty_sigpoll,
-[ans=no
-case "$ac_cv_hdr_def_sigpoll" in
- yes)
- case "$host" in
- mips-sgi-irix*)
- ans=no
- ;;
- vax-dec-bsd)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-*-aix[[45]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
-esac
-ac_cv_var_use_tty_sigpoll=$ans])
-case "$ac_cv_var_use_tty_sigpoll" in
- yes) AC_DEFINE(USE_TTY_SIGPOLL, 1, [Can we use SIGPOLL for tty IO?]) ;;
-esac
-
-case "$ac_cv_header_sys_sio_h" in
- yes)
- AC_CACHE_CHECK(sys/sio.h for TIOCDCDTIMESTAMP, ac_cv_hdr_def_tiocdcdtimestamp,
- AC_EGREP_CPP(yes,
-[#include <sys/sio.h>
-#ifdef TIOCDCDTIMESTAMP
- yes
-#endif
- ], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no))
- ;;
-esac
-
-case "$ac_cv_hdr_def_tiocdcdtimestamp" in
- yes)
- ac_cv_var_oncore_ok=yes
- ;;
-esac
-
-AC_CACHE_CHECK(if nlist() values might require extra indirection,
-ac_cv_var_nlist_extra_indirection,
-[ans=no
-case "$host" in
- *-*-aix*)
- ans=yes
- ;;
-esac
-ac_cv_var_nlist_extra_indirection=$ans])
-case "$ac_cv_var_nlist_extra_indirection" in
- yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION, 1, [Might nlist() values require an extra level of indirection (AIX)?]) ;;
-esac
-
-AC_CACHE_CHECK(for a minimum recommended value of tickadj,
-ac_cv_var_min_rec_tickadj,
-[ans=no
-case "$host" in
- *-*-aix*)
- ans=40
- ;;
-esac
-ac_cv_var_min_rec_tickadj=$ans])
-case "$ac_cv_var_min_rec_tickadj" in
- ''|no) ;;
- *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj, [Should we recommend a minimum value for tickadj?]) ;;
-esac
-
-AC_CACHE_CHECK(if the TTY code permits PARENB and IGNPAR,
-ac_cv_var_no_parenb_ignpar,
-[ans=no
-case "$host" in
- i?86-*-linux*)
- ans=yes
- ;;
- mips-sgi-irix*)
- ans=yes
- ;;
- i?86-*-freebsd[[123]].*)
- ;;
- i?86-*-freebsd*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
-esac
-ac_cv_var_no_parenb_ignpar=$ans])
-case "$ac_cv_var_no_parenb_ignpar" in
- yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
-esac
-
-AC_MSG_CHECKING(if we're including debugging code)
-AC_ARG_ENABLE(debugging, [ --enable-debugging + include debugging code],
- [ntp_ok=$enableval], [ntp_ok=yes])
-if test "$ntp_ok" = "yes"; then
- AC_DEFINE(DEBUG, 1, [Enable debugging?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(for a the number of minutes in a DST adjustment)
-AC_ARG_ENABLE(dst_minutes, [ --enable-dst-minutes=60 + minutes per DST adjustment],
- [ans=$enableval], [ans=60])
-AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment])
-AC_MSG_RESULT($ans)
-
-AC_CACHE_CHECK(if we have the tty_clk line discipline/streams module,
- ac_cv_var_tty_clk,
- [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
- *yes*) ac_cv_var_tty_clk=yes ;;
- esac])
-case "$ac_cv_var_tty_clk" in
- yes) AC_DEFINE(TTYCLK, 1, [Do we have the tty_clk line discipline/streams module?]) ;;
-esac
-
-AC_CACHE_CHECK(for the ppsclock streams module,
- ac_cv_var_ppsclock,
- ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
-case "$ac_cv_var_ppsclock" in
- yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
-esac
-
-AC_CACHE_CHECK(for kernel multicast support, ac_cv_var_mcast,
- [ac_cv_var_mcast=no
- case "$host" in
- i386-sequent-sysv4) ;;
- *) AC_EGREP_CPP(yes,
- [#include <netinet/in.h>
-#ifdef IP_ADD_MEMBERSHIP
- yes
-#endif
- ], ac_cv_var_mcast=yes) ;;
- esac])
-case "$ac_cv_var_mcast" in
- yes) AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?]) ;;
-esac
-
-AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
- [ac_cv_var_ntp_syscalls=no
- case "$ac_cv_func___adjtimex" in
- yes)
- ac_cv_var_ntp_syscalls=libc
- ;;
- *) case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime" in
- yesyes)
- ac_cv_var_ntp_syscalls=libc
- ;;
- *) AC_EGREP_CPP(yes,
- [#include <sys/syscall.h>
-#if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
- yes
-#endif
- ], ac_cv_var_ntp_syscalls=kernel)
- ;;
- esac
- ;;
- esac])
-case "$ac_cv_var_ntp_syscalls" in
- libc)
- AC_DEFINE(NTP_SYSCALLS_LIBC, 1, [Do we have ntp_{adj,get}time in libc?])
- ;;
- kernel)
- AC_DEFINE(NTP_SYSCALLS_STD, 1, [Do we have ntp_{adj,get}time in the kernel?])
- ;;
- *)
- ;;
-esac
-
-AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll,
-[AC_EGREP_CPP(yes,
- [#include <sys/timex.h>
-#ifdef STA_FLL
- yes
-#endif
- ], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)])
-
-AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll,
-[dnl ac_cv_var_ntp_syscalls is {no,libc,kernel}
-case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in
- *no*)
- ac_cv_var_kernel_pll=no
- ;;
- *) ac_cv_var_kernel_pll=yes
- ;;
-esac])
-case "$ac_cv_var_kernel_pll" in
- yes)
- AC_DEFINE(KERNEL_PLL, 1, [Does the kernel support precision time discipline?])
- ;;
-esac
-
-AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer,
- [ans=no
- case "$host" in
- *-fujitsu-uxp*)
- ans=yes
- ;;
- *-ncr-sysv4*)
- ans=yes
- ;;
- *-univel-sysv*)
- ans=yes
- ;;
- esac
- ac_cv_var_size_returned_in_buffer=$ans])
-case "$ac_cv_var_size_returned_in_buffer" in
- yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER, 1, [Does SIOCGIFCONF return size in the buffer?]) ;;
-esac
-
-dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying,
-dnl [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code],
-dnl [ans=$enableval], [ans=no])
-dnl ac_cv_var_gdt_surveying=$ans])
-dnl case "$ac_cv_var_gdt_surveying" in
-dnl yes) AC_DEFINE(GDT_SURVEYING, 1, [Include the GDT Surveying code?]) ;;
-dnl esac
-
-# Check for ioctls TIOCGPPSEV
-AC_MSG_CHECKING(ioctl TIOCGPPSEV)
-if test "$ac_cv_header_termios_h" = "yes"; then
- AC_EGREP_CPP(yes,
- [#include <termios.h>
-#ifdef TIOCGPPSEV
- yes
-#endif
- ], ntp_ok=yes, ntp_ok=no)
-else
-ntp_ok=no
-fi
-if test "$ntp_ok" = "yes"; then
- AC_DEFINE(HAVE_TIOCGPPSEV, 1, [Do we have the TIOCGPPSEV ioctl (Solaris)?])
- ac_cv_var_oncore_ok=yes
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Check for ioctls TIOCSPPS
-AC_MSG_CHECKING(ioctl TIOCSPPS)
-if test "$ac_cv_header_termios_h" = "yes"; then
- AC_EGREP_CPP(yes,
- [#include <termios.h>
-#ifdef TIOCSPPS
- yes
-#endif
- ], ntp_ok=yes, ntp_ok=no)
-else
- ntp_ok=no
-fi
-
-if test "$ntp_ok" = "yes"; then
- AC_DEFINE(HAVE_TIOCSPPS, 1, [Do we have the TIOCSPPS ioctl (Solaris)?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Check for ioctls CIOGETEV
-AC_MSG_CHECKING(ioctl CIOGETEV)
-if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
- AC_EGREP_CPP(yes,
- [#include <sys/ppsclock.h>
-#ifdef CIOGETEV
- yes
-#endif
- ], ntp_ok=yes, ntp_ok=no)
-else
-ntp_ok=no
-fi
-if test "$ntp_ok" = "yes"; then
- ac_cv_var_oncore_ok=yes
- AC_DEFINE(HAVE_CIOGETEV, 1, [Do we have the CIOGETEV ioctl (SunOS, Linux)?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-
-# ATOM/PPSAPI stuff.
-
-# ATOM used to require struct timespec, but that's been fixed now.
-
-# case "$ac_cv_struct_timespec" in
-# 'yes')
-# ac_cv_var_atom_ok=yes
-# ;;
-# esac
-ac_cv_var_atom_ok=yes
-
-# Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
-
-# The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
-
-# The PPSAPI needs ATOM
-
-# The PPSAPI needs struct timespec.
-
-case "$ac_cv_c_inline$ac_cv_struct_timespec$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h" in
- inlineyes*yes*)
- 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
-
-# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
-AC_CHECK_HEADER(linux/serial.h)
-AC_MSG_CHECKING(ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG)
-case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
- yesyes)
- AC_EGREP_CPP(yes,
- [#include <sys/time.h>
-typedef int u_int;
-
-#include <sys/ppsclock.h>
-#include <linux/serial.h>
-
-#ifdef TIOCGSERIAL
-#ifdef TIOCSSERIAL
-#ifdef ASYNC_PPS_CD_POS
-#ifdef ASYNC_PPS_CD_NEG
-#ifdef CIOGETEV
- yes
-#endif
-#endif
-#endif
-#endif
-#endif
- ], ntp_ok=yes)
- ;;
- *)
- ntp_ok=no
- ;;
-esac
-if test "$ntp_ok" = "yes"; then
- AC_DEFINE(HAVE_TIO_SERIAL_STUFF, 1, [Do we have the TIO serial stuff?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Check for SHMEM_STATUS support
-AC_MSG_CHECKING(SHMEM_STATUS support)
-case "$ac_cv_header_sys_mman_h" in
- yes) ntp_ok=yes ;;
- *) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- AC_DEFINE(ONCORE_SHMEM_STATUS, 1, [Do we have support for SHMEM_STATUS?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-dnl dnl These are for OPT_PROGRAMS in authstuff/
-dnl AC_SUBST(AUTHCERT)
-dnl AC_SUBST(AUTHSPEED)
-dnl AC_SUBST(MD5DRIVER)
-dnl AC_SUBST(KEYPARITY)
-dnl AC_SUBST(MAKEIPFP)
-dnl AC_SUBST(MAKEPC1)
-dnl AC_SUBST(MAKEPC2)
-dnl AC_SUBST(MAKESP)
-dnl AC_SUBST(MKRANDKEYS)
-dnl AC_SUBST(OMAKEIPFP)
-dnl AC_SUBST(UNIXCERT)
-
-ntp_refclock=no
-
-# HPUX only, and by explicit request
-AC_MSG_CHECKING(Datum/Bancomm bc635/VME interface)
-AC_ARG_ENABLE(BANCOMM,
- AC_HELP_STRING([--enable-BANCOMM], [- Datum/Bancomm bc635/VME interface]),
- [ntp_ok=$enableval], [ntp_ok=no])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_BANC, 1, [Datum/Bancomm bc635/VME interface?])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$host" in
- yes*-*-hpux*) ;;
- yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
-
-#HPUX only, and only by explicit request
-AC_MSG_CHECKING(TrueTime GPS receiver/VME interface)
-AC_ARG_ENABLE(GPSVME,
- AC_HELP_STRING([--enable-GPSVME], [- TrueTime GPS receiver/VME interface]),
- [ntp_ok=$enableval], [ntp_ok=no])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_GPSVME, 1, [TrueTime GPS receiver/VME interface?])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$host" in
- yes*-*-hpux*) ;;
- yes*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
-
-AC_MSG_CHECKING(for PCL720 clock support)
-case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
- yesyesyes)
- AC_DEFINE(CLOCK_PPS720, 1, [PCL 720 clock support])
- ans=yes
- ;;
- *)
- ans=no
- ;;
-esac
-AC_MSG_RESULT($ans)
-
-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:]),
- [ntp_eac=$enableval], [ntp_eac=yes])
-AC_MSG_RESULT($ntp_eac)
-
-AC_MSG_CHECKING(if we have support for PARSE clocks)
-case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
- yes*yes*)
- ntp_canparse=yes
- ;;
- *) ntp_canparse=no
- ;;
-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$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?])
- ;;
- *) ntp_canaudio=no ;;
-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], [s ACTS modem service]),
- [ntp_ok=$enableval],
- [AC_EGREP_CPP(yes,
- [#include <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
- ], ntp_ok=$ntp_eac, ntp_ok=no)])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_ACTS, 1, [ACTS modem service])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Arbiter 1088A/B GPS receiver)
-AC_ARG_ENABLE(ARBITER,
- AC_HELP_STRING([--enable-ARBITER], [+ Arbiter 1088A/B GPS receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_ARBITER, 1, [Arbiter 1088A/B GPS receiver])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Arcron MSF receiver)
-AC_ARG_ENABLE(ARCRON_MSF,
- AC_HELP_STRING([--enable-ARCRON-MSF], [+ Arcron MSF receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_ARCRON_MSF, 1, [ARCRON support?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Austron 2200A/2201A GPS receiver)
-AC_ARG_ENABLE(AS2201,
- AC_HELP_STRING([--enable-AS2201], [+ Austron 2200A/2201A GPS receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_AS2201, 1, [Austron 2200A/2201A GPS receiver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(ATOM PPS interface)
-AC_ARG_ENABLE(ATOM,
- AC_HELP_STRING([--enable-ATOM], [s ATOM PPS interface]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-case "$ac_cv_var_atom_ok" in
- no) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_ATOM, 1, [PPS interface?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Chrono-log K-series WWVB receiver)
-AC_ARG_ENABLE(CHRONOLOG,
- AC_HELP_STRING([--enable-CHRONOLOG], [+ Chrono-log K-series WWVB receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_CHRONOLOG, 1, [Chronolog K-series WWVB receiver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(CHU modem/decoder)
-AC_ARG_ENABLE(CHU,
- AC_HELP_STRING([--enable-CHU], [+ CHU modem/decoder]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_CHU, 1, [CHU modem/decoder])
-fi
-AC_MSG_RESULT($ntp_ok)
-ac_refclock_chu=$ntp_ok
-
-AC_MSG_CHECKING(CHU audio/decoder)
-AC_ARG_ENABLE(AUDIO-CHU,
- AC_HELP_STRING([--enable-AUDIO-CHU], [s CHU audio/decoder]),
- [ntp_ok=$enableval],
- [case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in
- *no*) ntp_ok=no ;;
- *) ntp_ok=yes ;;
-esac])
-if test "$ntp_ok" = "yes"; then
- AC_DEFINE(AUDIO_CHU, 1, [CHU audio/decoder?])
-fi
-AC_MSG_RESULT($ntp_ok)
-# We used to check for sunos/solaris target...
-case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in
- yes*no*) AC_MSG_WARN(*** But the expected answer is...no ***) ;;
-esac
-
-# Not under HP-UX
-AC_MSG_CHECKING(Datum Programmable Time System)
-AC_ARG_ENABLE(DATUM,
- AC_HELP_STRING([--enable-DATUM], [s Datum Programmable Time System]),
- [ntp_ok=$enableval],
- [case "$ac_cv_header_termios_h" in
- yes)
- ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_DATUM, 1, [Datum Programmable Time System?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Dumb generic hh:mm:ss local clock)
-AC_ARG_ENABLE(DUMBCLOCK,
- AC_HELP_STRING([--enable-DUMBCLOCK], [+ Dumb generic hh:mm:ss local clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_DUMBCLOCK, 1, [Dumb generic hh:mm:ss local clock?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Forum Graphic GPS)
-AC_ARG_ENABLE(FG,
- AC_HELP_STRING([--enable-FG], [+ Forum Graphic GPS]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_FG, 1, [Forum Graphic GPS datating station driver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Requires modem control
-AC_MSG_CHECKING(Heath GC-1000 WWV/WWVH receiver)
-AC_ARG_ENABLE(HEATH,
- AC_HELP_STRING([--enable-HEATH], [s Heath GC-1000 WWV/WWVH receiver]),
- [ntp_ok=$enableval],
- [AC_EGREP_CPP(yes,
- [#include <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
- ], ntp_ok=$ntp_eac, ntp_ok=no)])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_HEATH, 1, [Heath GC-1000 WWV/WWVH receiver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(for hopf serial clock device)
-AC_ARG_ENABLE(HOPFSERIAL,
- AC_HELP_STRING([--enable-HOPFSERIAL], [+ hopf serial clock device]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_HOPF_SERIAL, 1, [HOPF serial clock device?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(for hopf PCI clock 6039)
-AC_ARG_ENABLE(HOPFPCI,
- AC_HELP_STRING([--enable-HOPFPCI], [+ hopf 6039 PCI board]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_HOPF_PCI, 1, [HOPF PCI clock device?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(HP 58503A GPS receiver)
-AC_ARG_ENABLE(HPGPS,
- AC_HELP_STRING([--enable-HPGPS], [+ HP 58503A GPS receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_HPGPS, 1, [HP 58503A GPS receiver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(IRIG audio decoder)
-AC_ARG_ENABLE(IRIG,
- AC_HELP_STRING([--enable-IRIG], [s IRIG audio decoder]),
- [ntp_ok=$enableval],
- [case "$ntp_eac$ntp_canaudio" in
- *no*) ntp_ok=no ;;
- *) ntp_ok=yes ;;
- esac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_IRIG, 1, [IRIG audio decoder?])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canaudio" in
- yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
-
-AC_MSG_CHECKING(for JJY receiver)
-AC_ARG_ENABLE(JJY,
- AC_HELP_STRING([--enable-JJY], [+ JJY receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_JJY, 1, [JJY receiver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Rockwell Jupiter GPS receiver)
-AC_ARG_ENABLE(JUPITER,
- AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]),
- [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)
-
-AC_MSG_CHECKING(Leitch CSD 5300 Master Clock System Driver)
-AC_ARG_ENABLE(LEITCH,
- AC_HELP_STRING([--enable-LEITCH], [+ Leitch CSD 5300 Master Clock System Driver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_LEITCH, 1, [Leitch CSD 5300 Master Clock System Driver?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(local clock reference)
-AC_ARG_ENABLE(LOCAL-CLOCK,
- AC_HELP_STRING([--enable-LOCAL-CLOCK], [+ local clock reference]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_LOCAL, 1, [local clock reference?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(EES M201 MSF receiver)
-AC_ARG_ENABLE(MSFEES,
- AC_HELP_STRING([--enable-MSFEES], [+ EES M201 MSF receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_MSFEES, 1, [EES M201 MSF receiver])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Not Ultrix
-AC_MSG_CHECKING(Magnavox MX4200 GPS receiver)
-AC_ARG_ENABLE(MX4200,
- AC_HELP_STRING([--enable-MX4200 ], [s Magnavox MX4200 GPS receiver]),
- [ntp_ok=$enableval],
- [case "$ac_cv_var_ppsclock" in
- yes) ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_MX4200, 1, [Magnavox MX4200 GPS receiver])
-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(for NeoClock4X receiver)
-AC_ARG_ENABLE(NEOCLOCK4X,
- 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])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(NMEA GPS receiver)
-AC_ARG_ENABLE(NMEA,
- AC_HELP_STRING([--enable-NMEA], [+ NMEA GPS receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_NMEA, 1, [NMEA GPS receiver])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(for ONCORE Motorola VP/UT Oncore GPS)
-AC_ARG_ENABLE(ONCORE,
- AC_HELP_STRING([--enable-ONCORE], [s Motorola VP/UT Oncore GPS receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-case "$ac_cv_var_oncore_ok" in
- no) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_ONCORE, 1, [Motorola UT Oncore GPS])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(for Palisade clock)
-AC_ARG_ENABLE(PALISADE,
- AC_HELP_STRING([--enable-PALISADE], [s Palisade clock]),
- [ntp_ok=$enableval],
- [case "$ac_cv_header_termios_h" in
- yes)
- ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac])
-
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_PALISADE, 1, [Palisade clock])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Conrad parallel port radio clock)
-AC_ARG_ENABLE(PCF,
- AC_HELP_STRING([--enable-PCF ], [+ Conrad parallel port radio clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_PCF, 1, [Conrad parallel port radio clock])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(PST/Traconex 1020 WWV/WWVH receiver)
-AC_ARG_ENABLE(PST,
- AC_HELP_STRING([--enable-PST], [+ PST/Traconex 1020 WWV/WWVH receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_PST, 1, [PST/Traconex 1020 WWV/WWVH receiver])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Requires modem control
-AC_MSG_CHECKING(PTB modem service)
-AC_ARG_ENABLE(PTBACTS,
- AC_HELP_STRING([--enable-PTBACTS], [s PTB modem service]),
- [ntp_ok=$enableval],
- [AC_EGREP_CPP(yes,
- [#include <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
- ], ntp_ok=$ntp_eac, ntp_ok=no)])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_PTBACTS, 1, [PTB modem service])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(RIPENCC specific Trimble driver)
-AC_ARG_ENABLE(RIPENCC,
- AC_HELP_STRING([--enable-RIPENCC], [- RIPENCC specific Trimble driver]),
- [ntp_ok=$enableval], [ntp_ok=no])
-# 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
-case "$ac_cv_var_ripe_ncc_ok" in
- no) ntp_ok=no ;;
-esac
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_RIPENCC, ,[RIPE NCC Trimble clock])
-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]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_SPECTRACOM, 1, [Spectracom 8170/Netclock/2 WWVB receiver])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(KSI/Odetics TPRO/S GPS receiver/IRIG interface)
-AC_ARG_ENABLE(TPRO,
- AC_HELP_STRING([--enable-TPRO], [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]),
- [ntp_ok=$enableval],
- [case "$ac_cv_header_sys_tpro_h" in
- yes)
- ntp_ok=$ntp_eac
- ;;
- *) ntp_ok=no
- ;;
- esac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_TPRO, 1, [KSI/Odetics TPRO/S GPS receiver/IRIG interface])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ac_cv_header_sys_tpro" in
- yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
-
-AC_MSG_CHECKING(TRAK 8810 GPS receiver)
-AC_ARG_ENABLE(TRAK,
- AC_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_TRAK, 1, [TRAK 8810 GPS receiver])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Not on a vax-dec-bsd
-AC_MSG_CHECKING(Kinemetrics/TrueTime receivers)
-AC_ARG_ENABLE(TRUETIME,
- AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]),
- [ntp_ok=$enableval],
- [case "$host" in
- vax-dec-bsd)
- ntp_ok=no
- ;;
- *)
- ntp_ok=$ntp_eac
- ;;
- esac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_TRUETIME, 1, [Kinemetrics/TrueTime receivers])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$host" in
- yesvax-dec-bsd) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
-
-AC_MSG_CHECKING(TrueTime 560 IRIG-B decoder)
-AC_ARG_ENABLE(TT560,
- AC_HELP_STRING([--enable-TT560], [- TrueTime 560 IRIG-B decoder]),
- [ntp_ok=$enableval], [ntp_ok=no])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_TT560, , [TrueTime 560 IRIG-B decoder?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(Ultralink M320 WWVB receiver)
-AC_ARG_ENABLE(ULINK,
- AC_HELP_STRING([--enable-ULINK], [+ Ultralink WWVB receiver]),
- [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?])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-# Requires modem control
-AC_MSG_CHECKING(USNO modem service)
-AC_ARG_ENABLE(USNO,
- AC_HELP_STRING([--enable-USNO], [s USNO modem service]),
- [ntp_ok=$enableval],
- [AC_EGREP_CPP(yes,
- [#include <termios.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-#ifdef TIOCMBIS
- yes
-#endif
- ], ntp_ok=$ntp_eac, ntp_ok=no)])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_USNO, 1, [USNO modem service])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(WWV receiver)
-AC_ARG_ENABLE(WWV,
- AC_HELP_STRING([--enable-WWV], [s WWV Audio receiver]),
- [ntp_ok=$enableval],
- [case "$ntp_eac$ntp_canaudio" in
- *no*) ntp_ok=no ;;
- *) ntp_ok=yes ;;
- esac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_WWV, 1, [WWV audio driver])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canaudio" in
- yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
-esac
-
-AC_MSG_CHECKING(for Zyfer receiver)
-AC_ARG_ENABLE(ZYFER,
- AC_HELP_STRING([--enable-ZYFER], [+ Zyfer GPStarplus receiver]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(CLOCK_ZYFER, 1, [Zyfer GPStarplus])
-fi
-AC_MSG_RESULT($ntp_ok)
-
-AC_MSG_CHECKING(for default inclusion of all suitable PARSE clocks)
-AC_ARG_ENABLE(parse-clocks, [ --enable-parse-clocks - include all suitable PARSE clocks:],
- [ntp_eapc=$enableval],
- [case "$ntp_eac" in
- yes) ntp_eapc=$ntp_canparse ;;
- *) ntp_eapc=no ;;
- esac
- ntp_eapc=no])
-AC_MSG_RESULT($ntp_eapc)
-
-case "$ntp_eac$ntp_eapc$ntp_canparse" in
- noyes*)
- AC_MSG_ERROR("--enable-parse-clocks" requires "--enable-all-clocks".)
- ;;
- yesyesno)
- AC_MSG_ERROR(You said "--enable-parse-clocks" but PARSE isn't supported on this platform!)
- ;;
- *) ;;
-esac
-
-ntp_libparse=no
-ntp_parseutil=no
-ntp_rawdcf=no
-
-AC_MSG_CHECKING(Diem Computime Radio Clock)
-AC_ARG_ENABLE(COMPUTIME,
- AC_HELP_STRING([--enable-COMPUTIME], [s Diem Computime Radio Clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_COMPUTIME, 1, [Diems Computime Radio Clock?])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(ELV/DCF7000 clock)
-AC_ARG_ENABLE(DCF7000,
- AC_HELP_STRING([--enable-DCF7000], [s ELV/DCF7000 clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_DCF7000, 1, [ELV/DCF7000 clock?])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(HOPF 6021 clock)
-AC_ARG_ENABLE(HOPF6021,
- AC_HELP_STRING([--enable-HOPF6021 ], [s HOPF 6021 clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_HOPF6021, 1, [HOPF 6021 clock?])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(Meinberg clocks)
-AC_ARG_ENABLE(MEINBERG,
- AC_HELP_STRING([--enable-MEINBERG], [s Meinberg clocks]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_MEINBERG, 1, [Meinberg clocks])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(DCF77 raw time code)
-AC_ARG_ENABLE(RAWDCF,
- AC_HELP_STRING([--enable-RAWDCF], [s DCF77 raw time code]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_parseutil=yes
- ntp_refclock=yes
- ntp_rawdcf=yes
- AC_DEFINE(CLOCK_RAWDCF, 1, [DCF77 raw time code])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-case "$ntp_rawdcf" in
- yes)
- AC_CACHE_CHECK(if we must enable parity for RAWDCF,
- ac_cv_var_rawdcf_parity,
- [ans=no
- case "$host" in
- *-*-linux*)
- ans=yes
- ;;
- esac
- ac_cv_var_rawdcf_parity=$ans])
- case "$ac_cv_var_rawdcf_parity" in
- yes) AC_DEFINE(RAWDCF_NO_IGNPAR, 1, [Should we not IGNPAR (Linux)?]) ;;
- esac
- ;;
-
- *) # HMS: Is this a good idea?
- ac_cv_var_rawdcf_parity=no
- ;;
-esac
-
-AC_MSG_CHECKING(RCC 8000 clock)
-AC_ARG_ENABLE(RCC8000,
- AC_HELP_STRING([--enable-RCC8000], [s RCC 8000 clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_RCC8000, 1, [RCC 8000 clock])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(Schmid DCF77 clock)
-AC_ARG_ENABLE(SCHMID,
- AC_HELP_STRING([--enable-SCHMID ], [s Schmid DCF77 clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_SCHMID, 1, [Schmid DCF77 clock])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(Trimble GPS receiver/TAIP protocol)
-AC_ARG_ENABLE(TRIMTAIP,
- AC_HELP_STRING([--enable-TRIMTAIP], [s Trimble GPS receiver/TAIP protocol]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_TRIMTAIP, 1, [Trimble GPS receiver/TAIP protocol])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(Trimble GPS receiver/TSIP protocol)
-AC_ARG_ENABLE(TRIMTSIP,
- AC_HELP_STRING([--enable-TRIMTSIP], [s Trimble GPS receiver/TSIP protocol]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_TRIMTSIP, 1, [Trimble GPS receiver/TSIP protocol])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(WHARTON 400A Series clock)
-AC_ARG_ENABLE(WHARTON,
- AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-
-AC_MSG_CHECKING(VARITEXT clock)
-AC_ARG_ENABLE(VARITEXT,
- AC_HELP_STRING([--enable-VARITEXT], [s VARITEXT clock]),
- [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
-if test "$ntp_ok" = "yes"; then
- ntp_libparse=yes
- ntp_refclock=yes
- AC_DEFINE(CLOCK_VARITEXT, 1, [VARITEXT protocol])
-fi
-AC_MSG_RESULT($ntp_ok)
-case "$ntp_ok$ntp_canparse" in
- yesno)
- AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
- ;;
-esac
-AC_SUBST(LIBPARSE)
-AC_SUBST(MAKE_LIBPARSE)
-AC_SUBST(MAKE_LIBPARSE_KERNEL)
-AC_SUBST(MAKE_CHECK_Y2K)
-AC_MSG_CHECKING(if we need to make and use the parse libraries)
-ans=no
-case "$ntp_libparse" in
- yes)
- ans=yes
- AC_DEFINE(CLOCK_PARSE, 1, [PARSE driver interface])
- LIBPARSE=../libparse/libparse.a
- MAKE_LIBPARSE=libparse.a
- MAKE_CHECK_Y2K=check_y2k
- AC_DEFINE(PPS_SAMPLE, 1, [PPS auxiliary interface for ATOM?])
- AC_DEFINE(CLOCK_ATOM)
- ;;
-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(OPENSSL)
-AC_SUBST(OPENSSL_INC)
-AC_SUBST(OPENSSL_LIB)
-
-AC_SUBST(MAKE_NTP_KEYGEN)
-
-AC_MSG_CHECKING(for openssl library directory)
-AC_ARG_WITH(openssl-libdir,
- AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]),
-[ans=$withval], [ans=yes])
-case "$ans" in
- no) ;;
- yes) # Look in:
- ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
- ;;
- *) # Look where they said
- ;;
-esac
-case "$ans" in
- no) ;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $ans no
- do
- 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)
- ans=no
- OPENSSL_LIB=
- ;;
- *) ans=$i
- OPENSSL_LIB=$ans
- ;;
- esac
- ;;
-esac
-AC_MSG_RESULT($ans)
-
-AC_MSG_CHECKING(for openssl include directory)
-AC_ARG_WITH(openssl-incdir,
- AC_HELP_STRING([--with-openssl-incdir], [+ =/something/reasonable]),
-[ans=$withval], [ans=yes])
-case "$ans" in
- no) ;;
- yes) # look in:
- ans="/usr/include /usr/local/include /usr/local/ssl/include"
- ;;
- *) # Look where they said
- ;;
-esac
-case "$ans" in
- no) ;;
- *) # look for openssl/opensslconf.h:
- for i in $ans no
- do
- test -f $i/openssl/opensslconf.h && break
- done
- case "$i" in
- no)
- ans=no
- OPENSSL_INC=
- ;;
- *) ans=$i
- OPENSSL_INC=$ans
- ;;
- esac
- ;;
-esac
-AC_MSG_RESULT($ans)
-
-AC_ARG_WITH(crypto,
- AC_HELP_STRING([--with-crypto], [+ =openssl]),
-[ans=$withval], [ans=yes])
-case "$ans" in
- no) ;;
- yes|openssl)
- 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"
- 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,
- AC_HELP_STRING([--with-electricfence], [- compile with ElectricFence malloc debugger]),
-[ans=$withval], [ans=no])
-case "$ans" in
- no) ;;
- *)
- LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
- EF_PROGS="eftest tstheap"
- AC_SUBST(EF_PROGS)
- EF_LIBS=libefence.a
- AC_SUBST(EF_LIBS)
- ans=yes
- ;;
-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)
-
-AC_MSG_CHECKING(if we can make dcf parse utilities)
-ans=no
-if test "$ntp_parseutil" = "yes"; then
- case "$host" in
- *-*-sunos4*|*-*-solaris2*|*-*-linux*)
- ans="dcfd testdcf"
- DCFD=dcfd
- TESTDCF=testdcf
- ;;
- esac
-fi
-AC_MSG_RESULT($ans)
-
-AC_SUBST(MAKE_PARSEKMODULE)
-AC_MSG_CHECKING(if we can build kernel streams modules for parse)
-ans=no
-case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
- yesyes)
- case "$host" in
- sparc-*-sunos4*)
- case "$ac_cv_var_kernel_pll" in
- yes)
- AC_DEFINE(PPS_SYNC, 1, [PARSE kernel PLL PPS support])
- ;;
- esac
- ans=parsestreams
- MAKE_PARSEKMODULE=parsestreams.loadable_module.o
- ;;
- sparc-*-solaris2*)
- ans=parsesolaris
- MAKE_PARSEKMODULE=parse
- ;;
- esac
- ;;
-esac
-AC_MSG_RESULT($ans)
-
-AC_MSG_CHECKING(if we need basic refclock support)
-if test "$ntp_refclock" = "yes"; then
- AC_DEFINE(REFCLOCK, 1, [Basic refclock support?])
-fi
-AC_MSG_RESULT($ntp_refclock)
-
-dnl Things that can be made in clockstuff/
-AC_SUBST(PROPDELAY) dnl Set to "propdelay"
-AC_SUBST(CHUTEST) dnl Set to "chutest"
-AC_SUBST(CLKTEST) dnl Set to "clktest"
-
-AC_SUBST(MAKE_ADJTIMED)
-AC_MSG_CHECKING(if we want HP-UX adjtimed support)
-case "$host" in
- *-*-hpux[[56789]]*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-if test "$ans" = "yes"; then
- MAKE_ADJTIMED=adjtimed
- AC_DEFINE(NEED_HPUX_ADJTIME, 1, [Do we need HPUX adjtime() library support?])
-fi
-AC_MSG_RESULT($ans)
-
-AC_MSG_CHECKING(if we want QNX adjtime support)
-case "$host" in
- *-*-qnx*)
- ans=yes
- ;;
- *) ans=no
- ;;
-esac
-if test "$ans" = "yes"; then
- AC_DEFINE(NEED_QNX_ADJTIME, 1, [Do we need the qnx adjtime call?])
-fi
-AC_MSG_RESULT($ans)
-
-AC_CACHE_CHECK(if we can read kmem, ac_cv_var_can_kmem,
-[AC_ARG_ENABLE(kmem, [ --enable-kmem s read /dev/kmem for tick and/or tickadj],
- [ans=$enableval],
- [case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
- *yes*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- case "$host" in
- *-*-aix*)
- #ans=no
- ;;
- *-*-domainos) # Won't be found...
- ans=no
- ;;
- *-*-hpux*)
- #ans=no
- ;;
- *-*-irix[[456]]*)
- ans=no
- ;;
- *-*-linux*)
- ans=no
- ;;
- *-*-winnt3.5)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- esac
- ])
-ac_cv_var_can_kmem=$ans])
-
-case "$ac_cv_var_can_kmem" in
- *yes*) ;;
- *) AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?]) ;;
-esac
-
-AC_CACHE_CHECK(if adjtime is accurate, ac_cv_var_adjtime_is_accurate,
-[AC_ARG_ENABLE(accurate-adjtime, [ --enable-accurate-adjtime
- s the adjtime() call is accurate],
- [ans=$enableval],
- [case "$host" in
- i386-sequent-ptx*)
- ans=no
- ;;
- i386-unknown-osf1*)
- ans=yes
- ;;
- mips-sgi-irix[[456]]*)
- ans=yes
- ;;
- *-fujitsu-uxp*)
- ans=yes
- ;;
- *-ibm-aix[[45]]*)
- ans=yes
- ;;
- *-*-linux*)
- ans=yes
- ;;
- *-*-solaris2.[[01]])
- ans=no
- ;;
- *-*-solaris2*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ])
-ac_cv_var_adjtime_is_accurate=$ans])
-case "$ac_cv_var_adjtime_is_accurate" in
- yes) AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?]) ;;
-esac
-
-AC_CACHE_CHECK([the name of 'tick' in the kernel],
-ac_cv_var_nlist_tick,
-[ans=_tick
-case "$host" in
- m68*-hp-hpux*) # HP9000/300?
- ans=_old_tick
- ;;
- *-apple-aux[[23]]*)
- ans=tick
- ;;
- *-hp-hpux*)
- ans=old_tick
- ;;
- *-ibm-aix[[345]]*)
- ans=no
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-ptx*)
- ans=tick
- ;;
- *-*-sco3.2v[[45]]*)
- ans=no
- ;;
- *-*-solaris2*)
- ans=nsec_per_tick
- ;;
- *-*-sysv4*)
- ans=tick
- ;;
-esac
-ac_cv_var_nlist_tick=$ans])
-case "$ac_cv_var_nlist_tick" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick", [What is the name of TICK in the kernel?]) ;;
-esac
-#
-AC_CACHE_CHECK([for the units of 'tick'],
-ac_cv_var_tick_nano,
-[ans=usec
-case "$host" in
- *-*-solaris2*)
- ans=nsec
- ;;
-esac
-ac_cv_var_tick_nano=$ans])
-case "$ac_cv_var_tick_nano" in
- nsec)
- AC_DEFINE(TICK_NANO, 1, [Is K_TICK_NAME in nanoseconds?])
- ;;
-esac
-#
-AC_CACHE_CHECK([the name of 'tickadj' in the kernel],
-ac_cv_var_nlist_tickadj,
-[ans=_tickadj
-case "$host" in
- m68*-hp-hpux*) # HP9000/300?
- ans=_tickadj
- ;;
- *-apple-aux[[23]]*)
- ans=tickadj
- ;;
- *-hp-hpux10*)
- ans=no
- ;;
- *-hp-hpux9*)
- ans=no
- ;;
- *-hp-hpux*)
- ans=tickadj
- ;;
- *-*-aix*)
- ans=tickadj
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-ptx*)
- ans=tickadj
- ;;
- *-*-sco3.2v4*)
- ans=no
- ;;
- *-*-sco3.2v5.0*)
- ans=clock_drift
- ;;
- *-*-solaris2*)
- ans=no # hrestime_adj
- ;;
- *-*-sysv4*)
- ans=tickadj
- ;;
-esac
-ac_cv_var_nlist_tickadj=$ans])
-case "$ac_cv_var_nlist_tickadj" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj", [What is the name of TICKADJ in the kernel?]) ;;
-esac
-#
-AC_CACHE_CHECK([for the units of 'tickadj'],
-ac_cv_var_tickadj_nano,
-[ans=usec
-case "$host" in
- *-*-solaris2*)
- ans=nsec
- ;;
-esac
-ac_cv_var_tickadj_nano=$ans])
-case "$ac_cv_var_tickadj_nano" in
- nsec)
- AC_DEFINE(TICKADJ_NANO, 1, [Is K_TICKADJ_NAME in nanoseconds?])
- ;;
-esac
-#
-AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel],
-ac_cv_var_nlist_dosynctodr,
-[case "$host" in
- *-apple-aux[[23]]*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=dosynctodr
- ;;
- *-*-aix*)
- ans=dosynctodr
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-nextstep*)
- ans=_dosynctodr
- ;;
- *-*-ptx*)
- ans=doresettodr
- ;;
- *-*-sco3.2v4*)
- ans=no
- ;;
- *-*-sco3.2v5*)
- ans=track_rtc
- ;;
- *-*-solaris2*)
- ans=dosynctodr
- ;;
- *-*-sysv4*)
- ans=doresettodr
- ;;
- *)
- ans=_dosynctodr
- ;;
-esac
-ac_cv_var_nlist_dosynctodr=$ans])
-case "$ac_cv_var_nlist_dosynctodr" in
- no) ;;
- *) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr", [What is (probably) the name of DOSYNCTODR in the kernel?])
- ;;
-esac
-#
-AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel],
-ac_cv_var_nlist_noprintf,
-[case "$host" in
- *-apple-aux[[23]]*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=noprintf
- ;;
- *-*-aix*)
- ans=noprintf
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-ptx*)
- ans=noprintf
- ;;
- *-*-nextstep*)
- ans=_noprintf
- ;;
- *-*-solaris2*)
- ans=noprintf
- ;;
- *-*-sysv4*)
- ans=noprintf
- ;;
- *)
- ans=_noprintf
- ;;
-esac
-ac_cv_var_nlist_noprintf=$ans])
-case "$ac_cv_var_nlist_noprintf" in
- no) ;;
- *) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf", [What is (probably) the name of NOPRINTF in the kernel?])
- ;;
-esac
-
-dnl The tick/tickadj sections were written by Skippy, who never learned
-dnl that it's impolite (horridly gross) to show your guts in public.
-
-dnl tick tickadj
-dnl 10000 80 Unixware
-dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
-dnl 10000 150 sgi IRIX
-dnl 1000000L/hz 1000 RS6000 && NOKMEM
-dnl 1000000L/hz 668 DOMAINOS && NOKMEM
-dnl 1000000L/hz 500/HZ other && NOKMEM
-dnl txc.tick 1 Linux
-dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz
-dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE),
-dnl (RS6000 && !NOKMEM), SINIX MIPS
-
-dnl But we'll only use these "values" if we can't find anything else.
-
-AC_CACHE_CHECK(for a default value for 'tick', ac_cv_var_tick,
-[AC_ARG_ENABLE(tick, [ --enable-tick=VALUE s force a value for 'tick'],
- [ans=$enableval],
- [ans=no
- case "$host" in
- XXX-*-pc-cygwin*)
- ;;
- *-univel-sysv*)
- ans=10000
- ;;
- *-*-irix*)
- ans=10000
- ;;
- *-*-linux*)
- ans=txc.tick
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-winnt3.5)
- ans='(every / 10)'
- ;;
- *-*-unicosmp*)
- ans=10000
- ;;
- *)
- ans='1000000L/hz'
- ;;
- esac])
-ac_cv_var_tick=$ans])
-case "$ac_cv_var_tick" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *) AC_DEFINE_UNQUOTED(PRESET_TICK, $ac_cv_var_tick, [Preset a value for 'tick'?]) ;;
-esac
-
-AC_CACHE_CHECK(for a default value for 'tickadj', ac_cv_var_tickadj,
-[AC_ARG_ENABLE(tickadj, [ --enable-tickadj=VALUE s force a value for 'tickadj'],
- [ans=$enableval],
- [ans='500/hz'
- case "$host" in
- *-fujitsu-uxp*)
- case "$ac_cv_var_adjtime_is_accurate" in
- yes) ans='tick/16' ;;
- esac
- ;;
- XXX-*-pc-cygwin*)
- ans=no
- ;;
- *-univel-sysv*)
- ans=80
- ;;
- *-*-aix*)
- case "$ac_cv_var_can_kmem" in
- no) ans=1000 ;;
- esac
- ;;
- *-*-domainos) # Skippy: won't be found...
- case "$ac_cv_var_can_kmem" in
- no) ans=668 ;;
- esac
- ;;
- *-*-hpux*)
- case "$ac_cv_var_adjtime_is_accurate" in
- yes) ans='tick/16' ;;
- esac
- ;;
- *-*-irix*)
- ans=150
- ;;
- *-*-mpeix*)
- ans=no
- ;;
- *-*-sco3.2v5.0*)
- ans=10000L/hz
- ;;
- *-*-solaris2*)
- case "$ac_cv_var_adjtime_is_accurate" in
- yes)
- #ans='tick/16'
- ;;
- esac
- ;;
- *-*-winnt3.5)
- ans=50
- ;;
- *-*-unicosmp*)
- ans=150
- ;;
- esac])
-ac_cv_var_tickadj=$ans])
-case "$ac_cv_var_tickadj" in
- ''|no) ;; # HMS: I think we can only get 'no' here...
- *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $ac_cv_var_tickadj, [Preset a value for 'tickadj'?]) ;;
-esac
-
-# Newer versions of ReliantUNIX round adjtime() values down to
-# 1/100s (system tick). Sigh ...
-# Unfortunately, there is no easy way to know if particular release
-# has this "feature" or any obvious way to test for it.
-case "$host" in
- mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK, 1, [Do we want the ReliantUNIX clock hacks?]) ;;
-esac
-
-case "$host" in
- *-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK, 1, [Do we want the SCO clock hacks?]) ;;
-esac
-
-ac_cv_make_tickadj=yes
-case "$ac_cv_var_can_kmem$ac_cv_var_tick$ac_cv_var_tickadj" in
- nonono) # Don't read KMEM, no presets. Bogus.
- AC_MSG_WARN(Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.)
- ac_cv_make_tickadj=no
- ;;
- nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
- AC_MSG_WARN(Can't read kmem but no PRESET_TICK. No tickadj.)
- ac_cv_make_tickadj=no
- ;;
- no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
- AC_MSG_WARN(Can't read kmem but no PRESET_TICKADJ. No tickadj.)
- ac_cv_make_tickadj=no
- ;;
- no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
- ;;
- yesnono) # Read KMEM, no presets. Cool.
- ;;
- yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
- AC_MSG_WARN(PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.)
- ;;
- yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
- ;;
- yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
- ;;
- *) # Generally bogus.
- AC_MSG_ERROR(This shouldn't happen.)
- ;;
-esac
-
-AC_SUBST(MAKE_NTPTIME)
-AC_CACHE_CHECK(if we want and can make the ntptime utility, ac_cv_make_ntptime,
-[case "$host" in
- *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
- yesyes)
- ans=yes
- ;;
- *)
- ans=no
- ;;
- esac
- ;;
-esac
-ac_cv_make_ntptime=$ans])
-case "$ac_cv_make_ntptime" in
- yes)
- MAKE_NTPTIME=ntptime
- ;;
-esac
-
-AC_SUBST(MAKE_TICKADJ)
-case "$host" in
- mips-sni-sysv4*)
- # tickadj is pretty useless on newer versions of ReliantUNIX
- # Do not bother
- ac_cv_make_tickadj=no
- ;;
- *-*-irix*)
- ac_cv_make_tickadj=no
- ;;
- *-*-solaris2*)
- # DLM says tickadj is a no-no starting with solaris2.5
- case "$host" in
- *-*-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)
-case "$ac_cv_make_tickadj" in
- yes)
- MAKE_TICKADJ=tickadj
- ;;
-esac
-
-AC_SUBST(MAKE_TIMETRIM)
-AC_CACHE_CHECK(if we want and can make the timetrim utility, ac_cv_make_timetrim,
-[case "$host" in
- *-*-irix*)
- ac_cv_make_timetrim=yes
- ;;
- *-*-unicosmp*)
- ac_cv_make_timetrim=yes
- ;;
- *)
- ac_cv_make_timetrim=no
- ;;
-esac])
-case "$ac_cv_make_timetrim" in
- yes)
- MAKE_TIMETRIM=timetrim
- ;;
-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],
- [ans=no
- case "$host" in
- *-fujitsu-uxp*)
- ans=yes
- ;;
- *-univel-sysv*)
- ans=yes
- ;;
- *-*-aix3.2*)
- ans=yes
- ;;
- *-*-aix[[45]]*)
- ans=yes
- ;;
- *-*-bsdi*)
- ans=yes
- ;;
- *-*-domainos)
- ans=yes
- ;;
- *-*-freebsd*)
- ans=yes
- ;;
- *-*-hpux*)
- ans=yes
- ;;
- *-*-irix6*)
- ans=yes
- ;;
- *-*-linux*)
- ans=yes
- ;;
- *-*-mpeix*)
- ans=yes
- ;;
- *-*-osf*)
- ans=yes
- ;;
- *-*-ptx*)
- ans=yes
- ;;
- *-*-solaris2*)
- ans=yes
- ;;
- *-*-sunos4*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
- esac])
-ac_cv_var_udp_wildcard_delivery=$ans])
-case "$ac_cv_var_udp_wildcard_delivery" in
- yes) AC_DEFINE(UDP_WILDCARD_DELIVERY, 1, [use UDP Wildcard Delivery?]) ;;
-esac
-
-case "$build" in
- $host)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- LDFLAGS="$LDFLAGS -r"
- ;;
- esac
- ;;
-esac
-
-AC_CACHE_CHECK(if we should always slew the time, ac_cv_var_slew_always,
-[AC_ARG_ENABLE(slew-always, [ --enable-slew-always s always slew the time],
- [ans=$enableval],
- [case "$host" in
- *-apple-aux[[23]]*)
- ans=yes
- ;;
- *-*-bsdi[[012]]*)
- ans=no
- ;;
- *-*-bsdi*)
- ans=yes
- ;;
- *-*-openvms*) # HMS: won't be found
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ])
-ac_cv_var_slew_always=$ans])
-case "$ac_cv_var_slew_always" in
- yes) AC_DEFINE(SLEWALWAYS, 1, [Slew always?]) ;;
-esac
-
-AC_CACHE_CHECK(if we should step and slew the time, ac_cv_var_step_slew,
-[AC_ARG_ENABLE(step-slew, [ --enable-step-slew s step and slew the time],
- [ans=$enableval],
- [case "$host" in
- *-sni-sysv*)
- ans=yes
- ;;
- *-univel-sysv*)
- ans=no
- ;;
- *-*-ptx*)
- ans=yes
- ;;
- *-*-solaris2.1[[0-9]]*)
- ans-no
- ;;
- *-*-solaris2.[[012]]*)
- ans=yes
- ;;
- *-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ])
-ac_cv_var_step_slew=$ans])
-case "$ac_cv_var_step_slew" in
- yes) AC_DEFINE(STEP_SLEW, 1, [Step, then slew the clock?]) ;;
-esac
-
-AC_CACHE_CHECK(if ntpdate should step the time, ac_cv_var_ntpdate_step,
-[AC_ARG_ENABLE(ntpdate-step, [ --enable-ntpdate-step s if ntpdate should step the time],
- [ans=$enableval],
- [case "$host" in
- *-apple-aux[[23]]*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ])
-ac_cv_var_ntpdate_step=$ans])
-case "$ac_cv_var_ntpdate_step" in
- yes) AC_DEFINE(FORCE_NTPDATE_STEP, 1, [force ntpdate to step the clock if !defined(STEP_SLEW) ?]) ;;
-esac
-
-AC_CACHE_CHECK(if we should sync TODR clock every hour, ac_cv_var_sync_todr,
-[AC_ARG_ENABLE(hourly-todr-sync, [ --enable-hourly-todr-sync
- s if we should sync TODR hourly],
- [ans=$enableval],
- [case "$host" in
- *-*-nextstep*)
- ans=yes
- ;;
- *-*-openvms*) # HMS: won't be found
- ans=yes
- ;;
- *) ans=no
- ;;
- esac])
-ac_cv_var_sync_todr=$ans])
-case "$ac_cv_var_sync_todr" in
- yes) AC_DEFINE(DOSYNCTODR, 1, [synch TODR hourly?]) ;;
-esac
-
-AC_CACHE_CHECK(if we should avoid kernel FLL bug, ac_cv_var_kernel_fll_bug,
-[AC_ARG_ENABLE(kernel-fll-bug, [ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug],
- [ans=$enableval],
- [case "$host" in
- *-*-solaris2.6)
- unamev=`uname -v`
- case "$unamev" in
- Generic_105181-*)
- old_IFS="$IFS"
- IFS="-"
- set $unamev
- IFS="$old_IFS"
- if test "$2" -ge 17
- then
- # Generic_105181-17 and higher
- ans=no
- else
- ans=yes
- fi
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- *-*-solaris2.7)
- unamev=`uname -v`
- case "$unamev" in
- Generic_106541-*)
- old_IFS="$IFS"
- IFS="-"
- set $unamev
- IFS="$old_IFS"
- if test "$2" -ge 07
- then
- # Generic_106541-07 and higher
- ans=no
- else
- ans=yes
- fi
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- *) ans=no
- ;;
- esac
- ])
-ac_cv_var_kernel_fll_bug=$ans])
-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)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- LDFLAGS="$LDFLAGS -r"
- ;;
- esac
- ;;
-esac
-
-AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
-
-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(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(parseutil/Makefile)
-AC_CONFIG_FILES(scripts/Makefile)
-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)
-
-case "$MAKE_SNTP" in
- '') ;;
- *)
- AC_CONFIG_SUBDIRS(sntp)
- ;;
-esac
-
-AC_OUTPUT
diff --git a/contrib/ntp/depcomp b/contrib/ntp/depcomp
deleted file mode 100755
index aea3d00..0000000
--- a/contrib/ntp/depcomp
+++ /dev/null
@@ -1,472 +0,0 @@
-#! /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/dot.emacs b/contrib/ntp/dot.emacs
deleted file mode 100644
index 04241e7..0000000
--- a/contrib/ntp/dot.emacs
+++ /dev/null
@@ -1,18 +0,0 @@
-;; This is how Dave Mills likes to see the code formatted.
-
-(defconst ntp-c-style
- '((c-basic-offset . 8)
- (c-offsets-alist . ((arglist-intro . +)
- (case-label . *)
- (statement-case-intro . *)
- (statement-cont . *)
- (substatement-open . 0))))
- "Dave L. Mills; programming style for use with ntp")
-
-(defun ntp-c-mode-common-hook ()
- ;; add ntp c style
- (c-add-style "ntp" ntp-c-style nil))
-
-(add-hook 'c-mode-common-hook 'ntp-c-mode-common-hook)
-
-;; 1997112600
diff --git a/contrib/ntp/excludes b/contrib/ntp/excludes
deleted file mode 100644
index 36cb351..0000000
--- a/contrib/ntp/excludes
+++ /dev/null
@@ -1 +0,0 @@
-*.obj *.pch *.bsc *.pdb *.sbr nt*.zip *.tar *.gz *.ilk beta*.zip
diff --git a/contrib/ntp/flock-build b/contrib/ntp/flock-build
deleted file mode 100755
index 80dadc3..0000000
--- a/contrib/ntp/flock-build
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-
-BUILD_ARGS="$@"
-PARSE="--enable-parse-clocks"
-#PARSE=
-SNTP="--with-sntp"
-
-# 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
-
-c_d=`pwd`
-
-SIG=`perl -e 'print rand'`
-echo $SIG > .buildkey
-
-case "$LIST" in
- '') LIST="albert bunnylou churchy hepzibah pogo porkypine rackety snavely" ;;
-esac
-
-for i in $LIST
-do
- echo $i
- case "1" in
- 0)
- 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 $SNTP $BUILD_ARGS ; \
-./build $SIG $PARSE $SNTP --without-crypto $BUILD_ARGS" &
- ;;
- esac
-done
diff --git a/contrib/ntp/html/Oncore-SHMEM.htm b/contrib/ntp/html/Oncore-SHMEM.htm
deleted file mode 100644
index 3148f6a..0000000
--- a/contrib/ntp/html/Oncore-SHMEM.htm
+++ /dev/null
@@ -1,257 +0,0 @@
-<HTML>
-<HEAD>
- <TITLE> ONCORE - SHMEM </TITLE>
-</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>
-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>
-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>
-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 manuals are available as a pdf document online.
-<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.
-<H4>
-Activating the Interface
-</H4>
-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> line in the <tt>/etc/ntp.oncore</tt> data file that looks like
-<PRE>
- STATUS < file_name >
-</PRE>
-Thus a line like
-<PRE>
- STATUS /var/adm/ntpstats/ONCORE
-</PRE>
-would be acceptable.
-This file name will be used to access the Shared Memory.
-<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
-<PRE>
- STATUS /var/adm/ntpstats/ONCORE
- Posn3D
-</PRE>
-would be required.
-<H4>
-Storage of Messages in Shared Memory
-</H4>
-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>
-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>
-The data starts at location ONE of SHMEM (NOT location ZERO).
-<P>
-The messages are stacked in a series of variable length structures, that look like
-<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>
-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>
-Following the last structure, is a u_int containing a zero length to indicate the end
-of the data.
-<P>
-The messages are recognized by reading the headers in the data itself, viz @@Ea or whatever.
-<P>
-There are two special cases.
-<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>
-(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>
-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>
-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.
-<H4>
-Opening the Shared Memory File
-</H4>
-The shared memory segment is accessed through a file name given on a <B>ACCESS</B> card in the
-<tt>/etc/ntp.oncore</tt> input file.
-The following code could be used to open the Shared Memory Segment:
-
-<PRE>
- char *Buf, *file;
- int size, fd;
- struct stat statbuf;
-
- file = "/var/adm/ntpstats/ONCORE"; /* the file name on my ACCESS card */
- if ((fd=open(file, O_RDONLY)) < 0) {
- fprintf(stderr, "Cant open %s\n", file);
- exit(1);
- }
-
- if (stat(file, &statbuf) < 0) {
- fprintf(stderr, "Cant stat %s\n", file);
- exit(1);
- }
-
- size = statbuf.st_size;
- if ((Buf=mmap(0, size, PROT_READ, MAP_SHARED, fd, (off_t) 0)) < 0) {
- fprintf(stderr, "MMAP failed\n");
- exit(1);
- }
-</PRE>
-
-<H4>
-Accessing the data
-</H4>
-The following code shows how to get to the individual records.
-
-<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[] = { {"@@Bb", 0, &oncore_msg_Bb},
- {"@@Ea", 0, &oncore_msg_Ea},
- {"@@As", 0, &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 < 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 > jseq) { /* has it changed? */
- /* verify checksum */
- j = 0;
- cp1 = cp+3; /* points to start of oncore response */
- for (i=2; i < n-3; i++)
- j ^= cp1[i];
- if (j == cp1[n-3]) { /* good checksum */
- Hdr[k].go_to(cp1);
- } else {
- fprintf(stderr, "Bad Checksum for %s\n", Hdr[k].c);
- break;
- }
- }
- }
- }
- if (!strncmp(cp+3, "@@Ea", 4))
- cp += 3*(n+3);
- if (!strncmp(cp+3, "@@Cb", 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>
-
-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.
-<H4>
-Examples
-</H4>
-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>
-Try the new interface, enjoy.
-<HR>
-<ADDRESS>
-Reg.Clemens (reg@dwf.com),
-Poul-Henning Kamp (phk@FreeBSD.org)
-<ADDRESS>
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/accopt.htm b/contrib/ntp/html/accopt.htm
deleted file mode 100644
index b0f5a9d..0000000
--- a/contrib/ntp/html/accopt.htm
+++ /dev/null
@@ -1,210 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Access Control Options</title>
-</head>
-<body>
-<h3>Access Control Options</h3>
-
-<img align="left" src="pic/pogo6.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>The skunk watches for intruders and sprays.<br clear="left">
-</p>
-
-<hr>
-<h4>Access Control Support</h4>
-
-<tt>ntpd</tt> implements a general purpose address-and-mask based
-restriction list. The list is sorted by address and by mask, and
-the list is searched in this order for matches, with the last match
-found defining the restriction flags associated with the incoming
-packets. The source address of incoming packets is used for the
-match, with the 32- bit address being and'ed with the mask
-associated with the restriction entry and then compared with the
-entry's address (which has also been and'ed with the mask) to look
-for a match. Additional information and examples can be found in
-the <a href="notes.htm">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.
-While this facility may be otherwise useful for keeping unwanted or
-broken remote time servers from affecting your own, it should not
-be considered an alternative to the standard NTP authentication
-facility. Source address based restrictions are easily circumvented
-by a determined cracker.</p>
-
-<h4>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 kiss-of-death packet. If the <tt>
-kod</tt> flag is set and either service is denied or the client
-limit is exceeded, the server it returns the packet and sets the
-leap bits unsynchronized, stratum zero and the ASCII string "DENY"
-in the reference source identifier field. If the <tt>kod</tt> flag
-is not set, the server simply drops the packet.</p>
-
-<p>A client or peer receiving a kiss-of-death packet performs a set
-of sanity checks to minimize security exposure. If this is the
-first packet received from the server, the client assumes an access
-denied condition at the server. It updates the stratum and
-reference identifier peer variables and sets the access denied
-(test 4) bit in the peer flash variable. If this bit is set, the
-client sends no packets to the server. If this is not the first
-packet, the client assumes a client limit condition at the server,
-but does not update the peer variables. In either case, a message
-is sent to the system log.</p>
-
-<h4>Access Control Commands</h4>
-
-<dl>
-<dt><tt>restrict <i>numeric_address</i> [mask <i>numeric_mask</i>]
-[<i>flag</i>][...]</tt></dt>
-
-<dd>The <i><tt>numeric_address</tt></i> argument, expressed in
-dotted- quad form, is the address of an host or network. The <i>
-<tt>mask</tt></i> argument, also expressed in dotted-quad form,
-defaults to <tt>255.255.255.255</tt>, meaning that the <i><tt>
-numeric_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, given the sort algorithm, is
-always the first entry in the list. Note that, while <i><tt>
-numeric_address</tt></i> is normally given in dotted-quad format,
-the text string <tt>default</tt>, with no mask option, may be used
-to indicate the default entry.</dd>
-
-<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:</dd>
-
-<dd>
-<dl>
-<dt><tt>kod</tt></dt>
-
-<dd>If access is denied, send a kiss-of-death packet.</dd>
-
-<dt><tt>ignore</tt></dt>
-
-<dd>Ignore all packets from hosts which match this entry. If this
-flag is specified neither queries nor time server polls will be
-responded to.</dd>
-
-<dt><tt>noquery</tt></dt>
-
-<dd>Ignore all NTP mode 6 and 7 packets (i.e. information queries
-and configuration requests) from the source. Time service is not
-affected.</dd>
-
-<dt><tt>nomodify</tt></dt>
-
-<dd>Ignore all NTP mode 6 and 7 packets which attempt to modify the
-state of the server (i.e. run time reconfiguration). Queries which
-return information are permitted.</dd>
-
-<dt><tt>notrap</tt></dt>
-
-<dd>Decline to provide mode 6 control message trap service to
-matching hosts. The trap service is a subsystem of the mode 6
-control message protocol which is intended for use by remote event
-logging programs.</dd>
-
-<dt><tt>lowpriotrap</tt></dt>
-
-<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.</dd>
-
-<dt><tt>noserve</tt></dt>
-
-<dd>Ignore NTP packets whose mode is other than 6 or 7. In effect,
-time service is denied, though queries may still be permitted.</dd>
-
-<dt><tt>nopeer</tt></dt>
-
-<dd>Provide stateless time service to polling hosts, but do not
-allocate peer memory resources to these hosts even if they
-otherwise might be considered useful as future synchronization
-partners.</dd>
-
-<dt><tt>notrust</tt></dt>
-
-<dd>Treat these hosts normally in other respects, but never use
-them as synchronization sources.</dd>
-
-<dt><tt>limited</tt></dt>
-
-<dd>These hosts are subject to limitation of number of clients from
-the same net. Net in this context refers to the IP notion of net
-(class A, class B, class C, etc.). Only the first <tt>
-client_limit</tt> hosts that have shown up at the server and that
-have been active during the last <tt>client_limit_period</tt>
-seconds are accepted. Requests from other clients from the same net
-are rejected. Only time request packets are taken into account.
-Query packets sent by the <tt>ntpq</tt> and <tt>ntpdc</tt> programs
-are not subject to these limits. 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.</dd>
-
-<dt><tt>ntpport</tt></dt>
-
-<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.</dd>
-
-<dt><tt>version</tt></dt>
-
-<dd>Ignore these hosts if not the current NTP version.</dd>
-</dl>
-</dd>
-
-<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).</dd>
-
-<dt><tt>clientlimit <i>limit</i></tt></dt>
-
-<dd>Set the <tt>client_limit</tt> variable, which limits the number
-of simultaneous access-controlled clients. The default value for
-this variable is 3.</dd>
-
-<dt><tt>clientperiod <i>period</i></tt></dt>
-
-<dd>Set the <tt>client_limit_period</tt> variable, which specifies
-the number of seconds after which a client is considered inactive
-and thus no longer is counted for client limit restriction. The
-default value for this variable is 3600 seconds.</dd>
-</dl>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/accopt.html b/contrib/ntp/html/accopt.html
deleted file mode 100644
index f54852a..0000000
--- a/contrib/ntp/html/accopt.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!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.htm b/contrib/ntp/html/assoc.htm
deleted file mode 100644
index a56d122..0000000
--- a/contrib/ntp/html/assoc.htm
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html><title>
-Association Management
-</title></head><body><h3>
-Association Management
-</h3>
-
-<img align=left src=pic/alice51.gif alt="gif"><a href=http://www.eecis.udel.edu/~mills/pictures.htm>
-from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>Make sure who your friends are.
-<br clear=left><hr>
-
-<h4>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.htm>Configuration Options</a> and <a href=authopt.htm>Authentication Options</a> pages and in the papers, reports, memoranda and briefings at <a href=http://www.ntp.org>www.ntp.org</a>.
-
-<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>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.htm>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 provenance 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>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.
-
-<h4>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 "pull" 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 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.
-
-<h4>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 "push-pull" operation, in that the peer either pulls or pushes the time and proventic values depending on the particular configuration.
-
-<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 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.
-
-<h4>Broadcast Mode</h4>
-
-<p>Broadcast mode is intended for configurations involving one or a few servers and a possibly very large client population. A broadcast server is configured using the <tt>broadcast</tt> command and a local subnet 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>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 NTPv4 broadcast client responds to the first proventicated message received by waiting an interval randomized over the <tt>minpoll</tt> interval, in order to avoid implosion at the server. Then, the client polls the server 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 cycles over a 30-s interval during which both the synchronization and cryptographic protocols run concurrently. When the next broadcast message is received after 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.
-
-<h4>IP Multicast Support</h4>
-
-<p>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. 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>A general discussion of IP multicast technology is beyond the scope here. In simple terms a host or router sending to a IP multicast group (class D) 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 224.0.1.1 to NTP, but this address should be used only where the multicast span can be reliably constrained to protect neighbor networks. In general, administratively scoped group addresses should be used, as described in RFC-2365, or GLOP group addresses, as described in RFC-2770.
-
-<h4>Multicasting</h4>
-
-<p>IP multicasting can be used to extend the scope of a timekeeping subnet in two ways: multicasting and manycasting. A multicast client is configured using the <tt>broadcast</tt> command, but with a multicast group (class D) address instead of a local subnet broadcast address. However, there is a subtle difference between broadcasting and multicasting. 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.
-
-<p>IP multicasting is a different paradigm. A multicast message has the same format as a broadcast message and is configured with the same <tt>broadcast</tt> command, but with a multicast group address instead of a local subnet address. 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> 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.
-
-<h4>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 the "best" three of the available manycast servers, yet automatically reconfigures to sustain this number of servers should one or another fail.
-
-<p>Note that the manycasting paradigm does not coincide with the anycasting paradigm described in RFC-1546, which is designed to find a single server from a clique of servers providing the same service. The manycasting paradigm is designed to find a plurality of redundant servers, in this case willing NTP servers.
-
-<p>A persistent manycast client association is configured using the <tt>server</tt> command, but with a multicast (class D) group address instead of an ordinary IP (class A, B, C) address. It sends client mode messages to this address at the maximum feasible poll interval and minimum feasible time-to-live hops, depending on how many servers have already been found. There can be as many manycast client associations as different group addresss, each one serving as a template for a future ephemeral client/server mode association.
-
-<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 is configured with a <tt>server</tt> command, and manycast server, which is configured with a <tt>manycastserver</tt> command. If a manycast server is in range of the current time-to-live 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 server mode message.
-
-<p>The manycast client receiving this message mobilizes an ephemeral client association as in ordinary client/server mode according to the matching manycast client template. 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 cycles over a 30-s interval 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 best three associations. The surviving associations then continue in ordinary client/server mode.
-
-<p>The manycast client polling program is designed to reduce as much as possible the volume of messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. The program uses a poll interval eight times the system poll interval, which starts out at the <tt>minpoll</tt> value and under normal circumstances increases gradually to the <tt>maxpolll</tt> value. Initially, the time-to-live is set at one hop. At each retransmission the time-to-live is incremented by one until at least three manycast servers are found. Further retransmissions use the same time-to-live value.
-
-<p>If less than three servers are found when the time-to-live has reached the maximum specified by the <tt>ttl</tt> keyword, the poll interval is doubled. For each transmission after that, the poll interval is doubled again until reaching the maximum of eight times the value specified by the <tt>maxpoll</tt> keyword. Further transmissions use the same poll interval and time-to-live values.
-
-<p>The above scenario happens 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 they will fail the message digest test. If during a poll interval the number of client associations falls below three, all manycast client prototype associations are reset to the initial poll interval and time-to-live values and operation resumes from the beginning. It is important in manycast mode to avoid frequent manycast client messages, since each one requires all manycast servers in 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) and for <tt>ttl</tt> is 7.
-
-<p>It is possible and frequently useful to configure a host as both a 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 the smallest synchronization distance computed by the NTP mitigation algorithms. For example, consider an NTP subnet of two primary servers and maybe a dozen dependent clients. All servers and clients are configured as both multicast client and multicast server with multicast group address 239.1.1.1. In addition, the primary servers are configured for a primary reference source such as a GPS receiver.
-
-Once operations have stabilized in this scenario, the primary servers will affiliate with the primary reference source and each other, since they both operate at the same stratum (1), but not with any client, since clients operate at a higher stratum. The clients will find both primary servers and in addition, one of their own at the minimum synchronization distance. 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.
-
-<h4>Burst Modes</h4>
-
-<p>There are two burst modes that can be enabled in client/server mode using the <tt>iburst</tt> and <tt>burst</tt> keywords. In either mode a single poll initiates a burst of eight client messages at intervals randomized over the range 1-4 s. However, the interval between the first and second messages is increased to about 16 s in order for a dialup modem to complete a call, if necessary. Received server messages update the NTPv4 clock filter, which selects the best (most accurate) time values. When the last client message in the burst is sent, the next received server message 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>The <tt>iburst</tt> keyword can be configured for cases 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 30 s after the first message.
-
-<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.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
diff --git a/contrib/ntp/html/assoc.html b/contrib/ntp/html/assoc.html
deleted file mode 100644
index b4b8a99..0000000
--- a/contrib/ntp/html/assoc.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!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.htm b/contrib/ntp/html/audio.htm
deleted file mode 100644
index b345bc7..0000000
--- a/contrib/ntp/html/audio.htm
+++ /dev/null
@@ -1,187 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Reference Clock Audio Drivers</title>
-</head>
-<body>
-<h3>Reference Clock Audio Drivers</h3>
-
-<img align="left" src="pic/radio2.jpg" alt="gif">
-
-<p>Make a little noise here.<br clear="left">
-</p>
-
-<hr>
-<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 most
-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 are compatible with Sun operating
-systems, including Solaris and SunOS, and the native audio codec
-interface supported by these systems. 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>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 AC neutral wire.</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>
-
-<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>
-
-<li>Ambient noise (static) on the lower frequencies follows the
-thunderstorm season, so is higher on summer afternoons and
-evenings.</li>
-
-<li>The lower frequency bands are best for shorter distances, while
-the higher bands are best for longer distances.</li>
-
-<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.</li>
-</ul>
-
-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.
-
-<h4>Debugging Aids</h4>
-
-<p>The audio drivers include extensive 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>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 Gregorian 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>
-
-<h4>Additional Information</h4>
-
-<a href="refclock.htm">Reference Clock Drivers</a> <br>
-<a href="driver7.htm">Radio CHU Audio Demodulator/Decoder</a> <br>
-<a href="driver36.htm">Radio WWV/H Audio Demodulator/Decoder</a>
-<br>
-<a href="driver6.htm">IRIG Audio Decoder</a>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/audio.html b/contrib/ntp/html/audio.html
deleted file mode 100644
index 64b2412..0000000
--- a/contrib/ntp/html/audio.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!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.htm b/contrib/ntp/html/authopt.htm
deleted file mode 100644
index 29df75d..0000000
--- a/contrib/ntp/html/authopt.htm
+++ /dev/null
@@ -1,415 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Authentication Options</title>
-</head>
-<body>
-<h3>Authentication Options</h3>
-
-<img align="left" src="pic/alice44.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>Our resident cryptographer; now you see him, now you don't.<br
-clear="left">
-</p>
-
-<hr>
-<h4>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 an 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 augmented 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 schemes, 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.</p>
-
-<p>Authentication is configured separately for each association
-using the <tt>key</tt> or <tt>autokey</tt> subcommands on the <tt>
-peer</tt>, <tt>server</tt>, <tt>broadcast</tt> and <tt>
-manycastclient</tt> commands as described in the <a href=
-"config.htm">Configuration Options</a> page. The authentication
-options described below specify the suite of keys, select the key
-for each configured association and manage the configuration
-operations.</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> configuration commands and also by remote
-configuration commands sent by a <tt>ntpdc</tt> program running in
-another machine. If this flag is enabled, which is the default
-case, new broadcast client and symmetric passive associations and
-remote configuration commands must be cryptographically
-authenticated using either symmetric-key or public-key schemes. If
-this flag is disabled, these operations are effective even if not
-cryptographic authenticated. It should be understood that operating
-in the latter mode invites a significant vulnerability where a
-rogue hacker can seriously disrupt client timekeeping.</p>
-
-<p>In networks with firewalls and large numbers of broadcast
-clients it may be acceptable to disable authentication, since that
-avoids key distribution and simplifies network maintenance.
-However, when the configuration file contains host names, or when a
-server or client is configured remotely, host names are resolved
-using the DNS and a separate name resolution process. In order to
-protect against bogus name server messages, name resolution
-messages are authenticated using an internally generated key which
-is normally invisible to the user. However, if cryptographic
-support is disabled, the name resolution process will fail. This
-can be avoided either by specifying IP addresses instead of host
-names, which is generally inadvisable, or by enabling the flag for
-name resolution and disabled it once the name resolution process is
-complete.</p>
-
-<p>An attractive alternative where multicast support is available
-is manycast mode, in which clients periodically troll for servers.
-Cryptographic authentication in this mode uses public-key schemes
-as described below. The principle advantage of this 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>In addition to the default symmetric-key cryptographic support,
-support for public-key cryptography is available if the requisite
-<tt>rsaref20</tt> software distribution has been installed before
-building the distribution. Public-key cryptography provides secure
-authentication of servers without compromising accuracy and
-stability. The security model and protocol schemes for both
-symmetric-key and public-key cryptography are described below.</p>
-
-<h4>Symmetric-Key Scheme</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 their messages.
-Keys and related information are specified in a key file, usually
-called <tt>ntp.keys</tt>, which should be exchanged and stored
-using secure procedures 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.htm">ntpq</a></tt> and <tt><a href="ntpdc.htm">ntpdc</a></tt>
-utility programs.
-
-<p>When <tt>ntpd</tt> is first started, it reads the key file
-specified int he <tt>keys</tt> command and installs the keys in the
-key cache. However, the 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>Public-Key Scheme</h4>
-
-The original NTPv3 authentication scheme described in RFC-1305
-continues to be supported; however, in NTPv4 an additional
-authentication scheme called Autokey is available. It uses MD5
-message digest, RSA public-key signature and Diffie-Hellman key
-agreement algorithms available from several sources, but not
-included in the NTPv4 software distribution. In order to be
-effective, the <tt>rsaref20</tt> package must be installed as
-described in the <tt>README.rsa</tt> file. Once installed, the
-configure and build process automatically detects it and compiles
-the routines required. The Autokey scheme has several modes of
-operation corresponding to the various NTP modes supported. RSA
-signatures with timestamps are used in all modes to verify the
-source of cryptographic values. All modes use a special cookie
-which can be computed independently by the client and server. In
-symmetric modes the cookie is constructed using the Diffie-Hellman
-key agreement algorithm. In other modes the cookie is constructed
-from the IP addresses and a private value known only to the server.
-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.htm">Autonomous
-Authentication</a> page.
-
-<p>The cryptographic values used by the Autokey scheme are
-incorporated as a set of files generated by the <a href=
-"genkeys.htm"><tt>ntp-genkeys</tt></a> program, including the
-symmetric private keys, public/private key pair, and the agreement
-parameters. See the <tt>ntp-genkeys</tt> page for a description of
-the formats of these files. They contain cryptographic values
-generated by the algorithms of the <tt>rsaref20</tt> package and
-are in printable ASCII format. All file names include the
-timestamp, in NTP seconds, following the default names given below.
-Since the file data are derived from random values seeded by the
-system clock and the file name includes the timestamp, every
-generation produces a different file and different file name.</p>
-
-<p>The <tt>ntp.keys</tt> file contains the DES/MD5 private keys. It
-must be distributed by secure means to other servers and clients
-sharing the same security compartment and made visible only to
-root. While this file is not used with the Autokey scheme, it is
-needed to authenticate some remote configuration commands used by
-the <a href="ntpdc.htm"><tt>ntpq</tt></a> and <a href="ntpq.htm">
-<tt>ntpdc</tt></a> utilities. The <tt>ntpkey</tt> file contains the
-RSA private key. It is useful only to the machine that generated it
-and never shared with any other daemon or application program, so
-must be made visible only to root.</p>
-
-<p>The <tt>ntp_dh</tt> file contains the agreement parameters,
-which are used only in symmetric (active and passive) modes. It is
-necessary that both peers beginning a symmetric-mode association
-share the same parameters, but it does not matter which <tt>
-ntp_dh</tt> file generates them. If one of the peers contains the
-parameters, the other peer obtains them using the Autokey protocol.
-If both peers contain the parameters, the most recent copy is used
-by both peers. If a peer does not have the parameters, they will be
-requested by all associations, either configured or not; but, none
-of the associations can proceed until one of them has received the
-parameters. Once loaded, the parameters can be provided on request
-to other clients and servers. The <tt>ntp_dh</tt> file can be also
-be distributed using insecure means, since the data are public
-values.</p>
-
-<p>The <tt>ntpkey_<i>host</i></tt> file contains the RSA public
-key, where <tt><i>host</i></tt> is the name of the host. Each host
-must have its own <tt>ntpkey_<i>host</i></tt> file, which is
-normally provided to other hosts using the Autokey protocol Each
-<tt>server</tt> or <tt>peer</tt> association requires the public
-key associated with the particular server or peer to be loaded
-either directly from a local file or indirectly from the server
-using the Autokey protocol. These files can be widely distributed
-and stored using insecure means, since the data are public
-values.</p>
-
-<p>The optional <tt>ntpkey_certif_<i>host</i></tt> file contains
-the PKI certificate for the host. This provides a binding between
-the host hame and RSA public key. In the current implementation the
-certificate is obtained by a client, if present, but the contents
-are ignored.</p>
-
-<p>Due to the widespread use of interface-specific naming, the host
-names used in configured and mobilized associations are determined
-by the Unix <tt>gethostname()</tt> library routine. Both the <tt>
-ntp-genkeys</tt> program and the Autokey protocol derive the name
-of the public key file using the name returned by this routine.
-While every server and client is required to load their own public
-and private keys, the public keys for each client or peer
-association can be obtained from the server or peer using the
-Autokey protocol. Note however, that at the current stage of
-development the authenticity of the server or peer and the
-cryptographic binding of the server name, address and public key is
-not yet established by a certificate authority or web of trust.</p>
-
-<h4>Leapseconds Table</h4>
-
-<p>The NIST provides a table showing 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
-Universtal 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 scheme
-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, while clients can
-load 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>
-
-<h4>Key Management</h4>
-
-<p>All key files are installed by default in <tt>
-/usr/local/etc</tt>, which is normally in a shared filesystem in
-NFS-mounted networks and avoids installing them in each machine
-separately. The default can be overridden by the <tt>keysdir</tt>
-configuration command. However, this is not a good place to install
-the private key file, since each machine needs its own file. A
-suitable place to install it is in <tt>/etc</tt>, which is normally
-not in a shared filesystem.</p>
-
-<p>The recommended practice is to keep the timestamp extensions
-when installing a file and to install a link from the default name
-(without the timestamp extension) to the actual file. This allows
-new file generations to be activated simply by changing the link.
-However, <tt>ntpd</tt> parses the link name when present to extract
-the extension value and sends it along with the public key and host
-name when requested. This allows clients to verify that the file
-and generation time are always current. However, the actual
-location of each file can be overridden by the <tt>crypto</tt>
-configuration command.</p>
-
-<p>All cryptographic keys and related parameters should be
-regenerated on a periodic and automatic basis, like once per month.
-The <tt>ntp-genkeys</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. While a
-public/private key pair must be generated by every server and
-client, the public keys and agreement parameters do not need to be
-explicitly copied to all machines in the same security compartment,
-since they can be obtained automatically using the Autokey
-protocol. However, it is necessary that all primary servers have
-the same agreement parameter file. The recommended way to do this
-is for one of the primary servers to generate that file and then
-copy it to the other primary servers in the same compartment using
-the Unix <tt>rdist</tt> command. Future versions of the Autokey
-protocol are to contain provisions for an agreement protocol to do
-this automatically.</p>
-
-<p>Servers and clients can make a new generation in the following
-way. All machines have loaded the old generation at startup and are
-operating normally. At designated intervals, each machine generates
-a new public/private key pair and makes links from the default file
-names to the new file names. The <tt>ntpd</tt> is then restarted
-and loads the new generation, with result clients no longer can
-authenticate correctly. The Autokey protocol is designed so that
-after a few minutes the clients time out and restart the protocol
-from the beginning, with result the new generation is loaded and
-operation continues as before. A similar procedure can be used for
-the agreement parameter file, but in this case precautions must be
-take to be sure that all machines with this file have the same
-copy.</p>
-
-<h4>Authentication Commands</h4>
-
-<dl>
-<dt><tt>autokey [<i>logsec</i>]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>controlkey <i>key</i></tt></dt>
-
-<dd>Specifies the key identifier to use with the <a href=
-"ntpq.htm"><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 65534, inclusive.</dd>
-
-<dt><tt>crypto [flags <i>flags</i>] [privatekey <i>file</i>]
-[publickey <i>file</i>] [dhparms <i>file</i>] [leap <i>
-file</i>]</tt></dt>
-
-<dd>This command requires the NTP daemon build process be
-configured with the RSA library. This command activates public-key
-cryptography and loads the required RSA private and public key
-files and the optional Diffie-Hellman agreement parameter file, if
-present. If one or more files are left unspecified, the default
-names are used as described below. Following are the
-subcommands:</dd>
-
-<dd>
-<dl>
-<dt><tt>privatekey <i>file</i></tt></dt>
-
-<dd>Specifies the location of the RSA private key file, which
-otherwise defaults to <tt>/usr/local/etc/ntpkey</tt>.</dd>
-
-<dt><tt>publickey <i>file</i></tt></dt>
-
-<dd>Specifies the location of the RSA public key file, which
-otherwise defaults to <tt>/usr/local/etc/ntpkey_<i>host</i></tt>.,
-where <i>host</i> is the name of the generating machine.</dd>
-
-<dt><tt>dhparms <i>file</i></tt></dt>
-
-<dd>Specifies the location of the Diffie-Hellman parameters file,
-which otherwise defaults to <tt>/usr/local/etc/ntpkey_dh</tt>.</dd>
-
-<dt><tt>leap <i>file</i></tt></dt>
-
-<dd>Specifies the location of the leapsecond table file, which
-otherwise defaults to <tt>/usr/local/etc/ntpkey_leap</tt>.</dd>
-</dl>
-</dd>
-
-<dt><tt>keys <i>keyfile</i></tt></dt>
-
-<dd>Specifies the location of the DES/MD5 private key file
-containing the keys and key identifiers used by <tt>ntpd</tt>, <tt>
-ntpq</tt> and <tt>ntpdc</tt> when operating in symmetric-key
-mode.</dd>
-
-<dt><tt>keysdir <i>path</i></tt></dt>
-
-<dd>This command requires the NTP daemon build process be
-configured with the RSA library. It specifies the default directory
-path for the private key file, agreement parameters file and one or
-more public key files. The default when this command does not
-appear in the configuration file is <tt>/usr/local/etc/</tt>.</dd>
-
-<dt><tt>requestkey <i>key</i></tt></dt>
-
-<dd>Specifies the key identifier to use with the <a href=
-"ntpdc.htm"><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 65534,
-inclusive.</dd>
-
-<dt><tt>revoke [<i>logsec</i>]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>trustedkey <i>key</i> [...]</tt></dt>
-
-<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.</dd>
-</dl>
-
-<h4>Files</h4>
-
-<tt>ntp.keys</tt> private MD5 keys <br>
-<tt>ntpkey</tt> RSA private key <br>
-<tt>ntpkey_<i>host</i></tt> RSA public key <br>
-<tt>ntp_dh</tt> Diffie-Hellman agreement parameters
-
-<h4>Bugs</h4>
-
-The <tt>ntpkey_<i>host</i></tt> files are really digital
-certificates. These should be obtained via secure directory
-services when they become universally available.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/authopt.html b/contrib/ntp/html/authopt.html
deleted file mode 100644
index 978d60f..0000000
--- a/contrib/ntp/html/authopt.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<!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/biblio.htm b/contrib/ntp/html/biblio.htm
deleted file mode 100644
index 7f621d3..0000000
--- a/contrib/ntp/html/biblio.htm
+++ /dev/null
@@ -1,106 +0,0 @@
-<html><head><title>
-Protocol Conformance Statement
-</title></head><body><h3>
-Protocol Conformance Statement
-</h3>
-
-<img align=left src=pic/flatheads.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>From <i>The
-Wizard of Oz</i>, L. Frank Baum</a>
-
-<p>Say it three times and it must be right.
-<br clear=left>
-<hr>
-
-<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 up to a few tens of milliseconds on WANs relative to Coordinated Universal Time (UTC), as provided by 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. Some configurations include cryptographic authentication to prevent accidental or malicious protocol attacks.
-
-<p>Information on the NTP architecture, protocol and algorithms can be found in the following articles and reports, which are available online. General issues of the concepts and facilities assumed by NTP are discussed in the <a href=exec.htm>Executive Summary - Computer Network Time Synchronization</a> page, while issues related to the NTP timescale and pending century are discussed in the <a href=y2k.htm> Network Time Protocol Year 2000 Conformance Statement</a> page, both of which are included in this software distribution. Network timekeeping technology continues to advance and may obsolete some of the following documents. For a current list of all papers, reports, briefings and other documents relevant to the NTP community, see the <a href=http://www.eecis.udel.edu/~mills>David L. Mills</a> web page. A historical perspective is available in
-
-<ul>
-
-<p><li>Mills, D.L. A brief history of NTP time: confessions of an Internet timekeeper. Submitted for publication; please do not cite or redistribute. <a href=database/papers/history.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/history.pdf>PDF</a>
-
-</ul>
-
-<p>The NTP architecture, protocol and algorithm models are described in
-
-<ul>
-
-<p><li>Mills, D.L. Internet time synchronization: the Network Time Protocol. <I>IEEE Trans. Communications COM-39, 10</I> (October 1991), 1482-1493. <a href=http://www.eecis.udel.edu/~mills/database/papers/trans.ps> PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/trans.pdf> PDF</a>. Also in: Yang, Z., and T.A. Marsland (Eds.). <I>Global States and Time in Distributed Systems</I>. IEEE Computer Society Press, Los Alamitos, CA, 1994, 91-102.
-
-</ul>
-
-<p>The NTP specification and implementation has evolved over the last two decades to the current Version 4 of the protocol. This version includes significant enhancements in accuracy and reliability, as determined by experience in an estimated total of well over 100,000 clients and servers in the Internet, while retaining backward compatibility with previous versions. This software distribution contains an implementation of the NTP Version 4 architecture, protocol and algorithms. While a formal specification of this version is not yet available, this version is fully compliant with the previous NTP Version 3 specification and implementation defined in
-<ul>
-
-<p><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/~mills/database/rfc/rfc1305/rfc1305a.ps> PostScript)</a> | <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305a.pdf> PDF</a>, Body: <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305b.ps> PostScript)</a> | <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305b.pdf> PDF</a>, Appendices: <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305c.ps> PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305c.pdf> PDF</a>.
-
-</ul>
-
-<p>The NTP Version 4 implementation adds a number of extensions and refinements to the previous version, including an autonomous configuration and authentication capability, improved clock discipline algorithms capable of submicrosecond accuracy and many other refinements. Specific changes since the Version 3 specification was issued include:
-
-<ol>
-
-<p><li>Support for precision-time kernel modifications, as described in
-
-<p>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/~mills/database/papers/nano/nano2.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/nano/nano2.pdf>PDF</a>, Slides: <a href=database/brief/nano/nano.htm>HTML</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/nano/nano.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/nano/nano.ppt>PowerPoint</a>
-
-<p>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/~mills/database/reports/kern/kerna.ps> PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/kern/kerna.pdf> PDF</a>, Body: <a href=http://www.eecis.udel.edu/~mills/database/reports/kern/kernb.ps> PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/kern/kernb.pdf> PDF</a>. Major revision and update of: Network Working Group Report RFC-1589, University of Delaware, March 1994. 31 pp. <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1589.txt>ASCII</a>
-
-<p><li>Support for IP Multicasting, as described the <a href=assoc.htm>Association Management</a> page and in
-
-<p>Mills, D.L, and A. Thyagarajan. Network time protocol version 4 proposed changes. Electrical Engineering Department Report 94-10-2, University of Delaware, October 1994, 32 pp. Abstract: <a href=http://www.eecis.udel.edu/~mills/database/reports/acts/actsa.ps> PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/acts/actsa.pdf> PDF</a>, Body: <a href=http://www.eecis.udel.edu/~mills/database/reports/acts/actsb.ps> PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/acts/actsb.pdf> PDF</a>
-
-<p><li>A new hybrid phase/frequency-lock clock discipline, which
-replaces the RFC-1305 local clock algorithm, as described in</li>
-
-<p>Mills, D.L. Improved algorithms for synchronizing computer network clocks. <I>IEEE/ACM Trans. Networks 3, 3</I> (June 1995), 245-254. <a href=http://www.eecis.udel.edu/~mills/database/papers/tune2.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/tune2.pdf>PDF</a>
-
-<p>Mills, D.L. Clock discipline algorithms for the Network Time Protocol Version 4. Electrical Engineering Report 97-3-3, University of Delaware, March 1997, 35 pp. Abstract: <a href=http://www.eecis.udel.edu/~mills/database/reports/allan/securea.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/allan/securea.pdf> PDF</a>, Body: <a href=http://www.eecis.udel.edu/~mills/database/reports/allan/secureb.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/allan/secureb.pdf>PDF</a>
-
-<p><li>Simple Network Monitoring Protocol (SNMP) monitoring tools, as described in</li>
-
-<p>Sethi, A.S., H. Gao, and D.L. Mills. Management of the Network Time Protocol (NTP) with SNMP. Computer and Information Sciences Report 98-09, University of Delaware, November 1998, 32 pp. <a href=http://www.eecis.udel.edu/~mills/database/reports/ntp-mib-tr.ps>PostScript</a> | <a href=database/reports/ntp-mib-tr.pdf>PDF</a>
-
-<p><li>Engineered refinements to radio clock drivers and interface code, as described in in the <a href=pps.htm>Pulse-per-second (PPS) Signal Interfacing</a> page and</li>
-
-<p>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>
-
-<p>Mills, D.L. Precision synchronization of computer network clocks. <I>ACM Computer Communication Review 24, 2</I> (April 1994). 28-43. <a href=http://www.eecis.udel.edu/~mills/database/papers/fine.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/fine.pdf>PDF</a>
-
-<p><li>Support for over two dozen reference clock drivers for all known national and international radio, satellite and modem standard time services known at this time. See the <a href=refclock.htm>Reference Clock Drivers</a> page.</li>
-
-<p><li>A new security model and authentication scheme based on public-key cryptography called <I>Autokey</I>, as described in the <a href=authopt.htm>Authentication Options</a> page and in</li>
-
-<p>Mills, D.L. Public-Key cryptography for the Network Time Protocol. Internet Draft draft-ietf-stime-ntpauth-00.txt, University of Delaware, June 2000, 36 pp. <a href=http://www.eecis.udel.edu/~mills/database/memos/draft-ietf-stime-ntpauth-00.txt>ASCII</a>
-
-<p>Mills, D.L. Public key cryptography for the Network Time Protocol. Electrical Engineering Report 00-5-1, University of Delaware, May 2000. 23 pp. Abstract: <a href=http://www.eecis.udel.edu/~mills/database/reports/pkey/pkeya.ps>PostScript</a> | <a href=database/reports/pkey/pkeya.pdf>PDF</a>, Body: <a href=http://www.eecis.udel.edu/~mills/database/reports/pkey/pkeyb.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/pkey/pkeyb.pdf>PDF</a>
-
-<p>Mills, D.L. Authentication scheme for distributed, ubiquitous, real-time protocols. <I>Proc. Advanced Telecommunications/Information Distribution Research Program (ATIRP) Conference</I> (College Park MD, January 1997), 293-298. <a href=http://www.eecis.udel.edu/~mills/database/papers/atirp.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/atirp.pdf>PDF</a>
-
-<p>Mills, D.L. Proposed authentication enhancements for the Network Time
-Protocol version 4. Electrical Engineering Report 96-10-3, University of
-Delaware, October 1996, 36 pp. Abstract: <a href=http://www.eecis.udel.edu/~mills/database/reports/secure/securea.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/secure/securea.pdf>PDF</a>, Body: <a href=http://www.eecis.udel.edu/~mills/database/reports/secure/secureb.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/reports/secure/secureb.pdf>PDF</a>
-
-<p><li> Support for the MD5 cryptographic hash algorithm, in addition to the DES-CBC algorithm described in RFC-1305, as described in the <a href=ntpd.htm><tt>ntpd</tt> - Network Time Protocol (NTP) daemon </a>page.</li>
-
-<p><li>The prefer-peer scheme, as described in the <a href=prefer.htm>Mitigation Rules and the <tt>prefer</tt> Keyword </a>page.</li>
-
-<p><li>Specification for the Simple Network Time Protocol (SNTP), as described in</li>
-
-<p>Mills, D.L. Simple network time protocol (SNTP) version 4 for IPv4, IPv6 and OSI. Network Working Group Report RFC-2030, University of Delaware, October 1996, 18 pp. <a href=http://www.eecis.udel.edu/~mills/database/rfc/rfc2030.txt>ASCII</a>. Obsoletes RFC-1769 and RFC-1361.
-
-<p><li>Support for International Atomic Time (TAI), as described in</li>
-
-<p>Levine, J., and D. Mills. Using the Network Time Protocol to transmit International Atomic Time (TAI). <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/~mills/database/papers/tai.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/tai.pdf>PDF</a>
-
-<p><li>Performance surveys for NTP Version 4 can be found in</li>
-
-<p>Mills, D.L., A. Thyagarajan and B.C. Huffman. Internet timekeeping around the globe. <i>Proc. Precision Time and Time Interval (PTTI) Applications and Planning Meeting</i> (Long Beach CA, December 1997), 365-371. Paper: <a
-href=http://www.eecis.udel.edu/~mills/database/papers/survey5.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/survey5.pdf>PDF</a>, Slides: <a href=http://www.eecis.udel.edu/~mills/database/brief/survey/survey/index.htm>HTML</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/survey/survey.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/survey.ppt>PowerPoint</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/survey/survey.pdf>PDF</a>
-
-<p>Mills, D.L. The network computer as precision timekeeper. <i>Proc. Precision Time and Time Interval (PTTI) Applications and Planning Meeting</i> (Reston VA, December 1996), 96-108. Paper: <a href=http://www.eecis.udel.edu/~mills/database/papers/ptti.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/papers/ptti.pdf>PDF</a>, Slides: <a href=http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti/index.htm>HTML</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti.ps>PostScript</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti.ppt>PowerPoint</a> | <a href=http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti.pdf>PDF</a>
-
-</ol>
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/build.htm b/contrib/ntp/html/build.htm
deleted file mode 100644
index 5981de3..0000000
--- a/contrib/ntp/html/build.htm
+++ /dev/null
@@ -1,239 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Building and Installing the Distribution</title>
-</head>
-<body>
-<h3>Building and Installing the Distribution</h3>
-
-<img align="left" src="pic/beaver.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>For putting out compiler fires.<br clear="left">
-</p>
-
-<hr>
-<h4>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 sysdtem with a common set of binaries, even with
-the same system but different versions. Therefore, it is necessary
-to configure each system individually 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 "make" and the autoconfigure system does the rest. There
-are some exceptions, as noted below.</p>
-
-<p>Some programs included in this distribution use cryptographic
-algorithms to verify server authenticity and credentials. As
-required by the International Trade in Arms Regulations (ITAR), now
-called the Defense Trade Regulations (DTR), certain cryptographic
-products and media, including the Data Encryption Standard (DES),
-cannot be exported without per-instance license. For this reason,
-the DES encryption routine has been removed from the the current
-version, even though it is used only to compute a message digest.
-Current DTR regulations allow export of the the MD5 message digest
-routine, which is in fact the preferred algorithm, and this is
-included in the current version.</p>
-
-<p>The NTP authentication routines conform to the interface used by
-RSA Laboratories in the <tt>rsaref20.zip</tt> package, which was
-formerly downloadable from <tt>ftp.rsa.com</tt> or via the web at
-<tt>www.rsa.com</tt>, but this may no longer be the case. Outside
-the US and Canada, the functionally identical <tt>rsaeuro.zip</tt>
-package is available from J.S.A. Kapp and other sources. The
-recommended way to integrate the routines in either package with
-the NTP build procedures is to uncompress and extract the <tt>
-rsaref20</tt> files in a top level directory with that name. Then
-install a link to that directory from <tt>rsaref2</tt> in the top
-level directory of the distribution. Use <tt>rsaeuro1</tt> instead
-for that distribution. These steps must be completed
-before the configuration process described below.</p>
-
-<h4>Building and Installing under Unix</h4>
-
-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 - consider using the GNU tools and
-<tt>gcc</tt> compiler in this case). For a successful build, all of
-these tools should be accessible via the current path.
-
-<p>The first thing to do is uncompress the distribution and extract
-the source tree. 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 saves lots of messy fiddling. If you need to
-delete either the debugging code or one or more or all reference
-clock drivers to save space, see the <a href="config.htm">
-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 with the distribution base directory
-active, 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 configure with the <tt>
-../configure</tt> command. The remaining steps are the same whether
-building in the base directory or in the subdirectory.</p>
-
-<h4>Compilation</h4>
-
-Peruse the operating-system-specific information for your
-architecture under <a href="hints.htm">Hints and Kinks</a>.
-
-<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 the use of <tt>gcc</tt>
-can result in quite a few complaints about system header files and
-type inconsistencies, especially about pointer variables. This is
-usually the case when the system header files are not up to ANSI
-standards or <tt>gcc</tt>-isms, when gcc is not installed properly,
-or when operating system updates and patches are applied and gcc is
-not reinstalled. While the autoconfigure process is quite thorough,
-the Unix programming cultures of the various workstation makers
-still remain idiosyncratic.</p>
-
-<h4>Installation</h4>
-
-As root, use the <tt>make install</tt> command to install the
-binaries in the destination directory. You must of course have
-write permission on the install in the destination directory. This
-includes the following programs:
-
-<ul>
-<li><a href="ntpd.htm"><tt>ntpd</tt> - Network Time Protocol (NTP)
-daemon</a></li>
-
-<li><a href="ntpq.htm"><tt>ntpq</tt> - standard NTP query
-program</a></li>
-
-<li><a href="ntpdc.htm"><tt>ntpdc</tt> - special NTP query
-program</a></li>
-
-<li><a href="ntpdate.htm"><tt>ntpdate</tt> - set the date and time
-via NTP</a></li>
-
-<li><a href="ntptrace.htm"><tt>ntptrace</tt> - trace a chain of NTP
-servers back to the primary source</a></li>
-</ul>
-
-<p>If the precision time kernel modifications are present, the
-following program is installed:</p>
-
-<ul>
-<li><a href="ntptime.htm"><tt>ntptime</tt> - read kernel time
-variables</a></li>
-</ul>
-
-<p>If the public key authentication functions are present, the
-following program is installed:</p>
-
-<ul>
-<li><a href="genkeys.htm"><tt>ntp-genkeys</tt> - generate public
-and private keys</a></li>
-</ul>
-
-<p>In some systems that include the capability to edit kernel
-variables, the following program is installed:</p>
-
-<ul>
-<li><a href="tickadj.htm"><tt>tickadj</tt> - set time-related
-kernel variables</a></li>
-</ul>
-
-<h4>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
-possibly a cryptographic key file <tt>ntp.keys</tt>. Newbies should
-see the <a href="quick.htm">Quick Start</a> page for orientation.
-Seasoned veterans can start with the <a href="ntpd.htm"><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.htm">Notes on Configuring NTP and Setting up a NTP
-Subnet</a> page.</p>
-
-<h4>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.htm">Hints and Kinks</a> page. For other
-problems a tutorial on debugging technique is in the <a href=
-"debug.htm">NTP Debugging Technique</a> page. As always, the first
-line of general assistance is the <a href="http://www.ntp.org">NTP
-web site 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. Bug reports of a specific
-nature should be sent to <a href="mailto:bugs@mail.ntp.org">
-&lt;bugs@mail.ntp.org&gt;</a>. Bug reports of a specific nature on
-features implemented by the programmer corps mentioned in the <a
-href="copyright.htm">Copyright</a> page should be sent directly to
-the implementor listed in that page, with copy to
-bugs@mail.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>
-
-<p>Additional <tt>make</tt> commands</p>
-
-<dl>
-<dt><tt>make clean</tt></dt>
-
-<dd>Cleans out object files, programs and temporary files.</dd>
-
-<dt><tt>make distclean</tt></dt>
-
-<dd>Does the work of <tt>clean</tt>, but cleans out all directories
-in preparation for a new distribution release.</dd>
-
-<dt><tt>make dist</tt></dt>
-
-<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.</dd>
-</dl>
-
-<h4>Building and Installing under Windows NT</h4>
-
-See <tt><a href="hints/winnt.htm">hints/winnt.htm</a></tt> for
-directions to compile the sources and install the executables.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/build.html b/contrib/ntp/html/build.html
deleted file mode 100644
index 3e4ccd3..0000000
--- a/contrib/ntp/html/build.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!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.htm b/contrib/ntp/html/clockopt.htm
deleted file mode 100644
index 18773f0..0000000
--- a/contrib/ntp/html/clockopt.htm
+++ /dev/null
@@ -1,76 +0,0 @@
-<html><head><title>
-Reference Clock Options
-</title></head><body><h3>
-Reference Clock Options
-</h3>
-
-<img align=left src=pic/boom4.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>from <i>Pogo</i>, Walt Kelly</a>
-
-<p>See the radios, all in a row.
-<br clear=left><hr>
-
-<h4>Reference Clock Support</h4>
-
-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.htm">Reference Clock Drivers </a>page. Additional information can be found in the pages linked there, including the <a HREF="rdebug.htm">Debugging Hints for Reference Clock Drivers</a> and <a HREF="howto.htm">How To Write a Reference Clock Driver</a> pages. In addition, support for a PPS signal is available as described in <a HREF="pps.htm">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.htm">Line Disciplines and Streams Drivers</a>
-page.
-
-<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>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>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.htm">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>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>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.
-
-<h4>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></dt> <dd>This command can be used to configure reference clocks in special ways. The options are interpreted as follows:</dd>
-
-<dl><dt><tt>prefer</tt></dt>
-<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.htm">Mitigation Rules and the <tt>prefer</tt> Keyword </a>page for further information.</dd>
-
-<dt><tt>mode <i>int</i></tt></dt>
-<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.</dd>
-
-<dt><tt>minpoll <i>int</i></tt></dt>
-<dt><tt>maxpoll<i> int</i></tt></dt>
-<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.</dd>
-
-</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></dt>
-<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.htm">ntpdc</a></tt> program. The
-options are interpreted as follows:</dd>
-
-<dl>
-
-<dt><tt>time1 <i>sec</i></tt></dt>
-<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>
-
-<p><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.htm>Miscellaneous Options</a> page and operates as described in the <a href=refclock.hrm>Reference Clock Drivers</a> page.</dd>
-
-<dt><tt>time2 <i>secs</i></tt></dt>
-<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.htm">reference clock drivers</a> page.</dd>
-
-<dt><tt>stratum <i>int</i></tt></dt>
-<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.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-<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.</dd>
-
-<dt><tt>mode <i>int</i></tt></dt>
-<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.</dd>
-
-<dt><tt>flag1</tt> <tt>flag2</tt> <tt>flag3</tt> <tt>flag4</tt></dt>
-<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.htm">Monitoring Options </a>page.</dd>
-
-</dl>
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>/address></a></body></html>
diff --git a/contrib/ntp/html/clockopt.html b/contrib/ntp/html/clockopt.html
deleted file mode 100644
index af79b04..0000000
--- a/contrib/ntp/html/clockopt.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!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.htm b/contrib/ntp/html/config.htm
deleted file mode 100644
index 2fafb0c..0000000
--- a/contrib/ntp/html/config.htm
+++ /dev/null
@@ -1,188 +0,0 @@
-<html><head><title>
-Configuration Options
-</title></head><body><h3>
-Configuration Options
-</h3>
-
-<img align=left src=pic/pogo3a.gif><a
-href=http://www.eecis.udel.edu/~mills/pictures.htm>from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>Gnu autoconfigure tools are in the backpack.
-<br clear=left><hr>
-
-<H4>Basic Configuration Options - the <TT>configure</TT> utility</H4>
-
-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>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>Usage: <TT>configure [options] [host]</TT>
-<BR>Options: <TT>[defaults in brackets after descriptions]</TT>
-Configuration:
-<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>
-
-Directory and file names:
-
-<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>
-
-Host type:
-
-<PRE>
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-</PRE>
-
-Optional packages:
-
-<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>
-
-Optional features:
-
-<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
- 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>
-
-Radio clocks (these are ordinarily enabled, if supported by the
-machine and operating system):
-
-<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>
-
-PARSE Clocks:
-
-<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><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/config.html b/contrib/ntp/html/config.html
deleted file mode 100644
index 463214a..0000000
--- a/contrib/ntp/html/config.html
+++ /dev/null
@@ -1,168 +0,0 @@
-<!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.htm b/contrib/ntp/html/confopt.htm
deleted file mode 100644
index 8f911ef..0000000
--- a/contrib/ntp/html/confopt.htm
+++ /dev/null
@@ -1,257 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Configuration Options</title>
-</head>
-<body>
-<h3>Configuration Options</h3>
-
-<img align="left" src="pic/boom3a.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>The chicken is getting configuration advice.<br clear="left">
-</p>
-
-<hr>
-<h4>Configuration Support</h4>
-
-<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>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 (IP class A, B and C), (b) the
-broadcast address of a local interface, (m) a multicast address (IP
-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>
-
-<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></dt>
-
-<dt><tt>peer <i>address</i> [key <i>key</i> | autokey] [version <i>
-version</i>] [prefer] [minpoll <i>minpoll</i>] [maxpoll <i>
-maxpoll</i>]</tt></dt>
-
-<dt><tt>broadcast <i>address</i> [key <i>key</i> | autokey]
-[version <i>version</i>] [minpoll <i>minpoll</i>] [ttl <i>
-ttl</i>]</tt></dt>
-
-<dt><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></dt>
-
-<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.htm">Association Management</a> page.
-
-<dl>
-<dt><tt>server</tt></dt>
-
-<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.</dd>
-
-<dt><tt>peer</tt></dt>
-
-<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.</dd>
-
-<dt><tt>broadcast</tt></dt>
-
-<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>
-
-<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 224.0.1.1 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.</dd>
-
-<dt><tt>manycastclient</tt></dt>
-
-<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>
-
-<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.</dd>
-
-<dt>Options</dt>
-
-<dt><tt>autokey</tt></dt>
-
-<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.htm">Authentication Options</a>
-page.</dd>
-
-<dt><tt>burst</tt></dt>
-
-<dd>when the server is reachable and at each poll interval, send a
-burst of eight packets instead of the usual one packet. The spacing
-between the first and the second packets is about 16s to allow a
-modem call to complete, while the spacing between the remaining
-packets is about 2s. This is designed to improve timekeeping
-quality with the <tt>server</tt> command and <tt>s</tt>
-addresses.</dd>
-
-<dt><tt>iburst</tt></dt>
-
-<dd>When the server is unreachable and at each poll interval, send
-a burst of eight packets instead of the usual one. As long as the
-server is unreachable, the spacing between packets is about 16s to
-allow a modem call to complete. Once the server is reachable, the
-spacing between packets is about 2s. 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.</dd>
-
-<dt><tt>key</tt> <i><tt>key</tt></i></dt>
-
-<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.</dd>
-
-<dt><tt>minpoll <i>minpoll</i></tt><br>
-<tt>maxpoll <i>maxpoll</i></tt></dt>
-
-<dd>These options specify the minimum and maximum poll intervals
-for NTP messages, in seconds to the 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).</dd>
-
-<dt><tt>prefer</tt></dt>
-
-<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.htm">Mitigation
-Rules and the <tt>prefer</tt> Keyword</a> page for further
-information.</dd>
-
-<dt><tt>ttl <i>ttl</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>version <i>version</i></tt></dt>
-
-<dd>Specifies the version number to be used for outgoing NTP
-packets. Versions 1-4 are the choices, with version 4 the
-default.</dd>
-</dl>
-</dd>
-</dl>
-
-<h4>Auxilliary Commands</h4>
-
-<dl>
-<dt><tt>broadcastclient</tt></dt>
-
-<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.htm">
-Authentication Options</a> page.</dd>
-
-<dt><tt>manycastserver <i>address</i> [...]</tt></dt>
-
-<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.htm">
-Authentication Options</a> page.</dd>
-
-<dt><tt>multicastclient [<i>address</i>] [...]</tt></dt>
-
-<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.htm">Authentication Options</a> page.</dd>
-</dl>
-
-<h4>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>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/confopt.html b/contrib/ntp/html/confopt.html
deleted file mode 100644
index 110083a..0000000
--- a/contrib/ntp/html/confopt.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!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.htm b/contrib/ntp/html/copyright.htm
deleted file mode 100644
index 2f052a7..0000000
--- a/contrib/ntp/html/copyright.htm
+++ /dev/null
@@ -1,142 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html><head><title>
-Copyright Notice
-</title></head><body><h3>
-Copyright Notice
-</h3>
-
-<img align=left src=pic/sheepb.jpg>"Clone me," says Dolly sheepishly
-<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>
-
-<pre>
-***********************************************************************
-* *
-* Copyright (c) David L. Mills 1992-2001 *
-* *
-* 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 "as is" without express or implied *
-* warranty. *
-* *
-***********************************************************************
-</pre>
-
-The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work.
-
-<ol>
-
-<li><A HREF="mailto: marka@syd.dms.csiro.au">Mark Andrews &lt;marka@syd.dms.csiro.au&gt;</a> Leitch atomic clock controller</li>
-
-<li><A HREF="mailto: altmeier@atlsoft.de">Bernd Altmeier &lt;altmeier@atlsoft.de&gt;</a> hopf Elektronik serial line and PCI-bus devices</li>
-
-<li><A HREF="mailto: vbais@mailman1.intel.co">Viraj Bais &lt;vbais@mailman1.intel.com&gt;</a> and <A HREF="mailto:
-kirkwood@striderfm.intel.com">Clayton Kirkwood
-&lt;kirkwood@striderfm.intel.com&gt;</a> port to WindowsNT 3.5</li>
-
-<li><A HREF="mailto: michael.barone@lmco.com">Michael Barone &lt;michael,barone@lmco.com&gt;</a> GPSVME fixes</li>
-
-<li><A HREF="mailto: karl@owl.HQ.ileaf.com">Karl Berry &lt;karl@owl.HQ.ileaf.com&gt;</a> syslog to file option</li>
-
-<li><A HREF="mailto: greg.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>
-
-<li><A HREF="mailto: Marc.Brett@westgeo.com">Marc Brett &lt;Marc.Brett@westgeo.com&gt;</a> Magnavox GPS clock driver</li>
-
-<li><A HREF="mailto: Piete.Brooks@cl.cam.ac.uk">Piete Brooks &lt;Piete.Brooks@cl.cam.ac.uk&gt;</a> MSF clock driver, Trimble PARSE support</li>
-
-<li><A HREF="mailto: reg@dwf.com">Reg Clemens &lt;reg@dwf.com&gt;</a> Oncore driver (Current maintainer)</li>
-
-<li><A HREF="mailto: clift@ml.csiro.au">Steve Clift &lt;clift@ml.csiro.au&gt;</a> OMEGA clock driver</li>
-
-<li><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>
-
-<li><A HREF="mailto: Sven_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>
-
-<li><A HREF="mailto: dundas@salt.jpl.nasa.gov">John A. Dundas III &lt;dundas@salt.jpl.nasa.gov&gt;</a> Apple A/UX port</li>
-
-<li><A HREF="mailto: duwe@immd4.informatik.uni-erlangen.de">Torsten Duwe &lt;duwe@immd4.informatik.uni-erlangen.de&gt;</a> Linux port</li>
-
-<li><A HREF="mailto: dennis@mrbill.canet.ca">Dennis Ferguson
-&lt;dennis@mrbill.canet.ca&gt;</a> foundation code for NTP Version 2 as specified in RFC-1119</li>
-
-<li><A HREF="mailto: glenn@herald.usask.ca">Glenn Hollinger &lt;glenn@herald.usask.ca&gt;</a> GOES clock driver</li>
-
-<li><A HREF="mailto: iglesias@uci.edu">Mike Iglesias &lt;iglesias@uci.edu&gt;</a> DEC Alpha port</li>
-
-<li><A HREF="mailto: jagubox.gsfc.nasa.gov">Jim Jagielski &lt;jim@jagubox.gsfc.nasa.gov&gt;</a> A/UX port</li>
-
-<li><A HREF="mailto: jbj@chatham.usdesign.com">Jeff Johnson &lt;jbj@chatham.usdesign.com&gt;</a> massive prototyping overhaul</li>
-
-<li><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>
-
-<li><A HREF="mailto: phk@FreeBSD.ORG">Poul-Henning Kamp &lt;phk@FreeBSD.ORG&gt;</a> Oncore driver (Original author)</li>
-
-<li><A HREF="http://www4.informatik.uni-erlangen.de/~kardel">Frank Kardel</A> <A HREF="mailto: Frank.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>
-
-<li><A HREF="mailto: jones@hermes.chpc.utexas.edu">William L. Jones &lt;jones@hermes.chpc.utexas.edu&gt;</a> RS/6000 AIX modifications, HPUX modifications</li>
-
-<li><A HREF="mailto: dkatz@cisco.com">Dave Katz &lt;dkatz@cisco.com&gt;</a> RS/6000 AIX port</li>
-
-<li><A HREF="mailto: leres@ee.lbl.gov">Craig Leres
-&lt;leres@ee.lbl.gov&gt;</a> 4.4BSD port, ppsclock, Magnavox GPS clock driver</li>
-
-<li><A HREF="mailto: lindholm@ucs.ubc.ca">George Lindholm &lt;lindholm@ucs.ubc.ca&gt;</a> SunOS 5.1 port</li>
-
-<li><A HREF="mailto: louie@ni.umd.edu">Louis A. Mamakos &lt;louie@ni.umd.edu&gt;</a> MD5-based authentication</li>
-
-<li><A HREF="mailto: thorinn@diku.dk">Lars H. Mathiesen &lt;thorinn@diku.dk&gt;</a> adaptation of foundation code for Version 3 as specified in RFC-1305</li>
-
-<li><A HREF="mailto: mills@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>
-
-<li><A HREF="mailto: moeller@gwdgv1.dnet.gwdg.de">Wolfgang Moeller &lt;moeller@gwdgv1.dnet.gwdg.de&gt;</a> VMS port</li>
-
-<li><A HREF="mailto: mogul@pa.dec.com">Jeffrey Mogul &lt;mogul@pa.dec.com&gt;</a> ntptrace utility</li>
-
-<li><A HREF="mailto: tmoore@fievel.daytonoh.ncr.com">Tom Moore &lt;tmoore@fievel.daytonoh.ncr.com&gt;</a> i386 svr4 port</li>
-
-<li><A HREF="mailto: kamal@whence.com">Kamal A Mostafa &lt;kamal@whence.com&gt;</a> SCO OpenServer port</li>
-
-<li><A HREF="mailto: derek@toybox.demon.co.uk">Derek Mulcahy &lt;derek@toybox.demon.co.uk&gt;</a> and <A HREF="mailto: d@hd.org">Damon Hart-Davis &lt;d@hd.org&gt;</a> ARCRON MSF clock driver</li>
-
-<li><A HREF="mailto: Rainer.Pruy@informatik.uni-erlangen.de">Rainer Pruy &lt;Rainer.Pruy@informatik.uni-erlangen.de&gt;</a> monitoring/trap scripts, statistics file handling</li>
-
-<li><A HREF="mailto: dirce@zk3.dec.com">Dirce Richards &lt;dirce@zk3.dec.com&gt;</a> Digital UNIX V4.0 port</li>
-
-<li><A HREF="mailto: wsanchez@apple.com">Wilfredo S&aacute;nchez &lt;wsanchez@apple.com&gt;</A> added support for NetInfo</li>
-
-<li><A HREF="mailto: mrapple@quack.kfu.com">Nick Sayer &lt;mrapple@quack.kfu.com&gt;</a> SunOS streams modules</li>
-
-<li><A HREF="mailto: jack@innovativeinternet.com">Jack Sasportas &lt;jack@innovativeinternet.com&gt;</A> Saved a Lot of space on the stuff in the html/pic/ subdirectory</li>
-
-<li><A HREF="mailto: schnitz@unipress.com">Ray Schnitzler &lt;schnitz@unipress.com&gt;</a> Unixware1 port</li>
-
-<li><A HREF="mailto: shields@tembel.org">Michael Shields &lt;shields@tembel.org&gt;</a> USNO clock driver</li>
-
-<li><A HREF="mailto: pebbles.jpl.nasa.gov">Jeff Steinman &lt;jss@pebbles.jpl.nasa.gov&gt;</a> Datum PTS clock driver</li>
-
-<li><A HREF="mailto: harlan@pfcs.com">Harlan Stenn &lt;harlan@pfcs.com&gt;</a> GNU automake/autoconfigure makeover, various other bits (see the ChangeLog)</li>
-
-<li><A HREF="mailto: ken@sdd.hp.com">Kenneth Stone &lt;ken@sdd.hp.com&gt;</a> HP-UX port</li>
-
-<li><A HREF="mailto: ajit@ee.udel.edu">Ajit Thyagarajan &lt;ajit@ee.udel.edu&gt;</a>IP multicast/anycast support</li>
-
-<li><A HREF="mailto: tsuruoka@nc.fukuoka-u.ac.jp">Tomoaki TSURUOKA &lt;tsuruoka@nc.fukuoka-u.ac.jp&gt;</a>TRAK clock driver</li>
-
-<li><A HREF="mailto: vixie@vix.com">Paul A Vixie &lt;vixie@vix.com&gt;</a> TrueTime GPS driver, generic TrueTime clock driver</li>
-
-<li><A HREF="mailto: Ulrich.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</li>
-
-</ol>
-
-<hr>
-<a href=index.htm><img align=left src=pic/home.gif alt="gif"></a><address><a href=mailto:mills@udel.edu>David L. Mills &lt;mills@udel.edu&gt;</a></address></body></html>
diff --git a/contrib/ntp/html/copyright.html b/contrib/ntp/html/copyright.html
deleted file mode 100644
index 50ef51a..0000000
--- a/contrib/ntp/html/copyright.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!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.htm b/contrib/ntp/html/debug.htm
deleted file mode 100644
index 564bb18..0000000
--- a/contrib/ntp/html/debug.htm
+++ /dev/null
@@ -1,477 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>NTP Debugging Techniques</title>
-</head>
-<body>
-<h3>NTP Debugging Techniques</h3>
-
-<img align="left" src="pic/pogo.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>We make house calls and bring our own bugs.<br clear="left">
-</p>
-
-<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 <tt><a href="ntpd.htm">
-ntpd</a></tt> 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>The best way to verify correct operation is using the <tt><a
-href="ntpq.htm">ntpq</a></tt> and <tt><a href="ntpdc.htm">
-ntpdc</a></tt> 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/~mills/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
-of interest. 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). Note that NTP does not use TCP in any
-form. Other problems are apparent in the system log file. The log
-file should show the startup banner, some cryptic initialization
-data and the computed precision value. 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.</p>
-
-<p>When first started, the daemon normally 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 correctly operating servers and possible
-intruders, at least four valid messages from the majority of
-servers and peers listed in the configuration file is required
-before the daemon can set the local 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 will send
-a message to the system log and shut 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.htm">
-Miscellaneous Options</a> page. The panic threshold can be disabled
-entirely by the <tt>-g</tt> command line option described on the <a
-href="ntpd.htm">ntpd - 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 125 ms, the daemon will perform a step adjustment;
-otherwise, it will gradually slew the clock to the nominal time.
-The step threshold can be changed by the <tt>tinker step</tt>
-command discribed on the <a href="miscopt.htm">Miscellaneous
-Options</a> page. The step threshold can be disabled entirely by
-the <tt>-x</tt> command line option described on the <a href=
-"ntpd.htm">ntpd - Network Time Protocol (NTP) daemon</a> page. In
-this case 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="leap.htm">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. However, if the counter is greater than the
-stepout interval, which defaults to 900 s, the next sample will
-step or slew the time as directed. The stepout threshold can be
-changed by the <tt>tinker stepout</tt> command discribed on the <a
-href="miscopt.htm">Miscellaneous Options</a> page.</p>
-
-<p>If, as discussed later on this page, for some reason the
-hardware clock oscillator frequency error is very large, the time
-errors upon first startup of the daemon may increase over time
-until exceeding the step threshold, which requires 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 on the
-nominal frequency correction. After this, the correction is written
-to the <tt>ntp.drift</tt> file, which is read upon subsequent
-restarts, so the herky-jerky cycles should not recur.</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. 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>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, but not currently selected, 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="miro.time.saic.com", publickey=3171359012, pcookie=0x6629adb2,
-hcookie=0x61f99cdb, 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 NTP Version 4. 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. An
-explanation of the current set is on the <tt>ntpq</tt> page.</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 eleven 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="ntpd 4.0.99j4-r Fri Jul 7 23:38:17 GMT 2000 (1)",
-processor="i386", system="FreeBSD3.4-RELEASE", 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="barnstable.udel.edu", publickey=3171372095, params=3171372095,
-refresh=3172016539
-</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>publickey</tt>, <tt>params</tt> and <tt>
-refresh</tt>, which are used for the Autokey public-key
-cryptography described on the <a href="authopt.htm">Authentication
-Options</a> page. The values show the filestamps, in NTP seconds,
-that the associated values 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.htm">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 as long as
-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>Special Problems</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.htm">
-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>
-
-<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.htm">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 configure to generate what is called a
-kiss-of-death (KOD) packet and send to the client. In case of
-outright access denied, the KOD is the response to the first client
-packet. In this case the client association is permanently disabled
-and the access denied bit (test 4) is set in the flash peer
-variable mentioned above 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.htm">Access Control Options</a> page for further
-informatin.</p>
-
-<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>The recommended 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>Debugging Checklist</h4>
-
-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:
-
-<ol>
-<li style="list-style: none"></li>
-
-<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>
-
-<li style="list-style: none"></li>
-
-<li>Check the system log for <tt>ntpd</tt> messages about
-configuration errors, name-lookup failures or initialization
-problems.</li>
-
-<li style="list-style: none"></li>
-
-<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>
-
-<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>
-
-<li style="list-style: none"></li>
-
-<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.</li>
-
-<li style="list-style: none"></li>
-
-<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>
-
-<li style="list-style: none"></li>
-
-<li>If all else fails, see the FAQ and/or the discussion and
-briefings at <a href="http://www.eecis.udel.edu/~mills/ntp.htm">
-Network Time Synchronization Project.</a></li>
-</ol>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/debug.html b/contrib/ntp/html/debug.html
deleted file mode 100644
index c5e0766..0000000
--- a/contrib/ntp/html/debug.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<!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/driver1.htm b/contrib/ntp/html/driver1.htm
deleted file mode 100644
index b70010f..0000000
--- a/contrib/ntp/html/driver1.htm
+++ /dev/null
@@ -1,157 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<meta http-equiv="Content-Type" content=
-"text/html; charset=iso-8859-1">
-<meta name="GENERATOR" content=
-"Mozilla/4.01 [en] (Win95; I) [Netscape]">
-<title>Undisciplined Local Clock</title>
-</head>
-<body>
-<h3>Undisciplined Local Clock</h3>
-
-<hr>
-<h4>Synopsis</h4>
-
-Address: 127.127.1.<i>u</i> <br>
-Reference ID: <tt>LCL</tt> <br>
-Driver ID: <tt>LOCAL</tt>
-
-<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.htm">
-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 3 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>Monitor Data</h4>
-
-No <tt>filegen clockstats</tt> monitor data are produced by this
-driver.
-
-<h4>Fudge Factors</h4>
-
-<dl>
-<dt><tt>time1 <i>time</i></tt></dt>
-
-<dd>Specifies the time offset calibration factor, in seconds and
-fraction, with default 0.0.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-
-<dd>Specifies the frequency offset calibration factor, in parts per
-million, with default 0.0.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with
-default 3.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-
-<dd>Specifies the driver reference identifier, an ASCII string from
-one to four characters, with default <tt>LCL</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-</dl>
-
-<p>Additional Information</p>
-
-<p><a href="refclock.htm">Reference Clock Drivers</a></p>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver10.htm b/contrib/ntp/html/driver10.htm
deleted file mode 100644
index bdf314a..0000000
--- a/contrib/ntp/html/driver10.htm
+++ /dev/null
@@ -1,114 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Austron 2200A/2201A GPS Receivers</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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>
-<H4>
-Description</H4>
-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.htm">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.htm">Pulse-per-second
-(PPS) Signal Interfacing</A> page.
-
-<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>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
-of the ntp3 distribution.
-<H4>
-Monitor Data</H4>
-When enabled by the <TT>flag4</TT> fudge flag, every received timecode
-is written as-is to the <TT>clockstats</TT> file.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>GPS</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Set for computers that listen-only.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Enable verbose <TT>clockstats</TT> recording if set.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver11.htm b/contrib/ntp/html/driver11.htm
deleted file mode 100644
index 6e5dd7a..0000000
--- a/contrib/ntp/html/driver11.htm
+++ /dev/null
@@ -1,150 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Arbiter 1088A/B GPS Receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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>
-<H4>
-Description</H4>
-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>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>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>Format <TT>B5</TT> (24 ASCII printing characters):
-<PRE>&lt;cr>&lt;lf>i yy ddd hh:mm:ss.000bbb
-
-on-time = &lt;cr>
-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>
-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>The time quality character is encoded in IEEE P1344 standard:
-
-<P>Format <TT>TQ</TT> (IEEE P1344 estimated worst-case time quality)
-<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>
-The status string is encoded as follows:
-
-<P>Format <TT>SR</TT> (25 ASCII printing characters)
-<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>
-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.
-<H4>
-Monitor Data</H4>
-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.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>GPS</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Enable verbose <TT>clockstats</TT> recording if set.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver12.htm b/contrib/ntp/html/driver12.htm
deleted file mode 100644
index 57dbb71..0000000
--- a/contrib/ntp/html/driver12.htm
+++ /dev/null
@@ -1,98 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-KSI/Odetics TPRO/S IRIG Interface</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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
-<H4>
-Description</H4>
-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>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.htm">A
-Kernel Model for Precision Timekeeping </A>page for further details.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>IRIG</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver16.htm b/contrib/ntp/html/driver16.htm
deleted file mode 100644
index a4b9f0c..0000000
--- a/contrib/ntp/html/driver16.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 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>
-</head>
-<body>
-
-<h3>
-bc635VME/bc350VXI Time and Frequency Processor</h3>
-
-<hr>
-<h4>
-Synopsis</h4>
-Address: <font size=-1>127.127.16</font>.<i>u</i>
-<br>Reference ID: <font size=-1>BTFP</font>
-<br>Driver ID: <font size=-1>GPS_BANCOMM</font>
-<br>Bancomm Device<font size=-1>:&nbsp; /dev/btfp0</font>
-<br>Requires<font size=-1>: Bancomm bc635 TFP device module driver for
-SunOS 4.x/SunOS 5.x</font>
-<h4>
-Description</h4>
-This is the clock driver for the Bancomm bc635VME Time and Frequency Processor.
-It requires the BANCOMM bc635VME /
-<br>bc350VXI Time and Frequency Processor Module Driver for SunOS 4.x/SunOS
-5.x UNIX Systems.
-<p>Most of this code is originally from refclock_bancomm.c with thanks.
-It has been modified and tested on an UltraSparc IIi-cEngine
-<br>running Solaris 2.6. A port for HPUX is not available henceforth.
-<br>&nbsp;
-<h4>
-Additional Information</h4>
-
-<p><br><a href="http://www.eecis.udel.edu/~ntp/ntp_spool/html/refclock.htm">Reference
-Clock Drivers</a>
-<hr>
-<address>
-David L. Mills (mills@udel.edu)</address>
-
-</body>
-</html>
diff --git a/contrib/ntp/html/driver18.htm b/contrib/ntp/html/driver18.htm
deleted file mode 100644
index 5410d98..0000000
--- a/contrib/ntp/html/driver18.htm
+++ /dev/null
@@ -1,235 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-NIST Modem Time Service</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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
-<H4>
-Description</H4>
-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>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>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>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>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>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>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>fudge
-flag1</TT> using ntpdc.
-
-<P>The NIST timecode message is transmitted at 1200 bps in the following
-format:
-<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>
-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>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>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>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>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.
-<H4>
-Call Management</H4>
-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>Manual call attempts can be made at any time by setting fudge flag1
-using ntpdc. For example, the ntpdc command
-<PRE>
-fudge 127.127.18.1 flags 1</PRE>
-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>The flag1 can be set from a cron job in the following way. Construct
-a file with contents
-<PRE>keyid 11
-passwd dialup
-fudge 127.127.18.1 flags 1
-quit</PRE>
-Then, run the following program at specified times as required.
-<PRE>/usr/local/bin/ntpdc &lt;file</PRE>
-
-<H4>
-Monitor Data</H4>
-When enabled by the <TT>flag4</TT> fudge flag, every received timecode
-is written as-is to the <TT>clockstats</TT> file.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>NIST</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver19.htm b/contrib/ntp/html/driver19.htm
deleted file mode 100644
index a5cd5e0..0000000
--- a/contrib/ntp/html/driver19.htm
+++ /dev/null
@@ -1,124 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Heath WWV/WWVH Receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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
-<H4>
-Description</H4>
-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>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>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>The clock message consists of 23 ASCII printing characters in the following
-format:
-<PRE>hh:mm:ss.f&nbsp;&nbsp;&nbsp;&nbsp; dd/mm/yr&lt;cr>
-
-hh:mm:ss.f = hours, minutes, seconds
-f = deciseconds ('?' when out of spec)
-dd/mm/yr = day, month, year</PRE>
-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>A fudge time1 value of .07 s appears to center the clock offset residuals.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>WWV</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver2.htm b/contrib/ntp/html/driver2.htm
deleted file mode 100644
index 885a1b2..0000000
--- a/contrib/ntp/html/driver2.htm
+++ /dev/null
@@ -1,137 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Trak 8820 GPS Receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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>
-<H4>
-Description</H4>
-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>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>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>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:
-<PRE>*RQTS U,ddd:hh:mm:ss.0,q&lt;cr>&lt;lf>
-
-on-time = '*'
-ddd = day of year
-hh:mm:ss = hours, minutes, seconds
-q = quality indicator (phase error), 0-6:
-&nbsp;&nbsp;&nbsp;&nbsp; 0 > 20 us
-&nbsp;&nbsp;&nbsp;&nbsp; 6 > 10 us
-&nbsp;&nbsp;&nbsp;&nbsp; 5 > 1 us
-&nbsp;&nbsp;&nbsp;&nbsp; 4 > 100 ns
-&nbsp;&nbsp;&nbsp;&nbsp; 3 > 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>&lt;lf></TT> response.
-In the normal mode, other control and status requests are effective, including
-the leap-second status request <TT>RQLS&lt;cr></TT>. The radio responds
-with <TT>RQLS yy,mm,dd&lt;cr>&lt;lf></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.
-<H4>
-Monitor Data</H4>
-When enabled by the <TT>flag4</TT> fudge flag, every received timecode
-is written as-is to the <TT>clockstats</TT> file.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>GPS</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-
-<P>Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A></DL>
-
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver20.htm b/contrib/ntp/html/driver20.htm
deleted file mode 100644
index 6d1126b..0000000
--- a/contrib/ntp/html/driver20.htm
+++ /dev/null
@@ -1,161 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 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>
-</head>
-<body>
-
-<h3>
-Generic NMEA GPS Receiver</h3>
-
-<hr>
-<h4>
-Synopsis</h4>
-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>
-<h4>
-Description</h4>
-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.
-<br>The driver expects the receiver to be set up to transmit a <tt>$GPRMC</tt>
-message every second.
-<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>If the Operating System supports the PPSAPI, RFC-2783, it will be used.
-<br>&nbsp;
-<p>The various GPS sentences that this driver recognises look like this:
-<br>(others quietly ignored)
-<pre><tt>$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC&lt;cr>&lt;lf>
-$GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC&lt;cr>&lt;lf>
-$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>&lt;lf>
-
-&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, >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>&lt;lf> - 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>&nbsp;
-<p>The driver will send a <tt>$PMOTG,RMC,0000*1D&lt;cr>&lt;lf></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.
-<h4>
-Setting up the Garmin GPS-25XL</h4>
-Switch off all output with by sending it the following string.
-<pre>"$PGRMO,,2&lt;cr>&lt;lf>"</pre>
-Now switch only $GPRMC on by sending it the following string.
-<pre>"$PGRMO,GPRMC,1&lt;cr>&lt;lf>"</pre>
-On some systems the PPS signal isn't switched on by default. It can be
-switched on by sending the following string.
-<pre>"$PGRMC,,,,,,,,,,,,2&lt;cr>&lt;lf>"</pre>
-
-<h4>
-Monitor Data</h4>
-The GPS sentence(s) that is used is written to the clockstats file.
-<h4>
-Fudge Factors</h4>
-
-<dl>
-<dt>
-<tt>time1 <i>time</i></tt></dt>
-
-<dd>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</dd>
-
-<dt>
-<tt>time2 <i>time</i></tt></dt>
-
-<dd>
-Not used by this driver.</dd>
-
-<dt>
-<tt>stratum <i>number</i></tt></dt>
-
-<dd>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
-
-<dt>
-<tt>refid <i>string</i></tt></dt>
-
-<dd>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <tt>GPS</tt>.</dd>
-
-<dt>
-<tt>flag1 0 | 1</tt></dt>
-
-<dd>
-Not used by this driver.</dd>
-
-<dt>
-<tt>flag2 0 | 1</tt></dt>
-
-<dd>
-Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.</dd>
-
-<dt>
-<tt>flag3 0 | 1</tt></dt>
-
-<dd>
-Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.</dd>
-
-<dt>
-<tt>flag4 0 | 1</tt></dt>
-
-<dd>
-Not used by this driver.</dd>
-
-<br>&nbsp;
-<p>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<p>Additional Information
-<p><a href="refclock.htm">Reference Clock Drivers</a></dl>
-
-<hr>
-<address>
-David L. Mills (mills@udel.edu)</address>
-
-</body>
-</html>
diff --git a/contrib/ntp/html/driver22.htm b/contrib/ntp/html/driver22.htm
deleted file mode 100644
index a293cbc..0000000
--- a/contrib/ntp/html/driver22.htm
+++ /dev/null
@@ -1,159 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>PPS Clock Discipline</title>
-</head>
-<body>
-<h3>PPS Clock Discipline</h3>
-
-<hr>
-<h4>Synopsis</h4>
-
-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>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) 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
-is marked as the prefer peer, as described in the <a href=
-"prefer.htm">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 FreeBSD and
-Linux and proprietary versions for Digital/Compaq Tru64 (Alpha),
-Sun Solaris and Sun SunOS. See the <a href="pps.htm">
-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 is 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 reachable only if the
-auxiliary source is the prefer peer, is reachable and is selected
-to discipline the system clock. 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 match the stratum of the auxiliary source. Since the
-stratum is determined dynamically, it is not possible to assign
-another stratum using the <tt>fudge</tt> command as in other
-drivers.</p>
-
-<h4>Fudge Factors</h4>
-
-<dl>
-<dt><tt>time1 <i>time</i></tt></dt>
-
-<dd>Specifies the time offset calibration factor, in seconds and
-fraction, with default 0.0.dd&gt;</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with
-default 0.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-
-<dd>Specifies the driver reference identifier, an ASCII string from
-one to four characters, with default <tt>PPS</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-
-<dd>Specifies the PPS signal on-time edge: 0 for assert (default),
-1 for clear.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-
-<dd>Controls the kernel PPS discipline: 0 for disable (default), 1
-for enable.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-</dl>
-
-<p>Additional Information</p>
-
-<p><a href="refclock.htm">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.</li>
-</ol>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver23.htm b/contrib/ntp/html/driver23.htm
deleted file mode 100644
index 8d6fc9d..0000000
--- a/contrib/ntp/html/driver23.htm
+++ /dev/null
@@ -1,178 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>PTB Modem Time Service and other European Laboratories Time
-Services</H3>
-
-<HR ALIGN=LEFT>
-
-<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><BR>
-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.
-</UL>
-
-<BLOCKQUOTE>
- <P>For more detail, see <A HREF="http://www.ptb.de/english/org/4/43/433/disse.htm">http://www.ptb.de/english/org/4/43/433/disse.htm</A></P>
-</BLOCKQUOTE>
-
-<UL>
- <LI>In the UK by National Physical Laboratory (NPL)'s TRUETIME
- service. Phone number: 0891 516 333
-</UL>
-
-<BLOCKQUOTE>
- <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>
-</BLOCKQUOTE>
-
-<UL>
- <LI>In Italy by Istituto Elettrotecnico Nazionale &quot;Galileo
- Ferrais&quot; (IEN)'s CTD service. Phone number: 166 11 46
- 15
-</UL>
-
-<BLOCKQUOTE>
- <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>
-</BLOCKQUOTE>
-
-<UL>
- <LI>In Switzerland by Swiss Federal Office of Metrology 's timecode
- service. Phone number: 031 323 32 25
-</UL>
-
-<BLOCKQUOTE>
- <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>
-</BLOCKQUOTE>
-
-<UL>
- <LI>In Sweden by SP Swedish National Testing and Research Institute
- 's timecode service. Phone number: +46 33 415783
-</UL>
-
-<BLOCKQUOTE>
- <P>For more detail, see <A HREF="http://www.sp.se/pne/ElectricalMetrology/ElMeteng/frameset.htm">http://www.sp.se/pne/ElectricalMetrology/ElMeteng/frameset.htm</A><BR>
-<BR>
- </P>
-</BLOCKQUOTE>
-
-<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>
-
-<P>Additional Information</P>
-
-<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>
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp; <HR ALIGN=LEFT></P>
-
-<ADDRESS>by Marco Mascarello (masca@tf.ien.it) for David L. Mills
-(mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
-
diff --git a/contrib/ntp/html/driver24.htm b/contrib/ntp/html/driver24.htm
deleted file mode 100644
index 70c623b..0000000
--- a/contrib/ntp/html/driver24.htm
+++ /dev/null
@@ -1,85 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-USNO Modem Time Service</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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
-<H4>
-Description</H4>
-No information available.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>USNO</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Enable <TT>clockstats</TT> recording if set.</DD>
-</DL>
-
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver26.htm b/contrib/ntp/html/driver26.htm
deleted file mode 100644
index eabbc96..0000000
--- a/contrib/ntp/html/driver26.htm
+++ /dev/null
@@ -1,109 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Hewlett Packard 58503A GPS Receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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
-<H4>
-Description</H4>
-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>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>&lt;lf>, followed by a prompt
-string issued by the receiver, in the following format:
-<PRE>T#yyyymmddhhmmssMFLRVcc&lt;cr>&lt;lf></PRE>
-The driver processes the response at the &lt;cr> and &lt;lf>&lt;cr> and
-&lt;lf>, 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>&lt;lf></PRE>
-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>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
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>GPS</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver27.htm b/contrib/ntp/html/driver27.htm
deleted file mode 100644
index 686e985..0000000
--- a/contrib/ntp/html/driver27.htm
+++ /dev/null
@@ -1,634 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Arcron MSF Receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-Address: 127.127.27.<I>u</I>
-<BR>Reference ID: <TT>MSFa</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>
-<H4>
-Description</H4>
-This driver supports the Arcron MSF receiver, and would probably also support
-the DCF77 variant of the same clock. The clock reports its ID as ``<TT>MSFa</TT>''
-to indicate MSF as a source and the use of the ARCRON driver.
-
-<P>This documentation describes version V1.1 (1997/06/23) of the source
-and has 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). This code will probably
-work, and show 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>This code has been significantly slimmed down since the V1.0 version,
-roughly halving the memory footprint of its code and data.
-
-<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>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.
-
-<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.htm">ARC
-Rugby MSF Receiver</A> page for more details and the code.
-
-<P>Look at the notes at the start of the code for further information;
-some of the more important details follow.
-
-<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). 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.
-
-<P>The clock claims to be accurate to within about 20ms of the MSF-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>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>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>fudge</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>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>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>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>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:
-<UL>
-<LI>
-Your RS232 interface must drive both +ve and -ve</LI>
-
-<LI>
-You must (in theory) wait for an echo and a further 10ms between characters</LI>
-</UL>
-This driver, running on standard Sun 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>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 cae 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:
-<DL>
-<DT>
-<TT>g</TT> CR</DT>
-
-<DD>
-Request for signal quality. Answer only valid during (late part of) resync
-to MSF signal. The response consists of two characters as follows:</DD>
-
-<OL>
-<DL compact>
-<DT>
-bit 7</DT>
-
-<DD>
-parity</DD>
-
-<DT>
-bit 6</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 5</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 4</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 3</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 2</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 1</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 0</DT>
-
-<DD>
-= 0 if no reception attempt at the moment, = 1 if reception attempt (ie
-resync) in progress</DD>
-</DL>
-
-<DL compact>
-<DT>
-bit 7</DT>
-
-<DD>
-parity</DD>
-
-<DT>
-bit 6</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 5</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 4</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 3</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 2--0</DT>
-
-<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'.</DD>
-</DL>
-</OL>
-
-<DT>
-<TT>h</TT> CR</DT>
-
-<DD>
-Request to resync to MSF. 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 Rugby
-MSF (remember to allow for propagation time). By default the clock resyncs
-once per day shortly after 2am (presumably to catch transitions to/from
-daylight saving time quickly). With this driver code we resync at least
-once per hour to minimise clock wander.</DD>
-
-<DT>
-<TT>o</TT> CR</DT>
-
-<DD>
-Request timestamp. Start bit of first byte of response is on-time, so may
-be delayed up to 1 second. Note that when the BST mode is in effect the
-time is GMT/UTC +0100, ie an hour ahead of UTC to reflect local time in
-the UK. The response data is as follows:</DD>
-
-<OL>
-<LI>
-hours tens (hours range from 00 to 23)</LI>
-
-<LI>
-hours units</LI>
-
-<LI>
-minutes tens (minutes range from 00 to 59)</LI>
-
-<LI>
-minutes units</LI>
-
-<LI>
-seconds tens (seconds presumed to range from 00 to 60 to allow for leap
-second)</LI>
-
-<LI>
-seconds units</LI>
-
-<LI>
-day of week 1 (Monday) to 7 (Sunday)</LI>
-
-<LI>
-day of month tens (day ranges from 01 to 31)</LI>
-
-<LI>
-day of month units</LI>
-
-<LI>
-month tens (months range from 01 to 12)</LI>
-
-<LI>
-month units</LI>
-
-<LI>
-year tens (years range from 00 to 99)</LI>
-
-<LI>
-year units</LI>
-
-<LI>
-BST/UTC status</LI>
-
-<DL compact>
-<DT>
-bit 7</DT>
-
-<DD>
-parity</DD>
-
-<DT>
-bit 6</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 5</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 4</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 3</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 2</DT>
-
-<DD>
-= 1 if UTC is in effect (reverse of bit 1)</DD>
-
-<DT>
-bit 1</DT>
-
-<DD>
-= 1 if BST is in effect (reverse of bit 2)</DD>
-
-<DT>
-bit 0</DT>
-
-<DD>
-= 1 if BST/UTC change pending</DD>
-</DL>
-
-<LI>
-clock status</LI>
-
-<DL compact>&nbsp;
-<DT>
-bit 7</DT>
-
-<DD>
-parity</DD>
-
-<DT>
-bit 6</DT>
-
-<DD>
-always 0</DD>
-
-<DT>
-bit 5</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 4</DT>
-
-<DD>
-always 1</DD>
-
-<DT>
-bit 3</DT>
-
-<DD>
-= 1 if low battery is detected</DD>
-
-<DT>
-bit 2</DT>
-
-<DD>
-= 1 if last resync failed (though officially undefined for the MSF clock)</DD>
-
-<DT>
-bit 1</DT>
-
-<DD>
-= 1 if at least one reception attempt since 0230 for the MSF clock was
-successful (0300 for the DCF77 clock)</DD>
-
-<DT>
-bit 0</DT>
-
-<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.</DD>
-</DL>
-</OL>
-The driver only accepts time from the clock if the bottom three bits of
-the status byte are <TT>011</TT>. The leap-year logic for computing day-in-year
-is only valid until 2099, and the clock will ignore stamps from the clock
-that claim BST is in effect in the first hour of each year. 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.</DL>
-A typical <TT>ntp.conf</TT> configuration file for this driver might be:
-<PRE># hostname(n) means we expect (n) to be the stratum at which hostname runs.
-
-#------------------------------------------------------------------------------
-# SYNCHRONISATION PARTNERS
-# ========================
-
-# Our betters...
-server 127.127.27.0 # ARCRON MSF radio clock(1).
-# 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 flag4 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></DT>
-
-<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.</DD>
-
-<DT>
-<TT>ARCRON_OWN_FILTER</TT></DT>
-
-<DD>
-When defined, the code uses its own median-filter code rather than that
-available in <TT>ntp_refclock.c</TT> since the latter seems to have a minor
-bug, at least in version 3-5.90. If this bug goes away this flag should
-be turned off to avoid duplication of code. (The bug, if that's what it
-is, causes the last raw offset to be used rather than the median offset.)</DD>
-
-
-<P>Without this defined (and without <TT>ARCRON_MULTIPLE_SAMPLES</TT> below)
-a typical set of offsets reported and used to drive the clock-filter algorithm
-is (oldest last):
-<PRE>filtoffset=&nbsp; -4.32&nbsp; -34.82&nbsp;&nbsp; -0.78&nbsp;&nbsp;&nbsp; 0.89&nbsp;&nbsp;&nbsp; 2.76&nbsp;&nbsp;&nbsp; 4.58&nbsp;&nbsp; -3.92&nbsp;&nbsp; -2.17</PRE>
-Look at that spike!
-
-<P>With this defined a typical set of offsets is:
-<PRE>filtoffset=&nbsp; -7.06&nbsp;&nbsp; -7.06&nbsp;&nbsp; -2.91&nbsp;&nbsp; -2.91&nbsp;&nbsp; -2.91&nbsp;&nbsp; -1.27&nbsp;&nbsp; -9.54&nbsp;&nbsp; -6.70</PRE>
-with the repeated values being some evidence of outlyers being discarded.
-<DT>
-<TT>ARCRON_MULTIPLE_SAMPLES</TT></DT>
-
-<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.</DD>
-
-<DT>
-<TT>ARCRON_LEAPSECOND_KEEN</TT></DT>
-
-<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.</DD>
-
-<DT>
-<TT>PRECISION</TT></DT>
-
-<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.
-B^)</DD>
-
-<DT>
-<TT>NSAMPLES</TT></DT>
-
-<DD>
-Should be at least 3 to help smooth out sampling jitters. Can be more,
-but if made too long can make <TT>ntpd</TT> overshoot on clock corrections
-and can hold onto bad samples longer than you would like. With this set
-to 4 and <TT>NKEEP</TT> set to 3 this allows the occasional bad sample
-(in my experience less than 1 value in 10) to be dropped. (Note that there
-seems to be some sort of `beat' effect in the offset with a periodicity
-of about 7 samples as of this writing (1997/05/11) still under investigation;
-a filter of approximately this length should be able to almost completely
-suppress this effect.) Note that if the fudge-factor <TT>flag3</TT> is
-set to 1, a larger <TT>NSAMPLES</TT> is used.</DD>
-</DL>
-
-<H4>
-Monitor Data</H4>
-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>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>Syslog entries are of the form:
-<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>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<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.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not currently used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.
-It is suggested that the clock be fudged to stratum 1 so this it is used
-a backup time source rather than a primary when more accurate sources are
-available.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>MSFa</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-If set to 1, better precision is reported (and thus lower dispersion) while
-clock's received signal quality is known to be good.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-If set to 1, a longer-than-normal (8-stage rather than 4-stage) median
-filter is used, to provide some extra smoothing of clock output and reduction
-in jitter, at the cost of extra clock overshoot. Probably not advisable
-unless the server using this clock has other sources it can use to help
-mitigate the overshoot.</DD>
-</DL>
-
-<H4>
-Additional Information</H4>
-<A HREF="refclock.htm">Reference Clock Drivers</A>
-
-<P><A HREF="http://www2.exnet.com/NTP/ARC/ARC.htm">ARC Rugby MSF Receiver</A>
-page&nbsp;
-<HR>
-<ADDRESS>
-Damon Hart-Davis (d@hd.org)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver28.htm b/contrib/ntp/html/driver28.htm
deleted file mode 100644
index 787ccb4..0000000
--- a/contrib/ntp/html/driver28.htm
+++ /dev/null
@@ -1,133 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-Shared Memory Driver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-Address: 127.127.28.<I>u</I>
-<BR>Reference ID: <TT>SHM</TT>
-<BR>Driver ID: <TT>SHM</TT>
-<H4>
-Description</H4>
-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
-<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>
-When the poll-method of the driver is called, the valid-flag of the shared
-memory-segment is checked:
-
-<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>If not set, a timeout is reported to ntp, nothing else happend
-<H4>
-Operation mode=1</H4>
-When the poll-method of the driver is called, the valid-flag of the shared
-memory-segment is checked:
-
-<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>If not set, a timeout is reported to ntp, nothing else happend
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>SHM</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-
-<P>Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A></DL>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver29.htm b/contrib/ntp/html/driver29.htm
deleted file mode 100644
index 3cddfc2..0000000
--- a/contrib/ntp/html/driver29.htm
+++ /dev/null
@@ -1,1254 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Trimble Palisade Receiver</title>
-</head>
-<body text="#000000" bgcolor="#FFFFFF" 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;
-<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>No user initialization of the receiver is required. This driver is compatible
-with the following versions of Palisade:
-<br>&nbsp;
-<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.
-<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;</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:
-<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>"ntp.conf"</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;
-<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>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;
-<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>
-
-<li>
-Verify presence of timing packets by observing the 1 Hz (PPS) led on the
-interface module. It should flash once per second.</li>
-
-<li>
-Connect Palisade's port A to the NTP host.</li>
-
-<li>
-Configure NTP and the serial I/O port on the host system.</li>
-
-<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>
-
-<li>
-Run NTP in debug mode (-d -d), to observe Palisade_receive events.</li>
-
-<li>
-The driver reports the <a href="#TrackingStatus">tracking status of the
-receiver</a>. Make sure it is tracking several satellites.</li>
-
-<li>
-Remove fudge flag2 and restart <b>ntpd</b> in debug mode to observe palisade_receive
-events.</li>
-
-<li>
-If event polling fails, verify the <a href="#Pinouts">connections</a> and
-that the host hardware supports RTS control.</li>
-</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></dt>
-
-<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.</dd>
-
-<dt>
-<tt><font size=+1>stratum <i>number</i></font></tt></dt>
-
-<dd>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
-
-<dt>
-<tt><font size=+1><a href="#REFID">refid <i>string</i></a></font></tt></dt>
-
-<dd>
-Specifies the driver reference identifier, <b>GPS</b>.</dd>
-
-<dt>
-<a NAME="flag2"></a><tt><font size=+1><a href="#Configuration">flag2 0
-| 1</a></font></tt></dt>
-
-<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.</dd>
-</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 BORDER=0 CELLSPACING=0 WIDTH="712" >
-<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;--></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;--></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;--></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;--></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;--></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;--></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 BORDER=0 CELLSPACING=0 WIDTH="682" >
-<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>
-<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>(last updated July 29, 1999)
-<br>&nbsp;
-</body>
-</html>
diff --git a/contrib/ntp/html/driver3.htm b/contrib/ntp/html/driver3.htm
deleted file mode 100644
index 47511d8..0000000
--- a/contrib/ntp/html/driver3.htm
+++ /dev/null
@@ -1,131 +0,0 @@
-<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>
-</HEAD>
-<BODY>
-
-<H3>
-PSTI/Traconex 1020 WWV/WWVH Receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-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>
-<H4>
-Description</H4>
-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>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>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:
-<PRE>ahh:mm:ss.fffs&lt;cr> yy/dd/mm/ddd&lt;cr>
-frdzycchhSSFTttttuuxx&lt;cr>
-
-on-time = first &lt;cr>
-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>
-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.
-<H4>
-Monitor Data</H4>
-When enabled by the <TT>flag4</TT> fudge flag, every received timecode
-is written as-is to the <TT>clockstats</TT> file.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>WWV</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver30.htm b/contrib/ntp/html/driver30.htm
deleted file mode 100644
index d2ec9dd..0000000
--- a/contrib/ntp/html/driver30.htm
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 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>
-</HEAD>
-<BODY>
-
-<H3>
-Motorola Oncore GPS receiver</H3>
-
-<HR>
-<H4>
-Synopsis</H4>
-
-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><i>u</i> or,
-<TT>/etc/ntp.oncore.<TT><i>u</i>, or <TT>/etc/ntp.oncore<TT>.
-<H4>
-Description</H4>
-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>The three most interesting versions of the Oncore are the VP,
-the UT+, and the "Remote" which is a prepackaged UT+.
-The VP is no longer available.
-The Motorola evaluation kit
-can also 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.
-Two less expensive interface kits are available from
-<A HREF="http://www.tapr.org">TAPR</A>.
-
-<BR>&nbsp;
-<CENTER><TABLE NOSAVE >
-<TR NOSAVE>
-<TD NOSAVE><IMG SRC="pic/oncore_utplusbig.gif" HEIGHT=124
-WIDTH=210></TD>
-
-<TD><IMG SRC="pic/oncore_evalbig.gif" HEIGHT=124 WIDTH=182></TD>
-
-<TD><IMG SRC="pic/oncore_remoteant.jpg" 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.&nbsp; 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.
-If you do not have the PPS signal available, then you should probably be using
-the NMEA driver rather than the Oncore driver.
-
-<P>The driver will use the "position hold" mode with
-user provided coordinates,
-the receivers built-in site-survey,
-or a similar algorithm implemented in this driver to determine the antenna position.
-<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.htm> 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.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default
-0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>GPS</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-<B>Additional Information</B>
-<P>The driver was initially developed on FreeBSD, and has since been tested
-on Linux, SunOS and Solaris.
-<P><B>Configuration</B>
-<P>There is a driver specific configuration file <TT>/etc/ntp.oncore</TT>
-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>The <TT>/etc/ntp.conf</TT> file will need a line of the form<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<TT> pps /dev/oncore.pps.0 [ assert/clear ] hardpps</TT><BR>
-if you want the oncore driver to control the kernel PLL.
-For more information, see the <A HREF=clockopt.htm>Reference Clock
-Options</A> page.
-
-<P><B>Performance</B>
-<P>Really good.&nbsp; With the VP/UT+, the generated PPS pulse is referenced
-to UTC(GPS)&nbsp;with better than 50 nsec (1 sigma) accuracy.&nbsp; The
-limiting factor will be the timebase of the computer and the precision
-with which you can timestamp the rising flank of the
-PPS&nbsp;signal.&nbsp;
-Using FreeBSD, a FPGA&nbsp;based Timecounter/PPS&nbsp;interface,
-and an ovenized quartz oscillator, that performance has been reproduced.
-&nbsp;For more details on this aspect:&nbsp; <A
-HREF="http://phk.freebsd.dk/rover.html">Sub-Microsecond
-timekeeping under FreeBSD</A>.
-<HR>
-<ADDRESS>
-Poul-Henning Kamp (phk@FreeBSD.org),
-Reg Clemens (reg@dwf.com)
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver32.htm b/contrib/ntp/html/driver32.htm
deleted file mode 100644
index 208ad5c..0000000
--- a/contrib/ntp/html/driver32.htm
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html> <head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
-<title>Chrono-log K-series WWVB receiver</title>
-</head>
-
-<body>
-<h3>Chrono-log K-series WWVB receiver</h3>
-
-<hr>
-<h4>Synopsis</h4>
-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>
-<h4>Description</h4>
-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>Most of this code is originally from refclock_wwvb.c with thanks. It
-has been so mangled that wwvb is not a recognizable ancestor.
-<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>
-<hr>
-<address></address>
-<!-- hhmts start -->
-Last modified: Sun Feb 14 11:57:27 EST 1999
-<!-- hhmts end -->
-</body> </html>
diff --git a/contrib/ntp/html/driver33.htm b/contrib/ntp/html/driver33.htm
deleted file mode 100644
index 768cfe7..0000000
--- a/contrib/ntp/html/driver33.htm
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html> <head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
-<title>Dumb Clock</title>
-</head>
-
-<body>
-<h3>Dumb Clock</h3>
-
-<hr>
-<h4>Synopsis</h4>
-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>
-<br>Features: <tt>(none)</tt>
-<h4>Description</h4>
-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>Most of this code is originally from refclock_wwvb.c with thanks. It
-has been so mangled that wwvb is not a recognizable ancestor.
-<pre>
-Timecode format: hh:mm:ssCL
-hh:mm:ss - local time
-C - \r (carriage return)
-L - \n (newline)
-</pre>
-<hr>
-<address></address>
-<!-- hhmts start -->
-Last modified: Sun Feb 14 12:07:01 EST 1999
-<!-- hhmts end -->
-</body> </html>
diff --git a/contrib/ntp/html/driver34.htm b/contrib/ntp/html/driver34.htm
deleted file mode 100644
index c114c72..0000000
--- a/contrib/ntp/html/driver34.htm
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html> <head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
-<title>Ultralink Clock</title>
-</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>
-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>Most of this code is originally from refclock_wwvb.c with thanks. Any mistakes are mine. Any improvements are welcome.
-<hr>
-<pre>
- The Model 320 timecode format is:
-
- <cr><lf>SQRYYYYDDD+HH:MM:SS.mmLT<cr>
-
- 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 <-> STD transition indicators
-
- Note that this driver does not do anything with the T flag.
-
- The M320 also has a 'U' command which returns UT1 correction information.
- It is not used in this driver.
-</pre>
-<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 ))
-
- This driver ignores UT1 correction,DST indicator,Leap year
- and signal level.
-
-</pre>
-<hr>
-<pre>
-
-Fudge factors
- flag1 polling enable (1=poll 0=no poll)
-
-
-</pre>
-<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 -->
-</body> </html>
diff --git a/contrib/ntp/html/driver35.htm b/contrib/ntp/html/driver35.htm
deleted file mode 100644
index 0e6aebf..0000000
--- a/contrib/ntp/html/driver35.htm
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<title>Conrad parallel port radio clock</title>
-</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>The pcfclock device driver is required in order to use this
-reference clock driver. Currently device drivers for
-<a href="http://home.pages.de/~voegele/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></dt>
-<dd>Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.1725.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
-</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-<dd>Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <tt>PCF</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-<dd>If set to 1, the radio clock's synchronisation status bit is
-ignored, ie the timecode is used without a check.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-</dl>
-
-<hr>
-<address>Andreas Voegele &lt;voegelas@users.sourceforge.net&gt;</address>
-</body>
-</html>
diff --git a/contrib/ntp/html/driver36.htm b/contrib/ntp/html/driver36.htm
deleted file mode 100644
index 2c74646..0000000
--- a/contrib/ntp/html/driver36.htm
+++ /dev/null
@@ -1,930 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Radio WWV/H Audio Demodulator/Decoder</title>
-</head>
-<body>
-<h3>Radio WWV/H Audio Demodulator/Decoder</h3>
-
-<hr>
-<h4>Synopsis</h4>
-
-Address: 127.127.36.<i>u</i> <br>
-Reference ID: <tt>WWV</tt> or <tt>WWVH</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 WWV
-in Ft. Collins, CO, and WWVH in Kauai, HI. Transmissions are made
-continuously on 2.5, 5, 10, 15 and 20 MHz. 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/~mills/reports.htm">
-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.htm">Radio
-CHU Audio Demodulator/Decoder</a> and the <a href="driver6.htm">
-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.htm">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 shortwave
-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 highpass
-filter in most 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) or binary one (P1). The values are established by linear
-interpolation between the pulse lengths for P0 (300 ms) and P1 (500
-ms) so that the sum is equal to one. 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 all three probabilities are set to zero.</p>
-
-<p>The difference between the P1 and P0 probabilities, 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, an average value larger than a
-positive threshold is interpreted as a hit on one and a value
-smaller than a negative threshold as a hit on zero. Values between
-the two thresholds, which can occur due to signal fades or loss of
-signal, are interpreted as a miss, 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 of the 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 using an exponential
-average. 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 using 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.</p>
-
-<p>Once the minute is synchronized, the range gate is fixed and
-only energy within the window is considered for the minute sync
-pulse. A compare counter increments by one if the minute pulse has
-acceptable amplitude, SNR and jitter and decrements otherwise. 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
-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>The driver then 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. The minute units digit is decoded first and,
-when five repetitions have compared correctly, the remaining eight
-digits are decoded. 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>As long as signals are available, the clock frequency is
-disciplined for use during times when the signals are unavailable.
-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 acquired one or both stations
-and mitigated which one is best, it sets the station identifier in
-the timecode as described below. In addition, the NTP reference
-identifier is set to the station callsign. If the propagation
-delays has 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 will be 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 and ordinarily
-never changed. However, as long as the clock is set correctly, it
-will continue to read correctly after a period of signal loss, as
-long as it does not drift more than 500 ms from the correct time.
-Assuming the clock frequency can be disciplined within 1 PPM, the
-clock could coast without signals for some 5.8 days without
-exceeding that limit. If for some reason this did happen, the clock
-would be in the wrong second and would never resynchronize. 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>To work well, the driver needs a communications 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. The serial port speed is presently
-compiled in the program, but can be changed in the driver source
-file.</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 compare counter. 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 rotation, 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 a metric which considers the minute sync
-pulse amplitude, SNR and jitter, as well as, the data pulse
-amplitude and SNR. The minute pulse is evaluated at second 0, while
-the data pulses are evaluated at seconds 59 and 1. The results are
-summarized in a scoreboard of three bits</p>
-
-<dl>
-<dt><tt>0x0001</tt></dt>
-
-<dd>Jitter exceeded. The difference in epoches between the last
-minute sync pulse and the current one exceeds 50 ms (400
-samples).</dd>
-
-<dt><tt>0x0002</tt></dt>
-
-<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).</dd>
-
-<dt><tt>0x0004</tt></dt>
-
-<dd>Minute pulse error. For both of the data pulses in seocnds 59
-and 1, either the amplitude or SNR is below threshold (1000 and 10
-dB, respectively).</dd>
-</dl>
-
-<p>If none of the scoreboard bits are set, the compare counter is
-increased by one to a maximum of six. If any bits are set, the
-counter is decreased by one to a minimum of zero. At the end of
-each minute, the frequency and station with the maximum compare
-count is chosen, with ties going to the highest frequency.</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 algorithm, 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 agc 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 comp sync/snr/jitr</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 and 20), <tt>
-score</tt> is the scoreboard described above, <tt>comp</tt> is the
-compare counter, <tt>sync</tt> is the minute sync pulse amplitude,
-<tt>snr</tt> the SNR of the pulse and <tt>jitr</tt> is the sample
-difference between the current epoch and the last epoch. An example
-is:</p>
-
-<p><tt>wwv5 2 111 C20 0100 6 8348/30.0/-3 H20 0203 0
-22/-12.4/8846</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>C20</tt>) and WWVH (<tt>H20</tt>). The WWV report
-scoreboard is 0100 and the compare count is 6, which suggests very
-good reception conditions, and the minute sync amplitude and SNR
-are well above thresholds (2000 and 20 dB, respectively). Probably
-the most sensitive indicator of reception quality is the jitter, -3
-samples, which is well below threshold (50 ms or 400 samples).
-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 jitter is above threshold.</p>
-
-<p>A sequence of five messages, one for each minute, might appear
-as follows:</p>
-
-<pre>
-wwv5 2 95 C2 0107 0 164/7.2/8100 H2 0207 0 80/-5.5/7754
-wwv5 2 99 C5 0104 0 3995/21.8/395 H5 0207 0 27/-9.3/18826
-wwv5 2 239 C10 0105 0 9994/30.0/2663 H10 0207 0 54/-16.1/-529
-wwv5 2 155 C15 0103 3 3300/17.8/-1962 H15 0203 0 236/17.0/4873
-wwv5 2 111 C20 0100 6 8348/30.0/-3 H20 0203 0 22/-12.4/8846
-</pre>
-
-<p>Clearly, the only frequencies that are available are 15 MHz and
-20 MHz and propagation may be failing for 15 MHz. However, minute
-sync pulses are being heard on 5 and 10 MHz, even though the data
-pulses are not. This is typical of late afternoon when the maximum
-usable frequency (MUF) is falling and the ionospheric loss at the
-lower frequencies is beginning to decrease.</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 discipline 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>chu</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></dt>
-
-<dd>Minute sync. Set when the decoder has identified a station and
-acquired the minute sync pulse.</dd>
-
-<dt><tt>0x0002</tt></dt>
-
-<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.</dd>
-
-<dt><tt>0x0004</tt></dt>
-
-<dd>Minute unit sync. Set when the decoder has reliably determined
-the unit digit of the minute.</dd>
-
-<dt><tt>0x0008</tt></dt>
-
-<dd>Clock set. Set when the decoder has reliably determined all
-nine digits of the timecode and is selectable to discipline the
-system clock.</dd>
-</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 and 20). For the encoded frequency, <tt>comp</tt> is the compare
-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 C15 2 9247 30.0 18843 -1 1</tt><br>
-<tt>wwv8 2 127 H15 0 134 -2.9 19016 193 174</tt></p>
-
-<p>Here the radio is tuned to 15 MHz and the line-in port AGC is
-currently 127 at that frequency. The driver has not yet acquired
-minute sync, WWV 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 compare 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 ampl phas snr prob like</tt></p>
-
-<p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above,
-<tt>ampl</tt> is the subcarrier amplitude, <tt>phas</tt> the
-subcarrier phase, <tt>snr</tt> the subcarrier SNR, <tt>prob</tt>
-the bit probability and <tt>like</tt> the bit likelihood. An
-example is:</p>
-
-<p><tt>wwv3 28 0123 4122 4286 0 24.8 -5545 -1735</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 subcarrier tracking phase and 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 avint avcnt avinc jitr delt freq</tt></p>
-
-<p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above,
-<tt>avint</tt> is the averaging interval, <tt>avcnt</tt> the
-averaging interval counter, <tt>avinc</tt> the interval increment,
-<tt>jitr</tt> the sample change between the beginning and end of
-the interval, <tt>delt</tt> the computed frequency change and <tt>
-freq</tt> the current frequency (PPM). An example is:</p>
-
-<p><tt>wwv2 22 030f 5795 256 256 4 0 0.0 66.7</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 4 averaging intervals, has
-measured no change in frequency and the current frequency is 66.7
-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 yy ddd hh:mm:ss.fff ld du lset agc stn rfrq errs freq cons
-
- s sync indicator
- q quality character
- yyyy Gregorian year
- ddd day of year
- hh hour of day
- mm minute of hour
- fff millisecond of second
- 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
- comp minute sync compare counter
- errs bit error counter
- freq frequency offset
- avgt averaging time
-</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></dt>
-
-<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.</dd>
-
-<dt><tt>q</tt></dt>
-
-<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></dt>
-
-<dd>Sync alarm. The decoder may not be in correct second or minute
-phase relative to the transmitter.</dd>
-
-<dt><tt>0x4</tt></dt>
-
-<dd>Error alarm. More than 30 data bit errors occurred in the last
-minute.</dd>
-
-<dt><tt>0x2</tt></dt>
-
-<dd>Symbol alarm. The probability of correct decoding for a digit
-or miscellaneous bit has fallen below the threshold.</dd>
-
-<dt><tt>0x1</tt></dt>
-
-<dd>Decoding alarm. A maximum likelihood digit fails to agree with
-the current associated clock digit.</dd>
-</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 in future result in an
-error.</dd>
-
-<dt><tt>yyyy ddd hh:mm:ss.fff</tt></dt>
-
-<dd>The timecode format itself is self explanatory. Since the
-driver latches the on-time epoch directly from the second sync
-pulse, the fraction <tt>fff</tt>is always zero. Although the
-transmitted timecode includes only the year of century, the
-Gregorian year is augmented 2000 if the indicated year is less than
-72 and 1900 otherwise.</dd>
-
-<dt><tt>l</tt></dt>
-
-<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.</dd>
-
-<dt><tt>d</tt></dt>
-
-<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.</dd>
-
-<dt><tt>dut</tt></dt>
-
-<dd>The DUT sign and magnitude shows the current UT1 offset
-relative to the displayed UTC time, in deciseconds.</dd>
-
-<dt><tt>lset</tt></dt>
-
-<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 time was last verified
-relative to the broadcast signal.</dd>
-
-<dt><tt>agc</tt></dt>
-
-<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.</dd>
-
-<dt><tt>ident</tt></dt>
-
-<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 station identifier shows
-<tt>X</tt>.</dd>
-
-<dt><tt>comp</tt></dt>
-
-<dd>The minute sync compare counter is useful to determine the
-quality of the minute sync signal and can range from 0 (no signal)
-to 5 (best).</dd>
-
-<dt><tt>errs</tt></dt>
-
-<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 sync signals are lost and the decoder
-reverts to free-run anyway.</dd>
-
-<dt><tt>freq</tt></dt>
-
-<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.</dd>
-
-<dt><tt>avgt</tt></dt>
-
-<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.</dd>
-</dl>
-
-<p>An example timecode is:</p>
-
-<p><tt>0 2000 006 22:36:00.000 S +3 1 115 C20 6 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. Excellent reeiving conditions prevail, as
-indicated by the compare count 6 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. A missing or zero
-argument disables the CI-V interface. Following are the ID select
-codes for the known radios.</p>
-
-<table cols="6" width="100%">
-<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></dt>
-
-<dd>Specifies the propagation delay for WWV (40:40:49.0N
-105:02:27.0W), in seconds and fraction, with default 0.0.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-
-<dd>Specifies the propagation delay for WWVH (21:59:26.0N
-159:46:00.0W), in seconds and fraction, with default 0.0.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with
-default 0.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-
-<dd>Ordinarily, this field specifies the driver reference
-identifier; however, the driver sets the reference identifier
-automatically as described above.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-
-<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.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-
-<dd>Enables audio monitoring of the input signal. For this purpose,
-the speaker volume must be set before the driver is started.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-
-<dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
-</dl>
-
-<h4>Additional Information</h4>
-
-<a href="refclock.htm">Reference Clock Drivers</a> <br>
-<a href="audio.htm">Reference Clock Audio Drivers</a>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver37.htm b/contrib/ntp/html/driver37.htm
deleted file mode 100644
index 6f6c8b3..0000000
--- a/contrib/ntp/html/driver37.htm
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>Forum Graphic GPS Dating station</title>
-</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.htm">EMR company</a>.
-
-<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>
-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>
-
-<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></dt>
-<dd>Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
-</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-<dd>Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <tt>FG</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-<dd>Not used by this driver.</dd>
-</dl>
-
-<hr>
-<address>Dmitry Smirnov (das@amt.ru)</address>
-
-</body>
-</html>
diff --git a/contrib/ntp/html/driver38.htm b/contrib/ntp/html/driver38.htm
deleted file mode 100644
index 4ae1c78..0000000
--- a/contrib/ntp/html/driver38.htm
+++ /dev/null
@@ -1,191 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>hopf clock drivers by ATLSoft</title>
-</head>
-<body text="#000000" bgcolor="#FFFFFF" 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 border="0" cellpadding cellspacing width="100%">
- <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 border="0" src="pic/fg6021.gif" width="238" height="207"></td>
- </tr>
-</table>
-
-<hr>
-
-<h2>
-<font size=+1>Description</font></h2>
-The <b>refclock_hopf_serial</b> driver supports <a href="http://www.hopf.com">hopf
-electronic receivers</a> with serial Interface kompatibel 6021.
-<br>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>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;<table bgcolor="#C0C0C0">
-<tr>
-<td VALIGN=CENTER WIDTH="23%" nowrap>
- <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 WIDTH="23%" nowrap>
- <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>
-
-</tr>
-
-</table></center>
-
-<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:
-<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></dt>
-
-<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.</dd>
-
-<dt>
-<tt><font size=+1><a href="#REFID"><b>refid <i>string</i></b></a></font></tt></dt>
-
-<dd>
-Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b> DCF</b>.</dd>
-
-<dt>
-<tt><font size=+1><b>flag1 0
-| 1</b></font></tt></dt>
-
-<dd>
-When set to 1, driver sync's even if only crystal driven.</dd>
-</dl>
-
-<hr>
-
-<h2>
-<a NAME="DataFormat"></a><font size=+1>Data Format</font></h2>
-<p>as specified in clock manual under pt. <u>[ <span lang="EN-GB" 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"><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’ro f’r Software www.ATLSoft.de</a><p>(last updated 02/28/2001)
-<br>&nbsp;
-</body>
-</html>
diff --git a/contrib/ntp/html/driver39.htm b/contrib/ntp/html/driver39.htm
deleted file mode 100644
index 86b0f60..0000000
--- a/contrib/ntp/html/driver39.htm
+++ /dev/null
@@ -1,162 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>hopf clock drivers by ATLSoft</title>
-</head>
-<body text="#000000" bgcolor="#FFFFFF" 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 border="0" cellpadding="0" cellspacing="0" width="100%">
- <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 valign="middle" align="center"><font face="Arial"><i><blink><font size="5"><img border="0" src="pic/fg6039.jpg" width="141" height="140"></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;<table bgcolor="#C0C0C0">
-<tr>
-<td VALIGN=CENTER WIDTH="23%" nowrap>
- <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 WIDTH="23%" nowrap>
- <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>
-
-</tr>
-
-</table></center>
-
-<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>
-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></dt>
-
-<dd>
-Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b> DCF</b>.</dd>
-
-<dt>
-<tt><font size=+1><b>flag1 0
-| 1</b></font></tt></dt>
-
-<dd>
-When set to 1, driver sync's even if only crystal driven.</dd>
-</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’ro f’r Software www.ATLSoft.de</a><p>(last updated 03/02/2001)
-<br>&nbsp;
-</body>
-</html>
diff --git a/contrib/ntp/html/driver4.htm b/contrib/ntp/html/driver4.htm
deleted file mode 100644
index 4f3abd7..0000000
--- a/contrib/ntp/html/driver4.htm
+++ /dev/null
@@ -1,126 +0,0 @@
-<HTML><HEAD><TITLE>
-Spectracom 8170 and Netclock/2 WWVB Receivers
-</TITLE></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>
-
-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>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>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>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>on-time = first &lt;cr&gt;
-<br>i = synchronization flag (' ' = in synch, '?' = out synch)
-<br>hh:mm:ss = hours, minutes, seconds</PRE>
-
-<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>Format 2 (24 ASCII printing characters):
-<br>lt;cr&gt;lf&gt;iqyy ddd hh:mm:ss.fff ld
-
-<p>on-time = &lt;cr>
-<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</PRE>
-
-<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>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>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.
-
-<H4>Monitor Data</H4>
-
-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.
-
-<H4>Fudge Factors</H4>
-
-<DL>
-
-<DT><TT>time1 <I>time</I></TT></DT>
-<DD>Specifies the time offset calibration factor, in seconds and
-fraction,
-with default 0.0.</DD>
-
-<DT><TT>time2 <I>time</I></TT></DT>
-<DD>Not used by this driver.</DD>
-
-<DT><TT>stratum <I>number</I></TT></DT>
-<DD>Specifies the driver stratum, in decimal from 0 to 15, with default
-0.</DD>
-
-<DT><TT>refid <I>string</I></TT></DT>
-<DD>Specifies the driver reference identifier, an ASCII string from one
-to four characters, with default <TT>WWVB</TT>.</DD>
-
-<DT><TT>flag1 0 | 1</TT></DT>
-<DD>Not used by this driver.</DD>
-
-<DT><TT>flag2 0 | 1</TT></DT>
-<DD>Not used by this driver.</DD>
-
-<DT><TT>flag3 0 | 1</TT></DT>
-<DD>Not used by this driver.</DD>
-
-<DT><TT>flag4 0 | 1</TT></DT>
-<DD>Enable verbose <TT>clockstats</TT> recording if set.</DD>
-
-</DL>
-
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>
-<HR><ADDRESS>David L. Mills (mills@udel.edu)</ADDRESS></BODY></HTML>
diff --git a/contrib/ntp/html/driver40.htm b/contrib/ntp/html/driver40.htm
deleted file mode 100644
index f9fc7b6..0000000
--- a/contrib/ntp/html/driver40.htm
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>JJY Receivers</title>
-</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>
-<p>Tristate Ltd. JJY01 <a href=
-"http://www.tristate.ne.jp/rf-clock.htm">
-http://www.tristate.ne.jp/rf-clock.htm</a> (Japanese only)<br>
-Time code format<br>
-</p>
-
-<table>
-<tr>
-<td>Command</td>
-<td>Reply</td>
-</tr>
-
-<tr>
-<td><tt>date&lt;CR&gt;&lt;LF&gt;</tt></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><tt>HH:MM:SS&lt;CR&gt;&lt;LF&gt;</tt></td>
-</tr>
-</table>
-</li>
-
-<li>
-<p>C-DEX Co.,Ltd. JST2000 <a href="http://www.c-dex.co.jp/">
-http://www.c-dex.co.jp/</a> (Japanese only)<br>
-Time code format<br>
-</p>
-
-<table>
-<tr>
-<td>Command</td>
-<td>Reply</td>
-</tr>
-
-<tr>
-<td><tt>&lt;ENQ&gt;1J&lt;ETX&gt;</tt></td>
-<td><tt>&lt;STX&gt;JYYMMDD HHMMSSS&lt;ETX&gt;</tt></td>
-</tr>
-</table>
-</li>
-</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)<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></dt>
-
-<dd>Specifies the time offset calibration factor, in seconds and
-fraction, with default 0.0.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with
-default 0.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-
-<dd>Specifies the driver reference identifier, an ASCII string from
-one to four characters, with default <tt>WWVB</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-
-<dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
-</dl>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver42.htm b/contrib/ntp/html/driver42.htm
deleted file mode 100644
index 655ff14..0000000
--- a/contrib/ntp/html/driver42.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<meta name="generator" content=
-"HTML Tidy for Solaris (vers 1st May 2002), see www.w3.org">
-<meta http-equiv="Content-Type" content=
-"text/html; charset=iso-8859-1">
-<meta name="GENERATOR" content=
-"Mozilla/4.01 [en] (Win95; I) [Netscape]">
-<title>Zyfer GPStarplus Receiver</title>
-</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>
-
-This driver supports the <a href="http://www.zyfer.com/">Zyfer
-GPStarplus</a> receiver.
-<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. Additional Information</p>
-
-<p><a href="refclock.htm">Reference Clock Drivers</a>&nbsp;</p>
-
-<hr>
-<address>Harlan Stenn (stenn@whimsy.udel.edu)</address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver42.html b/contrib/ntp/html/driver42.html
deleted file mode 100644
index 3622b84..0000000
--- a/contrib/ntp/html/driver42.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<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>Zyfer GPStarplus Receiver</TITLE>
-</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>
-This driver supports the <a href="http://www.zyfer.com/">Zyfer GPStarplus</a>
-receiver.
-
-<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>Additionally, there are BNC connectors on the back for things like PPS
-and IRIG output.
-
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-Harlan Stenn (stenn@whimsy.udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver43.htm b/contrib/ntp/html/driver43.htm
deleted file mode 100644
index fc994ef..0000000
--- a/contrib/ntp/html/driver43.htm
+++ /dev/null
@@ -1,109 +0,0 @@
-<html>
-<head>
-<title>RIPE NCC interface for Trimble Palisade</title>
-</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>
-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>
-
-
-<h4>Monitor Data</h4>
-
-In the <tt>filegen clockstats</tt> file the following (example) data is
-collected:
-<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>
-This is in the form of:
-<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>
-
-<a href="refclock.htm">Reference Clock Drivers</a>
-
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"Home"></a>
-
-<address><a href="mailto:marks@ripe.net">Mark Santcroos
-&lt;marks@ripe.net&gt;</a></address>
-</body>
-</html>
diff --git a/contrib/ntp/html/driver44.htm b/contrib/ntp/html/driver44.htm
deleted file mode 100755
index 0d29384..0000000
--- a/contrib/ntp/html/driver44.htm
+++ /dev/null
@@ -1,131 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>NeoClock4X</title>
-
- <meta http-equiv="content-type"
- content="text/html; charset=ISO-8859-15">
-</head>
- <body>
-
-<h1>NeoClock4X - DCF77 / TDF serial line receiver<br>
- </h1>
-
-<hr width="100%" size="2">
-<h2>Synopsis</h2>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tbody>
- <tr>
- <td valign="top">
- <table cellpadding="2" cellspacing="0" border="0" width="100%">
- <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 valign="top" align="right"><a href="http://www.linum.com"><img
- src="pic/neoclock4x.gif" alt="NeoClock4X - DCF77 receiver" width="150"
- height="195">
- </a><br>
- </td>
- </tr>
-
- </tbody>
-</table>
-
-<hr width="100%" size="2">
-<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.linum.com/redir/jump/id=neoclock4x&amp;action=redir">http://www.linum.com/redir/jump/id=neoclock4x&amp;action=redir</a>.
-  
-<hr width="100%" size="2">
-<h2>Fudge Factors</h2>
-
-<dl>
- <dt> <b><a href="clockopt.htm">time1 time</a></b></dt>
- <dd> Specifies the time offset calibration factor with the default value
- off 0.16958333 seconds. This offset is used  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>
- <dd>Default setting is 0.16958333 seconds.<br>
- </dd>
-</dl>
-
-<dl>
- <dt> <b><a href="file:///E:/ntp-4.1.1a/html/clockopt.htm">time2 time</a></b></dt>
- <dd> Not used by this driver.</dd>
-</dl>
-
-<dl>
- <dt> <a href="clockopt.htm"><b>flag1 0 | 1</b></a></dt>
- <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>
- <dd>Default setting is 0 = don't synchronize to CMOS clock.<br>
- </dd>
- <dd><br>
- </dd>
- <dt> <a href="clockopt.htm"><b>flag2 0 | 1</b></a></dt>
- <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>
- <dd>Default setting is 0 = don't synchronize to unsynchronized CMOS clock.<br>
- </dd>
- <dt><br>
- </dt>
- <dt><a href="clockopt.htm"><b>flag3 0 | 1</b></a></dt>
- <dd> Not used by this driver.<tt><tt><tt><tt><tt><tt> </tt></tt></tt></tt></tt></tt></dd>
- <dd><br>
- </dd>
- <dt> <a href="clockopt.htm"><b>flag4 0 | 1</b></a></dt>
- <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>
- <dd>Default setting is 0 = don't log received data and converted utc time.<br>
- </dd>
-</dl>
-
-<hr width="100%" size="2">Please send any comments or question to <a
- href="mailto:neoclock4@linum.com">neoclock4x@linum.com</a>.<br>
- <br>
- <br>
-</body>
-</html>
diff --git a/contrib/ntp/html/driver5.htm b/contrib/ntp/html/driver5.htm
deleted file mode 100644
index edbd045..0000000
--- a/contrib/ntp/html/driver5.htm
+++ /dev/null
@@ -1,159 +0,0 @@
-<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>TrueTime GPS/GOES/OMEGA Receivers
-</TITLE>
-</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>
-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>Most of this code is originally from refclock_wwvb.c with thanks. It
-has been so mangled that wwvb is not a recognizable ancestor.
-<PRE>Timcode format: ADDD:HH:MM:SSQCL
-
-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
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 468-DC GOES Receiver:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GPS-TM/TMD Receiver:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ? +/- 500 milliseconds&nbsp; # +/- 50 milliseconds
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * +/- 5 milliseconds&nbsp;&nbsp;&nbsp; . +/- 1 millisecond
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; space less than 1 millisecond
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OM-DC OMEGA Receiver:
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; > +/- 5 seconds
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ? +/- 500 milliseconds&nbsp; # +/- 50 milliseconds
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * +/- 5 milliseconds&nbsp;&nbsp;&nbsp; . +/- 1 millisecond
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A-H less than 1 millisecond. Character indicates which
-station
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is being received as follows: A = Norway, B = Liberia,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C = Hawaii, D = North Dakota, E = La Reunion, F =
-Argentina,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; G = Australia, H = Japan.</PRE>
-The carriage return start bit begins on 0 seconds and extends to 1 bit
-time.
-
-<P>Notes on 468-DC and OMEGA receiver:
-
-<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>Notes on the 468-DC receiver:
-
-<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><TT>fudge 127.127.5.0 time1 +0.008 time2 -0.004</TT>
-
-<P>This corrects the 4 milliseconds advance and 8 milliseconds retard needed.
-The software will ask the clock which satellite it sees.
-
-<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.)
-<H4>
-Monitor Data</H4>
-When enabled by the <TT>flag4</TT> fudge flag, every received timecode
-is written as-is to the <TT>clockstats</TT> file.
-<H4>
-Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-to be used for the West satellite, with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-. Specifies the time offset calibration factor, in seconds and fraction,
-to be used for the East satellite, with default 0.0.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>TRUE</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Silence the clock side of ntpd, just reading the clock without trying to
-write to it.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Generate a debug file /tmp/true%d.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/driver6.htm b/contrib/ntp/html/driver6.htm
deleted file mode 100644
index 501f697..0000000
--- a/contrib/ntp/html/driver6.htm
+++ /dev/null
@@ -1,271 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>IRIG Audio Decoder</title>
-</head>
-<body>
-<h3>IRIG Audio Decoder</h3>
-
-<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 works only on older Sun SPARCstation
-systems. The new driver described here uses the stock kernel audio
-driver and works in SunOS 4.1.3 and Solaris 2.6 versions and
-probably all versions in between. The new driver requires no
-modification of the operating system. 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>
-
-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>This driver incorporates several features in common with other
-audio drivers such as described in the <a href="driver7.htm">Radio
-CHU Audio Demodulator/Decoder</a> and the <a href="driver36.htm">
-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.htm">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 mu-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. Specifically, if any of
-the following errors occur for a timecode, the data are rejected.
-Secifically, if any of the following errors occur for a time
-measurement, the data are rejected.</p>
-
-<ol>
-<li>The peak carrier amplitude is less than 100 units. This usually
-means dead IRIG signal source, broken cable or wrong input
-port.</li>
-
-<li>The frequency error is greater than &plusmn;250 PPM (.025
-percent). This usually means broken codec hardware or wrong codec
-configuration.</li>
-
-<li>The modulation index is less than 0.5. This usually means
-overdriven IRIG signal or wrong IRIG format.</li>
-
-<li>A frame synchronization error has occured. This usually means
-wrong IRIG signal format or the IRIG signal source has lost
-synchronization (signature control).</li>
-
-<li>A data decoding error has occured. This usually means wrong
-IRIG signal format.</li>
-
-<li>The current second of the day is not exactly one greater than
-the previous one. This usually means a very noisy IRIG signal or
-insufficient CPU resources.</li>
-
-<li>An audio codec error (overrun) occured. This usually means
-insufficient CPU resources, as sometimes happens with Sun SPARC
-IPCs when doing something useful.</li>
-</ol>
-
-Note that additional checks are done elsewhere in the reference
-clock interface routines.
-
-<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>
-
-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>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</h4>
-
-The mu-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>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 and maybe twice
-that with a Sun SPARC IPC. 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 the 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 signal 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>
-
-<h4>Fudge Factors</h4>
-
-<dl>
-<dt><tt>time1 <i>time</i></tt></dt>
-
-<dd>Specifies the time offset calibration factor, in seconds and
-fraction, with default 0.0.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with
-default 0.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-
-<dd>Specifies the driver reference identifier, an ASCII string from
-one to four characters, with default <tt>IRIG</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-
-<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.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-
-<dd>Enables audio monitoring of the input signal. For this purpose,
-the speaker volume must be set before the driver is started.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-
-<dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
-</dl>
-
-<h4>Additional Information</h4>
-
-<a href="refclock.htm">Reference Clock Drivers</a> <br>
-<a href="audio.htm">Reference Clock Audio Drivers</a>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver7.htm b/contrib/ntp/html/driver7.htm
deleted file mode 100644
index 029ac04..0000000
--- a/contrib/ntp/html/driver7.htm
+++ /dev/null
@@ -1,657 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Radio CHU Audio Demodulator/Decoder</title>
-</head>
-<body>
-<h3>Radio CHU Audio Demodulator/Decoder</h3>
-
-<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 in the <a href="gadget.htm">
-Gadget Box PPS Level Converter and CHU Modem</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 on
-line input port.</p>
-
-<p>This driver incorporates several features in common with other
-audio drivers such as described in the <a href="driver36.htm">Radio
-WWV/H Audio Demodulator/Decoder</a> and the <a href="driver6.htm">
-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.htm">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. The serial port speed is
-presently compiled in the program, but can be changed in the <tt>
-icom.h</tt> header file.</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></dt>
-
-<dd>Sign of DUT (0 = +)/dd&gt;</dd>
-
-<dt><tt>2</tt></dt>
-
-<dd>Leap second warning. One second will be added.</dd>
-
-<dt><tt>4</tt></dt>
-
-<dd>Leap second warning. One second will be subtracted. This is not
-likely to happen in our universe.</dd>
-
-<dt><tt>8</tt></dt>
-
-<dd>Even parity bit for this nibble.</dd>
-</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></dt>
-
-<dd>The sync indicator is initially <tt>?</tt> before the clock is
-set, but turns to space when the clock is correctly set.</dd>
-
-<dt><tt>q</tt></dt>
-
-<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></dt>
-
-<dd>Decoder alarm. A majority of repetitions for at least one digit
-of the timecode fails to agree.</dd>
-
-<dt><tt>4</tt></dt>
-
-<dd>Timestamp alarm. Fewer than 20 timestamps have been
-determined.</dd>
-
-<dt><tt>2</tt></dt>
-
-<dd>Format alarm. The majority timecode contains invalid bit
-combinations.</dd>
-
-<dt><tt>1</tt></dt>
-
-<dd>Frame alarm. A framing or format error occurred on at least one
-burst during the minute.</dd>
-</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 in future result in an
-error.</dd>
-
-<dt><tt>yyyy ddd hh:mm:ss.fff</tt></dt>
-
-<dd>The timecode format itself is self explanatory. Note that the
-Gregorian year is decoded directly from the transmitted
-timecode.</dd>
-
-<dt><tt>l</tt></dt>
-
-<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.</dd>
-
-<dt><tt>d</tt></dt>
-
-<dd>The DST code for Canada encodes the state for all
-provinces.</dd>
-
-<dt><tt>dut</tt></dt>
-
-<dd>The DUT sign and magnitude shows the current UT1 offset
-relative to the displayed UTC time, in deciseconds.</dd>
-
-<dt><tt>lset</tt></dt>
-
-<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.</dd>
-
-<dt><tt>agc</tt></dt>
-
-<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.</dd>
-
-<dt><tt>rfrq</tt></dt>
-
-<dd>The current radio frequency, if the CI-V interface is active,
-or 'X' if not.</dd>
-
-<dt><tt>bcnt</tt></dt>
-
-<dd>The number of format A bursts received during the most recent
-minute bursts were received.</dd>
-
-<dt><tt>dist</tt></dt>
-
-<dd>The minimum decoding distance determined during the most recent
-minute bursts were received.</dd>
-
-<dt><tt>tsmp</tt></dt>
-
-<dd>The number of timestamps determined during the most recent
-minute bursts were received.</dd>
-</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 cols="6" width="100%">
-<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></dt>
-
-<dd>Specifies the propagation delay for CHU (45:18N 75:45N), in
-seconds and fraction, with default 0.0.</dd>
-
-<dt><tt>time2 <i>time</i></tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>stratum <i>number</i></tt></dt>
-
-<dd>Specifies the driver stratum, in decimal from 0 to 15, with
-default 0.</dd>
-
-<dt><tt>refid <i>string</i></tt></dt>
-
-<dd>Specifies the driver reference identifier, an ASCII string from
-one to four characters, with default <tt>CHU</tt>.</dd>
-
-<dt><tt>flag1 0 | 1</tt></dt>
-
-<dd>Not used by this driver.</dd>
-
-<dt><tt>flag2 0 | 1</tt></dt>
-
-<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.</dd>
-
-<dt><tt>flag3 0 | 1</tt></dt>
-
-<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.</dd>
-
-<dt><tt>flag4 0 | 1</tt></dt>
-
-<dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
-</dl>
-
-<h4>Additional Information</h4>
-
-<a href="refclock.htm">Reference Clock Drivers</a> <br>
-<a href="audio.htm">Reference Clock Audio Drivers</a>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/driver8.htm b/contrib/ntp/html/driver8.htm
deleted file mode 100644
index 17ab6c3..0000000
--- a/contrib/ntp/html/driver8.htm
+++ /dev/null
@@ -1,353 +0,0 @@
-<HTML><HEAD><TITLE>
-Generic Reference Driver
-</TITLE></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>
-
-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>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>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>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>The use of the PPS option requires receivers with an accuracy of
-better than 1ms.
-
-<P>Fudge factors
-
-<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>ntpq (8)
-<P>timecode variable
-
-<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>Currently, eighteen clock types (devices /dev/refclock-0 -
-/dev/refclock-3) are supported by the PARSE driver.
-<BR>A note on the implementations:
-<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/~kardel">me</A>
-(<A HREF="mailto: kardel@acm.org">kardel@acm.org</A>) are welcome as
-long as they work within Europe 8-).
-
-<P>Verified implementations are:
-<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.
-<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.</UL>
-</UL>
-The pictures below refer to the respective clock and where taken from
-the vendors web pages. They are linked to the respective vendors.
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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>
-<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.htm">clock</A></TT></B>
-<BR><A HREF="http://www.igel.de/eigelmn.htm"><IMG SRC="pic/igclock.gif"
-HEIGHT=174 WIDTH=200></A>
-<BR>
-<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.htm">SVeeSix
-GPS receiver</A>TAIP protocol (GPS / &lt;&lt;1us)</TT></B>
-<BR>
-<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.htm">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.htm"><IMG
-SRC="pic/pd_om011.gif" ALT="SVeeSix-CM3" BORDER=0 HEIGHT=100 WIDTH=420
-ALIGN=TEXTTOP></A>
-<BR><A HREF="http://www.trimble.com/cgi/omprod.cgi/pd_om006.htm"><IMG
-SRC="pic/pd_om006.gif" ALT="Lassen-SK8" BORDER=0 HEIGHT=100
-WIDTH=420></A>
-<BR>
-<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>
-<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.htm">Funkuhr
-6021</A></TT></B>
-<BR><A HREF="http://www.hopf-time.com/engl/kart6021.htm"><IMG
-SRC="pic/fg6021.gif" ALT="DCF77-Interface Board" HEIGHT=207 WIDTH=238
-ALIGN=TEXTTOP></A>
-<BR>
-<LI>
-<B><TT>server 127.127.8.0-3 mode 13</TT></B>
-
-<p><B><TT>Diem's Computime Radio Clock</TT></B>
-<BR>
-<LI>
-<B><TT>server 127.127.8.0-3 mode 14</TT></B>
-
-<p><B><TT>RAWDCF receiver (DTR=high/RTS=low)</TT></B>
-
-<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>
-<LI>
-<B><TT>server 127.127.8.0-3 mode 16</TT></B>
-
-<p><B><TT>RAWDCF receiver (DTR=low/RTS=high)
-</TT></B>
-<LI>
-<B><TT>server 127.127.8.0-3 mode 17</TT></B>
-
-<p><B><TT>VARITEXT Receiver (MSF)
-</TT></B>
-</UL>
-<p>
-Actual data formats and set-up requirements of the various clocks can be
-found in <A HREF="parsedata.htm">NTP PARSE clock data formats</A>.
-
-<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>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>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>For the Meinberg GPS166/GPS167 receiver is also a special firmware
-release available (Uni-Erlangen). This release should be used for proper
-operation.
-
-<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.
-
-<H4>Monitor Data</H4>
-
-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.
-
-<H4>Fudge Factors</H4>
-
-<DL>
-
-<DT><TT>time1 <I>time</I></TT></DT>
-<DD>Specifies the time offset calibration factor, in seconds and
-fraction, with default depending on clock type.</DD>
-
-<DT><TT>time2 <I>time</I></TT></DT>
-<DD>Specifies the offset if the PPS signal to the actual time. (PPS fine
-tuning).</DD>
-
-<DT><TT>stratum <I>number</I></TT></DT>
-<DD>Specifies the driver stratum, in decimal from 0 to 15, with default
-0.</DD>
-
-<DT><TT>refid <I>string</I></TT></DT>
-<DD>Specifies the driver reference identifier, an ASCII string from one
-to four characters, with default according to current clock type.</DD>
-
-<DT><TT>flag1 0 | 1</TT></DT>
-<DD>Not used by this driver.</DD>
-
-<DT><TT>flag2 0 | 1</TT></DT>
-<DD>Not used by this driver.</DD>
-
-<DT><TT>flag3 0 | 1</TT></DT>
-<DD>delete next leap second instead of adding it.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-<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)</DD>
-
-</DL>
-
-<H4>Making your own PARSE clocks</H4>
-
-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.htm">making PARSE clocks</A>
-
-<P>Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href="mailto:mills@udel.edu"> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></body></html>
diff --git a/contrib/ntp/html/driver9.htm b/contrib/ntp/html/driver9.htm
deleted file mode 100644
index def05f8..0000000
--- a/contrib/ntp/html/driver9.htm
+++ /dev/null
@@ -1,129 +0,0 @@
-<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>
-</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>
-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.htm">Line
-Disciplines and Streams Modules</A> page. It also requires a <A
-HREF="gadget.htm">gadget box</A> and 1-PPS level converter, such as
-described in the <A HREF="pps.htm">Pulse-per-second (PPS) Signal
-Interfacing</A> page.
-
-<P>This driver supports all compatible receivers such as the 6-channel
-MX4200, MX4200D, and the 12-channel MX9212, MX9012R, MX9112.
-
-<P>
-<A HREF="http://www.leica-gps.com/"><IMG align=left HEIGHT=143 WIDTH=180
-SRC="pic/9400n.jpg" ALT="Leica MX9400N Navigator"></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>
-Leica MX9400N Navigator.
-
-<P>
-
-<H4>Operating Modes</H4>
-This driver supports two modes of operation, static and mobile, controlled
-by clock flag 2.
-
-<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 "Static,
-3D Nav" 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 "Known
-Position" mode, initialized with the calculated position, and then
-solves only for time.
-
-<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 "Dynamic,
-3D Nav" mode and solves for position, altitude and time while moving. No
-position averaging is performed.
-
-<H4>Monitor Data</H4>
-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.htm">MX4200 Receiver Data Format</A>.
-
-<H4>Fudge Factors</H4>
-
-<DL>
-<DT>
-<TT>time1 <I>time</I></TT></DT>
-
-<DD>
-Specifies the time offset calibration factor, in seconds and fraction,
-with default 0.0.</DD>
-
-<DT>
-<TT>time2 <I>time</I></TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>stratum <I>number</I></TT></DT>
-
-<DD>
-Specifies the driver stratum, in decimal from 0 to 15, with default 0.</DD>
-
-<DT>
-<TT>refid <I>string</I></TT></DT>
-
-<DD>
-Specifies the driver reference identifier, an ASCII string from one to
-four characters, with default <TT>GPS</TT>.</DD>
-
-<DT>
-<TT>flag1 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag2 0 | 1</TT></DT>
-
-<DD>
-Assume GPS receiver is on a mobile platform if set.</DD>
-
-<DT>
-<TT>flag3 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-
-<DT>
-<TT>flag4 0 | 1</TT></DT>
-
-<DD>
-Not used by this driver.</DD>
-</DL>
-Additional Information
-
-<P><A HREF="refclock.htm">Reference Clock Drivers</A>&nbsp;
-<HR>
-<ADDRESS>
-David L. Mills (mills@udel.edu)</ADDRESS>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/drivers/driver1.html b/contrib/ntp/html/drivers/driver1.html
deleted file mode 100644
index 5933483..0000000
--- a/contrib/ntp/html/drivers/driver1.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!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
deleted file mode 100644
index d5692ab..0000000
--- a/contrib/ntp/html/drivers/driver10.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!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
deleted file mode 100644
index 9f13f67..0000000
--- a/contrib/ntp/html/drivers/driver11.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!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
deleted file mode 100644
index 242e50b..0000000
--- a/contrib/ntp/html/drivers/driver12.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!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
deleted file mode 100644
index 96ecdb0..0000000
--- a/contrib/ntp/html/drivers/driver16.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!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
deleted file mode 100644
index dcd616a..0000000
--- a/contrib/ntp/html/drivers/driver18.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!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
deleted file mode 100644
index 20dae15..0000000
--- a/contrib/ntp/html/drivers/driver19.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!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
deleted file mode 100644
index 453374f..0000000
--- a/contrib/ntp/html/drivers/driver2.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!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
deleted file mode 100644
index c387002..0000000
--- a/contrib/ntp/html/drivers/driver20.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!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
deleted file mode 100644
index 2b871c1..0000000
--- a/contrib/ntp/html/drivers/driver22.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!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
deleted file mode 100644
index c8b37be..0000000
--- a/contrib/ntp/html/drivers/driver23.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!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
deleted file mode 100644
index 8bdf837..0000000
--- a/contrib/ntp/html/drivers/driver24.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!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
deleted file mode 100644
index 2facea1..0000000
--- a/contrib/ntp/html/drivers/driver26.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!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
deleted file mode 100644
index ab406a6..0000000
--- a/contrib/ntp/html/drivers/driver27.html
+++ /dev/null
@@ -1,249 +0,0 @@
-<!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
deleted file mode 100644
index 5013ae3..0000000
--- a/contrib/ntp/html/drivers/driver28.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!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
deleted file mode 100644
index 65600bf..0000000
--- a/contrib/ntp/html/drivers/driver29.html
+++ /dev/null
@@ -1,797 +0,0 @@
-<!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
deleted file mode 100644
index 7dcc092..0000000
--- a/contrib/ntp/html/drivers/driver3.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!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
deleted file mode 100644
index 34507f3..0000000
--- a/contrib/ntp/html/drivers/driver30.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!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
deleted file mode 100644
index 18beaaa..0000000
--- a/contrib/ntp/html/drivers/driver32.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!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
deleted file mode 100644
index ea77345..0000000
--- a/contrib/ntp/html/drivers/driver33.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!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
deleted file mode 100644
index dc37f3b..0000000
--- a/contrib/ntp/html/drivers/driver34.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!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
deleted file mode 100644
index 20ed717..0000000
--- a/contrib/ntp/html/drivers/driver35.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!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
deleted file mode 100644
index 2644716..0000000
--- a/contrib/ntp/html/drivers/driver36.html
+++ /dev/null
@@ -1,262 +0,0 @@
-<!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
deleted file mode 100644
index 26acbc3..0000000
--- a/contrib/ntp/html/drivers/driver37.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!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
deleted file mode 100644
index e32bd71..0000000
--- a/contrib/ntp/html/drivers/driver38.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!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
deleted file mode 100644
index 10a3d14..0000000
--- a/contrib/ntp/html/drivers/driver39.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!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
deleted file mode 100644
index 2f78eb5..0000000
--- a/contrib/ntp/html/drivers/driver4.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!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
deleted file mode 100644
index 0c68081..0000000
--- a/contrib/ntp/html/drivers/driver40.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!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
deleted file mode 100644
index c509db0..0000000
--- a/contrib/ntp/html/drivers/driver42.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!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
deleted file mode 100644
index 914693a..0000000
--- a/contrib/ntp/html/drivers/driver43.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!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
deleted file mode 100755
index e5cbf68..0000000
--- a/contrib/ntp/html/drivers/driver44.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!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
deleted file mode 100644
index 405c3ab..0000000
--- a/contrib/ntp/html/drivers/driver5.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!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
deleted file mode 100644
index 8e7cc1e..0000000
--- a/contrib/ntp/html/drivers/driver6.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!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
deleted file mode 100644
index 7c47b11..0000000
--- a/contrib/ntp/html/drivers/driver7.html
+++ /dev/null
@@ -1,235 +0,0 @@
-<!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
deleted file mode 100644
index ebc5e25..0000000
--- a/contrib/ntp/html/drivers/driver8.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!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
deleted file mode 100644
index 8a551de..0000000
--- a/contrib/ntp/html/drivers/driver9.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!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
deleted file mode 100644
index e181298..0000000
--- a/contrib/ntp/html/drivers/icons/home.gif
+++ /dev/null
Binary files differ
diff --git a/contrib/ntp/html/drivers/icons/mail2.gif b/contrib/ntp/html/drivers/icons/mail2.gif
deleted file mode 100644
index 21bc1c4..0000000
--- a/contrib/ntp/html/drivers/icons/mail2.gif
+++ /dev/null
Binary files differ
diff --git a/contrib/ntp/html/drivers/oncore-shmem.html b/contrib/ntp/html/drivers/oncore-shmem.html
deleted file mode 100644
index 91402eb..0000000
--- a/contrib/ntp/html/drivers/oncore-shmem.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<!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/exec.htm b/contrib/ntp/html/exec.htm
deleted file mode 100644
index 464b3af..0000000
--- a/contrib/ntp/html/exec.htm
+++ /dev/null
@@ -1,393 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" &amp;lt;html>
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Executive Summary - Computer Network Time
-Synchronization</title>
-</head>
-<body>
-<h3>Executive Summary - Computer Network Time Synchronization</h3>
-
-<img align="left" src="pic/alice12.gif" alt="gif"><a href=
-"pictures.htm">from <i>Alice's Adventures in Wonderland</i>, Lewis
-Carroll</a>
-
-<p>The executive is the one on the left.<br clear="left">
-</p>
-
-<hr>
-<h4>Introduction</h4>
-
-<p>The standard timescale used by most nations of the world is
-Coordinated UniversalTime (UTC), which is based on the Earth's
-rotation about its axis, and the Gregorian Calendar, which is based
-on the Earth's rotation about the Sun. The UTC timescale is
-disciplined with respect to International Atomic Time (TAI) by
-inserting leap seconds at intervals of about 18 months. UTC time is
-disseminated by various means, including radio and satellite
-navigation systems, telephone modems and portable clocks.</p>
-
-<p>Special purpose receivers are available for many
-time-dissemination services, including the Global Position System
-(GPS) and other services operated by various national governments.
-For reasons of cost and convenience, it is not possible to equip
-every computer with one of these receivers. However, it is possible
-to equip some number of computers acting as primary time servers to
-synchronize a much larger number of secondary servers and clients
-connected by a common network. In order to do this, a distributed
-network clock synchronization protocol is required which can read a
-server clock, transmit the reading to one or more clients and
-adjust each client clock as required. Protocols that do this
-include the Network Time Protocol (NTP), Digital Time
-Synchronization Protocol (DTSS) and others found in the literature
-(See "Further Reading" at the end of this article.)</p>
-
-<h4>Protocol Design Issues</h4>
-
-<p>The synchronization protocol determines the time offset of the
-server clock relative to the client clock. The various
-synchronization protocols in use today provide different means to
-do this, but they all follow the same general model. On request,
-the server sends a message including its current clock value or <i>
-timestamp</i> and the client records its own timestamp upon arrival
-of the message. For the best accuracy, the client needs to measure
-the server-client propagation delay to determine its clock offset
-relative to the server. Since it is not possible to determine the
-one-way delays, unless the actual clock offset is known, the
-protocol measures the total roundtrip delay and assumes the
-propagation times are statistically equal in each direction. In
-general, this is a useful approximation; however, in the Internet
-of today, network paths and the associated delays can differ
-significantly due to the individual service providers.</p>
-
-<p>The community served by the synchronization protocol can be very
-large. For instance, the NTP community in the Internet of 1998
-includes over 230 primary time servers, synchronized by radio,
-satellite and modem, and well over 100,000 secondary servers and
-clients. In addition, there are many thousands of private
-communities in large government, corporate and institution
-networks. Each community is organized as a tree graph or <i>
-subnet</i>, with the primary servers at the root and secondary
-servers and clients at increasing hop count, or stratum level, in
-corporate, department and desktop networks. It is usually necessary
-at each stratum level to employ redundant servers and diverse
-network paths in order to protect against broken software, hardware
-and network links.</p>
-
-<p>Synchronization protocols work in one or more association modes,
-depending on the protocol design. Client/server mode, also called
-master/slave mode, is supported in both DTSS and NTP. In this mode,
-a client synchronizes to a stateless server as in the conventional
-RPC model. NTP also supports symmetric mode, which allows either of
-two peer servers to synchronize to the other, in order to provide
-mutual backup. DTSS and NTP support a broadcast mode which allows
-many clients to synchronize to one or a few servers, reducing
-network traffic when large numbers of clients are involved. In NTP,
-IP multicast can be used when the subnet spans multiple
-networks.</p>
-
-<p>Configuration management can be a serious problem in large
-subnets. Various schemes which index public databases and network
-directory services are used in DTSS and NTP to discover servers.
-Both protocols use broadcast modes to support large client
-populations; but, since listen-only clients cannot calibrate the
-delay, accuracy can suffer. In NTP, clients determine the delay at
-the time a server is first discovered by polling the server in
-client/server mode and then reverting to listen-only mode. In
-addition, NTP clients can broadcast a special "manycast" message to
-solicit responses from nearby servers and continue in client/server
-mode with the respondents.</p>
-
-<h4>Security Issues</h4>
-
-<p>A reliable network time service requires provisions to prevent
-accidental or malicious attacks on the servers and clients in the
-network. Reliability requires that clients can determine that
-received messages are authentic; that is, were actually sent by the
-intended server and not manufactured or modified by an intruder.
-Ubiquity requires that any client can verify the authenticity of
-any server using only public information. This is especially
-important in such ubiquitous network services as directory
-services, cryptographic key management and time
-synchronization.</p>
-
-<p>NTP includes provisions to cryptographically authenticate
-individual servers using symmetric-key cryptography in which
-clients authenticate servers using shared secret keys. However, the
-secret keys must be distributed in advance using secure means
-beyond the scope of the protocol. This can be awkward and fragile
-with a large population of potential clients, possibly intruding
-hackers.</p>
-
-<p>Modern public-key cryptography provides means to reliably bind
-the server identification credentials and related public values
-using public directory services. However, these means carry a high
-computing cost, especially when large numbers of time-critical
-clients are involved as often the case with NTP servers. In
-addition, there are problems unique to NTP in the interaction
-between the authentication and synchronization functions, since
-each requires the other for success.</p>
-
-<p>The recent NTP Version 4 includes a revised security model and
-authentication scheme supporting both symmetric and public-key
-cryptography. The public-key variant is specially crafted to reduce
-the risk of intrusion, minimize the consumption of processor
-resources and minimize the vulnerability to hacker attack.</p>
-
-<h4>Computer Clock Modelling and Error Analysis</h4>
-
-Most computers include a quartz resonator-stabilized oscillator and
-hardware counter that interrupts the processor at intervals of a
-few milliseconds. At each interrupt, a quantity called <i>tick</i>
-is added to a system variable representing the clock time. The
-clock can be read by system and application programs and set on
-occasion to an external reference. Once set, the clock readings
-increment at a nominal rate, depending on the value of <i>tick</i>.
-Typical Unix system kernels provide a programmable mechanism to
-increase or decrease the value of <i>tick</i> by a small, fixed
-amount in order to amortize a given time adjustment smoothly over
-multiple <i>tick</i> intervals.
-
-<p>Clock errors are due to variations in network delay and
-latencies in computer hardware and software (jitter), as well as
-clock oscillator instability (wander). The time of a client
-relative to its server can be expressed</p>
-
-<center><i>T</i>(<i>t</i>) = <i>T</i>(<i>t</i><sub>0</sub>) + <i>
-R</i>(<i>t - t</i><sub>0</sub>) + 1/2 <i>D</i>(<i>t -
-t</i><sub>0</sub>)<sup>2</sup>,</center>
-
-<p>where <i>t</i> is the current time, <i>T</i> is the time offset
-at the last measurement update <i>t</i><sub>0</sub>, <i>R</i> is
-the frequency offset and <i>D</i> is the drift due to resonator
-ageing. All three terms include systematic offsets that can be
-corrected and random variations that cannot. Some protocols,
-including DTSS, estimate only the first term in this expression,
-while others, including NTP, estimate the first two terms. Errors
-due to the third term, while important to model resonator aging in
-precision applications, are neglected, since they are usually
-dominated by errors in the first two terms.</p>
-
-<p>The synchronization protocol estimates <i>
-T</i>(<i>t</i><sub>0</sub>) (and <i>R</i>(<i>t</i><sub>0</sub>),
-where relevant) at regular intervals <font face="symbol">t</font>
-and adjusts the clock to minimize <i>T</i>(<i>t</i>) in future. In
-common cases, <i>R</i> can have systematic offsets of several
-hundred parts-per-million (PPM) with random variations of several
-PPM due to ambient temperature changes. If not corrected, the
-resulting errors can accumulate to seconds per day. In order that
-these errors do not exceed a nominal specification, the protocol
-must periodically re-estimate <i>T</i> and <i>R</i> and compensate
-for variations by adjusting the clock at regular intervals. As a
-practical matter, for nominal accuracies of tens of milliseconds,
-this requires clients to exchange messages with servers at
-intervals in the order of tens of minutes.</p>
-
-<p>Analysis of quartz-resonator stabilized oscillators show that
-errors are a function of the averaging time, which in turn depends
-on the interval between corrections. At correction intervals less
-than a few hundred seconds, errors are dominated by jitter, while,
-at intervals greater than this, errors are dominated by wander. As
-explained later, the characteristics of each regime determine the
-algorithm used to discipline the clock. These errors accumulate at
-each stratum level from the root to the leaves of the subnet tree.
-It is possible to quantify these errors by statistical means, as in
-NTP. This allows real-time applications to adjust audio or video
-playout delay, for example. However, the required statistics may be
-different for various classes of applications. Some applications
-need absolute error bounds guaranteed never to exceeded, as
-provided by the following correctness principles.</p>
-
-<h4>Correctness Principles</h4>
-
-<p>Applications requiring reliable time synchronization such as air
-traffic control must have confidence that the local clock is
-correct within some bound relative to a given timescale such as
-UTC. There is a considerable body of literature that studies these
-issues with respect to various failure models such as fail-stop and
-Byzantine disagreement. While these models inspire much confidence
-in a theoretical setting, most require multiple message rounds for
-each measurement and would be impractical in a large computer
-network such as the Internet. However, it can be shown that the
-worst-case error in reading a remote server clock cannot exceed
-one-half the roundtrip delay measured by the client. This is a
-valuable insight, since it permits strong statements about the
-correctness of the timekeeping system.</p>
-
-<p>In the Probabilistic Clock Synchronization (PCS) scheme devised
-by Cristian, a maximum error tolerance is established in advance
-and time value samples associated with roundtrip delays that exceed
-twice this value are discarded. By the above argument, the
-remaining samples must represent time values within the specified
-tolerance. As the tolerance is decreased, more samples fail the
-test until a point where no samples survive. The tolerance can be
-adjusted for the best compromise between the highest accuracy
-consistent with acceptable sample survival rate.</p>
-
-<p>In a scheme devised by Marzullo and exploited in NTP and DTSS,
-the worst-case error determined for each server determines a
-correctness interval. If each of a number of servers are in fact
-synchronized to a common timescale, the actual time must be
-contained in the intersection of their correctness intervals. If
-some intervals do not intersect, then the clique containing the
-maximum number of intersections is assumed correct <i>
-truechimers</i> and the others assumed incorrect <i>
-falsetickers</i>. Only the truechimers are used to adjust the
-system clock.</p>
-
-<h4>Data Grooming Algorithms</h4>
-
-By its very nature, clock synchronization is a continuous process,
-resulting in a sequence of measurements with each of possibly
-several servers and resulting in a clock adjustment. In some
-protocols, crafted algorithms are used to improve the time and
-frequency estimates and refine the clock adjustment. Algorithms
-described in the literature are based on trimmed-mean and median
-filter methods. The clock filter algorithm used in NTP is based on
-the above observation that the correctness interval depends on the
-roundtrip delay. The algorithm accumulates offset/delay samples in
-a window of several samples and selects the offset sample
-associated with the minimum delay. In general, larger window sizes
-provide better estimates; however, stability considerations limit
-the window size to about eight.
-
-<p>The same principle could be used when selecting the best subset
-of servers and combining their offsets to determine the clock
-adjustment. However, different servers often show different
-systematic offsets, so the best statistic for the central tendency
-of the server population may not be obvious. Various kinds of
-clustering algorithms have been found useful for this purpose. The
-one used in NTP sorts the offsets by a quality metric, then
-calculates the variance of all servers relative to each server
-separately. The algorithm repeatedly discards the outlyer with the
-largest variance until further discards will not improve the
-residual variance or until a minimum number of servers remain. The
-final clock adjustment is computed as a weighted average of the
-survivors.</p>
-
-<p>At the heart of the synchronization protocol is the algorithm
-used to adjust the system clock in accordance with the final
-adjustment determined by the above algorithms. This is called the
-clock discipline algorithm or simply the discipline. Such
-algorithms can be classed according to whether they minimize the
-time offset or frequency offset or both. For instance, the
-discipline used in DTSS minimizes only the time offset, while the
-one used in NTP minimizes both time and frequency offsets. While
-the DTSS algorithm cannot remove residual errors due to systematic
-frequency errors, the NTP algorithm is more complicated and less
-forgiving of design and implementation mistakes.</p>
-
-<p>All clock disciplines function as a feedback loop, with measured
-offsets used to adjust the clock oscillator phase and frequency to
-match the external synchronization source. The behavior of feedback
-loops is well understood and modelled by mathematical analysis. The
-significant design parameter is the time constant, or
-responsiveness to external or internal variations in time or
-frequency. Optimum selection of time constant depends on the
-interval between update messages. In general, the longer these
-intervals, the larger the time constant and vice versa. In practice
-and with typical network configurations the optimal poll intervals
-vary between one and twenty minutes for network paths to some
-thousands of minutes for modem paths.</p>
-
-<h4>Further Reading</h4>
-
-<ol>
-<li>
-<p>Cristian, F. Probabilistic clock synchronization. In Distributed
-Computing 3, Springer Verlag, 1989, 146-158.</p>
-</li>
-
-<li>
-<p>Digital Time Service Functional Specification Version T.1.0.5.
-DigitalEquipment Corporation, 1989.</p>
-</li>
-
-<li>
-<p>Gusella, R., and S. Zatti. TEMPO - A network time controller for
-a distributed Berkeley UNIX system. IEEE Distributed Processing
-Technical Committee Newsletter 6, NoSI-2 (June 1984), 7-15. Also
-in: Proc. Summer 1984 USENIX (Salt Lake City, June 1984).</p>
-</li>
-
-<li>
-<p>Kopetz, H., and W. Ochsenreiter. Clock synchronization in
-distributed real-time systems. IEEE Trans. Computers C-36, 8
-(August 1987), 933-939.</p>
-</li>
-
-<li>
-<p>Lamport, L., and P.M. Melliar-Smith. Synchronizing clocks in the
-presence of faults. JACM 32, 1 (January 1985), 52-78.</p>
-</li>
-
-<li>
-<p>Marzullo, K., and S. Owicki. Maintaining the time in a
-distributed system. ACM Operating Systems Review 19, 3 (July 1985),
-44-54.</p>
-</li>
-
-<li>
-<p>Mills, D.L. Adaptive hybrid clock discipline algorithm for the
-Network Time Protocol. <i>IEEE/ACM Trans. Networking 6, 5</i>
-(October 1998), 505-514.</p>
-</li>
-
-<li>
-<p>Mills, D.L. Improved algorithms for synchronizing computer
-network clocks. <i>IEEE/ACM Trans. Networks 3, 3</i> (June 1995),
-245-254.</p>
-</li>
-
-<li>
-<p>Mills, D.L. Internet time synchronization: the Network Time
-Protocol. IEEE Trans. Communications COM-39, 10 (October 1991),
-1482-1493. Also in: Yang, Z., and T.A. Marsland (Eds.). Global
-States and Time in Distributed Systems, IEEE Press, Los Alamitos,
-CA, 91-102.</p>
-</li>
-
-<li>
-<p>Mills, D.L. Modelling and analysis of computer network clocks.
-Electrical Engineering Department Report 92-5-2, University of
-Delaware, May 1992, 29 pp.</p>
-</li>
-
-<li>
-<p>NIST Time and Frequency Dissemination Services. NBS Special
-Publication432 (Revised 1990), National Institute of Science and
-Technology, U.S. Department of Commerce, 1990.</p>
-</li>
-
-<li>
-<p>Schneider, F.B. A paradigm for reliable clock synchronization.
-Department of Computer Science Technical Report TR 86-735, Cornell
-University, February 1986.</p>
-</li>
-
-<li>
-<p>Srikanth, T.K., and S. Toueg. Optimal clock synchronization.
-JACM 34, 3 (July 1987), 626-645.</p>
-</li>
-
-<li>
-<p>Stein, S.R. Frequency and time - their measurement and
-characterization (Chapter 12). In: E.A. Gerber and A. Ballato
-(Eds.). Precision Frequency Control, Vol. 2, Academic Press, New
-York 1985, 191-232, 399-416. Also in: Sullivan, D.B., D.W. Allan,
-D.A. Howe and F.L. Walls (Eds.). Characterization of Clocks and
-Oscillators. National Institute of Standards and Technology
-Technical Note 1337, U.S. Government Printing Office (January,
-1990), TN61-TN119.</p>
-</li>
-</ol>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"home"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/extern.htm b/contrib/ntp/html/extern.htm
deleted file mode 100644
index 01c0149..0000000
--- a/contrib/ntp/html/extern.htm
+++ /dev/null
@@ -1,108 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>External Clock Discipline and the Local Clock Driver</title>
-</head>
-<body>
-<h3>External Clock Discipline and the Local Clock Driver</h3>
-
-<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 Lockclock 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="driver1.htm">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>ntp__enable. set/reset by enable command. enables ntp clock
-discipline</p>
-
-<p>ntp_control. set during initial configuration if kernel support
-is available kern_enable Set/reset by enable commandexit If this
-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 ntp_adjtime(). If this switch is
-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. pps_update set in the protocol routine if
-the prefer peer has survived and has offset less than 128 ms;
-otherwise set to zero. pps_control 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 ntp_enable and kern_enable 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 pps_update switch is set by the protocol module when
-it believes the PPS provider source is legitimate and operating
-within nominals. The ntp_control switch is set during configuration
-by interrogating the kernel. If both the kern_enable and
-ntp_control siwitches 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 ntp_adjtime() 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>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/extern.html b/contrib/ntp/html/extern.html
deleted file mode 100644
index 89a1b56..0000000
--- a/contrib/ntp/html/extern.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!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/gadget.htm b/contrib/ntp/html/gadget.htm
deleted file mode 100644
index 6bf64fc..0000000
--- a/contrib/ntp/html/gadget.htm
+++ /dev/null
@@ -1,48 +0,0 @@
-<html><head><title>
-Gadget Box PPS Level Converter and CHU Modem
-</title></head><body><h3>
-Gadget Box PPS Level Converter and CHU Modem
-</h3>
-
-<img align=left src=pic/gadget.jpg>A Gadget Box built by Chuck Hanavin
-
-<br clear=left><hr>
-
-<h4>Introduction</h4>
-
-<p>Many radio clocks used as a primary reference source for NTP servers produce a pulse-per-second (PPS) signal that can be used to improve accuracy to a high degree. However, the signals produced are usually incompatible with the modem interface signals on the serial ports used to connect the signal to the host. The gadget box consists of a handful of electronic components assembled in a small aluminum box. It includes level converters and a optional radio modem designed to decode the radio timecode signals transmitted by the Canadian time and frequency station CHU. A complete set of schematics, PCB artwork, drill templates can be obrtained via the web as the distribution <a href= "http://www.eecis.udel.edu/~mills/ntp/ntp">gadget.tar.Z</a>, or by anonymous FTP from ftp.udel.edu in the <TT>pub/ntp</TT> directory.
-
-<p>The gadget box is assembled in a 5&quot;x3&quot;x2&quot; aluminum minibox containing the level converter and modem circuitry. It includes two subcircuits. One of these converts a TTL positive edge into a fixed-width pulse at EIA levels and is for use with a timecode receiver or oscillator including a TTL PPS output. The other converts the timecode modulation broadcast by Canadian time/frequency standard station CHU into a 300-bps serial character stream at EIA levels and is for use with the <a href=driver7.htm>Radio CHU Audio Demodulator/Decoder</a> driver.
-
-<p>This archive contains complete construction details for the gadget box, including schematic, parts list and artwork for a two-sided, printed-circuit board. All files are in PostScript, with the exception of this file and an information file, which are in ASCII. The artwork is in the 1:1 scale and is suitable for direct printing on photographic resist for each side of the board. While a plated-through-holes process is most convenient, it is possible to bridge the two sides using soldered wires where necessary.
-
-<h4>Circuit Description</h4>
-
-<p>Following is a brief functional description of the device. See the schematic diagram gadget.s01 for reference. The audio output of a shortwave radio tuned to CHU at 3330, 7335 or 14670 kHz is connected to J2. A level of at least 30 mV peak-peak is required, such as provided by the recorder output on many receivers. The input level is adjusted by potentiometer R8 so that the timecode modulation broadcast at 31-39 seconds past the minute reliably lights green LED1, but the signals broadcast during other seconds of the minute do not.
-
-<p>Opamp U4A provides low-impedance drive for the bridged-tee bandpass filter U4B. The filter has a bandpass of about 600 Hz at the 6-dB points and a center frequency of about 2150 Hz. It is designed to avoid aliasing effects with receivers of relatively wide bandpass characteristics. The modem itself is implemented by U2 and its associated circuitry. Resistors R4 and R1 are a 40-dB pad which matches the filter output to the modem input. U2 is a TTL/EIA level converter with integral power supply for bipolar signals. The modem output is available at pin 3 (receive data) of DB25 connector J1.
-
-<p>The TTL PPS signal is connected via J3 to a retriggerable one-shot U3A, which generates a TTL pulse of width determined by potentiometer R7. The pulse width is determined by the bit rate of the attached serial port. In the common case the width is one bit-time, such as 26 us for 38.4 kbps, for example. This appears to the port as a single start bit of zero followed by eight bits of ones and a stop bit of one. The second one-shot U3B generates a 200-ms pulse suitable for driving the amber LED3 as a visual monitor. The output of U3A is converted to EIA levels by U1 and appears at pin 12 (secondary receive data) of J1.
-
-<p>If only the PPS circuit is required, U2 and U4 can be deleted and the gadget box powered from the EIA modem-control signal at pin 20 (terminal ready) of J1, assuming this signal is placed in the on (positive voltage) condition by the computer program. J1 is wired to keep most finicky UARTs and terminal-driver programs happy. If the CHU circuit is required, an external 12-volt AC transformer or 9-12-volt DC supply
-connected to J4 is required. Red LED2 indicates power is supplied to the box.
-
-<p>Files
-
-<p>Following is a list of files included in this archive. All files are in PostScript, except the <tt>README</tt> and <tt>gadget.lst</tt> files, which are in ASCII. The files <tt>gadget.s01, gadget.s02</tt> and <tt>gadget.lst</tt> were generated using the Schema schematic-capture program from Omation. The printed-circuit files <tt>*.lpr</tt> were generated using Schema-PCB, also from Omation.
-
-<p>Files
-
-<p><tt>README</tt> - helpful information
-<br><tt>gadget.s01</tt> - circuit schematic
-<br><tt>gadget.s02</tt> - minibox assembly drawing
-<br><tt>gadget.lst</tt> - net list, pin list, parts list, etc.
-<br><tt>gen0102.lpr</tt> - pcb x-ray diagram
-<br><tt>art01.lpr</tt> - pcb artword side 1
-<br><tt>art02.lpr</tt> - pcb artwork side 2
-<br><tt>adt0127.lpr</tt> - pcb assembly drawing
-<br><tt>dd0124.lpr</tt> - pcb drill drawing
-<br><tt>sm0228.lpr</tt> - pcb solder mask (side 2)
-<br><tt>sst0126.lpr</tt> - pcb silkscreen mask (side 1)
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/genkeys.htm b/contrib/ntp/html/genkeys.htm
deleted file mode 100644
index 33e99ef..0000000
--- a/contrib/ntp/html/genkeys.htm
+++ /dev/null
@@ -1,181 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntp-genkeys - generate public and private keys</title>
-</head>
-<body>
-<h3><tt>ntp-genkeys</tt> - generate public and private keys</h3>
-
-<img align="left" src="pic/alice23.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>Alice holds the key.<br clear="left">
-</p>
-
-<hr>
-<h4>Synopsis</h4>
-
-<tt>ntp-genkeys</tt>
-
-<h4>Description</h4>
-
-<p>This program generates random keys used by either or both the
-NTPv3/NTPv4 symmetric key or the NTPv4 public key (Autokey)
-cryptographic authentication schemes. By default the program
-generates the <tt>ntp.keys</tt> file containing 16 random symmetric
-keys. In addition, if the <tt>rsaref20</tt> package is configured
-for the software build, the program generates cryptographic values
-used by the Autokey scheme. These values are incorporated as a set
-of three files, <tt>ntpkey</tt> containing the RSA private key,
-<tt>ntpkey_<i>host</i></tt> containing the RSA public key, where
-<tt><i>host</i></tt> is the DNS name of the generating machine, and
-<tt>ntpkey_dh</tt> containing the parameters for the Diffie-Hellman
-key-agreement algorithm. All files and are in printable ASCII
-format. A timestamp in NTP seconds is appended to each. Since the
-algorithms are seeded by the system clock, each run of this program
-produces a different file and file name.</p>
-
-<p>The <tt>ntp.keys</tt> file contains 16 MD5 keys. Each key
-consists of 16 characters randomized over the ASCII 95-character
-printing subset. The file is read by the daemon at the location
-specified by the <tt>keys</tt> configuration file command and made
-visible only to root. An additional key consisting of a easily
-remembered password should be added by hand for use with the <tt>
-ntpq</tt> and <tt>ntpdc</tt> programs. The file must be distributed
-by secure means to other servers and clients sharing the same
-security compartment. While the key identifiers for MD5 and DES
-keys must be in the range 1-65534, inclusive, the <tt>
-ntp-genkeys</tt> program uses only the identifiers from 1 to 16.
-The key identifier for each association is specified as the key
-argument in the <tt>server</tt> or peer configuration file
-command.</p>
-
-<p>The <tt>ntpkey</tt> file contains the RSA private key. It is
-read by the daemon at the location specified by the <tt>
-privatekey</tt> argument of the <tt>crypto</tt> configuration file
-command and made visible only to root. This file is useful only to
-the machine that generated it and never shared with any other
-daemon or application program.</p>
-
-<p>The <tt>ntpkey_<i>host</i></tt> file contains the RSA public
-key, where <tt><i>host</i></tt> is the DNS name of the host that
-generated it. The file is read by the daemon at the location
-specified by the <tt>publickey</tt> argument to the <tt>server</tt>
-or <tt>peer</tt> configuration file command. This file can be
-widely distributed and stored without using secure means, since the
-data are public values.</p>
-
-<p>The <tt>ntp_dh</tt> file contains two Diffie-Hellman parameters:
-the prime modulus and the generator. The file is read by the daemon
-at the location specified by the <tt>dhparams</tt> argument of the
-<tt>crypto</tt> configuration file command. The file can be
-distributed by insecure means to other servers and clients sharing
-the same key agreement compartment, since the data are public
-values.</p>
-
-<p>The file formats begin with two lines, the first containing the
-generating system DNS name and the second the datestamp. Lines
-beginning with <tt>#</tt> are considered comments and ignored by
-the daemon. In the <tt>ntp.keys</tt> file, the next 16 lines
-contain the MD5 keys in order. If necessary, this file can be
-further customized by an ordinary text editor. The format is
-described in the following section. In the <tt>ntpkey</tt> and <tt>
-ntpkey_<i>host</i></tt> files, the next line contains the modulus
-length in bits followed by the key as a PEM encoded string. In the
-<tt>ntpkey_dh</tt> file, the next line contains the prime length in
-bytes followed by the prime as a PEM encoded string, and the next
-and final line contains the generator length in bytes followed by
-the generator as a PEM encoded string.</p>
-
-<p>Note: See the file <tt>./source/rsaref.h</tt> in the <tt>
-rsaref20</tt> package for explanation of return values, if
-necessary.</p>
-
-<h4>Symmetric Key File Format</h4>
-
-In the case of DES, the keys are 56 bits long with, depending on
-type, a parity check on each byte. In the case of MD5, the keys are
-64 bits (8 bytes). <tt>ntpd</tt> reads its keys from a file
-specified using the <tt>-k</tt> command line option or the <tt>
-keys</tt> statement in the configuration file. While key number 0
-is fixed by the NTP standard (as 56 zero bits) and may not be
-changed, one or more of the keys numbered 1 through 15 may be
-arbitrarily set in the keys file.
-
-<p>The key file uses the same comment conventions as the
-configuration file. Key entries use a fixed format of the form</p>
-
-<p><i><tt>keyno type key</tt></i></p>
-
-<p>where <i><tt>keyno</tt></i> is a positive integer, <i><tt>
-type</tt></i> is a single character which defines the key format,
-and <i><tt>key</tt></i> is the key itself.</p>
-
-<p>The key may be given in one of three different formats,
-controlled by the <i><tt>type</tt></i> character. The three key
-types, and corresponding formats, are listed following.</p>
-
-<dl>
-<dt><tt>S</tt></dt>
-
-<dd>The key is a 64-bit hexadecimal number in the format specified
-in the DES specification; that is, the high order seven bits of
-each octet are used to form the 56-bit key while the low order bit
-of each octet is given a value such that odd parity is maintained
-for the octet. Leading zeroes must be specified (i.e., the key must
-be exactly 16 hex digits long) and odd parity must be maintained.
-Hence a zero key, in standard format, would be given as <tt>
-0101010101010101</tt>.</dd>
-
-<dt><tt>N</tt></dt>
-
-<dd>The key is a 64-bit hexadecimal number in the format specified
-in the NTP standard. This is the same as the DES format, except the
-bits in each octet have been rotated one bit right so that the
-parity bit is now the high order bit of the octet. Leading zeroes
-must be specified and odd parity must be maintained. A zero key in
-NTP format would be specified as <tt>8080808080808080</tt>.</dd>
-
-<dt><tt>A</tt></dt>
-
-<dd>The key is a 1-to-8 character ASCII string. A key is formed
-from this by using the low order 7 bits of each ASCII character in
-the string, with zeroes added on the right when necessary to form a
-full width 56-bit key, in the same way that encryption keys are
-formed from Unix passwords.</dd>
-
-<dt><tt>M</tt></dt>
-
-<dd>The key is a 1-to-8 character ASCII string, using the MD5
-authentication scheme. Note that both the keys and the
-authentication schemes (DES or MD5) must be identical between a set
-of peers sharing the same key number.</dd>
-</dl>
-
-<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 ASCII format.</p>
-
-<h4>Files</h4>
-
-The RSA Laboratories package <tt>rsaref20</tt> of cryptographic
-routines is necessary in order to build and use this program.
-
-<h4>Bugs</h4>
-
-It can take quite a while to generate the RSA public/private key
-pair and Diffie-Hellman parameters, from a few seconds on a modern
-workstation to several minutes on older machines.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/hints.htm b/contrib/ntp/html/hints.htm
deleted file mode 100644
index fcb533b..0000000
--- a/contrib/ntp/html/hints.htm
+++ /dev/null
@@ -1,32 +0,0 @@
-<html><head><title>
-Hints and Kinks
-</title></head><body><h3>
-Hints and Kinks
-</h3>
-
-<img align=left src=pic/alice35.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>
-from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>Mother in law has all the answers.
-<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>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=http:hints>directory listing</a>.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/hints.html b/contrib/ntp/html/hints.html
deleted file mode 100644
index cb6275b..0000000
--- a/contrib/ntp/html/hints.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!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/a-ux b/contrib/ntp/html/hints/a-ux
deleted file mode 100644
index f8c26d2..0000000
--- a/contrib/ntp/html/hints/a-ux
+++ /dev/null
@@ -1,195 +0,0 @@
--------------
-INTRODUCTION:
--------------
-Last revision: 06-Jul-1994
-
-Included in this distribution of XNTP V3 is a configuration file suitable
-for use under Apple's A/UX Version 3.x.x There is also one for A/UX 2.0.1
-but it has not been fully tested. To make the executables follow the steps
-outlined below.
-
-*** NOTE: You must have gcc installed to successfully compile the current
-distribution; the native cc supplied with A/UX will NOT correctly compile
-this source. See the FAQ in comp.unix.aux for places to obtain gcc from
-and how to install it.
-
-----------------------
-MAKING XNTPD FOR A/UX:
-----------------------
-
-First, you need to create the makefiles (after you've downloaded the
-source, of course):
-
- % make clean
- % make refconf
-
-After that, you should edit Config.local to make sure that BINDIR is
-correct for where you wish the programs to be "installed". The default
-(and what I use) is /usr/local/etc. Make sure that DEFS_LOCAL and
-CLOCKDEFS are commented out! Presently, only the LOCAL_CLOCK/REFCLOCK
-clock is used and supported.
-
-
-After this is done (you should be told that your system is A/UX 3), make
-'xntpd' (the options to 'gcc' are held in compilers/aux3.gcc):
-
- % make
-
-I do not normally use the `make install' option and so have not verified its
-compatibility with A/UX. Rather, I pull out each of the executables and
-place them in the locally appropriate locations.
-
----------------
-STARTING XNTPD:
----------------
-
-At this point you need to set things up so that 'xntpd' is started upon
-boot-up. You can do this in 1 of 2 ways: either add entries in /etc/inittab
-or, more ideally, create and use an /etc/rc.local file. Since rc.local is
-what I recommend, here's how you do it:
-
-By default, A/UX doesn't have rc.local, so you'll need to add the following to
-/etc/inittab:
-
- net6:2:wait:/etc/syslogd # set to "wait" to run a syslog daemon
-+ jmj0:2:wait:/etc/rc.local 1>/dev/syscon 2>&1 # Local stuff
- dbg2::wait:/etc/telinit v # turn off init's verbose mode
-
-Now, the look of a sample /etc/rc.local is as follows:
-
- #!/bin/sh
- :
- : rc.local
- :
- # @(#)Copyright Apple Computer 1987 Version 1.17 of rc.sh on 91/11/08 15:56:21 (ATT 1.12)
-
-
- # Push line discipline/set the device so it will print
- /etc/line_sane 1
- echo " "
- echo "Entering rc.local..."
-
- set `/bin/who -r`
- if [ "$7" = 2 ]
- then
- /bin/echo " now setting the time..."
- /usr/local/etc/ntpdate -s -b <host.domain>
- sleep 5
- #
- # start up 'xntpd' if we want
- #
- if [ -f /etc/ntp.conf ]
- then
- /bin/echo " setting tick and tickadj..."
- /usr/local/etc/tickadj -t 16672 -a 54
- sleep 5
- /bin/echo " starting xntpd..."
- /usr/local/etc/xntpd <&- > /dev/null 2>&1
- sleep 5
- fi
- #
- fi
-
- echo "Leaving rc.local..."
-
-There are a few things to notice about the above:
-
- o When run, 'ntpdate' forces your clock to the time returned by the
- host(s) specified by <host.domain> (you'll need to replace this
- be the IP address(es) of your timehosts. This is good since it gets
- things close to start off with. You can use more than one time
- server.
-
- o 'tickadj' is also called. This does two things: changes the
- default value of 'tick' (which the the amount of time, in ms, that
- is added to the clock every 1/60 seconds) and changes the value
- of 'tickadj' which the the amount that is added or subtracted
- from 'tickadj' when adjtime() is called.
-
- Now Mac clocks are pretty bad and tend to be slow. Sooo, instead of
- having A/UX add the default of 16666ms every 1/60th of a second, you
- may want it to add more (or less) so that it keeps better time. The
- above value works for me but your "best" value may be different and
- will likely require some fooling around to find the best value. As a
- general rule of thumb, if you see 'xntpd' make a lot of negative clock
- adjustments, then your clock is fast and you'll need to _decrease_
- the value of 'tick'. If your adjustments are positive, then you need
- to increase 'tick'. To make a guess on how fast/slow your clock is,
- use 'ntpdate' to sync your clock. Now watch 'xntpd' and see how it
- operates. If, for example, it resets your clock by 1 second every 30
- minutes, then your clock is (1/(30*60)) is about 0.056% off and you'll
- need to adjust 'tick' by 16666*0.00056 or about 9 (i.e. 'tick' should
- be ~16675 if slow or ~16657 if fast)
-
- A/UX's default value of 'tickadj' is 1666 which is too big for
- 'xntpd'... so it also needs to be adjusted. I like using larger
- values then the recommended value of 9 for 'tickadj' (although not
- anything near as big as 1666) since this allows for quick slews
- when adjusting the clock. Even with semi-large values of 'tickadj'
- (~200), getting 5ms (1/200 s) accuracy is easy.
-
-
-Finally, before A/UX and 'xntpd' will work happily together, you need to
-patch the kernel. This is due to the fact that A/UX attempts to keep the
-UNIX-software clock and the Mac-hardware clock in sync. Neither the h/w or
-the s/w clock are too accurate. Also, 'xntpd' will be attempting to adjust
-the software clock as well, so having A/UX muck around with it is asking
-for headaches. What you therefore need to do is tell the kernel _not_ to
-sync the s/w clock with the h/w one. This is done using 'adb'. The
-following is a shell script that will do the patch for you:
-
- #! /bin/sh
- adb -w /unix <<!
- init_time_fix_timeout?4i
- init_time_fix_timeout?w 0x4e75
- init_time_fix_timeout?4i
- $q
- !
-
-This must be done _every_ time you create a new kernel (via newconfig or
-newunix) or else 'xntpd' will go crazy.
-
---------
-HISTORY:
---------
-
-John Dundas was the original porter of 'xntpd' and a lot of the additions
-and A/UX-ports are from him. I got involved when I wanted to run 'xntpd'
-on jagubox. It was also around this time that the base-patchlevel of
-'xntpd' changed relatively (the so-called "jones" version). Since then,
-I've been maintaining 'xntpd' for A/UX for the xntp development team
-
-The original kernel patch (which patched 'time_fix_timeout') was from
-Richard Todd. I suggest patching 'init_time_fix_timeout' which prevents
-'time_fix_timeout' from even being called.
-
-----------------
-TECHNICAL NOTES:
-----------------
-
- o As configured (see machines/aux3), 'xntpd' will log messages via syslogd
- using the LOC_LOCAL1 facility. I would suggest the following in
- /etc/syslog.conf:
-
- local1.notice /usr/adm/ntpd-syslog
-
- o As mentioned above, the clocks on A/UX and Macs are kinda bad. Not
- only that, but logging in and out of the MacOS mode as well as
- extensive floppy use causes A/UX to drop and lose clock interupts
- (these are sent every 1/60th of a second). So, if you do these
- activities a lot, you find out that you lose about 300ms of time
- (i.e., you become 300ms slow). 'xntpd' default way of handling this
- is to called 'settimeofday()' and step the clock to the correct
- time. I prefer having 'xntpd' slew the clock back into line by
- making gradual adjustments to the clock over a coupla minutes
- or so. It's for this reason that SLEWALWAYS is defined in
- include/ntp_machine.h for SYS_AUX3. It's also for this reason than
- I like larger values of 'tickadj'.
-
-Good luck! If you have problems under A/UX feel free to contact me (e-mail
-is preferred).
---
- Jim Jagielski | "That is no ordinary rabbit... 'tis the
- jim@jagubox.gsfc.nasa.gov | most foul, cruel and bad-tempered
- NASA/GSFC, Code 734.4 | rodent you ever set eyes on"
- Greenbelt, MD 20771 | Tim the Enchanter
diff --git a/contrib/ntp/html/hints/aix b/contrib/ntp/html/hints/aix
deleted file mode 100644
index e53beff..0000000
--- a/contrib/ntp/html/hints/aix
+++ /dev/null
@@ -1,76 +0,0 @@
-Problem with recent ANSI compilers
-
-On some systems, including AIX, the compiler quits on the ntp_refclock.c
-file when processing the refclock_report() routine. The problem, which
-is eithre a feature or a bug, has to do with an unwanted promotion of
-the u_char argument to an int and a failure of the compiler to recognize
-the preceding prototype. A workaround is to use ANSI syntax to delare
-the arguments. Since ANSI compilers are not universally available, this
-syntax can't be used in the stock distribution.
-
-(Message # 60: 2884 bytes, New)
-Date: Sat, 19 Aug 1995 13:20:50 -0400
-From: "R. Bernstein" <rocky@panix.com>
-Newsgroups: comp.protocols.time.ntp
-to: mills@udel.edu
-return-receipt-to: rocky@panix.com
-Subject: time and AIX 3.2.5 raw tty bug
-
-This posting isn't strictly about NTP, any program that may stop the
-clock or set the clock backwards is subject to the AIX 3.2.5 bug.
-
-On AIX 3.2.5, there is a bug in the tty driver for a raw device which
-may crash the box under certain conditions: basically a read() on a
-raw tty in effect, a character was read but not as many as specified
-by VMIN when a read timeout occurred. VTIME specifies the timeout. See
-the AIX manual page on termios.h or that include file. for Information
-on VMIN (or MIN) VTIME (or TIME).
-
-A remedy other than to not use raw tty's is to apply patch U435110.
-
-Details of the problem report follow.
-
-> ABSTRACT:
-> IX43779: TRAP IN PSX_TIMEO
->
-> ORIGINATING DETAILS:
-> Stacktrace shows:
-> IAR: 01460214 posixdd:psx_timeo + 8bf4: ti 4,r12,0x0
-> *LR: 014601a0 posixdd:psx_timeo + 8b80
-> 00212c60: 014604f4 posixdd:psx_timer + 8ed4
-> 00212cc0: 0144b74c ttydd:tty_do_offlevel + 4284
-> 00212d20: 000216fc .i_offlevel + 8c
-> 00212d70: 00021d78 .i_softint + c8
-> 00001004: 00008714 .finish_interrupt + 80
->
-> RESPONDER SUMMARY:
-> AIX asserted in psx_timeo(). Reason for the assert was that
-> the current time was behind psx_ctime. Since this state
-> can occur when the current time is changed after a character
-> is received but before the VTIME interbyte timer pops, we
-> should not assert on this.
->
-> RESPONDER CONCLUSION:
-> Removed the requirement that current time > psx_ctime by
-> adding a new L_ntimersub macro that is used instead of the
-> ntimersub macro in time.h. Also added a test for (current
-> time - psx_ctime) being negative, in that case we do not
-> adjust the new timeout.
->
-> Reported to Correct a PTF in Error: NO
-> Reported as a Highly pervasive problem: NO
->
-> PE Apar?: NoPE
-> Hiper Apar?: NoHiper
-> Status: CLOSED PER
-> Component Name: AIX V3 FOR RS/6
-> Version: 320
-> Component ID: 575603001
-> Submitted: 94/05/03
-> Closed: 94/05/05
-> ChangeTeam: TX2527
->
-> APAR FIXED BY: U431696 U432151 U432844 U432870 U432979
-> U433049 U433081 U433459 U433876 U433906 U434598 U434453
-> U434672 U434737 U435110
-
diff --git a/contrib/ntp/html/hints/bsdi b/contrib/ntp/html/hints/bsdi
deleted file mode 100644
index 3b8bc38..0000000
--- a/contrib/ntp/html/hints/bsdi
+++ /dev/null
@@ -1,65 +0,0 @@
-hints/bsdi
-
-Author: Bdale Garbee, bdale@gag.com
-Last revision: 27Oct94 (Paul Vixie)
-
-Included in this distribution of XNTP is a configuration file suitable
-for use with BSDI's BSD/OS 1.1 (formerly BSD/386 1.1). On this system,
-the "cc" command is GCC 1.4x rather than PCC or GCC 2.x. It is imperative
-that "cc" be used since it predefines the symbol __bsdi__; if you want to
-use another compiler you will need to add -D__bsdi__ to catch the various
-#ifdef's required for this system.
-
-The Kinemetrics/Truetime GPS-TM/TMD driver is known to work on this system.
-The GPS-805 and GOES should also work fine. Hell, they should all work fine
-but it's hard to test very many locally.
-
-Due to BNR2's strict interpretation of POSIX and XNTP's use of SIGIO, BSD/OS
-can only handle one refclock per daemon. We're working this out with the
-system architects.
-
-The config file is machine/bsdi, and the following steps should be all that
-are required to install and use the bits.
-
-Note that you will need GNU sed; the version supplied with BSD/OS 1.1 loops
-endlessly during "make refconf". Likewise you should get GNU make, which
-the instructions below assume that you have put in /usr/local/bin/gnumake.
-
-To build the software:
-
- rm -f Config.local
- gnumake refconf
- gnumake MAKE=gnumake
-
-To install the software:
-
- gnumake install
-
- This will place all of the executables in /usr/local/etc. The config
- file is expected to be /usr/local/etc/xntp.conf and the key file for
- the optional authentication is /etc/ntp.keys.
-
- Craft a config file and a key file, and put them in the right places.
- There is information on how to do this elsewhere in the documentation,
- the only thing I'll mention is that I put the drift file in
- /var/log/ntp.drift, and the authdelay on my 486DX/50 system is
- 0.000064. Your mileage will vary, learn to use the authspeed tools
- if you're going to authenticate.
-
- In the file /etc/rc.local, make sure that the invocation of ntpd is
- commented out, and add an invocation of xntpd. Here's what I'm using:
-
- echo -n 'starting local daemons:'
-
- if [ -f /etc/ntp.keys -a -f /usr/local/etc/xntp.conf ]; then
- echo -n ' xntpd'; /usr/local/etc/xntpd
- fi
-
- #XXX# echo -n ' ntpd'; /usr/libexec/ntpd -t
-
-At this point, you should be good to go. Try running /usr/local/etc/xntpd and
-using ntpq or xntpdc to see if things are working, then pay attention the next
-time you reboot to make sure that xntpd is being invoked, and use ntpq or
-xntpdc again to make sure all is well.
-
-Enjoy!
diff --git a/contrib/ntp/html/hints/changes b/contrib/ntp/html/hints/changes
deleted file mode 100644
index 177e562..0000000
--- a/contrib/ntp/html/hints/changes
+++ /dev/null
@@ -1,13 +0,0 @@
-Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (xntpd/refclock_parse.c):
- - Added support to supply power from RS232 with CLOCK_RAWDCF.
- Known to work with Linux 1.2.
- - Made Linux ignore parity errors with CLOCK_RAWDCF.
-
-Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (parse/util/dcfd.c):
- - Removed conflicting prototype for Linux (sscanf)
- - Corrected spelling error
- - Made Linux ignore parity errors.
- - Added support to supply power from RS232 with CLOCK_RAWDCF.
-
-Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (parse/util/testdcf.c):
- - Made Linux ignore parity errors.
diff --git a/contrib/ntp/html/hints/decosf1 b/contrib/ntp/html/hints/decosf1
deleted file mode 100644
index bc4ce0b..0000000
--- a/contrib/ntp/html/hints/decosf1
+++ /dev/null
@@ -1,40 +0,0 @@
-Some major changes were necessary to make xntp v3 run on the DEC Alpha
-hardware running DEC OSF/1. All "long" and "u_long" declarations and
-casts in the code were changed to "LONG" and "U_LONG" and a new header
-file (include/ntp_types.h) was added. The new header file defines
-LONG as int and U_LONG as u_int for the Alpha hardware and as long
-and u_long for anything else. A couple of #ifs where changed in
-ntpq and xntpdc to get the result of a signal defined correctly. The
-Config.decosf1 file built the programs here with no problems.
-
-I don't have a radio clock here, so none of that code has been tested.
-I have run xntpd, xntpdc, xntpres, ntpq, ntpdate, and tickadj under
-DEC OSF/1 v1.2-2 (BL10).
-
-Mike Iglesias Internet: iglesias@draco.acs.uci.edu
-University of California, Irvine BITNET: iglesias@uci
-Office of Academic Computing uucp: ...!ucbvax!ucivax!iglesias
-Distributed Computing Support phone: (714) 856-6926
-
-Support for NTP Version 2 is included with the current OSF/1 release. If
-you are upgrading to NTP Version 3 with this distribution, you should not
-use the xntpd or ntpq programs that come with the OSF/1 release. The
-older programs should be replaced by the newer programs of the same name,
-either in situ or via a link to a tranquil spot like /usr/local/bin. The
-make install script in the this distribution don't work due to a silly
-install program incompatibility, so you will need to copy the programs by
-hand.
-
-Don't use the setup utility to install or configure the xntpd installation,
-as it will cheerfully clobber your painstakingly crafted ntp.conf program.
-However, assuming you put this file in /etc/ntp.conf, you can use the
-/sbin/init.d/xntpd script to start and stop the daemon.
-
-This distribution compiles with nominal mumur with the stock cc compiler
-that comes with OSF/1.
-
-Dave Mills
-Electrical Engineering Department
-Unibergisty of Delabunch
-mills@udel.edu
-
diff --git a/contrib/ntp/html/hints/decosf2 b/contrib/ntp/html/hints/decosf2
deleted file mode 100644
index e4a8828..0000000
--- a/contrib/ntp/html/hints/decosf2
+++ /dev/null
@@ -1,54 +0,0 @@
-Problems with DEC OSF/1 V2.0
-
-Compilation using gcc fails with ntp_config.c. The problem is an apparent
-error in the /usr/include/sys/procset.h and /usr/include/sys/wait.h
-include files.
-
-cowbird:/usr/include/sys# diff -c wait.h.orig wait.h
-*** wait.h.orig Tue Feb 22 02:41:38 1994
---- wait.h Thu Aug 25 14:52:57 1994
-***************
-*** 298,304 ****
- #else
-
- _BEGIN_CPLUSPLUS
-! extern int waitid(idtype_t, id_t, siginfo_t *, int);
- _END_CPLUSPLUS
- #endif /* _NO_PROTO */
-
---- 298,304 ----
- #else
-
- _BEGIN_CPLUSPLUS
-! extern int waitid(idtype_t, pid_t, siginfo_t *, int);
- _END_CPLUSPLUS
- #endif /* _NO_PROTO */
-
-cowbird:/usr/include/sys# diff -c procset.h.orig procset.h
-*** procset.h.orig Tue Feb 22 02:41:44 1994
---- procset.h Thu Aug 25 14:43:52 1994
-***************
-*** 86,95 ****
- */
-
- idtype_t p_lidtype; /* The id type for the left set. */
-! id_t p_lid; /* The id for the left set. */
-
- idtype_t p_ridtype; /* The id type of for right set. */
-! id_t p_rid; /* The id of the right set. */
- } procset_t;
-
-
---- 86,95 ----
- */
-
- idtype_t p_lidtype; /* The id type for the left set. */
-! pid_t p_lid; /* The id for the left set. */
-
- idtype_t p_ridtype; /* The id type of for right set. */
-! pid_t p_rid; /* The id of the right set. */
- } procset_t;
-
-Also, if using gcc from the freeware disk, either replace syscall.h
-in the directory /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.3/include
-or replace with a link to /usr/include/sys/syscall.h.
diff --git a/contrib/ntp/html/hints/freebsd b/contrib/ntp/html/hints/freebsd
deleted file mode 100644
index ef84732..0000000
--- a/contrib/ntp/html/hints/freebsd
+++ /dev/null
@@ -1,15 +0,0 @@
-If you are compiling under FreeBSD and see messages in the syslogs that
-indicate that the ntpd process is trying to use unavailable sched_
-calls, it means you are running a kernel that does not have the POSIX
-scheduling calls enabled.
-
-You have two choices:
-
-- Ignore the messages
-
-- Generate a new kernel, where the kernel configuration file contains
- the lines:
-
- options "P1003_1B"
- options "_KPOSIX_PRIORITY_SCHEDULING"
- options "_KPOSIX_VERSION=199309L"
diff --git a/contrib/ntp/html/hints/hpux b/contrib/ntp/html/hints/hpux
deleted file mode 100644
index 1640d05..0000000
--- a/contrib/ntp/html/hints/hpux
+++ /dev/null
@@ -1,158 +0,0 @@
-Last update: Sun Mar 13 15:05:31 PST 1994
-
-This file hopefully describes the whatever and however of how to get xntp
-running on hpux 7.0 and later s300. s400, s700, and s800.
-
-First off, all the standard disclaimers hold here ... HP doesn't have anthing
-to do with this stuff. I fool with it in my spare time because we use it and
-because I like to. We just happen to have a lot of HP machines around here :-)
-Xntpd has been in use here for several years and has a fair amount of mileage
-on various HP platforms within the company. I can't really guarantee bug fixes
-but I'd certainly like to hear about bugs and I won't hestitate to look at
-any fixes sent to me.
-
-Now lets talk OS. If you don't have 7.0 or later, pretty much hang it up now.
-This stuff has run here on pretty much everything from 8.0 upward on s300,
-s700, and s800. It is known to run on 7.0 s300/s400 but all reports are
-from the field and not my personal experience.
-
-If you are lucky enough to have a s300 or s400 with 9.03, then you no longer
-have to worry about adjtimed as HP-UX now has adjtime(2). The rest of you
-will have to wait on 10.0 which will have adjtime(2) and a supported though
-a bit older version of xntpd.
-
-Next, let me explain a bit about how this stuff works on HP-UX's that do not
-have adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed
-daemon. Instead of the adjtime(2) system call, we use a library routine to
-talk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and
-causes the clock to skew properly as needed. PLEASE NOTE that the adjtime
-code provided here is NOT a general replacement for adjtime(2) ... use of
-this adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results.
-
-What to do to get this stuff running ?
-
- * If you are running an OS less than 10.0 or do not have a s300/s400
- with 9.03 or better
- -> cd machines
- -> vi hpux
- -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9])
- -> cd ..
-
- * Say "make makeconfig"
-
- * Say "make", sit back for a few minutes.
-
- * cd authstuff
- * Say "./authcert < certdata" and check the output. Every line should
- end with "OK" ... if not, we got trouble.
- * Now try "./authspeed auth.samplekeys". What we want to
- remember here is the "authentication delay in CPU time"
- * cd ..
-
- * Say "make install"
-
- * I'd suggest reading the xntp docs about now :-) ... seriously !!
-
- * One thing I have added to this version of xntpd is a way to select
- config files if you are sharing /usr/local thru NFS or whatever.
- If the file /usr/local/etc/xntp.conf happens to be a directory, the
- files in that directory are searched until a match is found. The
- rules for a match are:
-
- 1. Our hostname
- 2. default.<machine id> (as in default.375 or default.850)
- 3. default
-
- * Ok, make sure adjtimed is running (just start it up for now with
- "/usr/local/etc/adjtimed"). Using -z as an option will get you
- a usage message.
-
- * Now start up xntpd and watch it work.
-
- * Make sure that adjtimed gets started at boot right before xntpd.
- We do this in /etc/netbsdsrc. They must both run as root !!
-
-Possible problems ?
-
- * On some 320's and 835's we have had to run adjtimed with "-p 45" or
- so to get rid of syslog messages about "last adjust did not finish".
-
- * At 9.0, there is a problem with DIAGMON (patch available from the
- response center) which causes it to delete the message queue that
- adjtimed/xntpd use to communicate. (see next note for result)
-
- * Xntpd has been known to get really ticked off when adjtime() fails
- which is usually only while running the emulation code on HP-UX.
- When it gets mad, it usually jumps the clock into never never land.
- Possible reasons for this are adjtimed being killed or just never
- started or adjtimed being completely swapped out on a really busy
- machine (newer adjtimed try to lock themselves in memory to prevent
- this one).
-
-Anything else ... just drop me a line at ken@sdd.hp.com
-
-Received: from louie.udel.edu by huey.udel.edu id aa14418; 15 Jun 95 9:19 EDT
-Received: from host5.colby.edu (host-05.colby.edu) by host-04.colby.edu with ESMTP (1.37.109.15/Colby 1.1)
- id AA165442355; Thu, 15 Jun 1995 09:19:16 -0400
-Received: by host5.colby.edu (1.37.109.15/Colby 1.1)
- id AA056252339; Thu, 15 Jun 1995 09:18:59 -0400
-Date: Thu, 15 Jun 1995 09:18:59 -0400 (EDT)
-From: "Jeff A. Earickson" <jaearick@colby.edu>
-To: Mills@huey.udel.edu
-Subject: More minor bugs in xntp3.4s
-In-Reply-To: <9506150022.aa12727@huey.udel.edu>
-Message-Id: <Pine.HPP.3.91.950615083549.4557A-100000@host5.colby.edu>
-Mime-Version: 1.0
-Content-Type: TEXT/PLAIN; charset=US-ASCII
-
-Dave,
- After reading the hpux hints file, I realized I didn't install or
-start adjtimed. In the course of doing this, I discovered that:
-
---> $(TOP) is not defined in adjtime/Makefile, so "make install" can't
- find the install.sh script.
-
---> "make install" from the main Makefile never goes into the adjtime
- directory, so I added the following two lines into the install
- target of the main Makefile:
-
- @echo installing from adjtime
- @cd adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" install
-
-This twiddle may not be right for all systems, but it got adjtimed
-installed for me.
-
- You might also want to add to the hpux hints file that one way to
-fire things up at boot time is to add the following lines to the localrc
-function of /etc/rc:
-
- #---daemons for Network Time Protocol (version 3.4s)
- #---note that adjtimed is only needed for HP-UX 9.X, not 10.0
- #---adjtimed must be running or xntpd won't work right...
- if [ -x /usr/local/bin/adjtimed ]; then
- /usr/local/bin/adjtimed -r & echo -n ' adjtimed'
- if [ -x /usr/local/bin/xntpd ]; then
- /usr/local/bin/xntpd & echo -n ' xntpd'
- fi
- fi
-
-I discovered that the "-r" option of adjtimed is needed to clear out any
-trash from a previous execution of it. Otherwise adjtimed quietly dies
-and leaves xntpd in the lurch...
-
-Thanks for the help.
-
-** Jeff A. Earickson, Ph.D PHONE: 207-872-3659
-** Senior UNIX Sysadmin, Information Technology EMAIL: jaearick@colby.edu
-** Colby College, 4214 Mayflower Hill, FAX: 207-872-3555
-** Waterville ME, 04901-8842
-
-On Thu, 15 Jun 1995 Mills@huey.udel.edu wrote:
-
-> Jeff,
->
-> Read the hpux file in the hints directory.
->
-> Dave
->
-
diff --git a/contrib/ntp/html/hints/linux b/contrib/ntp/html/hints/linux
deleted file mode 100644
index b06a36a..0000000
--- a/contrib/ntp/html/hints/linux
+++ /dev/null
@@ -1,5 +0,0 @@
-The kernel PLL interface is broken, I know.
-Update RSN.
-
- Torsten
- (duwe@informatik.uni-erlangen.de)
diff --git a/contrib/ntp/html/hints/mpeix b/contrib/ntp/html/hints/mpeix
deleted file mode 100644
index 83c7241e..0000000
--- a/contrib/ntp/html/hints/mpeix
+++ /dev/null
@@ -1,50 +0,0 @@
-HP e3000 MPE/iX NTP Hints - May 29, 2001
-----------------------------------------
-
-NTP was first ported to MPE several years ago, but those diffs were never
-submitted back to the official NTP distribution. For more information about
-that deprecated port, please see http://www.bixby.org/mark/xntpix.html.
-
-NTP was re-ported to MPE in May 2001. What follows are hints learned from
-working with NTP 4.0.99k23. For additional information about NTP on MPE,
-please see http://jazz.external.hp.com/src/hp_freeware/ntp/.
-
-MPE lacks the clock-related APIs expected by NTP, so adjtime(), gettimeofday(),
-and settimeofday() all had to be implemented from scratch by calling
-privileged, undocumented internal OS functions.
-
-Unfortunately the implementation of adjtime() has exposed a sub-second accuracy
-bug when slewing the system time. This bug is documented in SR 5003462838, and
-exists on all current versions of MPE. It has not been fixed at the time of
-this writing. The adjtime() code may possibly need to be altered if/when this
-bug is fixed.
-
-This bug has a side-effect whereby the ntpd daemon will screw up the hardware
-PDC clock time by many minutes if used for continuous clock adjustments or in
-the one-time -q mode. But note that you can safely run ntpd in order to become
-a time server if you include "disable ntp" in the ntp.conf configuration file.
-
-The one-time clock adjustment functionality of ntpdate and ntp_timeset is not
-affected by this bug side-effect. You can safely use these commands to alter
-your system time with reasonable accuracy.
-
-The only reference clock that has been tested on MPE is the local clock. So
-building NTP with --disable-all-clocks --enable-LOCAL_CLOCK is strongly
-recommended.
-
-NTP makes use of Privileged Mode (PM) capability in order to bind to the NTP
-network port (123) and to access the low-level clock functions.
-
-NTP was ported using the gcc compiler. Attempting to use the HP C/iX compiler
-is not recommended and has not been tested.
-
-Please note that NTP is not an HP product and is NOT supported by HP. The best
-place for asking MPE-specific questions about NTP is the HP3000-L mailing list
-at http://raven.utc.edu/Archives/hp3000-l.html or the associated Usenet
-newsgroup of comp.sys.hp.mpe.
-
-The original author of this port is:
-
-Mark Bixby
-HP CSY MPE Internet & Interoperability Engineer
-mark_bixby@hp.com
diff --git a/contrib/ntp/html/hints/netbsd b/contrib/ntp/html/hints/netbsd
deleted file mode 100644
index f5f628d..0000000
--- a/contrib/ntp/html/hints/netbsd
+++ /dev/null
@@ -1,37 +0,0 @@
-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/notes-xntp-v3 b/contrib/ntp/html/hints/notes-xntp-v3
deleted file mode 100644
index ba027f2..0000000
--- a/contrib/ntp/html/hints/notes-xntp-v3
+++ /dev/null
@@ -1,119 +0,0 @@
-Notes for NTP Version 3
-
-This version operates in much the same manner as Version 2 with the
-following changes and additions:
-
-1. The protocol machinery operates in conformance with the RFC1305 NTP
- Version 3 specification. The most visible characteristic of this
- version is that the poll intervals for all polls, even selected
- ones, is significantly increased. This is especially desirable when
- serving a large client population. This implementation supports
- previous versions as non-configured peers; for version-2 configured
- peers a "version 2" keyword should be included on the "peer" line.
-
-2. The configuration file has a new keyword: statfile <file>, where
- <file> is the name of a statistics file." When present, each clock
- update generates an entry of the form:
-
- <day> <sec>.<frac> <addr> <status> <offset> <delay> <disp>
-
- where <day> is the modified Julian day, <sec>.<frac> is the time of
- day, <addr> is the peer address and <status> is the peer status.
- The <offset>, <delay> and <disp> are the measured offset, delay and
- dispersion, respectively, of the peer clock relative to the local
- clock. About once per day the current file is closed and a new one
- created with names <file>.<gen>, where <gen> starts at one and
- increments for each new generation.
-
-3. A number of additional platforms are supported. See ./Config file
- for details.
-
-4. A driver for the TrueTime 468DC GOES Synchronized Clock is
- included. This driver (refclock_goes.c) should also work for other
- TrueTime radio clocks, since all use the same format.
-
-5. A replacement driver for the Spectracom 8170 WWVB Synchronized
- Clock is included. This driver (refclock_wwvb.c) (a) does not
- require a 1-pulse-per-second signal, (b) supports both format 0
- (original 8170) and format 2 (Netclock/2 and upgraded 8170), (c)
- can be connected to more than one computer and (d) automatically
- compensates for all serial baud rates.
-
-6. A driver for the German time/frequency station DCF77 is included.
- This requires a special STREAMS module.
-
-7. In Version 2 special line-discipline modules were required for the
- CHU and WWVB drivers. This code continues to work in Version 3,
- although it is no longer needed for the WWVB driver. However, this
- code does not work under STREAMS, as used in SunOS 4.1.1.
- Equivalent STREAMS modules are supplied with Version 3.
-
-8. Support for an external 1-pulse-per-second (pps) signal is
- provided. The signal is connected to a serial port (see
- xntpd/ntp_loopfilter.c for details). When present the leading edge
- of the pulse establishes the on-time epoch within an interval
- established by the selected radio clock or other NTP time server.
- Use of the pps is indicated when the tattletale displayed by ntpq
- changes from "*" to "o".
-
-9. The clock-selection and poll-update procedures have been modified
- slightly in order to achieve better performance on high speed LANs
- with compromise in performance on typical WANs.
-
-10. In order to comply with U.S. Commerce Department regulations, the DES
- encryption routine lib/authdes.c cannot be exported. For exportable
- versions of this distribution a DES-encrypted version of this routine
- lib/authdes.c.des is included along with an unencrypted version
- lib/authdes.c.export, which allows normal operation, but without the
- NTP authentication feature. Further information is available in the
- lib/authdes.c.export file.
-
-11. As an alternative to the DES-based authentication mechanism, an
- implementation of the RSA Message Digest 5 algorithm is provided.
- (see applicable copyright information in the library files).
-
-12. A driver for the Magnavox MX4200 GPS clock.
-
-13. A STREAMS module which captures carrier-detect data-lead transitions to
- connect a precision source of 1-pps, yet avoid the ugly overhead in the
- usual STREAMS processing. See the ppsclock subdirectory.
-
-14. Support for the Apple A/UX operating system and enhanced support for the
- Hewlet-Packard HP/UX operating system. See the various README and Config
- files for further information.
-
-See the COPYRIGHT file for authors and copyright information. Note that some
-modules in this distribution contain copyright information that supersedes
-the copyright information in that file.
-
-If I missed something or neglected to give due credit, please advise.
-
-David L. Mills
-University of Delaware
-31 May 1992, amended 23 July 1992, 25 October 1992
-
-Bugs and notes
-
-A bug in the original tty_clk_STREAMS.c module has been fixed.
-
-The poll-interval randomization feature of poll_update (in
-xntpd/ntp_proto.c) has been extended to apply when the poll interval is
-increased, as well as reduced. This spreads the update messages in time
-and helps avoid unpleasant bursts of messages.
-
-In the clock_select algorithm the peers selected for combining are
-limited to those survivors at the lowest stratum, not the entire list.
-This helps avoid whiplash when large numbers of peers are at the same
-stratum.
-
-The number formerly displayed by ntpq as "compliance" is now the time
-constant of integration.
-
-The DNS resolver xntpd/ntp_intres.c is now integrated into xntpd, making
-configuration of multiple hosts easier.
-
-System and peer event are now written to the system log at priority
-LOG_INFO.
-
-The leap-second code was fixed to avoid broadcasting leap warnings on
-all except the last day of June and December.
diff --git a/contrib/ntp/html/hints/parse b/contrib/ntp/html/hints/parse
deleted file mode 100644
index d252351..0000000
--- a/contrib/ntp/html/hints/parse
+++ /dev/null
@@ -1,105 +0,0 @@
-Compilation:
- Usual thing: rm -f Config.local ; make for vanilla
- make refconf for reference clock (e. g. DCF77)
-
-Directory contents:
-
- hints/PARSE - this file
-
- xntpd/refclock_parse.c
- - reference clock support for DCF77/GPS in xntp
- parse/parse.c
- - Reference clock data parser framework
- parse/parse_conf.c
- - parser configuration (clock types)
- parse/clk_meinberg.c
- - Meinberg clock formats (DCF U/A 31, PZF 535, GPS166)
- parse/clk_schmid.c
- - Schmid receiver (DCF77)
- parse/clk_rawdcf.c
- - 100/200ms pulses via 50 Baud line (DCF77)
- parse/clk_dcf7000.c
- - ELV DCF7000 (DCF77)
- parse/clk_trimble.c
- - Trimble SV6 GPS receiver
-
- If you want to add new clock types please check
- with kardel@informatik.uni-erlangen.de. These files
- implement the conversion of RS232 data streams into
- timing information used by refclock_parse.c which is
- mostly generic except for NTP configuration constants.
-
- parse/Makefile.kernel
- - *SIMPLE* makefile to build a loadable STREAMS
- module for SunOS 4.x / SunOS 5.x systems
-
- parse/parsestreams.c
- - SUN Streams module (loadable) for radio clocks
- This streams module is designed for SunOS 4.1.X.
-
- parse/parsesolaris.c
- - SUN Streams module (loadable) for radio clocks.
- This streams module is designed for SunOS 5.x
- Beware this is still new - so it might crash
- your machine (we have seen it working, though).
-
- parse/parsetest.c
- - simple test program for STREAMS module. Its so simple,
- that it doesn't even set TTY-modes, thus they got to
- be correct on startup - works for Meinberg receivers
-
- parse/testdcf.c
- - test program for raw DCF77 (100/200ms pulses)
- receivers
-
- include/parse.h - interface to "parse" module and more
- include/parse_conf.h
- - interface to "parse" configuration
-
- include/sys/parsestreams.h
- - STREAMS specific definitions
-
- scripts/support
- - scripts (perl & sh) for statistics and rc startup
- the startup scripts are used in Erlangen for
- starting the daemon on a variety of Suns and HPs
- and for Reference Clock startup on Suns
- These scripts may or may not be helpful to you.
-
-Supported clocks:
- Meinberg DCF U/A 31
- Meinberg PZF535/TCXO (Software revision PZFUERL 4.6)
- Meinberg PZF535/OCXO (Software revision PZFUERL 4.6)
- Meinberg GPS166 (Software version for Uni-Erlangen)
- ELV DCF7000 (not recommended - casual/emergency use only)
- Conrad DCF77 receiver (email: time@informatik.uni-erlangen.de)
- + level converter
- TimeBrick (email: time@informatik.uni-erlangen.de)
- Schmid Receiver Kit
- Trimble SV6 GPS receiver
-
-Addresses:
- Meinberg Funkuhren
- Auf der Landwehr 22
- 31812 Bad Pyrmont
- Germany
- Tel.: 05281/20 18
- FAX: 05281/60 81 80
-
- ELV Kundenservice
- Postfach 1000
- 26787 Leer
- Germany
- Tel.: 0491/60 08 88
-
- Walter Schmidt
- Eichwisrain 14
- 8634 Hombrechtikon
- Switzerland
-
-If you have problems mail to:
-
- time@informatik.uni-erlangen.de
-
-We'll help (conditions permitting)
-
diff --git a/contrib/ntp/html/hints/refclocks b/contrib/ntp/html/hints/refclocks
deleted file mode 100644
index 17e7643..0000000
--- a/contrib/ntp/html/hints/refclocks
+++ /dev/null
@@ -1,35 +0,0 @@
-This is a short overview for the reference clocks currently supported
-by xntp V3. (Ultimate wisdom can be obtained from xntpd/refclock_*.c
-this file was derived from that information - unfortunately some comments
-in the files tend to get stale - so use with caution)
-
-Refclock address Type
-127.127.0.x no clock (fails to configure)
-127.127.1.x local clock - use local clock as reference
-127.127.2.x no clock (fails to configure)
-127.127.3.x PSTI 1010/1020 WWV Clock
-127.127.4.x SPECTRACOM WWVB receiver 8170 and Netclock/2
-127.127.5.x Kinimetric Truetime 468-DC GOES receiver
-127.127.6.x IRIG audio decode (Sun & modified BSD audio driver)
-127.127.7.x CHU Timecode (via normal receiver & Bell 103 modem)
-127.127.8.x PARSE (generic driver for a bunch of DCF/GPS clocks
- can be extended for other clocks too)
- 8.0-3 Meinberg PZF535/TCXO
- 8.4-7 Meinberg PZF535/OCXO
- 8.8-11 Meinberg DCF U/A 31
- 8.12-15 ELV DCF7000
- 8.16-19 Walter Schmid DCF receiver (Kit)
- 8.20-23 Conrad DCF77 receiver module + level converter (Kit)
- 8.24-27 TimeBrick (limited availability ask
- time@informatik.uni-erlangen.de)
- 8.28-31 Meinberg GPS166
- 8.32-35 Trimble SV6 GPS receiver
-127.127.9.x MX4200 GPS receiver
-127.127.10.x Austron 2201A GPS Timing Receiver
-127.127.11.x Kinemetrics Truetime OM-DC OMEGA Receiver
-127.127.12.x KSI/Odetecs TPRO-S IRIG-B / TPRO-SAT GPS
-127.127.13.x Leitch: CSD 5300 Master Clock System Driver
-127.127.14.x MSFEES
-127/127.15.x TrueTime GPS/TM-TMD
-127.127.16.x Bancomm GPS/IRIG Ticktock
-127.127.17.x Datum Programmable Time System
diff --git a/contrib/ntp/html/hints/rs6000 b/contrib/ntp/html/hints/rs6000
deleted file mode 100644
index 8561ac2..0000000
--- a/contrib/ntp/html/hints/rs6000
+++ /dev/null
@@ -1,56 +0,0 @@
-15.7.1993
-xntp3 compiles now again on AIX. I have disabled prototyping and added
-the switch -D_NO_PROTO which disables prototyping in the system include
-files.
-
-Matthias Ernst maer@nmr.lpc.ethz.ch
---------------------------------------------------------------------------------
-Xntp version 3 now support the cc compiler for AIX.
-The Config.aix will now use cc by default. You can still compile xntp
-with the bsd compiler by changing "COMP= cc" to "COMP= bsdcc" and
-and removing the "-DSTUPID_SIGNAL" option from the "DEFS" option.
-
-xntp and tickadj was also modified so that the value of tickadj is read
-form the kernel and can be set by tickadj. For now I would not set
-tickadj below 40 us.
-
-Bill Jones
-jones@chpc.utexas.edu
--------------------------------------------------------------------------------
-
-This is a modified version of xntp version 3 for the RS6000. It works for
-AIX 3.2 and these are the same changes as have been applied tothe version 2
-implementation of xntp. It works fine for us but I have not tested all of
-the features, especially the local clock support for the RS6000 is not tested
-at all.
-
-Matthias Ernst, ETH-Zuerich, Switzerland - maer@nmr.lpc.ethz.ch
-
---------------------------------------------------------------------------------
-
-Here the original README.rs6000 for the version 2 implementation:
-
-A hacked version of xntp for the IBM RS/6000 under AIX 3.1 can be found
-in xntp.rs6000.tar.Z. [ if still available at all - Frank Kardel 93/12/3 ]
-
-This will not work on older versions of AIX due to a kernel bug; to find
-out whether you have the kernel bug, compile and run testrs6000.c (see
-comments in the code for instructions).
-
-xntp and testrs6000 require "bsdcc" to compile. This is simply another
-entry point into the xlc compiler with various options set for BSD
-compatibility. If your system does not have bsdcc, do the following:
-
-link /bin/bsdcc to /bin/xlc
-
-put the following into /etc/xlc.cfg:
-
-* BSD compatibility
-bsdcc: use = DEFLT
- crt = /lib/crt0.o
- mcrt = /lib/mcrt0.o
- gcrt = /lib/gcrt0.o
- libraries = -lbsd, -lc
- proflibs = -L/lib/profiled,-L/usr/lib/profiled
- options = -H512,-T512, -qlanglvl=extended, -qnoro, -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO, -tp,-B/lib/
-
diff --git a/contrib/ntp/html/hints/sco.htm b/contrib/ntp/html/hints/sco.htm
deleted file mode 100644
index 2273faa..0000000
--- a/contrib/ntp/html/hints/sco.htm
+++ /dev/null
@@ -1,39 +0,0 @@
-<HTML>
-<HEAD>
- <TITLE>SCO Unix hints</TITLE>
-</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>.
-
- <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.
-
- <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>
- Run &quot;ntpd&quot; with a high negative nice-value, i.e.
- &quot;nice --19 ntpd&quot; for best results.
-
- <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>
- <A HREF="mailto:kees@echelon.nl">Kees Hendrikse</A>, January 1999
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/hints/sco.html b/contrib/ntp/html/hints/sco.html
deleted file mode 100644
index bd08e98..0000000
--- a/contrib/ntp/html/hints/sco.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!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/sgi b/contrib/ntp/html/hints/sgi
deleted file mode 100644
index 5e4f7de..0000000
--- a/contrib/ntp/html/hints/sgi
+++ /dev/null
@@ -1,74 +0,0 @@
-adjtime, tick and tickadj:
---------------------------
-
-The SGI value for HZ is 100 under Irix 4, with the system clock running
-in nominal mode (ftimer off), so the value for tick is 10000 usec.
-Tickadj is a bit more tricky because of the behaviour of adjtime(),
-which seems to try to perform the correction over 100-200 seconds, with
-a rate limit of 0.04 secs/sec for large corrections. Corrections of
-less than 0.017 seconds generally complete in less than a second,
-however.
-
-Some measured rates are as follows:
-
- Delta Rate (sec/sec)
-
- > 1 0.04
- 0.75 0.04
- 0.6 0.004
- 0.5 0.004
- 0.4 0.0026
- 0.3 0.0026
- 0.2 0.0013
- 0.1 0.0015
- 0.05 0.0015
- 0.02 0.0003
- 0.01 0.015
-Strange. Anyway, since adjtime will complete adjustments of less than
-17msec in less than a second, whether the fast clock is on or off, I
-have used a value of 150usec/tick for the tickadj value.
-
-Fast clock:
------------
-
-I get smoother timekeeping if I turn on the fast clock, thereby making
-the clock tick at 1kHz rather than 100Hz. With the fast clock off, I
-see a sawtooth clock offset with an amplitude of 5msec. With it on,
-the amplitude drops to 0.5msec (surprise!). This may be a consequence
-of having a local reference clock which spits out the time at exactly
-one-second intervals - I am probably seeing sampling aliasing between
-that and the machine clock. This may all be irrelevant for machines
-without a local reference clock. Fiddling with the fast clock doesn't
-seem to compromise the above choices for tick and tickadj.
-
-I use the "ftimer" program to switch the fast clock on when the system
-goes into multiuser mode, but you can set the "fastclock" flag in
-/usr/sysgen/master.d/kernel to have it on by default. See ftimer(1).
-
-timetrim:
----------
-
-Irix has a kernel variable called timetrim which adjusts the system
-time increment, effectively trimming the clock frequency. Xntpd could
-use this rather than adjtime() to do it's frequency trimming, but I
-haven't the time to explore this. There is a utility program,
-"timetrim", in the util directory which allows manipulation of the
-timetrim value in both SGI and xntpd native units. You can fiddle with
-default timetrim value in /usr/sysgen/master.d/kernel, but I think
-that's ugly. I just use xntpd to figure out the right value for
-timetrim for a particular CPU and then set it using "timetrim" when
-going to multiuser mode.
-
-Serial I/O latency:
--------------------
-
-If you use a local clock on an RS-232 line, look into the kernel
-configuration stuff with regard to improving the input latency (check
-out /usr/sysgen/master.d/[sduart|cdsio]). I have a Kinemetrics OM-DC
-hooked onto /dev/ttyd2 (the second CPU board RS-232 port) on an SGI
-Crimson, and setting the duart_rsrv_duration flag to 0 improves things
-a bit.
-
-
-12 Jan 93
-Steve Clift, CSIRO Marine Labs, Hobart, Australia (clift@ml.csiro.au)
diff --git a/contrib/ntp/html/hints/solaris-dosynctodr.html b/contrib/ntp/html/hints/solaris-dosynctodr.html
deleted file mode 100644
index 89a12b2..0000000
--- a/contrib/ntp/html/hints/solaris-dosynctodr.html
+++ /dev/null
@@ -1,321 +0,0 @@
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-
-
-<!-- Sun Template V4.0 9/9/98 -->
-<HTML>
-<HEAD>
-<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">
-
-<!-- INSERT YOUR META TAGS HERE -->
-
-<META NAME="PUBLISHED_DATE" CONTENT="">
-<META NAME="KEYWORDS" CONTENT="">
-<META NAME="DESCRIPTION" CONTENT="">
-
-<!-- END META TAGS -->
-
-<LINK REL="Stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style">
-
-</HEAD>
-<!--stopindex-->
-<BODY BGCOLOR="#FFFFFF" LINK="#666699" ALINK="#FFFFFF">
-
-
-<TABLE WIDTH="623" BORDER="0" CELLSPACING="0" CELLPADDING="0">
- <TR>
- <TD COLSPAN="2" VALIGN="TOP" WIDTH="623">
- <IMG BORDER="0" SRC="/images/homebuy.gif" WIDTH="149" HEIGHT="32" ALT="Home * Buy * My Sun(sm)" USEMAP="#lefttop"><IMG BORDER="0" SRC="/images/globalnavbar.gif" WIDTH="474" HEIGHT="32" ALT="sun.com Global Sections" USEMAP="#topnav"></TD>
- </TR>
- <TR>
- <TD COLSPAN="2" VALIGN="TOP" WIDTH="623">
-
- <!-- TITLEBAR IMAGE: INSERT CUSTOMIZED TITLEBAR IMAGE BELOW -->
-
- <A HREF="http://www.sun.com/"><IMG BORDER="0" SRC="/images/sunlogo.gif" WIDTH="149" HEIGHT="72" ALT="Sun Microsystems"></A><IMG BORDER="0" SRC="/images/titlebar/doc.title.gif" WIDTH="474" HEIGHT="72"></TD>
- </TR>
- <!-- Begin Search Elements -->
- <TR VALIGN="top">
- <TD BGCOLOR="#666699">
- <TABLE BORDER="0" WIDTH="157" CELLSPACING="0" CELLPADDING="0">
- <TR>
- <TD BGCOLOR="#666699" COLSPAN="2" WIDTH="157" VALIGN="TOP"><IMG BORDER="0" SRC="/images/search/contract/search1.gif" WIDTH="157" HEIGHT="16" ALT="Search SunSolve"></TD>
- </TR>
- <TR>
- <TD VALIGN="top" ALIGN="center" WIDTH="141" BGCOLOR="#666699"><FORM ACTION="search.pl" METHOD="POST"><FONT SIZE="2"><INPUT TYPE="text" NAME="zone_32" SIZE="14"></FONT><input type=hidden name=mode value=results><BR>
-<INPUT TYPE="image" SRC="/images/search/contract/search5.gif" BORDER="0" NAME="Search"><IMG SRC="/images/cg_clear.gif" ALT="" WIDTH="2" HEIGHT="1" BORDER="0" HSPACE="29" VSPACE="0"><BR>
-
-<A HREF="search.pl?mode=advanced"><IMG BORDER="0" SRC="/images/search/contract/search3.gif" WIDTH="144" HEIGHT="16" ALT="Advanced Search"></A><BR>
-
-<A HREF="search.pl?mode=product"><IMG SRC="/images/search/contract/search4.gif" BORDER="0" ALT="Product Search" WIDTH="144" HEIGHT="19"></A><BR>
-
-<A HREF="show.pl?target=help/search_tips"><IMG SRC="/images/search/contract/search6.gif" BORDER="0" ALT="Search Tips" WIDTH="144" HEIGHT="27"></A></TD>
- <TD ALIGN="right"><IMG SRC="/images/search/contract/search2.gif" ALT="" WIDTH="13" HEIGHT="117" BORDER="0"></TD>
- </TR>
- <!-- End Search Elements -->
- <!-- Begin User Personalization (Must limit to 10 Characters)-->
- <TR>
- <TD COLSPAN="2"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="157"><TR><TD COLSPAN="3" ALIGN="right"><IMG SRC="/images/home_con/welcom_1.gif" ALT="" WIDTH="156" HEIGHT="4" BORDER="0"></TD></TR>
- <TR><TD BGCOLOR="#333366"><IMG SRC="/images/home_con/welcom_2.gif" ALT="" WIDTH="17" HEIGHT="19" BORDER="0"></TD><TD BGCOLOR="#333366" VALIGN="middle"><NOBR><FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" COLOR="#99CC33" SIZE="-2">sopko</FONT></NOBR></TD><TD BGCOLOR="#333366" ALIGN="right"><A HREF="edit-user-form.pl?viewmode=contractuser"><IMG SRC="/images/home_con/welcom_3.gif" ALT="Edit" WIDTH="45" HEIGHT="19" BORDER="0"></A></TD></TR>
- </TABLE>
- </TD>
- </TR>
- <!-- End User Personalization -->
-
- <TR>
- <TD COLSPAN="2" ALIGN="right" VALIGN="top" WIDTH="157" BGCOLOR="#666699"><IMG BORDER="0" SRC="/images/ssolvecontents.gif" WIDTH="157" HEIGHT="37" ALT="Contents Of SunSolve"><BR>
-
-
-
-
-
- <!-- PILLS: CHANGE THE PILL FOR CURRENT SECTION TO THE HIGHLIGHTED PILL -->
- <!-- Beginning of Nav area -->
-<A HREF="show.pl?target=patches/patch-access" onmouseover="window.status='All Public Patches'; return true" onmouseout="window.status=''; return true">
-<IMG BORDER="0" SRC="/images/nav/p1.gif" WIDTH="157" HEIGHT="19" ALT="All Public Patches"></A><BR>
-<A HREF="suncourier.pl" onmouseover="window.status='Submit a Service Order'; return true" onmouseout="window.status=''; return true">
-<IMG BORDER="0" SRC="/images/nav/p5.gif" WIDTH="157" HEIGHT="19" ALT="Submit a Service Order"></A><BR>
-<A HREF="show.pl?target=resources/tools" onmouseover="window.status='Diagnostic Tools'; return true" onmouseout="window.status=''; return true">
-<IMG BORDER="0" SRC="/images/nav/p4.gif" WIDTH="157" HEIGHT="19" ALT="Diagnostic Tools"></A><BR>
-<A HREF="show.pl?target=help/collections" onmouseover="window.status='Support Docs.'; return true" onmouseout="window.status=''; return true">
-<IMG BORDER="0" SRC="/images/nav/cp2.gif" WIDTH="157" HEIGHT="19" ALT="Support Docs."></A><BR>
-<A HREF="show.pl?target=resources/y2k" onmouseover="window.status='Y2K Central'; return true" onmouseout="window.status=''; return true">
-<IMG BORDER="0" SRC="/images/nav/p3.gif" WIDTH="157" HEIGHT="19" ALT="Y2K Central"></A><BR>
-<A HREF="show.pl?target=security/sec" onmouseover="window.status='Security Information'; return true" onmouseout="window.status=''; return true">
-<IMG BORDER="0" SRC="/images/nav/p2.gif" WIDTH="157" HEIGHT="19" ALT="Security Information"></A><BR>
-<br><table cellpadding="0" cellspacing="0" border="0" width="157">
-<tr><td width="8">&nbsp;</td><td width="149">
-<table cellpadding="0" cellspacing="0" border="0">
-<BR><tr><td><BR><img src="/images/line.gif" alt="------" width="140" height="11" border="0"><br>
- <A HREF="mark.pl"
- onmouseover="window.status='Marked Docs.';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Marked Docs.</FONT></A><BR>
- <A HREF="notify.pl"
- onmouseover="window.status='Notifications';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Notifications</FONT></A><BR>
- <A HREF="/plain-cgi/show.pl?target=home_con"
- onmouseover="window.status='Low Graphics';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Low Graphics</FONT></A><BR>
- <A HREF="show.pl?target=link"
- onmouseover="window.status='SunSolve Servers';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">SunSolve Servers</FONT></A><BR>
- <A HREF="show.pl?target=about_sunsolve"
- onmouseover="window.status='About SunSolve';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">About SunSolve</FONT></A><BR>
- <A HREF="feedback.pl"
- onmouseover="window.status='Contact Us';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Contact Us</FONT></A><BR>
- <A HREF="show.pl?target=help/sitemap"
- onmouseover="window.status='Site Map';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Site Map</FONT></A><BR>
- <A HREF="show.pl?target=article/article"
- onmouseover="window.status='Articles';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Articles</FONT></A><BR>
- <A HREF="show.pl?target=home_con"
- onmouseover="window.status='Home';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Home</FONT></A><BR>
- <A HREF="show.pl?target=help/faq"
- onmouseover="window.status='Help';return true"
- onmouseout="window.status='';return true">
- <font class="locallink" color="#dddddd">Help</FONT></A><BR>
-<br></td></tr></table></td></tr></table>
-<!-- End of Nav area -->
-
- </FORM>
- <br><br><!-- some spacers -->
- </TD>
- </TR>
- </TABLE>
- </TD>
- <TD VALIGN="TOP" WIDTH="466">
-
-
- <!--startindex-->
- <!-- ============ -->
- <!-- MAIN CONTENT -->
- <!-- ============ -->
-
-
-
-<table width=100% cellpadding=16 cellspacing=0 border=0>
- <tr>
-<td width=100% valign=top>
-<CENTER><FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" SIZE="2">
-[&nbsp;<a href="retrieve.pl?type=0&doc=srdb%2F19195&display=plain">Printer Friendly Page</a>&nbsp;]
-[&nbsp;<b>Was this document useful? <a href="retrieve.pl?type=0&doc=srdb/19195&vote=yes">Yes</a> or <a href="retrieve.pl?type=0&doc=srdb/19195&vote=no">No</a></b>&nbsp;]<br>[&nbsp;<a href="notify.pl?action=add&doc=srdb%2F19195&type=synopsis">Notify if Document Changes</a>&nbsp;]
-[&nbsp;<a href="mark.pl?action=add&doc=srdb%2F19195&type=0">Mark Document for Download</a>&nbsp;]<br>[&nbsp;<a href="notify.pl">View/Edit Notifications</a>&nbsp;]
-[&nbsp;<a href="mark.pl">View/Edit Marked Documents</a>&nbsp;]<br></FONT></CENTER><br>
- <SCRIPT Language="JavaScript">
- <!-- Hide javascript from older browsers
- function jump()
- {
- var ctl = document.docform.jumplist;
- location.href = ctl.options[ctl.selectedIndex].value;
- }
- // End hiding contents -->
- </SCRIPT>
-<a name="top">
-<form name="docform"><div align=center><font size=2> Jump to <select name="jumplist" size=1 onchange="jump();"></font><option value="#Hardware">Hardware</option>
-<option value="#Product">Product</option>
-<option value="#Product-Area">Product Area</option>
-<option value="#Synopsis">Synopsis</option>
-<option value="#Problem-Description">Problem Description</option>
-<option value="#Document-Content">Document Content</option>
-<option value="#Problem-Solution">Problem Solution</option>
-<option value="#SRDB-ID">SRDB ID</option>
-<option value="#OS">OS</option>
-</select></div></form>
-<table width=100% cellpadding=2 cellspacing=0 border=0>
-<tr bgcolor=#666699><td><font size=2 color=#ffffff><b>SRDB ID</b></font></td>
-<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
-<td><font size=2 color=#ffffff><b>Synopsis</b></font></td>
-<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
-<td><font size=2 color=#ffffff><b>Date</b></font></td>
-</tr>
-<tr bgcolor=#CCCCE7><td><font size=2><b>19195</b></font></td>
-<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
-<td><font size=2><b>Upgraded to 2.6, using xntpd, but the system clock is drifting. Worked fine</b></font></td>
-<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
-<td><font size=2><b>4 Sep 1999</b></font></td>
-</tr>
-</table><br clear>
-<table width=100% cellpadding=2 cellspacing=0 border=0><tr bgcolor=#999999>
-<td><font size=2 color=#ffffff><b><a name=Problem-Description>Problem Description</a></b></font></td>
-<td align=right><b><a href="#top"><font size=2 color=#ffffff>Top</font></a></b></td></tr></table>
-<pre>Ever since upgrading to Solaris 2.6, the system clock has been drifting and
-there are messages like 'synchronisation lost', 'Previous time adjustment
-didn''t complete' and 'time reset (step)' a lot in the /var/adm/messages
-file. The system either was previously working fine with the freeware
-xntpd or the configuration was copied from another system that was
-using the freeware version.
--- 23-Apr-99 08:22 US/Eastern --</pre><table width=100% cellpadding=2 cellspacing=0 border=0><tr bgcolor=#999999>
-<td><font size=2 color=#ffffff><b><a name=Problem-Solution>Problem Solution</a></b></font></td>
-<td align=right><b><a href="#top"><font size=2 color=#ffffff>Top</font></a></b></td></tr></table>
-<pre>The common lore for setting up xntpd on Solaris using
-the freeware version included the warning to set the
-kernel variable <font color=red>dosynctodr</font> to 0 in the /etc/system
-file thus: set <font color=red>dosynctodr</font>=0
-
-When using NTP on Solaris 2.6 or later, the kernel
-variable MUST be left at the default value of 1. Prior
-to 2.6 this variable controlled whether or not to rein
-in the softclock using the hardware clock, with the result
-that NTP and the hardware clock would fight for control of
-the soft clock; thus before 2.6 you had to set <font color=red>dosynctodr</font>
-to 0. At 2.6, every system call that adjusts the softclock
-also sets the hard clock, thus while NTP controls the soft
-clock, the hard clock is also controlled. Setting
-<font color=red>dosynctodr</font> to 0 reverts the behavior back to the pre 2.6
-defaulkt behavior, having exactly the opposite effect
-as that intended.
-
-Do not set <font color=red>dosynctodr</font> to 0.</pre><table width=100% cellpadding=2 cellspacing=0 border=0>
-<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Product-Area>Product Area</a></b></font></td>
-<td bgcolor=#cccccc valign=top width=75%><font size=2>Bundled Network</font></td></tr>
-<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Product>Product</a></b></font></td>
-<td bgcolor=#cccccc valign=top width=75%><font size=2>NTP</font></td></tr>
-<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=OS>OS</a></b></font></td>
-<td bgcolor=#cccccc valign=top width=75%><font size=2>Solaris 2.6</font></td></tr>
-<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Hardware>Hardware</a></b></font></td>
-<td bgcolor=#cccccc valign=top width=75%><font size=2>Ultra 2</font></td></tr>
-<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Document-Content>Document Content</a></b></font></td>
-<td bgcolor=#cccccc valign=top width=75%><font size=2>with freeware xntpd.</font></td></tr>
-</table><br clear>
-<font size=2><a href="#top">Top</a></font><br><br>
-</td></tr></table>
-
- <!-- =================== -->
- <!-- END OF MAIN CONTENT -->
- <!-- =================== -->
- <!--stopindex-->
-
- <!-- DON'T CHANGE INFORMATION OTHER THAN titlebar BELOW THIS LINE -->
-
- <!-- Altered Table Structure from Template to format properly with new design -->
- </TD>
- </TR>
- <TR>
- <TD>&nbsp;</TD>
- <TD VALIGN="top">
- <center>
- <IMG SRC="/images/cg_grey_line.gif" ALT="" WIDTH="466" HEIGHT="2" BORDER="0"><BR>
- <IMG SRC="/images/cg_clear.gif" ALT="" WIDTH="1" HEIGHT="2" BORDER="0" HSPACE="0" VSPACE="4">
- </center>
- <CENTER>
- <FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" SIZE="2">
- [ <A HREF="edit-user-form.pl?viewmode=contractuser">Edit Account</A> ]
- [ <A HREF="show.pl?target=patches/patch-access">Patches</A> ]
- [ <A HREF="suncourier.pl">Submit a Service Order</A> ]<br>
- [ <A HREF="show.pl?target=resources/tools">Diagnostic Tools</A> ]
- [ <A HREF="show.pl?target=help/collections">Support Docs.</A> ]
- [ <A HREF="show.pl?target=resources/y2k">Y2K Central</A> ]
- [ <A HREF="show.pl?target=security/sec">Security Information</A> ] <br>
- [ <A HREF="show.pl?target=link">SunSolve Servers </A> ]
- [ <A HREF="show.pl?target=about_sunsolve">About SunSolve</A> ]
- [ <A HREF="feedback.pl">Contact Us</A> ]
- [ <A HREF="show.pl?target=help/sitemap">Site Map</A> ]
- [ <A HREF="show.pl?target=article/article">Articles</A> ]
- [ <A HREF="show.pl?target=home_con">Home</A> ]
- [ <A HREF="show.pl?target=help/faq">Help</A> ]
- </FONT>
- </CENTER>
-
-<!-- MAPS -->
-<MAP NAME="lefttop">
-<AREA SHAPE="rect" HREF="http://www.sun.com/MySun/" ALT="My Sun" COORDS="89,0 149,32">
-<AREA SHAPE="rect" HREF="show.pl?target=home_con" ALT="Home" COORDS="0,0 42,32">
-<AREA SHAPE="rect" HREF="http://www.sun.com/sales/" ALT="Buy" COORDS="54,0 78,32">
-</MAP>
-
-
-<MAP NAME="topnav">
-<AREA SHAPE="rect" HREF="http://www.sun.com/java/" ALT="Java Technologies" COORDS="4,0,67,32">
-<AREA SHAPE="rect" HREF="http://www.sun.com/products-n-solutions/" ALT="Products and Solutions" COORDS="74,0,141,32">
-<AREA SHAPE="rect" HREF="http://www.sun.com/service/" ALT="Support, Education, and Consulting" COORDS="148,0,249,32">
-<AREA SHAPE="rect" HREF="http://www.sun.com/tech/" ALT="Technology and Research" COORDS="261,0,324,32">
-<AREA SHAPE="rect" HREF="http://www.sun.com/developers/developers.html" ALT="For Developers" COORDS="334,0,396,32">
-<AREA SHAPE="rect" HREF="http://www.sun.com/corporateoverview/" ALT="Corporate Information" COORDS="406,0,482,32">
-</MAP>
-
-<!-- INSERT titlebar HREFS BELOW -->
-<MAP NAME="titlebar">
-<!-- LINK TO SEC HOME Removed because no longer needed on this template -->
-<AREA SHAPE="rect" HREF="/visual/home/" ALT="SunSolve Online(tm)" COORDS="0,21,215,51"> <!-- LINK TO CURRENT PILL HOME -->
-</MAP>
-
-
-<!-- begin copyright notice -->
-
-<BR>
-<CENTER>
-<FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" COLOR="#999999" SIZE="2">
-<br>
-Copyright 1994-1999 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.
-<br>
-All rights reserved.
-<a href="http://www.sun.com/share/text/SMICopyright.html">Legal Terms</a>.
-<a href="http://www.sun.com/privacy/">Privacy Policy</a>.
-</font>
-</CENTER>
-
-<!-- end copyright notice -->
-
- </TD>
- </TR>
-</TABLE>
-
-</BODY>
-</HTML>
-
diff --git a/contrib/ntp/html/hints/solaris.html b/contrib/ntp/html/hints/solaris.html
deleted file mode 100644
index 7161d5d..0000000
--- a/contrib/ntp/html/hints/solaris.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<HTML>
-<HEAD>
-<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.
-<BR>
-Last Updated: Sun Jun 21 01:32:18 EDT 1998,
-John Hawkinson,
-<! -- This is deliberately not a mailto -- > &lt;jhawk@MIT.EDU&gt;
-<P>
-If you're not running Solaris 2.5.1 or later, it is likely
-that you will have problems; upgrading would be a really good plan.
-<P>
-<H3>All Solaris versions</H3>
-<P>
- We have a report that says starting with Solaris 2.6 we should leave
- <I>dosynctodr</I> alone.
- <A HREF="solaris-dosynctodr.html">Here is the report</A>.
-<P>
-Proper operation of ntp under Solaris may require setting the kernel
-variable <I>dosynctodr</I> to zero (meaning "do not synchronize the clock
-to the hardware time-of-day clock"). This can be done with the
-tickadj utility:
-<BLOCKQUOTE><TT>
-tickadj -s
-</TT></BLOCKQUOTE>
-If you prefer, it can also be done with the native Solaris kernel debugger:
-<BLOCKQUOTE><TT>
-echo dosynctodr/W0 | adb -k -w /dev/ksyms /dev/mem
-</BLOCKQUOTE></TT>
-<P>
-Or, it can also be set by adding a line to /etc/system:
-<BLOCKQUOTE><TT>
-set dosynctodr = 0
-</BLOCKQUOTE></TT>
-<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.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>
-<I>nsec_per_tick</I> and <I>usec_per_tick</I> control the number of
-nanoseconds and microseconds, respectively, added to the system clock
-each clock interrupt. Enterprising souls may set these based on
-information collected by ntpd in the <CODE>/etc/ntp.drift</CODE> file
-to correct for individual hardware variations.
-<P>
-On UltraSPARC systems, <I>nsec_per_tick</I> and <I>usec_per_tick</I>
-are ignored in favor of the <I>cpu_tick_freq</I> variable, which
-should be automatically be determined by the PROM in an accurate
-fashion.
-<P>
-In general, the same ntp binaries should not be used across multiple
-operating system releases. There is enough variation in the core operating
-system support for timekeeping that a rebuild of ntpd for the idiosyncracies
-of your specific operating system version is advisable.
-<P>
-It is recommended that ntp be started via a script like <A
-HREF="solaris.xtra.S99ntpd">this one</A>, installed in
-<CODE>/etc/init.d/ntpd</CODE> with a symbol link from
-<CODE>/etc/rc2.d/S99ntpd</CODE>.
-
-<H3>Solaris 2.6</H3>
-<P>
-Solaris 2.6 adds support for kernel PLL timekeeping, but breaks this
-support in such a fashion that using it worse than not. This is <A
-HREF="solaris.xtra.4095849"> SUN Bug ID 4095849</A>, and it is not yet
-fixed as of June 1998.
-<P>
-<H3>Solaris 2.5 and 2.5.1</H3>
-<P>
-On UltraSPARC systems, calculation of <I>cpu_tick_freq</I> is broken
-such that values that are off by significant amounts may be used
-instead. This unfortunately means that ntpd may have severe problems
-keeping synchronization. This is <A HREF="solaris.xtra.4023118"> SUN Bug ID
-4023118</A>. Bryan Cantrill <! -- &lt;bmc@eng.sun.com&gt; --> of Sun
-posted <A HREF="solaris.xtra.patchfreq">patchfreq</A>, a workaround script,
-to comp.protocols.time.ntp in March of 1997.
-<P>
-<HR>
-<H2>OLD DATA</H2>
-<STRONG>I can't vouch for the accuracy the information below this
-rule. It may be significantly dated or incorrect.</STRONG>
-<P>
-<P>
-<H3>Solaris 2.2</H3>
-<P>
-Solaris 2.2 and later contain completely re-written clock code to
-provide high resolution microsecond timers. A benefit of the
-re-written clock code is that adjtime does not round off its
-adjustments, so ntp does not have to compensate for this
-rounding. Under Solaris 2.2 and later, ntp #define's
-<CODE>ADJTIME_IS_ACCURATE</CODE>, and does not look for the <I>tickadj</I>
-kernel variable.
-<P>
-<H3>Solaris 2.1</H3>
-(This originally written by William L. Jones &lt;jones@chpc.utexas.edu&gt;)
-<P>
-Solaris 2.1 contains fairly traditional clock code, with <I>tick</I>
-and <I>tickadj</I>.
-<P>
-Since settimeofday under Solaris 2.1 only sets the seconds part of timeval
-care must be used in starting xntpd. I suggest the following start
-up script:
-<BLOCKQUOTE><TT>
-tickadj -s -a 1000
-<BR>ntpdate -v server1 server2
-<BR>sleep 20
-<BR>ntpdate -v server1 server2
-<BR>sleep 20
-<BR>tickadj -a 200
-<BR>xntpd
-</TT></BLOCKQUOTE>
-
-The first tickadj turns of the time of day clock and sets the tick
-adjust value to 1 millisecond. This will insure that an adjtime value
-of at most 2 seconds will complete in 20 seconds.
-<P>
-The first ntpdate will set the time to within two seconds
-using settimeofday or it will adjust time using adjtime.
-<P>
-The first sleep insures the adjtime has completed for the first ntpdate.
-<P>
-The second ntpdate will use adjtime to set the time of day since the
-clock should be within 2 seconds of the correct time.
-<P>
-The second tickadj set the tick adjust system value to 5 microseconds.
-<P>
-The second sleeps insure that adjtime will complete before starting
-the next xntpd.
-<P>
-I tried running with a tickadj of 5 microseconds with out much success.
-200 microseconds seems to work well.
-<P>
-<HR>
-Prior versions of this file had major text contributed by:
-<MENU>
-<LI>Denny Gentry &lt;denny@eng.sun.com&gt;
-</MENU>
-<BODY>
-</HTML>
diff --git a/contrib/ntp/html/hints/solaris.xtra.4023118 b/contrib/ntp/html/hints/solaris.xtra.4023118
deleted file mode 100644
index 84c5d15..0000000
--- a/contrib/ntp/html/hints/solaris.xtra.4023118
+++ /dev/null
@@ -1,36 +0,0 @@
- Bug Id: 4023118
- Category: kernel
- Subcategory: other
- State: integrated
- Synopsis: sun4u doesn't keep accurate time
- Description:
-
-[ bmc, 12/20/96 ]
-
-The clock on a sun4u drifts unacceptably. On a typical 143 mHz Ultra,
-the clock took 1.0001350 seconds to count 1 second. While this may seem
-trivial, it adds up quickly. In this case, the TOD chip will have to
-pull the clock forward by 2 seconds every 4 hours and 7 minutes.
-This drift rate is so high, that the clock is close to being too broken
-for NTP to guarantee correctness (in order for NTP's mechanism to work,
-it must be assured that the local clock drifts no more than 20 ms in 64
-seconds; this particular 143 mHz Ultra will drift by nearly 9 ms in that
-period). This problem has been reproduced on virtually all sun4u
-classes.
-
-The fundamental problem lies in the kernel's perception of ticks per
-second. The PROM is responsible for determining this figure exactly,
-and the kernel extracts it into the variable cpu_tick_freq. On sun4u's,
-this number is disconcertingly round: 143000000, 167000000, 248000000,
-etc. Indeed, a simple experiment revealed that these numbers were
-quite far from the actual ticks per second. Typical was the 143 mHz
-Ultra which was discovered to tick around 142,980,806 (+/- 10) times
-per second.
-
- Work around:
-
- Integrated in releases: s297_27
- Duplicate of:
- Patch id:
- See also:
- Summary:
diff --git a/contrib/ntp/html/hints/solaris.xtra.4095849 b/contrib/ntp/html/hints/solaris.xtra.4095849
deleted file mode 100644
index 8d3ce80..0000000
--- a/contrib/ntp/html/hints/solaris.xtra.4095849
+++ /dev/null
@@ -1,74 +0,0 @@
- Bug Id: 4095849
- Category: kernel
- Subcategory: syscall
- State: evaluated
- Synopsis: time_constant value >6 with PLL in use leads to integer divide
- zero trap panic
- Description:
-If the time_constant parameter is 7 or higher, and the phase-lock looping model
-is in use, the system will take a "integer divide zero trap" panic in
-the clock routine as soon as the time_offset becomes non-zero.
-
-time_constant defaults to 0. The only place it is set is in the ntp_adjtime
-system call, from the 'constant' element of the timex structure argument.
-
- Work around:
-Never set the constant element of the timex structure passed to ntp_adjtime to
-a value larger than 6.
-
-satish.mynam@Eng 1998-04-30
-1. Use Sun's version of NTP software instead of PD version. This problem
-is not seen with Sun's NTP version (which is mostly eqivalent to PD NTP 3.4
-plus some Sun's local functionality futures).
-
-2. Workaround for the public domain NTP version ONLY:
- =====================================================
-The workaround for public domain NTP version is to disable the
-KERNEL_PLL from the NTP code. This way ntp_Adjtime() system call is
-totally bypassed without sacrificing any of the functionality of the
-NTP. The only hit you might see is the way kernel precision timminig
-is done without the PLL algorithm in the kernel.
-
- The easiest way to disable ntp_adjtime option is(without changing
- any makefiles or other config files) to disable the KERNEL_PLL
- value in the ./config.h file.
-
-After doing a ./configure for probing for all the necessary tools(compilers,
-os version, libraries), please comment out KERNEL_PLL macro in
-the ./config.h file. This will disable the KERNEL_PLL part of the source
-code and the newly obtained xntpd is just similar to the old one but it
-does not use ntp_adjtime() system call. This prevents it from panic'ng
-the kernel.
-
-/*#define KERNEL_PLL 1*/
-
-I complied a new xntpd binary this way and it does nothave any ntp_adjtime()
-related stuff.
-
-Default:
-=======
-/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings
-xntpd |
-grep ntp_adjtime
-354:adj_frequency: ntp_adjtime failed: %m
-357:loop_config: ntp_adjtime() failed: %m
-435:get_kernel_info: ntp_adjtime() failed: %m
-
-With KERNEL_PLL disabled in config.h file
--=======================
-
-/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings
-xntpd.nopll | grep ntp_adjtime
-
- Integrated in releases:
- Duplicate of:
- Patch id:
- See also: 4133517
- Summary:
-If the time_constant parameter is 7 or higher, and the phase-lock looping model
-is in use, the system will take a "integer divide zero trap" panic in
-the clock routine as soon as the time_offset becomes non-zero.
-
-time_constant defaults to 0. The only place it is set is in the ntp_adjtime
-system call, from the 'constant' element of the timex structure argument.
-----------------------------------------------------------------------------
diff --git a/contrib/ntp/html/hints/solaris.xtra.S99ntpd b/contrib/ntp/html/hints/solaris.xtra.S99ntpd
deleted file mode 100644
index d8058fd..0000000
--- a/contrib/ntp/html/hints/solaris.xtra.S99ntpd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-if [ $1 = "start" ]; then
- if [ -x /usr/local/bin/xntpd ]; then
- echo "Starting NTP daemon, takes about 1 minute... "
- # dosynctodr may need to be left alone as of with Solaris 2.6
- # The following line is unnecessary if you turn off
- # dosynctodr in /etc/system.
- /usr/local/bin/tickadj -s
- /usr/local/bin/ntpdate -v server1 server2
- sleep 5
- /usr/local/bin/xntpd
- fi
-else
- if [ $1 = "stop" ]; then
- pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
- if [ "${pid}" != "" ]; then
- echo "Stopping Network Time Protocol daemon "
- /usr/bin/kill ${pid}
- fi
- fi
-fi
diff --git a/contrib/ntp/html/hints/solaris.xtra.patchfreq b/contrib/ntp/html/hints/solaris.xtra.patchfreq
deleted file mode 100644
index 9600881..0000000
--- a/contrib/ntp/html/hints/solaris.xtra.patchfreq
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/ksh
-
-#
-# File: patchfreq
-# Author: Bryan Cantrill (bmc@eng.sun.com), Solaris Performance
-# Modified: Sat Apr 26 04:00:59 PDT 1997
-#
-# This is a little script to patch a 5.5 or 5.5.1 kernel to get around
-# the cpu_tick_freq inaccuracy. Before running this script, one must
-# know the true frequency of one's CPU; this can be derived by NTP,
-# or by observing the clock relative to the time-of-day chip over a
-# long period of time (the TOD will pull system time when it drifts
-# by more than two seconds).
-#
-# Patching a kernel can render a machine unbootable; do not run this
-# script unless you are prepared to accept that possibility. It
-# is advisable to have a backout path (e.g. net booting, an alternate
-# boot disk, an installation CD) should your machine fail to boot.
-#
-# This is not a product of Sun Microsystems, and is provided "as is",
-# without warranty of any kind expressed or implied including, but not
-# limited to, the suitability of this script for any purpose.
-#
-
-if [ $# -eq 0 ]; then
- echo "Usage: $0 cpu_tick_freq [ alternate_kernel ]"
- exit 1
-fi
-
-cpu_tick_freq=$1
-kernel=/platform/sun4u/kernel/unix
-
-if [ $# -eq 2 ]; then
- kernel=$2
-fi
-
-if [ ! -w $kernel ]; then
- echo "$0: Cannot open $kernel for writing."
- exit 1
-fi
-
-arch=`echo utsname+404?s | adb $kernel | cut -d: -f2`
-
-if [ ! $arch = "sun4u" ]; then
- echo "Patch only applies to sun4u"
- exit 1
-fi
-
-rel=`echo utsname+202?s | adb $kernel | cut -d: -f2`
-
-if [ ! $rel = "5.5" ] && [ ! $rel = "5.5.1" ]; then
- echo "Patch only applies to 5.5 or 5.5.1..."
- exit 1
-fi
-
-nop="1000000" # nop
-store_mask="ffffe000" # mask out low 13 bits
-store="da256000" # st %o5, [%l5 + offset]
-
-instr=`echo setcpudelay+34?X | adb $kernel | cut -d: -f 2 | nawk '{ print $1 }'`
-
-if [ $instr = $nop ]; then
- echo "Instruction already patched..."
-else
- let masked="(16#$store_mask & 16#$instr) - 16#$store"
- if [ $masked -ne 0 ]; then
- echo "Couldn't find instruction to patch; aborting."
- exit 1
- fi
-
- if ! echo setcpudelay+34?W $nop | adb -w $kernel 1> /dev/null
- then
- echo "adb returned an unexpected error; aborting."
- fi
-fi
-
-echo "Patching cpu_tick_freq to $cpu_tick_freq..."
-
-if ! echo cpu_tick_freq?W 0t$cpu_tick_freq | adb -w $kernel 1> /dev/null; then
- echo "adb returned an unexpected error; aborting."
- exit 1
-fi
-
-echo "$kernel successfully patched."
-exit 0
diff --git a/contrib/ntp/html/hints/sun4 b/contrib/ntp/html/hints/sun4
deleted file mode 100644
index 424fa18..0000000
--- a/contrib/ntp/html/hints/sun4
+++ /dev/null
@@ -1,15 +0,0 @@
-Notes on CPU clock oscillator tolerance with SunOS 4.1.1 and 4.1.3
-
-A bug in SunOS 4.1.1 results in the kernel time losing 1 microsecond
-per tick of the system clock. The bug was fixed (bugid 1094383) for
-SunOS 4.1.1 and corrected in SunOS 4.1.3. The easiest way to fix this
-is to replace the 4.1.1 binary clock.o with the corresponding 4.1.3
-binary. Without this change it is necessary to use the tickadj program
-included in this distribution with the -t 9999 option.
-
-The tickadj option will work in all cases except when the kernel has
-been modified to correct the CPU clock oscillator frequency using a
-1-pps signal from a precision source. The bugfix must be installed for
-this wrinkle to work properly.
-
-Dave Mills (mills@udel.edu)
diff --git a/contrib/ntp/html/hints/svr4-dell b/contrib/ntp/html/hints/svr4-dell
deleted file mode 100644
index 2c92f8a..0000000
--- a/contrib/ntp/html/hints/svr4-dell
+++ /dev/null
@@ -1,8 +0,0 @@
-Notes on the DELL SVR4.
-
-You should use -DSETTIMEOFDAY_BROKEN.
-
-Philip.Gladstone@mail.citicorp.com
-
-(XXX But there is no checking for SETTIMEOFDAY_BROKEN in the code)
-
diff --git a/contrib/ntp/html/hints/svr4_package b/contrib/ntp/html/hints/svr4_package
deleted file mode 100644
index b9f5ca3..0000000
--- a/contrib/ntp/html/hints/svr4_package
+++ /dev/null
@@ -1,33 +0,0 @@
-Date: Wed, 12 Apr 1995 12:42:03 +0100
-Message-ID: <513.797686923@concurrent.co.uk>
-From: Andy Chittenden <asc@concurrent.co.uk>
-
-Dave
-
-Here is a uuencoded, compressed tar file. The only file I've
-changed is Makefile - I've included the full file rather than diffs.
-There are some new files as well:
-
- xntp shell script that starts up ntp during boot up
- (the packaging stuff creates links to it so it comes
- up at run level 2). As with all svr4 start/stop
- scripts, it takes one parameter which is either
- start or stop. It assumes that ntp.conf is in
- /etc/inet/ntp.conf (where it should be on svr4
- machines).
- prototype describes the file contents of the package.
- You might like to review its contents to
- see whether you want to include any other
- files or remove some. NB I've made the man
- pages go into 1m as they should on svr4.
- preinstall runs before installation takes place. It
- ensures that ntp is down if it is up before
- installing a replacement package
- postinstall starts up ntp after package installation.
- preremove brings down ntp before removing the package.
-
-You create a package using "make package". This creates a file
-called xntp.pkg. To install this package, you use
-"pkgadd -d `pwd`/xntp.pkg xntp". This will start up ntp if
-/etc/inet/ntp.conf exists. If you don't want the package anymore, use
-"pkgrm xntp". I have tested this on Solaris 2.4.
diff --git a/contrib/ntp/html/hints/todo b/contrib/ntp/html/hints/todo
deleted file mode 100644
index e0e5ffa..0000000
--- a/contrib/ntp/html/hints/todo
+++ /dev/null
@@ -1,4 +0,0 @@
-Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>:
- Any change in a source file in the lib directory causes all files to
- be recompiled (because the objects are removed). Add a better rule for
- make to update the library. Maybe just remove "-rm -f $?".
diff --git a/contrib/ntp/html/hints/vxworks.htm b/contrib/ntp/html/hints/vxworks.htm
deleted file mode 100644
index b6fae80..0000000
--- a/contrib/ntp/html/hints/vxworks.htm
+++ /dev/null
@@ -1,153 +0,0 @@
-<HTML>
-<HEAD>
- <TITLE>vxWorks Port of NTP</TITLE>
-</HEAD>
-<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 "ntpd_LDADD = $(LDADD) -lm" by removing the "-lm".<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>
-
-<LI>Little endianess is set if the target is of type iX86. </LI>
-
-<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>
-
-<LI>clock_settime() is defined to be used for setting the clock. </LI>
-
-<LI>The Linking flags have -r added to allow for relinking into the vxWorks
-kernel </LI>
-</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>
-
-<LI>POSIX timers have been added. </LI>
-
-<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.</LI>
-</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</A> <BR>
-<A HREF="mailto:casey@csc.co.za">casey@csc.co.za</A> </P>
-
-<P><BR>
-</P>
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/hints/vxworks.html b/contrib/ntp/html/hints/vxworks.html
deleted file mode 100644
index cd4c919..0000000
--- a/contrib/ntp/html/hints/vxworks.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-
- <head>
- <title>vxWorks Port of NTP</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <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>
-
-</html> \ No newline at end of file
diff --git a/contrib/ntp/html/hints/winnt.htm b/contrib/ntp/html/hints/winnt.htm
deleted file mode 100644
index 2b675ed..0000000
--- a/contrib/ntp/html/hints/winnt.htm
+++ /dev/null
@@ -1,334 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
- <title>NTP on Windows NT</title>
-</head>
-<body>
-
-<h1>
-NTP 4.x for Windows NT</h1>
-
-<h2>
-Do not try to compile NTP-4.0.99i under WINNT, it will not work.
-Fixed NTP-4.0.99i; look for next release to be functional.
-Sven - May 11 2000
-</h2>
-
-<h2>
-Download NTP-4.0.99g for the last stable WINNT port.
-I am working on adapting the major changes starting with 99i
-and getting things running again. Sven - April 25 2000
-</h2>
-
-<h2>
-Introduction</h2>
-The NTP 4 distribution runs as service on (i386) Windows NT 4.0 and Windows
-2000. The binaries work on dual processor systems. This port has not been
-tested on the Alpha platform.
-<p>Refer to System Requirements and Instructions for how to compile the
-program.
-<h2>
-Reference Clocks</h2>
-Refernce clock support under Windows NT is tricky because the IO functions
-are so much different. The following reference clocks are supported by
-Windows NT:
-<p><a href="../driver1.htm">Type 1</a> Undisciplined Local Clock (LOCAL)
-<br><a href="../driver29.htm">Type 29</a> Trimble Navigation Palisade GPS
-(GPS_PALISADE)
-<h2>
-Functions Supported</h2>
-All NTP functions are supported with some constraints. See the TODO list
-below.
-<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.
-<h2>
-Binaries</h2>
-Recent InstallShield based executable versions of NTP for Windows NT (i386)
-are available from:
-<br><a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>
-and <a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a>
-<h2>
-ToDo</h2>
-
-<ul>
-<li>
-MD5 authentication causes problems with DNS. If you use encryption/authentication,
-you have to use IP numbers in <tt>ntp.conf.</tt></li>
-
-<li>
-NMEA refclock support is in development.</li>
-
-<li>
-See if precision can be improved by using CPU cycle counter for tick interpolation.</li>
-
-<li>
-Make precision time available to applications using NTP_GETTIME API</li>
-</ul>
-
-<h2>
-Compiling Requirements</h2>
-
-<ul>
-<li>
-<tt>Windows NT 4.0 or 5.0 (2000)</tt></li>
-
-<li>
-<tt>Microsoft Visual C++ 6.0</tt></li>
-
-<li>
-Some version of the archiving program <tt>ZIP</tt>.</li>
-</ul>
-
-<h2>
-Compiling Instructions</h2>
-
-<ol>
-<li>
-Unpack the NTP-4.x.tar.gz</li>
-
-<li>
-Open the .\ports\winnt\ntp.dsw Visual C workspace</li>
-
-<li>
-Batch build all projects</li>
-</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 "set" at
-the "Command Prompt" or from the "System" icon in the "Control Panel").
-<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>\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 "instsrv.exe &lt;pathname_for_ntpd.exe>"</li>
-
-<li>
-Clicking on the "Services" icon in the "Control Panel" 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
-"Start" button in the dialog box. The NTP service should start.</li>
-
-<li>
-View the event log by clicking on the "Event Viewer" icon in the "Administrative
-Tools" group, there should be several successful startup messages from
-NTP. NTP will keep running and restart automatically when the machine is
-rebooted.</li>
-</ol>
-You can change the start mode (automatic/manual) and other startup parameters
-correponding to the NTP service (eg. location of conf file) also in the
-"Services" dialog box if you wish.
-<h2>
-Removing NTP</h2>
-You can also use <tt>instsrv</tt> to delete the NTP service by entering:
-"instsrv.exe remove"
-<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>Add the -g option to the ImagePath key, behind "%INSTALLDIR>\ntpd.exe".
-This will force NTP to accept large time errors (including 1.1.1980 00:00)
-<h2>
-Bug Reports</h2>
-Send bug reports to <a href="news://comp.protocols.time.ntp">news://comp.protocols.time.ntp</a>
-and Sven_Dietrich@Trimble.COM
-<h2>
-Change Log</h2>
-
-<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>
-<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.</li>
-</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>
-<ul>
-<li>
-Fixed I/O problem delaying packet responses which resulted in no-replys
-to NTPQ and others.</li>
-
-<li>
-The default configuration file path is <tt>&lt;WINDIR>\system32\drivers\etc\ntp.conf.
-The old &lt;WINDIR>\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.</li>
-</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.</li>
-</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>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
-<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>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 "bldrel" for non-debug
-<br>or "blddbg" for debug executables.
-<p>Greg Schueman
-<br>&nbsp;&nbsp;&nbsp; &lt;schueman@acm.org>
-<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>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>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>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 "longjmp" 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>See below for more detail:
-<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>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>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.
-<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 "service"
-<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 "longjmp" 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; "Books Online" on Visual C++ 2.0 under the topic "Numerical
-List of Error
-<br>&nbsp;&nbsp; Codes".
-<p>Last HTML Update: November 17, 1999
-<br><a href="mailto://sven_dietrich@trimble.com">Sven_Dietrich@Trimble.COM</a>
-</body>
-</html>
diff --git a/contrib/ntp/html/hints/winnt.html b/contrib/ntp/html/hints/winnt.html
deleted file mode 100644
index 29abc64..0000000
--- a/contrib/ntp/html/hints/winnt.html
+++ /dev/null
@@ -1,259 +0,0 @@
-<!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.htm b/contrib/ntp/html/howto.htm
deleted file mode 100644
index 6e08242..0000000
--- a/contrib/ntp/html/howto.htm
+++ /dev/null
@@ -1,320 +0,0 @@
-<html><head><title>
-How to Write a Reference Clock Driver
-</title></head><body><h3>
-How to Write a Reference Clock Driver
-</h3>
-
-<img align=left src=pic/pogo4.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>from <i>Pogo</i>, Walt Kelly</a>
-
-<p>You need a little magic.
-<br clear=left><hr>
-
-<h4>Description</h4>
-
-<p>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 local 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>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 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>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> are called to
-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>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
-millisecond/microsecond decoded from the ASCII timecode. Additional
-information includes the receive timestamp, exception report, 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.
-
-<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> and <tt>ppsclock</tt> STREAMS modules and
-<tt>ppsapi</tt> PPS interface described in the <a href="ldisc.htm">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>ppsclock</tt> module is an interface for the
-PPS signal provided by some radios. 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 = "gadget.htm"> Gadget Box PPS Level
-Converter and CHU Modem</a> page.
-
-<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.htm"> 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.htm"> Configuration Options </a> page.
-
-<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>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>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>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).
-
-<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.
-
-<h4>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.
-
-<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.
-
-<p><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.
-
-<p><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.
-
-<p><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.
-
-<p><dt><tt>./acconfig.h</tt>
-<dd>This is a configuration file used by the autoconfigure scheme. Add
-two lines in the form:
-
-<p><pre>
- /* Define if we have a FOO clock */
- #undef FOO
-</pre>
-
-<p>where FOO is the define used to cause the driver to be included in
-the distribution.
-
-<p><dt><tt>./configure.in</tt>
-<dd>This is a configuration file used by the autoconfigure scheme. Add
-lines similar to the following:
-
-<p><pre>
- AC_MSG_CHECKING(FOO clock_description)
- AC_ARG_ENABLE(FOO, [ --enable-FOO clock_description],
- [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
- if test "$ntp_ok" = "yes"; then
- ntp_refclock=yes
- AC_DEFINE(FOO)
- fi
- AC_MSG_RESULT($ntp_ok)
-</pre>
-
-<p>(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.)
-
-<p><dt><tt>./ntpd/Makefile.am</tt>
-<dd><p>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.
-
-<p>Patches to <tt>automake-1.0</tt> are required for the
-autoconfigure scripts to work properly. The file <tt>automake-
-1.0.patches</tt> can be used for this purpose.
-
-<p><dt><tt>./ntpd/Makefile.am</tt>
-<dd>Do the following sequence of commands:
-
-<p><pre>
- automake
- autoconf
- autoheader
- configure
-</pre>
-
-<p>or simply run <tt>make</tt>, which will do this command sequence
-automatically.
-
-</dl>
-
-<p><h4>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.
-<p><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.
-
-<p><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.
-
-<p><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.
-
-<p>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.
-
-<p><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.
-
-<p><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.
-
-<p><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.
-
-<p><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.
-
-<p><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.
-
-<p><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><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/howto.html b/contrib/ntp/html/howto.html
deleted file mode 100644
index 2390d12..0000000
--- a/contrib/ntp/html/howto.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!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/htmlprimer.htm b/contrib/ntp/html/htmlprimer.htm
deleted file mode 100644
index 898a583..0000000
--- a/contrib/ntp/html/htmlprimer.htm
+++ /dev/null
@@ -1,1198 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Draft//EN">
-<HTML>
-<HEAD>
-<TITLE>A Beginner's Guide to HTML</TITLE>
-</HEAD>
-
-<BODY>
-<H1>A Beginner's Guide to HTML</H1>
-
-<P>
-This is a primer for producing documents in HTML, the markup language
-used by the World Wide Web.
-
-<UL>
-<LI><A HREF="#A1.1">Acronym Expansion</A>
-<LI><A HREF="#A1.2">What This Primer Doesn't Cover</A>
-<LI><A HREF="#A1.3">Creating HTML Documents</A>
- <UL>
- <LI><A HREF="#A1.3.1">The Minimal HTML Document</A>
- <LI><A HREF="#A1.3.2">Basic Markup Tags</A>
- <UL>
- <LI><A HREF="#A1.3.2.1">Titles</A>
- <LI><A HREF="#A1.3.2.2">Headings</A>
- <LI><A HREF="#A1.3.2.3">Paragraphs</A>
- </UL>
- <LI><A HREF="#A1.3.3">Linking to Other Documents</A>
- <UL>
- <LI><A HREF="#A1.3.3.1">Relative Links Versus Absolute Pathnames</A>
- <LI><A HREF="#A1.3.3.2">Uniform Resource Locator</A>
- <LI><A HREF="#A1.3.3.3">Anchors to Specific Sections in Other Documents</A>
- <LI><A HREF="#A1.3.3.4">Anchors to Specific Sections Within
- the Current Document</A>
- </UL>
- </UL>
-<LI><A HREF="#A1.4">Additional Markup Tags</A>
- <UL>
- <LI><A HREF="#A1.4.1">Lists</A>
- <UL>
- <LI><A HREF="#A1.4.1.1">Unnumbered Lists</A>
- <LI><A HREF="#A1.4.1.2">Numbered Lists</A>
- <LI><A HREF="#A1.4.1.3">Definition Lists</A>
- <LI><A HREF="#A1.4.1.4">Nested Lists</A>
- </UL>
- <LI><A HREF="#A1.4.2">Preformatted Text</A>
- <LI><A HREF="#A1.4.3">Extended Quotes</A>
- <LI><A HREF="#A1.4.4">Addresses</A>
- </UL>
-
-<LI><A HREF="#A1.5">Character Formatting</A>
- <UL>
- <LI><A HREF="#A1.5.1">Physical Versus Logical:
- Use Logical Tags When Possible</A>
- <UL>
- <LI><A HREF="#A1.5.1.1">Logical Styles</A>
- <LI><A HREF="#A1.5.1.2">Physical Styles</A>
- </UL>
- <LI><A HREF="#A1.5.2">Using Character Tags</A>
- <LI><A HREF="#A1.5.3">Special Characters</A>
- <UL>
- <LI><A HREF="#A1.5.3.1">Escape Sequences</A>
- <LI><A HREF="#A1.5.3.2">Forced Line Breaks</A>
- <LI><A HREF="#A1.5.3.3">Horizontal Rules</A>
- </UL>
- </UL>
-<LI><A HREF="#A1.6">In-line Images</A>
- <UL>
- <LI><A HREF="#A1.6.1">Alternate Text for Viewers
- That Can't Display Images</A>
- </UL>
-<LI><A HREF="#A1.7">External Images, Sounds, and Animations</A>
-<LI><A HREF="#A1.8">Troubleshooting</A>
- <UL>
- <LI><A HREF="#A1.8.1">Avoid Overlapping Tags</A>
- <LI><A HREF="#A1.8.2">Embed Anchors and Character Tags,
- But Not Anything Else</A>
- <LI><A HREF="#A1.8.3">Check Your Links</A>
- </UL>
-<LI><A HREF="#A1.9">A Longer Example</A>
-<LI><A HREF="#A1.10">For More Information</A>
- <UL>
- <LI><A HREF="#A1.10.1">Fill-out Forms</A>
- <LI><A HREF="#A1.10.2">Style Guides</A>
- <LI><A HREF="#A1.10.3">Other Introductory Documents</A>
- <LI><A HREF="#A1.10.4">Additional References</A>
- </UL>
-</UL>
-
-<H2><A NAME = "A1.1">Acronym Expansion</A></H2>
-<DL COMPACT>
-<DT><I>WWW</I>
-<DD>World Wide Web (or Web, for short).
-<DT><I>SGML</I>
-<DD>Standard Generalized Markup Language -- this is a standard for
- describing markup languages.
-<DT><CITE>DTD</CITE>
-<DD>Document Type Definition -- this is a specific markup language,
- written using SGML.
-<DT><CITE>HTML</CITE>
-<DD>HyperText Markup Language -- HTML is a SGML DTD. In practical
- terms, HTML is a collection of styles (indicated by markup tags)
- that define the various components of a World Wide Web document.
-HTML was invented by Tim Berners-Lee while at CERN. He is now director
-of the W3 Consortium.
-</DL>
-
-<H2><A NAME = "A1.2">What This Primer Doesn't Cover</A></H2>
-<P>
-This primer assumes that you have:
-
-<UL>
-<LI>at least a passing knowledge of how to use NCSA Mosaic or some
- other Web browser
-<LI>a general understanding of how Web servers and client browsers
- work
-<LI>access to a Web server for which you would like to produce HTML
- documents, or that you wish to produce HTML documents for personal
- use
-</UL>
-
-<H2><A NAME = "A1.3">Creating HTML Documents</A></H2>
-<P>
-HTML documents are in plain (also known as ASCII) text format and can
-be created using any text editor (e.g., Emacs or vi on UNIX machines).
-A couple of Web browsers (tkWWW for X Window System machines and CERN's
-Web browser for NeXT computers) include rudimentary HTML editors in
-a WYSIWYG environment. There are also some WYSIWIG editors available
-now (e.g. HotMetal for Sun Sparcstations, HTML Edit for Macintoshes).
-You may wish to try one of them first before delving into the details
-of HTML.
-<BLOCKQUOTE>
- <I>You can preview a document in progress with NCSA Mosaic (and
- some </I><I>other Web browsers). Open it with the </I><B>Open Local
- </B><I>command under the </I><B>File</B><I> menu. </I>
-
- <P>
- <I>After you edit the source HTML file, save the changes. Return
- to NCSA </I><I>Mosaic and </I><B>Reload</B><I> the document. The
- changes are reflected in the on-</I><I>screen display.</I>
-
-</BLOCKQUOTE>
-
-<H3><A NAME = "A1.3.1">The Minimal HTML Document</A></H3>
-<P>
-Here is a bare-bones example of HTML:
-
-<PRE>
- &lt;TITLE&gt;The simplest HTML example&lt;/TITLE&gt;
- &lt;H1&gt;This is a level-one heading&lt;/H1&gt;
- Welcome to the world of HTML.
- This is one paragraph.&lt;P&gt;
- And this is a second.&lt;P&gt;
-</PRE>
-
-<A HREF=MinimalHTML.html>Click here</A> to see the formatted version
-of the example.
-
-<P>
-HTML uses markup tags to tell the Web browser how to display the text.
-The above example uses:
-
-<UL>
-<LI>the <SAMP>&lt;TITLE&gt;</SAMP> tag (and corresponding <SAMP>&lt;/TITLE&gt;</SAMP>
- tag), which specifies the title of the document
-<LI>the <SAMP>&lt;H1&gt;</SAMP> header tag (and corresponding <SAMP>&lt;/H1&gt;</SAMP>)
-<LI>the <SAMP>&lt;P&gt;</SAMP> paragraph-separator tag
-</UL>
-
-<P>
-HTML tags consist of a left angle bracket (<SAMP>&lt;</SAMP>), (a ``less
-than'' symbol to mathematicians), followed by name of the tag and closed
-by a right angular bracket (<SAMP>&gt;</SAMP>). Tags are usually paired,
-e.g. <SAMP>&lt;H1&gt;</SAMP> and <SAMP>&lt;/H1&gt;</SAMP>. The ending
-tag looks just like the starting tag except a slash (/) precedes the
-text within the brackets. In the example, <SAMP>&lt;H1&gt;</SAMP> tells
-the Web browser to start formatting a level-one heading; <SAMP>&lt;/H1&gt;</SAMP>
-tells the browser that the heading is complete.
-
-<P>
-The primary exception to the pairing rule is the <SAMP>&lt;P&gt;</SAMP>
-tag. There is no such thing as <SAMP>&lt;/P&gt;</SAMP>.
-
-<P>
-<STRONG>NOTE:</STRONG><I> HTML is not case sensitive. </I><SAMP>&lt;title&gt;</SAMP><I>
-is equivalent to </I><SAMP>&lt;TITLE&gt;</SAMP><I> or </I><SAMP>&lt;TiTlE&gt;</SAMP><I>.
-</I>
-
-<P>
-Not all tags are supported by all World Wide Web browsers. If a browser
-does not support a tag, it just ignores it.
-
-<H3><A NAME = "A1.3.2">Basic Markup Tags</A></H3>
-<H4><A NAME = "A1.3.2.1">Title</A></H4>
-<P>
-Every HTML document should have a title. A title is generally displayed
-separately from the document and is used primarily for document identification
-in other contexts (e.g., a WAIS search). Choose about half a dozen
-words that describe the document's purpose.
-<BLOCKQUOTE>
- <I>In the X Window System and Microsoft Windows versions of NCSA
- </I><I>Mosaic, the </I><B>Document Title</B><I> field is at the
- top of the screen just below the </I><I>pulldown menus. In NCSA
- Mosaic for Macintosh, text tagged as </I><SAMP>&lt;TITLE&gt;</SAMP>
- <I>appears as the window title.</I>
-
-</BLOCKQUOTE>
-
-<H4><A NAME = "A1.3.2.2">Headings</A></H4>
-<P>
-HTML has six levels of headings, numbered 1 through 6, with 1 being
-the most prominent. Headings are displayed in larger and/or bolder
-fonts than normal body text. The first heading in each document should
-be tagged <SAMP>&lt;H1&gt;</SAMP>. The syntax of the heading tag is:
-
-<P>
-<SAMP>&lt;H</SAMP><VAR>y</VAR><SAMP>&gt;</SAMP><VAR>Text of heading</VAR><SAMP>
-&lt;/H</SAMP><VAR>y</VAR><SAMP> &gt;</SAMP>
-
-<P>
-where <VAR>y</VAR> is a number between 1 and 6 specifying the level
-of the heading.
-
-<P>
-For example, the coding for the ``Headings'' section heading above
-is
-
-<PRE>
- &lt;H3&gt;Headings&lt;/H3&gt;
-</PRE>
-
-<H5><A NAME = "A1.3.2.2.1">Title versus first heading</A></H5>
-<P>
-In many documents, the first heading is identical to the title. For
-multipart documents, the text of the first heading should be suitable
-for a reader who is already browsing related information (e.g., a chapter
-title), while the title tag should identify the document in a wider
-context (e.g., include both the book title and the chapter title, although
-this can sometimes become overly long).
-
-<H4><A NAME = "A1.3.2.3">Paragraphs</A></H4>
-<P>
-Unlike documents in most word processors, carriage returns in HTML
-files aren't significant. Word wrapping can occur at any point in your
-source file, and multiple spaces are collapsed into a single space.
-(There are couple of exceptions; space following a <SAMP>&lt;P&gt;</SAMP>
-or <SAMP>&lt;H</SAMP><VAR>y</VAR><SAMP>&gt;</SAMP> tag, for example,
-is ignored.) Notice that in the bare-bones example, the first paragraph
-is coded as
-
-<PRE>
- Welcome to HTML.
- This is the first paragraph. &lt;P&gt;
-</PRE>
-
-<P>
-In the source file, there is a line break between the sentences. A
-Web browser ignores this line break and starts a new paragraph only
-when it reaches a <SAMP>&lt;P&gt;</SAMP> tag.
-
-<P>
-<STRONG>Important:</STRONG> You must separate paragraphs with <SAMP>&lt;P&gt;</SAMP>.
-The browser ignores any indentations or blank lines in the source text.
-HTML relies almost entirely on the tags for formatting instructions,
-and without the <SAMP>&lt;P&gt;</SAMP> tags, the document becomes one
-large paragraph. (The exception is text tagged as ``preformatted,''
-which is explained below.) For instance, the following would produce
-identical output as the first bare-bones HTML example:
-
-<PRE>
- &lt;TITLE&gt;The simplest HTML example&lt;/TITLE&gt;&lt;H1&gt;This is a level
- one heading&lt;/H1&gt;Welcome to the world of HTML. This is one
- paragraph.&lt;P&gt;And this is a second.&lt;P&gt;
-</PRE>
-
-<P>
-However, to preserve readability in HTML files, headings should be
-on separate lines, and paragraphs should be separated by blank lines
-(in addition to the <SAMP>&lt;P&gt;</SAMP> tags).
-<BLOCKQUOTE>
- <I>NCSA Mosaic handles &lt;P&gt; by ending the current paragraph
- and insert</I><I>ing a blank line. </I>
-
-</BLOCKQUOTE>
-
-<P>
-In HTML+, a successor to HTML currently in development, <SAMP>&lt;P&gt;</SAMP>
-becomes a ``container'' of text, just as the text of a level-one heading
-is ``contained'' within<SAMP>&lt;H1&gt; ... </SAMP><SAMP>&lt;/H1&gt;</SAMP>:
-
-<PRE>
- &lt;P&gt;
- This is a paragraph in HTML+.
- &lt;/P&gt;
-</PRE>
-
-<P>
-The difference is that the <SAMP>&lt;/P&gt;</SAMP> closing tag can
-always be omitted. (That is, if a browser sees a <SAMP>&lt;P&gt;</SAMP>,
-it knows that there must be an implied <SAMP>&lt;/P&gt;</SAMP> to end
-the previous paragraph.) In other words, in HTML+, <SAMP>&lt;P&gt;</SAMP>
-is a beginning-of-paragraph marker.
-
-<P>
-The advantage of this change is that you will be able to specify formatting
-options for a paragraph. For example, in HTML+, you will be able to
-center a paragraph by coding
-
-<PRE>
- <SAMP>&lt;P ALIGN=CENTER&gt;</SAMP>
- This is a centered paragraph. This is HTML+, so you can't do it yet.
-</PRE>
-
-<P>
-This change won't effect any documents you write now, and they will
-continue to look just the same with HTML+ browsers.
-
-<H3><A NAME = "A1.3.3">Linking to Other Documents</A></H3>
-<P>
-The chief power of HTML comes from its ability to link regions of text
-(and also images) to another document. The browser highlights these
-regions (usually with color and/or underlines) to indicate that they
-are hypertext links (often shortened to <DFN>hyperlinks</DFN> or simply
-<DFN>links</DFN>).
-
-<P>
-HTML's single hypertext-related tag is <SAMP>&lt;A&gt;</SAMP>, which
-stands for <DFN>anchor</DFN>. To include an anchor in your document:
-
-<OL>
-<LI>Start the anchor with <SAMP>&lt;A</SAMP> . (There's a space after
- the <CODE>A</CODE>.)
-<LI>Specify the document that's being pointed to by entering the parameter
- <SAMP>HREF=&quot;</SAMP><VAR>filename</VAR><SAMP>&quot;</SAMP>
- followed by a closing right angle bracket: <SAMP>&gt;</SAMP>
-<LI>Enter the text that will serve as the hypertext link in the current
- document.
-<LI>Enter the ending anchor tag: <SAMP>&lt;/A&gt;</SAMP>.
-</OL>
-
-<P>
-Here is an sample hypertext reference:
-
-<PRE>
- &lt;A HREF=&quot;MaineStats.html&quot;&gt;Maine&lt;/A&gt;
-</PRE>
-
-<P>
-This entry makes the word ``Maine'' the hyperlink to the document <SAMP>MaineStats.html</SAMP>,
-which is in the same directory as the first document. You can link
-to documents in other directories by specifying the <DFN>relative path</DFN>
-from the current document to the linked document. For example, a link
-to a file <SAMP>NJStats.html</SAMP> located in the subdirectory <SAMP>AtlanticStates</SAMP>
-would be:
-
-<PRE>
- &lt;A HREF=&quot;AtlanticStates/NJStats.html&quot;&gt;New Jersey&lt;/A&gt;
-</PRE>
-
-<P>
-These are called <VAR>relative links</VAR>. You can also use the absolute
-pathname of the file if you wish. Pathnames use the standard UNIX syntax.
-
-<H4><A NAME = "A1.3.3.1">Relative Links Versus Absolute Pathnames</A></H4>
-<P>
-In general, you should use relative links, because
-
-<OL>
-<LI>You have less to type.
-<LI>It's easier to move a group of documents to another location, because
- the relative path names will still be valid.
-</OL>
-
-<P>
-However, use absolute pathnames when linking to documents that are
-not directly related. For example, consider a group of documents that
-comprise a user manual. Links within this group should be relative
-links. Links to other documents (perhaps a reference to related software)
-should use full path names. This way, if you move the user manual to
-a different directory, none of the links would have to be updated.
-
-<H4><A NAME = "A1.3.3.2">Uniform Resource Locator</A></H4>
-<P>
-The World Wide Web uses Uniform Resource Locators (URLs) to specify
-the location of files on other servers. A URL includes the type of
-resource being accessed (e.g., gopher, WAIS), the address of the server,
-and the location of the file. The syntax is:
-
-<P>
-<VAR>scheme</VAR><SAMP>://</SAMP><VAR>host.domain</VAR><SAMP>[:</SAMP><VAR>port</VAR><SAMP>]/</SAMP><VAR>path</VAR><SAMP>/</SAMP><VAR>filename</VAR>
-
-<P>
-where <VAR>scheme</VAR> is one of
-
-<DL COMPACT>
-<DT><SAMP>file</SAMP>
-<DD>
-<DT>
-<DD>a file on your local system, or a file on an anonymous FTP server
-
-<DT><SAMP>http</SAMP>
-<DD>a file on a World Wide Web server
-<DT><SAMP>gopher</SAMP>
-<DD>a file on a Gopher server
-<DT><SAMP>WAIS</SAMP>
-<DD>a file on a WAIS server
-<DT><SAMP>news</SAMP>
-<DD>an Usenet newsgroup
-<DT><SAMP>telnet</SAMP>
-<DD>a connection to a Telnet-based service
-</DL>
-
-<P>
-The <VAR>port</VAR> number can generally be omitted. (That means unless
-someone tells you otherwise, leave it out.)
-
-<P>
-For example, to include a link to this primer in your document, you
-would use
-
-<PRE>
- &lt;A HREF = &quot;http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html&quot;&gt;
- NCSA's Beginner's Guide to HTML&lt;/A&gt;
-</PRE>
-
-<P>
-This would make the text ``NCSA's Beginner's Guide to HTML'' a hyperlink
-to this document.
-
-<P>
-For more information on URLs, look at
-
-<UL>
-<LI><A HREF = "http://www.w3.org/hypertext/WWW/Addressing/Addressing.html">
- <CITE>WWW Names and Addresses, URIs, URLs, URNs</CITE></A>, written
- by people at CERN
-<LI><A HREF = "http://www.ncsa.uiuc.edu/demoweb/url-primer.html">
- <CITE>A Beginner's Guide to URLs</CITE></A>, located on the NCSA Mosaic
- <B>Help</B> menu
-</UL>
-
-<H4><A NAME = "A1.3.3.3">Links to Specific Sections in Other Documents</A></H4>
-<P>
-Anchors can also be used to move to a particular section in a document.
-Suppose you wish to set a link from document A and a specific section
-in document B. (Call this file <SAMP>documentB.html</SAMP>.) First
-you need to set up a <DFN>named anchor</DFN> in document B. For example,
-to set up an anchor named ``Jabberwocky'' to document B, enter
-
-<PRE>
- Here's &lt;A NAME = &quot;Jabberwocky&quot;&gt;some text&lt;/a&gt;
-</PRE>
-
-<P>
-Now when you create the link in document A, include not only the filename,
-but also the named anchor, separated by a hash mark (#).
-
-<PRE>
- This is my &lt;A HREF = &quot;documentB.html#Jabberwocky&quot;&gt;link&lt;/A&gt; to document B.
-</PRE>
-
-<P>
-Now clicking on the word ``link'' in document A sends the reader directly
-to the words ``some text'' in document B.
-
-<H4><A NAME = "A1.3.3.4">Links to Specific Sections Within the Current Document</A></H4>
-<P>
-The technique is exactly the same except the filename is omitted.
-
-<P>
-For example, to link to the Jabberwocky anchor from within the same
-file (Document B), use
-
-<PRE>
- This is &lt;A HREF = &quot;#Jabberwocky&quot;&gt;Jabberwocky link&lt;/A&gt; from within Document B.
-</PRE>
-
-<H2><A NAME = "A1.4">Additional Markup Tags</A></H2>
-<P>
-The preceding is sufficient to produce simple HTML documents. For more
-complex documents, HTML has tags for several types of lists, preformatted
-sections, extended quotations, character formatting, and other items.
-
-<H3><A NAME = "A1.4.1">Lists</A></H3>
-<P>
-HTML supports unnumbered, numbered, and definition lists.
-
-<H4><A NAME = "A1.4.1.1">Unnumbered Lists</A></H4>
-<P>
-To make an unnumbered list,
-
-<OL>
-<LI>Start with an opening list <SAMP>&lt;UL&gt;</SAMP> tag.
-<LI>Enter the <SAMP>&lt;LI&gt;</SAMP> tag followed by the individual
- item. (No closing <SAMP>&lt;/LI&gt;</SAMP> tag is needed.)
-<LI>End with a closing list <SAMP>&lt;/UL&gt;</SAMP> tag.
-</OL>
-
-<P>
-Below an example two-item list:
-
-<PRE>
- &lt;UL&gt;
- &lt;LI&gt; apples
- &lt;LI&gt; bananas
- &lt;/UL&gt;
-</PRE>
-
-<P>
-The output is:
-
-<UL>
-<LI>apples
-<LI>bananas
-</UL>
-
-<P>
-The <SAMP>&lt;LI&gt;</SAMP> items can contain multiple paragraphs.
-Just separate the paragraphs with the <SAMP>&lt;P&gt;</SAMP> paragraph
-tags.
-
-<H4><A NAME = "A1.4.1.2">Numbered Lists</A></H4>
-<P>
-A numbered list (also called an ordered list, from which the tag name
-derives) is identical to an unnumbered list, except it uses <SAMP>&lt;OL&gt;</SAMP>
-instead of <SAMP>&lt;UL&gt;</SAMP>. The items are tagged using the
-same <SAMP>&lt;LI&gt;</SAMP> tag. The following HTML code
-
-<PRE>
- &lt;OL&gt;
- &lt;LI&gt; oranges
- &lt;LI&gt; peaches
- &lt;LI&gt; grapes
- &lt;/OL&gt;
-</PRE>
-
-<P>
-produces this formatted output:
-
-<OL>
-<LI>oranges
-<LI>peaches
-<LI>grapes
-</OL>
-
-<H4><A NAME = "A1.4.1.3">Definition Lists </A></H4>
-<P>
-A definition list usually consists of alternating a term (abbreviated
-as <SAMP>DT</SAMP>) and a definition (abbreviated as <SAMP>DD</SAMP>).
-Web browsers generally format the definition on a new line.
-
-<P>
-The following is an example of a definition list:
-
-<PRE>
- &lt;DL&gt;
- &lt;DT&gt; NCSA
- &lt;DD&gt; NCSA, the National Center for Supercomputing Applications,
- is located on the campus of the University of Illinois
- at Urbana-Champaign. NCSA is one of the participants in the
- National MetaCenter for Computational Science and Engineering.
- &lt;DT&gt; Cornell Theory Center
- &lt;DD&gt; CTC is located on the campus of Cornell University in Ithaca,
- New York. CTC is another participant in the National MetaCenter
- for Computational Science and Engineering.
- &lt;/DL&gt;
-</PRE>
-
-<P>
-The output looks like:
-
-<DL COMPACT>
-<DT>NCSA
-<DD>NCSA, the National Center for Supercomputing Applications, is located
- on the campus of the University of Illinois at Urbana-Champaign.
- NCSA is one of the participants in the National MetaCenter for
- Computational Science and Engineering.
-<DT>Cornell Theory Center
-<DD>CTC is located on the campus of Cornell University in Ithaca, New
- York. CTC is another participant in the National MetaCenter for
- Computational Science and Engineering.
-</DL>
-
-<P>
-The <SAMP>&lt;DT&gt;</SAMP> and<SAMP> &lt;DD&gt;</SAMP> entries can
-contain multiple paragraphs (separated by <SAMP>&lt;P&gt;</SAMP> paragraph
-tags), lists, or other definition information.
-
-<H4><A NAME = "A1.4.1.4">Nested Lists</A></H4>
-<P>
-Lists can be arbitrarily nested, although in practice you probably
-should limit the nesting to three levels. You can also have a number
-of paragraphs, each containing a nested list, in a single list item.
-
-<P>
- An example nested list:
-
-<PRE>
- &lt;UL&gt;
- &lt;LI&gt; A few New England states:
- &lt;UL&gt;
- &lt;LI&gt; Vermont
- &lt;LI&gt; New Hampshire
- &lt;/UL&gt;
- &lt;LI&gt; One Midwestern state:
- &lt;UL&gt;
- &lt;LI&gt; Michigan
- &lt;/UL&gt;
- &lt;/UL&gt;
-</PRE>
-
-<P>
-The nested list is displayed as
-
-<UL>
-<LI>A few New England states:
- <UL>
- <LI>Vermont
- <LI>New Hampshire
- </UL>
-<LI>One Midwestern state:
- <UL>
- <LI>Michigan
- </UL>
-</UL>
-
-<H3><A NAME = "A1.4.2">Preformatted Text</A></H3>
-<P>
-Use the<SAMP> &lt;PRE&gt;</SAMP> tag (which stands for ``preformatted'')
-to generate text in a fixed-width font and cause spaces, new lines,
-and tabs to be significant. (That is, multiple spaces are displayed
-as multiple spaces, and lines break in the same locations as in the
-source HTML file.) This is useful for program listings. For example,
-the following lines
-
-<PRE>
- &lt;PRE&gt;
- #!/bin/csh
- cd $SCR
- cfs get mysrc.f:mycfsdir/mysrc.f
- cfs get myinfile:mycfsdir/myinfile
- fc -02 -o mya.out mysrc.f
- mya.out
- cfs save myoutfile:mycfsdir/myoutfile
- rm *
- &lt;/PRE&gt;
-</PRE>
-
-<P>
-display as
-
-<PRE>
- #!/bin/csh
- cd $SCR
- cfs get mysrc.f:mycfsdir/mysrc.f
- cfs get myinfile:mycfsdir/myinfile
- fc -02 -o mya.out mysrc.f
- mya.out
- cfs save myoutfile:mycfsdir/myoutfile
- rm *
-</PRE>
-
-<P>
-Hyperlinks can be used within <SAMP>&lt;PRE&gt;</SAMP> sections. You
-should avoid using other HTML tags within <SAMP>&lt;PRE&gt;</SAMP>
-sections, however.
-
-<P>
-Note that because &lt;, &gt;, and &amp; have special meaning in HTML,
-you have to use their escape sequences (<SAMP>&amp;lt;</SAMP>, <SAMP>&amp;gt;</SAMP>,
-and <SAMP>&amp;amp;</SAMP>, respectively) to enter these characters.
-See the section <A HREF = "#A1.5.3">
-Special Characters</A> for more information.
-
-<H3><A NAME = "A1.4.3">Extended Quotations</A></H3>
-<P>
-Use the <SAMP>&lt;BLOCKQUOTE&gt;</SAMP> tag to include quotations in
-a separate block on the screen. Most browsers generally indent to separate
-it from surrounding text.
-
-<P>
-An example:
-
-<PRE>
- &lt;BLOCKQUOTE&gt;
- I still have a dream. It is a dream deeply rooted in the
- American dream. &lt;P&gt;
- I have a dream that one day this nation will rise up and
- live out the true meaning of its creed. We hold these truths
- to be self-evident that all men are created equal. &lt;P&gt;
- &lt;/BLOCKQUOTE&gt;
-</PRE>
-
-<P>
-The result is:
-<BLOCKQUOTE>
- I still have a dream. It is a dream deeply rooted in the American
- dream.
-
- <P>
- I have a dream that one day this nation will rise up and live out
- the true meaning of its creed. We hold these truths to be self-evident
- that all men are created equal.
-
-</BLOCKQUOTE>
-
-<H3><A NAME = "A1.4.4">Addresses</A></H3>
-<P>
-The <SAMP>&lt;ADDRESS&gt;</SAMP> tag is generally used to specify the
-author of a document and a means of contacting the author (e.g., an
-email address). This is usually the last item in a file.
-
-<P>
-For example, the last line of the online version of this guide is
-
-<PRE>
- &lt;ADDRESS&gt;
- A Beginner's Guide to HTML / NCSA / pubs@ncsa.uiuc.edu
- &lt;/ADDRESS&gt;
-</PRE>
-
-<P>
-The result is
-<ADDRESS>A Beginner's Guide to HTML / NCSA / pubs@ncsa.uiuc.edu </ADDRESS>
-
-<P>
-<STRONG>NOTE:</STRONG> <SAMP>&lt;ADDRESS&gt;</SAMP> is <EM>not</EM>
-used for postal addresses. See ``Forced Line Breaks'' on page 10 to
-see how to format postal addresses.
-
-<H2><A NAME = "A1.5">Character Formatting</A></H2>
-<P>
-You can code individual words or sentences with special styles. There
-are two types of styles: logical and physical. <DFN>Logical styles</DFN>
-tag text according to its meaning, while <DFN>physical styles</DFN>
-specify the specific appearance of a section. For example, in the preceding
-sentence, the words ``logical styles'' was tagged as a ``definition.''
-The same effect (formatting those words in italics), could have been
-achieved via a different tag that specifies merely ``put these words
-in italics.''
-
-<H3><A NAME = "A1.5.1">Physical Versus Logical: Use Logical Styles When Possible</A></H3>
-<P>
-If physical and logical styles produce the same result on the screen,
-why are there both? We devolve, for a couple of paragraphs, into the
-philosophy of SGML, which can be summed in a Zen-like mantra: ``Trust
-your browser.''
-
-<P>
-In the ideal SGML universe, content is divorced from presentation.
-Thus, SGML tags a level-one heading as a level-one heading, but does
-not specify that the level-one heading should be, for instance, 24-point
-bold Times centered on the top of a page. The advantage of this approach
-(it's similar in concept to style sheets in many word processors) is
-that if you decide to change level-one headings to be 20-point left-justified
-Helvetica, all you have to do is change the definition of the level-one
-heading in the presentation device (i.e., your World Wide Web browser).
-
-<P>
-The other advantage of logical tags is that they help enforce consistency
-in your documents. It's easier to tag something as <SAMP>&lt;H1&gt;</SAMP>
-than to remember that level-one headings are 24-point bold Times or
-whatever. The same is true for character styles. For example, consider
-the <SAMP>&lt;STRONG&gt;</SAMP> tag. Most browsers render it in bold
-text. However, it is possible that a reader would prefer that these
-sections be displayed in red instead. Logical styles offer this flexibility.
-
-<H4><A NAME = "A1.5.1.1">Logical Styles</A></H4>
-<DL COMPACT>
-<DT><SAMP>&lt;DFN&gt;</SAMP>
-<DD>for a word being defined. Typically displayed in italics. (<DFN>NCSA
- </DFN><DFN>Mosaic</DFN> is a World Wide Web browser.)
-<DT><SAMP>&lt;EM&gt;</SAMP>
-<DD>for emphasis. Typically displayed in italics. (<EM>Watch out for
- pick</EM><EM>pockets</EM>.)
-<DT><SAMP>&lt;CITE&gt;</SAMP>
-<DD>for titles of books, films, etc. Typically displayed in italics.
- (<CITE>A </CITE><CITE>Beginner's Guide to HTML</CITE>)
-<DT><SAMP>&lt;CODE&gt;</SAMP>
-<DD>for snippets of computer code. Displayed in a fixed-width font.
- (The <SAMP>&lt;stdio.h&gt;</SAMP> header file)
-<DT> <SAMP>&lt;KBD&gt;</SAMP>
-<DD>for user keyboard entry. Should be displayed in a bold fixed-width
- font, but many browsers render it in the plain fixed-width font.
- (Enter <KBD>passwd</KBD> to change your password.)
-<DT><SAMP>&lt;SAMP&gt;</SAMP>
-<DD>for computer status messages. Displayed in a fixed-width font.
- (<SAMP>Segmentation fault: Core dumped.</SAMP>)
-<DT><SAMP>&lt;STRONG&gt;</SAMP>
-<DD>for strong emphasis. Typically displayed in bold. (<STRONG>Important</STRONG>)
-
-<DT><SAMP>&lt;VAR&gt;</SAMP>
-<DD>for a ``metasyntactic'' variable, where the user is to replace
- the variable with a specific instance. Typically displayed in italics.
- (<KBD>rm</KBD> <VAR>filename</VAR> deletes the file.)
-</DL>
-
-<H4><A NAME = "A1.5.1.2">Physical Styles</A></H4>
-<DL COMPACT>
-<DT><SAMP>&lt;B&gt;</SAMP>
-<DD>bold text
-<DT><SAMP>&lt;I&gt;</SAMP>
-<DD>italic text
-<DT><SAMP>&lt;TT&gt;</SAMP>
-<DD>typewriter text, e.g. fixed-width font.
-</DL>
-
-<H3><A NAME = "A1.5.2">Using Character Tags</A></H3>
-<P>
-To apply a character style,
-
-<OL>
-<LI>Start with <SAMP>&lt;</SAMP><VAR>tag</VAR><SAMP>&gt;</SAMP>, where<SAMP>
- </SAMP><VAR>tag</VAR> is the desired character formatting tag,
- to indicate the beginning of the tagged text.
-<LI>Enter the tagged text.
-<LI>End the passage with <SAMP>&lt;/</SAMP><VAR>tag</VAR><SAMP>&gt;</SAMP>.
-</OL>
-
-<H3><A NAME = "A1.5.3">Special Characters</A></H3>
-<H4><A NAME = "A1.5.3.1">Escape Sequences</A></H4>
-<P>
-Four characters of the ASCII character set -- the left angle bracket
-(&lt;), the right angle bracket (&gt;), the ampersand (&amp;) and the
-double quote (&quot;) -- have special meaning within HTML and therefore
-cannot be used ``as is'' in text. (The angle brackets are used to indicate
-the beginning and end of HTML tags, and the ampersand is used to indicate
-the beginning of an escape sequence.)
-
-<P>
-To use one of these characters in an HTML document, you must enter
-its <DFN>escape </DFN><DFN>sequence</DFN> instead:
-
-<DL COMPACT>
-<DT><SAMP>&amp;lt;</SAMP>
-<DD>the escape sequence for &lt;
-<DT><SAMP>&amp;gt;</SAMP>
-<DD>the escape sequence for &gt;
-<DT><SAMP>&amp;amp;</SAMP>
-<DD>the escape sequence for &amp;
-<DT><SAMP>&amp;quot;</SAMP>
-<DD>the escape sequence for &quot;
-</DL>
-
-<P>
-Additional escape sequences support accented characters. For example:
-
-<DL COMPACT>
-<DT><SAMP>&amp;ouml;</SAMP>
-<DD>the escape sequence for a lowercase o with an umlaut: &ouml;
-
-<DT><SAMP>&amp;ntilde;</SAMP>
-<DD>the escape sequence for a lowercase n with an tilde: &ntilde;
-<DT><SAMP>&amp;Egrave;</SAMP>
-<DD>the escape sequence for an uppercase E with a grave accent: &Egrave;
-
-</DL>
-
-<P>
-<A HREF = "http://www.w3.org/hypertext/WWW/MarkUp/ISOlat1.html"> A full
-list of supported characters</A> is available.
-
-<P>
-<STRONG>NOTE:</STRONG> Unlike the rest of HTML, the escape sequences
-are case sensitive. You cannot, for instance, use &amp;LT; instead
-of &amp;lt;.
-
-<H4><A NAME = "A1.5.3.2">Forced Line Breaks</A></H4>
-<P>
-The <SAMP>&lt;BR&gt;</SAMP> tag forces a line break with no extra space
-between lines. (By contrast, most browsers format the <SAMP>&lt;P&gt;</SAMP>
-paragraph tag with an additional blank line to more clearly indicate
-the beginning the new paragraph.)
-
-<P>
-One use of <SAMP>&lt;BR&gt;</SAMP> is in formatting addresses:
-
-<PRE>
- National Center for Supercomputing Applications&lt;BR&gt;
- 605 East Springfield Avenue&lt;BR&gt;
- Champaign, Illinois 61820-5518&lt;BR&gt;
-</PRE>
-
-<H4><A NAME = "A1.5.3.3">Horizontal Rules</A></H4>
-<P>
-The <SAMP>&lt;HR&gt; tag </SAMP>produces a horizontal line the width
-of the browser window.
-
-<H2><A NAME = "A1.6">In-line Images</A></H2>
-<P>
-Most Web browsers can display in-line images (that is, images next
-to text) that are in X Bitmap (XBM) or GIF format. Each image takes
-time to process and slows down the initial display of the document,
-so generally you should not include too many or overly large images.
-
-<P>
-To include an in-line image, use
-
-<PRE>
- &lt;IMG SRC=<VAR>image_URL</VAR>&gt;
-</PRE>
-
-<P>
-where <VAR>image_URL</VAR> is the URL of the image file. The syntax
-for <SAMP>IMG SRC </SAMP>URLs is identical to that used in an anchor
-<SAMP>HREF</SAMP>. If the image file is a GIF file, then the filename
-part of <VAR>image_URL </VAR><STRONG>must</STRONG> end with <SAMP>.gif</SAMP>.
-Filenames of X Bitmap images must end with <SAMP>.xbm</SAMP>.
-
-<P>
-<IMG SRC = "Graphics/RandomPic.gif" ALT = "">By default the bottom
-of an image is aligned with the text as shown in this paragraph.
-
-<P>
-<IMG SRC = "Graphics/RandomPic.gif" ALT = "" ALIGN = TOP>
-Add the <SAMP>ALIGN=TOP</SAMP>
-option if you want the browser to align adjacent text with the top
-of the image as shown in this paragraph. The full in-line image tag
-with the top alignment is:
-
-<PRE>
- &lt;IMG ALIGN=top SRC=<VAR>image_URL</VAR>&gt;
-</PRE>
-
-<P>
-<IMG SRC = "Graphics/RandomPic.gif" ALT = "" ALIGN = MIDDLE>
-<SAMP>ALIGN=MIDDLE</SAMP>
-aligns the text with the center of the image.
-
-<H3><A NAME = "A1.6.1">Alternate Text for Browsers That Can't Display Images</A></H3>
-<P>
-Some World Wide Web browsers, primarily those that run on VT100 terminals,
-cannot display images. The <SAMP>ALT</SAMP> option allows you to specify
-text to be displayed when an image cannot be. For example:
-
-<PRE>
- &lt;IMG SRC = &quot;UpArrow.gif&quot; ALT = &quot;Up&quot;&gt;
-</PRE>
-
-<P>
-where <SAMP>UpArrow.gif </SAMP>is the picture of an upward pointing
-arrow. With NCSA Mosaic and other graphics-capable viewers, the user
-sees the up arrow graphic. With a VT100 browser, such as lynx, the
-user sees the word ``Up.''
-
-<H2><A NAME = "A1.7">External Images, Sounds, and Animations</A></H2>
-<P>
-You may want to have an image open as a separate document when a user
-activates a link on either a word or a smaller, in-line version of
-the image included in your document. This is considered an external
-image and is useful if you do not wish to slow down the loading of
-the main document with large in-line images.
-
-<P>
-To include a reference to an external image, use
-
-<PRE>
- &lt;A HREF = <VAR>image_URL</VAR>&gt;link anchor&lt;/A&gt;
-</PRE>
-
-<P>
-Use the same syntax is for links to external animations and sounds.
-The only difference is the file extension of the linked file. For example,
-
-<P>
-<SAMP>&lt;A HREF = &quot;QuickTimeMovie.mov&quot;&gt;link anchor&lt;/A&gt;</SAMP>
-
-<P>
-specifies a link to a QuickTime movie. Some common file types and their
-extensions are:
-
-<DL COMPACT>
-<DT><STRONG>File Type</STRONG>
-<DD><STRONG>Extension</STRONG>
-<DT>Plain text
-<DD><SAMP>.txt</SAMP>
-<DT>HTML document
-<DD><SAMP>.html</SAMP>
-<DT>GIF image
-<DD><SAMP>.gif</SAMP>
-<DT>TIFF image
-<DD><SAMP>.tiff</SAMP>
-<DT>XBM bitmap image
-<DD><SAMP>.xbm</SAMP>
-<DT>JPEG image
-<DD><SAMP>.jpg</SAMP> or <SAMP>.jpeg</SAMP>
-<DT>PostScript file
-<DD><SAMP>.ps</SAMP>
-<DT>AIFF sound
-<DD><SAMP>.aiff</SAMP>
-<DT>AU sound
-<DD><SAMP>.au</SAMP>
-<DT>QuickTime movie
-<DD><SAMP>.mov</SAMP>
-<DT>MPEG movie
-<DD><SAMP>.mpeg</SAMP> or <SAMP>.mpg</SAMP>
-</DL>
-
-<P>
-Make sure your intended audience has the necessary viewers. Most UNIX
-workstations, for instance, cannot view QuickTime movies.
-
-<H2><A NAME = "A1.8">Troubleshooting</A></H2>
-<H3><A NAME = "A1.8.1">Avoid Overlapping Tags</A></H3>
-<P>
-Consider this snippet of HTML:
-
-<PRE>
- &lt;B&gt;This is an example of &lt;DFN&gt;overlapping&lt;/B&gt; HTML tags.&lt;/DFN&gt;
-</PRE>
-
-<P>
-The word ``overlapping'' is contained within both the <SAMP>&lt;B&gt;</SAMP>
-and <SAMP>&lt;DFN&gt;</SAMP> tags. How does the browser format it?
-You won't know until you look, and different browsers will likely react
-differently. In general, avoid overlapping tags.
-
-<H3><A NAME = "A1.8.2">Embed Anchors and Character Tags, But Nothing Else</A></H3>
-<P>
-It is acceptable to embed anchors within another HTML element:
-
-<PRE>
- &lt;H1&gt;&lt;A HREF = &quot;Destination.html&quot;&gt;My heading&lt;/A&gt;&lt;/H1&gt;
-</PRE>
-
-<P>
-<EM>Do not</EM> embed a heading or another HTML element within an anchor:
-
-<PRE>
- &lt;A HREF = &quot;Destination.html&quot;&gt;
- &lt;H1&gt;My heading&lt;/H1&gt;
- &lt;/A&gt;
-</PRE>
-
-<P>
-Although most browsers currently handle this example, it is forbidden
-by the official HTML and HTML+ specifications, and will not work with
-future browsers.
-
-<P>
-Character tags modify the appearance of other tags:
-
-<PRE>
- &lt;UL&gt;&lt;LI&gt;&lt;B&gt;A bold list item&lt;/B&gt;
- &lt;UL&gt;
- &lt;LI&gt;&lt;I&gt;An italic list item&lt;/I&gt;
- &lt;/UL&gt;
-</PRE>
-
-<P>
-However, avoid embedding other types of HTML element tags. For example,
-it is tempting to embed a heading within a list, in order to make the
-font size larger:
-
-<PRE>
- &lt;UL&gt;&lt;LI&gt;&lt;H1&gt;A large heading&lt;/H1&gt;
- &lt;UL&gt;
- &lt;LI&gt;&lt;H2&gt;Something slightly smaller&lt;/H2&gt;
- &lt;/UL&gt;
-</PRE>
-
-<P>
-Although some browsers, such as NCSA Mosaic for the X Window System,
-format this construct quite nicely, it is unpredictable (because it
-is undefined) what other browsers will do. For compatibility with all
-browsers, avoid these kinds of constructs.
-
-<P>
-What's the difference between embedding a <SAMP>&lt;B&gt;</SAMP> within
-a <SAMP>&lt;LI&gt;</SAMP> tag as opposed to embedding a <SAMP>&lt;H1&gt;</SAMP>
-within a <SAMP>&lt;LI&gt;</SAMP>? This is again a question of SGML.
-The semantic meaning of <SAMP>&lt;H1&gt;</SAMP> is that it's the main
-heading of a document and that it should be followed by the content
-of the document.Thus it doesn't make sense to find a <SAMP>&lt;H1&gt;</SAMP>
-within a list.
-
-<P>
-Character formatting tags also are generally not additive. You might
-expect that
-
-<PRE>
- &lt;B&gt;&lt;I&gt;some text&lt;/I&gt;&lt;/B&gt;
-</PRE>
-
-<P>
-would produce bold-italic text. On some browsers it does; other browsers
-interpret only the innermost tag (here, the italics).
-
-<H3><A NAME = "A1.8.3">Check Your Links</A></H3>
-<P>
-When an <SAMP>&lt;IMG&gt;</SAMP> tag points at an image that does not
-exist, a dummy image is substituted. When this happens, make sure that
-the referenced image does in fact exist, that the hyperlink has the
-correct information in the URL, and that the file permission is set
-appropriately (world-readable).
-
-<H2><A NAME = "A1.9">A Longer Example</A></H2>
-<P>
-Here is a longer example of an HTML document:
-
-<PRE>
- &lt;HEAD&gt;
- &lt;TITLE&gt;A Longer Example&lt;/TITLE&gt;
- &lt;/HEAD&gt;
- &lt;BODY&gt;
- &lt;H1&gt;A Longer Example&lt;/H1&gt;
- This is a simple HTML document. This is the first
- paragraph. &lt;P&gt;
- This is the second paragraph, which shows special effects. This is a
- word in &lt;I&gt;italics&lt;/I&gt;. This is a word in &lt;B&gt;bold&lt;/B&gt;.
- Here is an in-lined GIF image: &lt;IMG SRC = &quot;myimage.gif&quot;&gt;.
- &lt;P&gt;
- This is the third paragraph, which demonstrates links. Here is
- a hypertext link from the word &lt;A HREF = &quot;subdir/myfile.html&quot;&gt;foo&lt;/A&gt;
- to a document called &quot;subdir/myfile.html&quot;. (If you
- try to follow this link, you will get an error screen.) &lt;P&gt;
- &lt;H2&gt;A second-level header&lt;/H2&gt;
- Here is a section of text that should display as a
- fixed-width font: &lt;P&gt;
- &lt;PRE&gt;
- On the stiff twig up there
- Hunches a wet black rook
- Arranging and rearranging its feathers in the rain ...
- &lt;/PRE&gt;
- This is a unordered list with two items: &lt;P&gt;
- &lt;UL&gt;
- &lt;LI&gt; cranberries
- &lt;LI&gt; blueberries
- &lt;/UL&gt;
- This is the end of my example document. &lt;P&gt;
- &lt;ADDRESS&gt;Me (me@mycomputer.univ.edu)&lt;/ADDRESS&gt;
- &lt;/BODY&gt;
-</PRE>
-
-<A HREF=LongerExample.html>Click here</A> to see the formatted version.
-
-<P>
-In addition to tags already discussed, this example also uses the <SAMP>&lt;HEAD&gt;
-... &lt;/HEAD&gt; </SAMP>and <SAMP>&lt;BODY&gt; ... &lt;/BODY&gt;</SAMP>
-tags, which separate the document into introductory information about
-the document and the main text of the document. These tags don't change
-the appearance of the formatted document at all, but are useful for
-several purposes (for example, NCSA Mosaic for Macintosh 2.0, for example,
-allows you to browse just the header portion of document before deciding
-whether to download the rest), and it is recommended that you use these
-tags.
-
-<H2><A NAME = "A1.10">For More Information</A></H2>
-<P>
-This guide is only an introduction to HTML and not a comprehensive
-reference. Below are additional sources of information.
-
-<H3><A NAME = "A1.10.1">Fill-out Forms</A></H3>
-<P>
-One major feature not discussed here is fill-out forms, which allows
-users to return information to the World Wide Web server. For information
-on fill-out forms, look at this
-<A HREF = "/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html"> Fill-out
-Forms Overview</A>
-
-<H3><A NAME = "A1.10.2">Style Guides</A></H3>
-<P>
-The following offer advice on how to write ``good'' HTML:
-
-<UL>
-<LI><A HREF = "http://www.willamette.edu/html-composition/strict-html.html">
- <CITE>Composing Good HTML</CITE></A>
-<LI>
-<A HREF = "http://www.w3.org/hypertext/WWW/Provider/Style/Introduction.html">
- CERN's style guide for online hypertext</A>
-</UL>
-
-<H3><A NAME = "A1.10.3">Other Introductory Documents</A></H3>
-These cover similar information as this guide:
-<UL>
-<LI><A HREF = "http://www.ucc.ie/info/net/htmldoc.html">
- <CITE>How to Write HTML Files</CITE></A>
-<LI><A HREF = "http://melmac.corp.harris.com/about_html.html">
- <CITE>Introduction to HTML</CITE></A>
-</UL>
-
-<H3><A NAME = "A1.10.4">Additional References</A></H3>
-<UL>
-<LI><A HREF = "http://kuhttp.cc.ukans.edu/lynx_help/HTML_quick.html">
- <CITE>The HTML Quick Reference Guide</CITE></A>,
- which provides a comprehensive listing of HTML codes
-<LI><A HREF = "http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html">
- The official HTML specification</A>
-<LI><A HREF = "http://www.w3.org/hypertext/WWW/MarkUp/SGML.html">A
- description of SGML</A>, the Standard Generalized Markup Language
-<LI><A HREF
-= "http://www.ietf.cnri.reston.va.us/html.charters/html-charter.html">
-<cite>The HTML Working Group of the IETF</cite></A>.
-</UL>
-<HR>
-<ADDRESS>
-National Center for Supercomputing Applications / pubs@ncsa.uiuc.edu
-</ADDRESS>
-</BODY>
-
diff --git a/contrib/ntp/html/icons/home.gif b/contrib/ntp/html/icons/home.gif
deleted file mode 100644
index e181298..0000000
--- a/contrib/ntp/html/icons/home.gif
+++ /dev/null
Binary files differ
diff --git a/contrib/ntp/html/icons/mail2.gif b/contrib/ntp/html/icons/mail2.gif
deleted file mode 100644
index 21bc1c4..0000000
--- a/contrib/ntp/html/icons/mail2.gif
+++ /dev/null
Binary files differ
diff --git a/contrib/ntp/html/index.htm b/contrib/ntp/html/index.htm
deleted file mode 100644
index 680cec8..0000000
--- a/contrib/ntp/html/index.htm
+++ /dev/null
@@ -1,261 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>The Network Time Protocol (NTP) Distribution</title>
-</head>
-<body>
-<h3>The Network Time Protocol (NTP) Distribution</h3>
-
-<img align="left" src="pic/barnstable.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm"><i>P.T. Bridgeport
-Bear</i>; from <i>Pogo</i>, Walt Kelly</a>
-
-<p>Pleased to meet you.<br clear="left">
-</p>
-
-<hr>
-<h4>Introduction</h4>
-
-Note: The software contained in this distribution is available
-without charge under the conditions set forth in the <a href=
-"copyright.htm">Copyright Notice</a>.
-
-<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. Some configurations include cryptographic
-authentication to prevent accidental or malicious protocol attacks
-and some provide automatic server discovery using IP multicast.</p>
-
-<p>Background information on computer network time synchronization
-can be found on the <a href="exec.htm">Executive Summary - Computer
-Network Time Synchronization</a> page. Discussion on protocol
-conformance issues and interoperability with previous NTP versions
-can be found in the <a href="biblio.htm">Protocol Conformance
-Statement</a> page. Discussion on how NTP reckons the time can be
-found in the <a href="leap.htm">NTP Timescale and Leap Seconds</a>
-page. Background information, bibliography and briefing slides
-suitable for presentations can be found in the <a href=
-"http://www.eecis.udel.edu/~mills/ntp.htm">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>Building and Installing NTP</h4>
-
-NTP supports Unix and Windows (NT4 and 2000) systems. The <a href=
-"build.htm">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 in the <a href="config.htm">
-Configuration Options</a> and <a href="release.htm">Release
-Notes</a> pages. Note that support for strong cryptography requires
-cryptographic libraries not included in this distribution.
-
-<p>Bringing up a NTP primary server requires a radio or satellite
-receiver or modem. It is also possible to configure a machine on an
-isolated network with the local clock driver and have other
-machines synchronize to it. The distribution includes hardware
-drivers for the local clock and over three dozen radio clocks and
-modem services. A list of supported drivers is given in the <a
-href="refclock.htm">Reference Clock Drivers</a> page. For most
-popular workstations marketed by Digital/Compaq, Sun 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>
-
-<h4>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.htm">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.htm">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.htm">
-<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.htm">Association Management</a> page. NTP support
-for one or more computers is normally engineered as part of the
-existing NTP synchronization subnet. The existing NTP 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>The NTP subnet in late 2000 includes 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 over a hundred public secondary (stratum
-2) servers synchronized to the primary servers and providing
-synchronization to a total in excess of 100,000 clients and servers
-in the Internet. The current lists are maintained in the <a href=
-"http://www.eecis.udel.edu/~mills/ntp/index.htm">Information on
-Time and Frequency Services</a> page, which is updated frequently.
-There are numerous private primary and secondary servers not
-normally available to the public as well. You are strongly
-discouraged from using these servers, since they sometimes hide in
-little ghettos behind dinky links to the outside world and your
-traffic can bring up expensive ISDN lines, causing much grief and
-frustration.</p>
-
-<h4>Resolving Problems</h4>
-
-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 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.htm">NTP Debugging Techniques</a>
-and <a href="hints.htm">Hints and Kinks</a> pages contain useful
-information for identifying problems and devising solutions.
-
-<p>Users are requested to report bugs, offer suggestions and
-contribute additions to this distribution. The <a href=
-"patches.htm">Patching Procedures</a> page suggests procedures
-which greatly simplify distribution updates, while the <a href=
-"porting.htm">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="refclock.htm">Reference Clock
-Drivers</a> page. Further information on NTP in the Internet can be
-found in the <a href="http://www.eecis.udel.edu/~ntp">NTP web
-page</a>.</p>
-
-<h4>Program Manual Pages</h4>
-
-<ul>
-<li><a href="ntpd.htm"><tt>ntpd</tt> - Network Time Protocol (NTP)
-daemon</a></li>
-
-<li><a href="ntpq.htm"><tt>ntpq</tt> - standard NTP query
-program</a></li>
-
-<li><a href="ntpdc.htm"><tt>ntpdc</tt> - special NTP query
-program</a></li>
-
-<li><a href="ntpdate.htm"><tt>ntpdate</tt> - set the date and time
-via NTP</a></li>
-
-<li><a href="ntptrace.htm"><tt>ntptrace</tt> - trace a chain of NTP
-servers back to the primary source</a></li>
-
-<li><a href="tickadj.htm"><tt>tickadj</tt> - set time-related
-kernel variables</a></li>
-
-<li><a href="ntptime.htm"><tt>ntptime</tt> - read kernel time
-variables</a></li>
-
-<li><a href="genkeys.htm"><tt>ntp-genkeys</tt> - generate public
-and private keys</a></li>
-</ul>
-
-<h4>Supporting Documentation</h4>
-
-<ul>
-<li><a href="http://www.eecis.udel.edu/~mills/ntp.htm">NTP Project
-and Reference Library</a></li>
-
-<li><a href="copyright.htm">Copyright Notice</a></li>
-
-<li><a href="exec.htm">Executive Summary - Computer Network Time
-Synchronization</a></li>
-
-<li><a href="biblio.htm">Protocol Conformance Statement</a></li>
-
-<li><a href="leap.htm">NTP Timescale and Leap Seconds</a></li>
-
-<li><a href="notes.htm">Notes on Configuring NTP and Setting up a
-NTP Subnet</a></li>
-
-<li><a href="release.htm">NTP Version 4 Release Notes</a></li>
-
-<li><a href="build.htm">Building and Installing the
-Distribution</a></li>
-
-<li><a href="config.htm">Configuration Options</a></li>
-
-<li><a href="debug.htm">NTP Debugging Techniques</a></li>
-
-<li><a href="refclock.htm">Reference Clock Drivers</a></li>
-
-<li><a href="patches.htm">Patching Procedures</a></li>
-
-<li><a href="hints.htm">Hints and Kinks</a></li>
-
-<li><a href="porting.htm">Porting Hints</a></li>
-</ul>
-
-<h4>Application Notes</h4>
-
-<ul>
-<li><a href="prefer.htm">Mitigation Rules and the <tt>prefer</tt>
-Keyword</a></li>
-
-<li><a href="assoc.htm">Association Management</a></li>
-
-<li><a href="pps.htm">Pulse-per-second (PPS) Signal
-Interfacing</a></li>
-
-<li><a href="gadget.htm">Gadget Box PPS Level Converter and CHU
-Modem</a></li>
-
-<li><a href="measure.htm">Time and Time Interval Measurement with
-Application to Computer and Network Performance Evaluation</a></li>
-
-<li><a href="kern.htm">Kernel Model for Precision
-Timekeeping</a></li>
-
-<li><a href="kernpps.htm">Kernel Programming Interface for
-Precision Time Signals</a></li>
-</ul>
-
-<hr>
-<center><img src="pic/pogo1a.gif" alt="gif"></center>
-
-<br>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/index.html b/contrib/ntp/html/index.html
deleted file mode 100644
index 57fd25a..0000000
--- a/contrib/ntp/html/index.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!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.htm b/contrib/ntp/html/kern.htm
deleted file mode 100644
index 4139fb2..0000000
--- a/contrib/ntp/html/kern.htm
+++ /dev/null
@@ -1,122 +0,0 @@
-<!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>
-</head>
-<body>
-<h3>Kernel Model for Precision Timekeeping</h3>
-
-<hr>
-<img align="left" src="pic/alice61.gif" alt="gif"> <a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>Exploding kernel<br clear="left">
-</p>
-
-<hr>
-<p>The technical report [2], which is a major revision and update
-of an earlier report [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 hybrid loop
-provides automatic time and frequency steering with update
-intervals from a few seconds to over one day.</p>
-
-<p>The hybrid PLL/FLL has been implemented in the Unix kernels for
-several operating systems, including FreeBSD and Linux and those
-made by Sun Microsystems, Digital/Compaq and Hewlett Packard. The
-modifications are currently included in the licensed kernels for
-Digital Unix 4.0 (aka Tru64) and Sun Solaris 2.8. Since the
-modifications involve proprietary kernel interface code, they
-cannot be provided for other licensed kernels directly. Inquiries
-should be directed to the manufacturer's representatives. The
-software and documentation, including a simulator with code
-segments almost identical to the implementations, but not involving
-licensed code, is called <tt>nanokernel.tar.gz</tt> and available
-via the web at <a href="http://www.ntp.org">www.ntp.org</a> or by
-anonymous FTP from ftp.udel.edu in the <tt>pub/ntp/software</tt>
-directory.</p>
-
-<p>Recently [1], the model has been re-implemented to support a
-nanosecond system clock. The <tt>/usr/include/sys/timex.h</tt>
-header file defines the applications programming interface (API)
-routines and data structures. Implementations are available for
-Linux, FreeBSD, SunOS and Tru64; however, only the Linux and
-FreeBSD implementations, which are included in recent system
-versions, are directly available. The software and documentation,
-including a simulator with code segments almost identical to the
-implementations, but not involving licensed code, is called <tt>
-nanokernel.tar.gz</tt> and available via the web at <a href=
-"http://www.ntp.org">www.ntp.org</a> or by anonymous FTP from
-ftp.udel.edu in the <tt>pub/ntp/software</tt> directory.</p>
-
-<p>The model changes the way the system clock is adjusted in time
-and frequency, as well as provides mechanisms to discipline its
-time and frequency to an external precision timing source, such as
-described in the <a href="pps.htm">Pulse-per-second (PPS) Signal
-Interfacing</a> page. The model incorporates a generic system call
-interface for use with the NTP or similar time synchronization
-protocol. The NTP software daemons for Version 3 <tt>xntpd</tt> and
-Version 4 <tt>ntpd</tt> use this API to provide synchronization
-limited in principle only by the accuracy and stability of the
-external timing source. There are two new system calls defined in
-<tt>timex.h</tt>, <tt>ntp_gettime()</tt>, which returns a structure
-including the current time, estimated error and maximum error, and
-<tt>ntp_adjtime()</tt>, which provides a means to adjust kernel
-variables, including the current time and frequency offsets.</p>
-
-<p>These kernel modifications are normally used in conjunction with
-a kernel hardware interface such as described in the <a href=
-"kernpps.htm">Kernel Programming Interface for Precision Time
-Signals</a> page.</p>
-
-<h4>References</h4>
-
-<ol>
-
-<li><p>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=
-"database/papers/nano/nano2.ps">PostScript</a> | <a href=
-"http://www.eecis.udel.edu/~mills/database/papers/nano/nano2.pdf">
-PDF</a>, Slides: <a href=
-"http://www.eecis.udel.edu/~mills/database/brief/nano/nano.htm">
-HTML</a> | <a href=
-"http://www.eecis.udel.edu/~mills/database/brief/nano/nano.ps">
-PostScript</a> | <a href=
-"http://www.eecis.udel.edu/~mills/database/brief/nano/nano.pdf">
-PDF</a> | <a href=
-"http://www.eecis.udel.edu/~mills/database/brief/nano/nano.ppt">
-PowerPoint</a></p></li>
-
-<li><p>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/~mills/database/reports/kern/kerna.ps">
-PostScript</a> | <a href="database/reports/kern/kerna.pdf">PDF</a>,
-Body: <a href=
-"http://www.eecis.udel.edu/~mills/database/reports/kern/kernb.ps">
-PostScript</a> | <a href=
-"http://www.eecis.udel.edu/~mills/database/reports/kern/kernb.pdf">
-PDF</a></p></li>
-
-<li><p>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/~mills/database/rfc/rfc1589.txt">
-ASCII</a></p></li>
-</ol>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/kern.html b/contrib/ntp/html/kern.html
deleted file mode 100644
index 9a8a392..0000000
--- a/contrib/ntp/html/kern.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!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/kernpps.htm b/contrib/ntp/html/kernpps.htm
deleted file mode 100644
index d9c9643..0000000
--- a/contrib/ntp/html/kernpps.htm
+++ /dev/null
@@ -1,24 +0,0 @@
-<html><head><title>
-Kernel Programming Interface for Precision Time Signals
-Network Performance Evaluation
-</title></head><body><h3>
-Kernel Programming Interface for Precision Time Signals
-</h3><hr>
-
-<p>The technical report [1] describes a proposed application programming interface (API) for external precision time signals, such as the pulse-per-second (PPS) signal generated by some radio clocks and cesium oscillators. The report argues for a generic capability in the ubiquitous Unix kernel, which could be used for a wide variety of measurement applications, including network time synchronization and experiments involving performance measurement and evaluation of computer networks and transmission systems. The hardware to do this requires only a serial port and a modem control lead, such as the data carrier detect (DCD) lead, which can be driven by an external source via a level converter/pulse generator.
-
-<p>Support for this API has been implemented in the NTP Version 4 software distribution. The <tt>/usr/include/sys/timepps.h</tt> header file defines the API interface routines and data structures. The API obsoletes previous APIs based on the <tt>tty_clock</tt> and <tt>ppsclock</tt> line disciplines and streams modules, which are no longer supported. The API used by the <a href=driver22.htm>PPS Clock Discipline</a> driver (type 22) to support PPS signals via either a serial port or parallel port, depending on the operating system. The API is supported in stock FreeBSD from 3.4 and with the addition of the <tt>PPSkit</tt> kernel software in Linux. Limited support for Solaris from 2.8 is available using the <tt>timepps.h.solaris</tt> header file included in this distribution. Copy this file to <tt>/usr/include/sys</tt> before configuring the distributution.
-
-<p>The API is normally used in conjunction with the precision time kernel modifications described in the <a href=kern.htm>Kernel Model for Precision Timekeeping</a> page.
-
-<h4>Reference</h4>
-
-<ol>
-
-<p><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><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/keygen.html b/contrib/ntp/html/keygen.html
deleted file mode 100644
index fcdb831..0000000
--- a/contrib/ntp/html/keygen.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!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.htm b/contrib/ntp/html/ldisc.htm
deleted file mode 100644
index e6a026a..0000000
--- a/contrib/ntp/html/ldisc.htm
+++ /dev/null
@@ -1,89 +0,0 @@
-<html><head><title>
-Line Disciplines and Streams Modules
-</title></head><body><h3>
-Line Disciplines and Streams Modules
-</h3><hr>
-
-<p><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 (ioctls) 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>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>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.
-
-<h4>PPSAPI Application Program Interface</h4>
-
-<p>Pulse-per-second (PPS) signals are normally processed as described in the <a href=pps.htm>Pulse-per-second (PPS) Signal Interfacing</a> page. The <a href=driver22.htm>PPS Clock Discipline</a> driver uses the PPSAPI application program interface to capture PPS signal transitions used to fine-tune the system clock. This interface, defined in RFC-2783, is the only PPS interface supported in NTP. While older PPS interfaces based on the ioctls described below continue to be supported, they are used only in the special header file <t>/usr/include/sys/timepps.h</tt>, which implements the PPSAPI specific to each archeticture and operating system.
-
-<p>It is the intent of the evolving design to remove all PPS support from the various clock drivers and utilize only the PPS driver for PPS support. This allows the required sanity checks and signal grooming to be provided and maintained in one place and avoids cluttering up the drivers with duplicate functionality. Since the PPS signal samples are processed by the entire suite of NTP grooming, selection and clustering algorithms, noisy PPS signals and signals outside specific time and frequency tolerances are excluded.
-
-<p>The PPSAPI interface provides the following functions:
-
-<dl>
-
-<dt><tt>time_pps_create</tt>
-<dd>Creates a PPS interface instance and returns a handle to it.</dd>
-
-<dt><tt>time_pps_destroy</tt>
-<dd>Destroys a PPS interface and returns the resources used.</dd>
-
-<dt><tt>time_pps_setparams</tt>
-<dd>Sets the parameters associated with a PPS interface instance, including offsets to be automatically added to captured timestamps.</dd>
-
-<dt><tt>time_pps_getparams</tt>
-<dd>Returns the parameters associated with a PPS interface instance.</dd>
-
-<dt><tt>time_pps_getcap</tt>
-<dd>Returns the capabilities of the current interface and kernel implementation.</dd>
-
-<dt><tt>time_pps_fetch</tt>
-<dd>Returns the current timestamps associated with a PPS interface instance in either nanoseconds and nanoseconds (Unix <tt>timespec</tt>) or seconds and fraction (NTP) format.</dd>
-
-<dt><tt>time_pps_kcbind</tt>
-<dd>If kernel PPS processing is supported, this binds the support to the associated PPS interface instance.</dd>
-
-</dl>
-
-<p>The entire PPS interface functionality is currently provided by inline code in the <tt>timepps.h</tt> header files implemented for SunOS, Solaris, FreeBSD, Linux and Tru64. While not all implementations support the full PPSAPI specification, they do support all the functions required for the PPS driver. 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 ioctls function improperly in Solaris versions prior to 2.8 with patch Generic_108528-02.
-
-<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>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>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>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.
-
-<h4><tt>ppsclock</tt>Streams Module</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 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>The ppsclock streams module implements the <tt>CIOGETEV</tt> ioctl, which takes a pointer to the structure
-
-<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>Users are cautioned that these ioctls function improperly in Solaris versions prior to 2.8 with patch Generic_108528-02.
-
-<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=driver7.htm>Radio CHU Audio Demodulator/Decoder (type 7)</a> clock driver.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/ldisc.html b/contrib/ntp/html/ldisc.html
deleted file mode 100644
index 40e5804..0000000
--- a/contrib/ntp/html/ldisc.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!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/leap.htm b/contrib/ntp/html/leap.htm
deleted file mode 100644
index 97bf8d4..0000000
--- a/contrib/ntp/html/leap.htm
+++ /dev/null
@@ -1,250 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>NTP Timescale and Leap Seconds</title>
-</head>
-<body>
-<h3>NTP Timescale and Leap Seconds</h3>
-
-<img align="left" src="pic/alice15.gif" alt="gif"><a href=
-"pictures.htm">from <i>Alice's Adventures in Wonderland</i>, Lewis
-Carroll</a>
-
-<p>The Mad Hatter and the March Hare are discussing whether the
-Teapot serial number should have two or four digits.<br clear=
-"left">
-</p>
-
-<hr>
-<h4>Introduction</h4>
-
-<p>In the year 2001 the Network Time Protocol (NTP) has been in use
-for over two decades and remains the longest running, continuously
-operating application protocol in the Internet. There was some
-concern, especially in government and financial institutions, that
-NTP might cause Internet applications to misbehave in terrible ways
-on the epoch of the new century, but this didn't happen. However,
-how NTP reckons the time is important when considering the
-relationship between NTP time and conventional civil time.</p>
-
-<p>This document presents an analysis of the NTP timescale, in
-particular the metrication relative to the conventional civil
-timescale and when the NTP timescale rolls over in 2036. These
-issues are also important with respect to the Unix timescale, but
-that rollover will not happen until 2038. This document does not
-establish a standard, nor does it present specific algorithms which
-metricate the NTP timescale with respect to other timescales.</p>
-
-<h4>The NTP Timescale</h4>
-
-<p>It will be helpful in understanding the issues raised in this
-document to consider the concept of a universal timescale. The
-conventional civil timescale used in most parts of the world is
-based on Coordinated Universal Time (UTC) (sic), formerly known as
-Greenwich Mean Time (GMT). UTC is based on International Atomic
-Time (TAI sic), which is derived from hundreds of cesium clocks in
-the national standards laboratories of many countries. Deviations
-of UTC from TAI are implemented in the form of leap seconds, which
-occur on average every eighteen months.</p>
-
-<p>For almost every computer application today, UTC represents the
-universal timescale extending into the indefinite past and
-indefinite future. We know of course that the UTC timescale did not
-exist prior to 1972, the Gregorian calendar did not exist prior to
-1582, the Julian calendar did not exist prior to 54 BC and we
-cannot predict exactly when the next leap second will occur.
-Nevertheless, most folks would prefer that, even if we can't get
-future seconds numbering right beyond the next leap second, at
-least we can get the days numbering right until the end of
-reason.</p>
-
-<p>The universal timescale can be implemented using a binary
-counter of indefinite width and with the unit seconds bit placed
-somewhere in the middle. The counter is synchronized to UTC such
-that it runs at the same rate (also the rate of TAI) and the units
-increment coincides with the UTC seconds tick. The NTP timescale is
-constructed from 64 bits of this counter, of which 32 bits number
-the seconds and 32 bits represent the fraction. With this design,
-the counter runs in 136-year cycles, called eras, the latest of
-which began with a counter value of zero at 0h 1 January 1900. The
-next era will begin when the seconds counter rolls over sometime in
-2036. The design assumption is that further low order bits, if
-required, are provided by local interpolation, while further high
-order bits, when required, are provided by external means.</p>
-
-<p>The important point to be made here is that the high order bits
-must ultimately be provided by astronomers and disseminated to the
-population by international means. Ultimately, should a need exist
-to align a particular NTP era to the current calendar, the
-operating system in which NTP is embedded must provide the
-necessary high order bits, most conveniently from the file system
-or flash memory.</p>
-
-<p>With respect to the recent year 2000 issue, the most important
-thing to observe about the NTP timescale is that it knows nothing
-about days, years or centuries, only the seconds since the
-beginning of the current era which began on 1 January 1900. On 1
-January 1970 when Unix life began, the NTP timescale showed
-2,208,988,800 and on 1 January 1972 when UTC life began, it showed
-2,272,060,800. On the last second of the year 1999, the NTP
-timescale showed 3,155,673,599 and one second later on the first
-second of the next century showed 3,155,673,600. Other than this
-observation, the NTP timescale has no knowledge of or provision for
-any of these eclectic seconds.</p>
-
-<h4>Conversion to Other Timescales</h4>
-
-<p>The NTP timescale is almost never used directly by system or
-application programs. The generic Unix kernel keeps time in seconds
-and microseconds (or nanoseconds) to provide both time of day and
-interval timer functions. In order to synchronize the Unix clock,
-NTP must convert to and from NTP representation and Unix
-representation. Unix kernels implement the time of day function
-using two 32-bit counters, one representing the signed seconds
-since Unix life began and the other the microseconds or nanoseconds
-of the second. In principle, the seconds counter will change sign
-in 2038. How the particular Unix semantics interprets the counter
-values is of concern, but is beyond the scope of discussion
-here.</p>
-
-<p>While incorrect NTP time values are unlikely in a properly
-configured subnet using strong cryptography, redundant sources and
-diverse network paths, hazards remain due to incorrect software
-external to NTP. These include the Unix kernel and library routines
-which convert NTP time to and from Unix time and to and from
-conventional civil time in seconds, minutes, hours, days and years.
-Although NTP uses these routines to format monitoring data
-displays, they are not used to read or set the NTP clock. They may
-in fact cause problems with certain application programs, but this
-is not an issue which concerns NTP correctness.</p>
-
-<p>It is possible that some external source to which NTP
-synchronizes may produce a discontinuity which could then induce a
-NTP discontinuity. The NTP primary (stratum 1) time servers, which
-are the ultimate time references for the entire NTP population,
-obtain time from various sources, including radio and satellite
-receivers and telephone modems. Not all sources provide year
-information and not all of these provide time in four-digit form.
-In point of fact, the NTP reference implementation does not use the
-year information, even if available. Instead, the year information
-is provided from the file system, which itself depends on the Unix
-clock.</p>
-
-<p>Most computers include a time-of-year (TOY) clock chip which
-maintains the time when the power is off. When the operating system
-is booted, the system clock is set from the chip. As the chip does
-not record the year, this value is determined from the datestamp on
-a system configuration file. For this to be correct, the filestamp must by updated at least once each year. The NTP protocol specification
-requires the apparent NTP time derived from external servers to be
-compared to the system time before the clock is set. If the
-discrepancy is over 1000 seconds, an error alarm is raised
-requiring manual intervention. This makes it very unlikely that
-even a clique of seriously corrupted NTP servers will result in
-grossly incorrect time values. When the system clock is synchronized to
-NTP, the TOY chip is corrected to system time on a regular
-basis.</p>
-
-<h4>Timescale Resolution and the Tick Interval</h4>
-
-<p>Modern computer clocks use a hardware counter to generate processor interrupts at tick intervals in the order of a few milliseconds. At each tick the processor increments the software system clock by the number of microseconds or nanoseconds in the tick. The software resolution of the system clock is defined as the tick interval. Most modern processors implement some kind of high resolution hardware counter that can be used to interpolate the interval between the most recent tick and the actual clock reading. The hardware resolution of the system clock is defined as the time between increments of this counter. However, the actual reading latency due to the kernel interface and interpolation code can range from a few tens of microseconds in older processors to under a microsecond in modern processors.</p>
-
-<p>System clock correctness principles require that clock readings must be always monotonically increasing, so that no two clock readings will be the same. As long as the reading latency exceeds the hardware resolution, this behavior is guaranteed. With reading latencies dropping below the microsecond in modern processors, the system clock in modern operating systems runs in nanoseconds, rather than the microseconds used in the original Unix kernel. With processor speeds exceeding 1 GHz, this assumption may be in jeopardy.
-
-<h4>Leap Seconds</h4>
-
-<p>The International Earth Rotation Service (IERS) uses
-astronomical observations provided by USNO and other observatories
-to determine UTC, which is syntonic (identical frequency) with TAI
-but offset by a integral number of seconds. Starting from apparent
-mean solar time as observed, the UT0 timescale is determined using
-corrections for Earth orbit and inclination (the Equation of Time,
-as used by sundials), the UT1 (navigator's) timescale by adding
-corrections for polar migration and the UT2 timescale by adding
-corrections for known periodicity variations. UTC is based on UT1,
-which is presently fast relative to TAI by a fraction of a second
-per year. Since the UTC timescale runs at the TAI rate, when the
-magnitude of the UT1 correction approaches 0.5 second, a leap
-second is inserted or deleted in the UTC timescale on the last day
-of June or December.</p>
-
-<p>For the most precise coordination and timestamping of events
-since 1972, it is necessary to know when leap seconds are
-implemented in UTC and how the seconds are numbered. The insertion
-of leap seconds into UTC is currently the responsibility of the
-IERS, which is located at the Paris Observatory. As specified in
-CCIR Report 517, a leap second is inserted following second
-23:59:59 on the last day of June or December and becomes second
-23:59:60 of that day. A leap second would be deleted by omitting
-second 23:59:59 on one of these days, although this has never
-happened. A table of historic leap seconds and the NTP time when
-each occurred is available via FTP from any NIST NTP server.</p>
-
-<p>The UTC timescale thus ticks in standard (atomic) seconds and
-was set to an initial offset of 10 seconds relative to TAI at 0h
-MJD 41,318.0 according to the Julian calendar or 0h on 1 January
-1972 according to the Gregorian calendar. This established the
-first tick of the UTC era and its reckoning with these calendars.
-Subsequently, the UTC timescale has marched backward relative to
-the TAI timescale exactly one second on scheduled occasions
-recorded in the institutional memory of our civilization. Note in
-passing that leap second adjustments affect the number of seconds
-per day and thus the number of seconds per year. Apparently, should
-we choose to worry about it, the UTC clock, Gregorian calendar and
-various cosmic oscillators will inexorably drift apart with time
-until rationalized by some future papal bull.</p>
-
-<h4>Reckoning with NTP and UTC Leap seconds</h4>
-
-<p>The NTP timescale is based on the UTC timescale, but not
-necessarily always coincident with it. At the first tick of the UTC
-Era, which began at 0h on 1 January 1972 (MJD 41,318.0) the NTP
-clock read 2,272,060,800, representing the number of standard
-seconds since the beginning of the NTP era at 0h on 1 January 1900
-(MJD 15,021.0) according to the Gregorian calendar. The insertion
-of leap seconds in UTC and subsequently into NTP does not affect
-the UTC or NTP oscillator frequency, only the conversion between
-NTP network time and UTC civil time. However, since the only
-institutional memory available to NTP are the UTC broadcast
-services, the NTP timescale is in effect reset to UTC as each
-broadcast timecode is received. Thus, when a leap second is
-inserted in UTC and subsequently in NTP, knowledge of all previous
-leap seconds is lost.</p>
-
-<p>Another way to describe this is to say there are as many NTP
-timescales as historic leap seconds. In effect, a new timescale is
-established after each new leap second. Thus, all previous leap
-seconds, not to mention the apparent origin of the timescale
-itself, lurch forward one second as each new timescale is
-established. If a clock synchronized to NTP in early 2001 was used
-to establish the UTC epoch of an event that occurred in early 1972
-without correction, the event would appear 22 seconds late.
-However, NTP primary time servers resolve the epoch using the
-broadcast timecode, so that the NTP clock is set to the broadcast
-value on the current timescale. As a result, for the most precise
-determination of epoch relative to the historic Gregorian calendar
-and UTC timescale, the user must subtract from the apparent NTP
-epoch the offsets derived from the NIST table. This is a feature of
-almost all present day time distribution mechanisms.</p>
-
-<p>The obvious question raised by this scenario is what happens
-during the leap second when NTP time stops and the clock remains
-unchanged. If the precision time kernel modifications have been
-implemented, the kernel includes a state machine that implements
-the actions required by the scenario. At the exact instant of the
-leap, the logical clock is stepped backward one second. However,
-the routine that actually reads the clock is constrained never to
-step backwards, unless the step is significantly larger than one
-second, which might occur due to explicit operator direction.</p>
-
-<p>In this design time stands still during the leap second, but is correct commencing with the next second. Since clock readings must be positive monotonic, the apparent time will increase by one nanosecond for each reading. At the end of the second the apparent time may be ahead of the actual time depending on how many times the clocks was read during the second. Eventually, the actual time will catch up with the apparent time and operation continues normally.</p>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/manyopt.html b/contrib/ntp/html/manyopt.html
deleted file mode 100644
index d2003d3..0000000
--- a/contrib/ntp/html/manyopt.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!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.htm b/contrib/ntp/html/measure.htm
deleted file mode 100644
index 11035d0..0000000
--- a/contrib/ntp/html/measure.htm
+++ /dev/null
@@ -1,17 +0,0 @@
-<html><head><title>
-Time and Time Interval Measurement with Application to Computer and
-Network Performance Evaluation
-</title></head><body><h3>
-Time and Time Interval Measurement with Application to Computer and
-Network Performance Evaluation
-</h3><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/~mills/database/memos/memo96a.ps">(PostScript) </a> describes a number of techniques for conducting experiments typical of computer network and transmission systems engineering.
-
-<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>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>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.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/measure.html b/contrib/ntp/html/measure.html
deleted file mode 100644
index c254627..0000000
--- a/contrib/ntp/html/measure.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!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.htm b/contrib/ntp/html/miscopt.htm
deleted file mode 100644
index 348bc3e..0000000
--- a/contrib/ntp/html/miscopt.htm
+++ /dev/null
@@ -1,279 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Miscellaneous Options</title>
-</head>
-<body>
-<h3>Miscellaneous Options</h3>
-
-<img align="left" src="pic/boom3.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>We have three, now looking for more.<br clear="left">
-</p>
-
-<hr>
-<dl>
-<dt><tt>broadcastdelay <i>seconds</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>driftfile <i>driftfile</i></tt></dt>
-
-<dd>This command specifies the name of the file used to record the
-frequency offset of the local clock oscillator. If the file exists,
-it is read at startup in order to set the initial frequency offset
-and then updated once per hour with the current frequency offset
-computed by the daemon. If the file does not exist or this command
-is not given, the initial frequency offset is assumed zero. In this
-case, it may take some hours for the frequency to stabilize and the
-residual timing errors to subside.
-
-<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>
-</dd>
-
-<dt><tt>enable [auth | bclient | calibrate | kernel | monitor | ntp
-| stats]</tt><br>
-<tt>disable [auth | bclient | calibrate | kernel | monitor | ntp |
-stats</tt></dt>
-
-<dd>Provides a way to enable or disable various server options.
-Flags not mentioned are unaffected. Note that all of these flags
-can be controlled remotely using the <a href="ntpdc.htm"><tt>
-ntpdc</tt></a> utility program.</dd>
-
-<dd>
-<dl>
-<dt><tt>bclient</tt></dt>
-
-<dd>When enabled, this is identical to the <tt>broadcastclient</tt>
-command. The default for this flag is <tt>disable</tt>.</dd>
-
-<dt><tt>calibrate</tt></dt>
-
-<dd>Enables the calibration facility, which automatically adjusts
-the <tt>time1</tt> values for each clock driver to display the same
-offset as the currently selected source or kernel discipline
-signal. See the <a href="refclock.htm">Reference Clock Drivers</a>
-for further information. The default for this flag is <tt>
-disable</tt>.</dd>
-
-<dt><tt>kernel</tt></dt>
-
-<dd>Enables the precision-time kernel support for the <tt>
-ntp_adjtime()</tt> system call, if implemented. Ordinarily, support
-for this routine is detected automatically when the NTP daemon is
-compiled, so it is not necessary for the user to worry about this
-flag. It flag is provided primarily so that this support can be
-disabled during kernel development. The default for this flag is
-<tt>enable</tt>.</dd>
-
-<dt><tt>monitor</tt></dt>
-
-<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 <tt>enable</tt>.</dd>
-
-<dt><tt>ntp</tt></dt>
-
-<dd>Enables the server to adjust its local clock by means of NTP.
-If disabled, the local clock free-runs at its intrinsic time and
-frequency offset. This flag is useful in case the local clock is
-controlled by some other device or protocol and NTP is used only to
-provide synchronization to other clients. In this case, the local
-clock driver can be used to provide this function and also certain
-time variables for error estimates and leap-indicators. See the <a
-href="refclock.htm">Reference Clock Drivers</a> page for further
-information. The default for this flag is <tt>enable</tt>.</dd>
-
-<dt><tt>stats</tt></dt>
-
-<dd>Enables the statistics facility. See the <a href="monopt.htm">
-Monitoring Options</a> page for further information. The default
-for this flag is <tt>enable</tt>.</dd>
-</dl>
-</dd>
-
-<dt><tt>logconfig <i>configkeyword</i></tt></dt>
-
-<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.</dd>
-
-<dd>Informational messages (<tt>info</tt>) control configuration
-information. Event messages (<tt>events</tt>) control logging of
-events (reachability, synchronization, alarm conditions).
-Statistical output is controlled with the <tt>statistics</tt>
-keyword. The final message group is the status messages. This
-describes mainly the synchronizations status. 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.</dd>
-
-<dd>Thus, a minimal log configuration could look like this:
-
-<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>
-</dd>
-
-<dt><tt>logfile <i>logfile</i></tt></dt>
-
-<dd>This command specifies the location of an alternate log file to
-be used instead of the default system <tt>syslog</tt>
-facility.</dd>
-
-<dt><tt>setvar <i>variable</i> [default]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>tinker [ step <i>step</i> | panic <i>panic</i> | dispersion
-<i>dispersion</i> | stepout <i>stepout</i> | minpoll <i>minpoll</i>
-]</tt></dt>
-
-<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>All arguments are in floating point seconds or seconds per
-second. The <tt>minpoll</tt> argument is an integer in seconds to
-the power of two. The variables operate as follows:</p>
-</dd>
-
-<dd>
-<dl>
-<dt><tt>step <i>step</i></tt></dt>
-
-<dd>The argument becomes the new value for the step threshold,
-normally 0.128 s. If set to zero, step adjustments will never
-occur. In general, if the intent is only to avoid step adjustments,
-the step threshold should be left alone and the <tt>-x</tt> command
-line option be used instead.</dd>
-
-<dt><tt>panic <i>panic</i></tt></dt>
-
-<dd>The argument becomes the new value for 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.</dd>
-
-<dt><tt>dispersion <i>dispersion</i></tt></dt>
-
-<dd>The argument becomes the new value for the dispersion increase
-rate, normally .000015.</dd>
-
-<dt><tt>stepout <i>stepout</i></tt></dt>
-
-<dd>The argument becomes the new value for the watchdog timeout,
-normally 900 s.</dd>
-
-<dt><tt>minpoll <i>minpoll</i></tt></dt>
-
-<dd>The argument becomes the new value for the minimum poll
-interval used when configuring multicast client, manycast client
-and , symmetric passive mode association. The value defaults to 6
-(64 s) and has a lower limit of 4 (16 s).</dd>
-
-<dt><tt>allan <i>allan</i></tt></dt>
-
-<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 defaults to 1024 s, which is also the lower
-limit.</dd>
-
-<dt><tt>huffpuff <i>huffpuff</i></tt></dt>
-
-<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.</dd>
-</dl>
-</dd>
-
-<dt><tt>trap <i>host_address</i> [port <i>port_number</i>]
-[interface <i>interface_address</i>]</tt></dt>
-
-<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>
-</dd>
-</dl>
-
-<h4>Files</h4>
-
-<tt>ntp.drift</tt> frequency compensation (PPM)
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/miscopt.html b/contrib/ntp/html/miscopt.html
deleted file mode 100644
index 13f8981..0000000
--- a/contrib/ntp/html/miscopt.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!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.htm b/contrib/ntp/html/monopt.htm
deleted file mode 100644
index 4ec8c23..0000000
--- a/contrib/ntp/html/monopt.htm
+++ /dev/null
@@ -1,255 +0,0 @@
-<html><head><title>
-Monitoring Options
-</title></head><body><h3>
-Monitoring Options
-</h3>
-
-<img align=left src=pic/pogo8.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>from <i>Pogo</i>, Walt Kelly</a>
-
-<p>The pig watches the logs.
-<br clear=left><hr>
-
-<h4>Monitoring Support</h4>
-
-<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 ./scripts
-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></dt>
-<dd>Enables writing of statistics records. Currently, four kinds of
-<I><tt>name</tt></I>statistics are supported.</dd>
-
-<dl>
-
-<dt><tt>loopstats</tt></dt>
-<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>
-
-<p><dd><tt>50935 75440.031 0.000006019 13.778190 0.000351733 0.013380
-6</tt></dd>
-
-<p><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.</dd>
-
-<dt><tt>peerstats</tt></dt>
-<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>:</dd>
-
-<p><dd><tt>48773 10847.650 127.127.4.1 9714 -0.001605 0.00000
-0.00142</tt></dd>
-
-<p><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 three fields show the offset,
-delay and RMS jitter, all in seconds.</dd>
-
-<dt><tt>clockstats</tt></dt>
-<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>
-
-<p><dd><tt>49213 525.624 127.127.4.1 93 226 00:08:29.606 D</tt></dd>
-<p><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.</dd>
-
-<dt><tt>rawstats</tt></dt>
-<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>:</dd>
-
-<p><dd><tt>50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000
-3102453281.58622800031 02453332.540806000 3102453332.541458000</tt></dd>
-
-<p><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.</dd>
-
-</dl>
-
-<dt><tt>statsdir <I>directory_path</I></tt></dt>
-<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.</dd>
-
-<dt><tt>filegen <I>name</I> [file <I>filename</I>] [type
-<I>typename</I>] [link | nolink] [enable | disable]</tt></dt>
-<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>
-
-<dd>Note that this command can be sent from the <tt>ntpdc</tt> program
-running at a remote location.</dd>
-
-<dl>
-
-<dt><I><tt>name</tt></I></dt>
-<dd>This is the type of the statistics records, as shown in the
-<tt>statistics</tt> command.</dd>
-
-</dl>
-
-<dd><tt>file <I>filename</I></tt></dd>
-
-<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>:</dd>
-
-<dl>
-
-<dt><I><tt>prefix</tt></I></dt>
-<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.</dd>
-
-<dt><I><tt>filename</tt></I></dt>
-<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>.</dd>
-
-<dt><I><tt>suffix</tt></I></dt>
-<dd>This part is reflects individual elements of a file set. It is
-generated according to the type of a file set.</dd>
-
-</dl>
-
-</dl>
-
-<dd><tt>type <I>typename</I></tt></dd>
-
-<dl>
-
-<dd>A file generation set is characterized by its type. The following
-types are supported:</dd>
-
-<dl>
-
-<dt><tt>none</tt></dt>
-<dd>The file set is actually a single plain file.</dd>
-
-<dt><tt>pid</tt></dt>
-<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.</dd>
-
-<dt><tt>day</tt></dt>
-<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>.</dd>
-
-<dt><tt>week</tt></dt>
-<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>.</dd>
-
-<dt><tt>month</tt></dt>
-<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.</dd>
-
-<dt><tt>year</tt></dt>
-<dd>One generation file element is generated per year. The filename
-suffix consists of a dot and a 4 digit year number.</dd>
-
-<dt><tt>age</tt></dt>
-<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>.</dd>
-
-</dl>
-
-</dl>
-
-<dd><tt>link | nolink</tt></dd>
-
-<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.</dd>
-
-</dl>
-
-<dd><tt>enable | disable</tt></dd>
-
-<dl>
-
-<dd>Enables or disables the recording function.</dd>
-
-</dl>
-
-</dl>
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/monopt.html b/contrib/ntp/html/monopt.html
deleted file mode 100644
index f790bc8..0000000
--- a/contrib/ntp/html/monopt.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<!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
deleted file mode 100644
index 8a9a78f..0000000
--- a/contrib/ntp/html/msyslog.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!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.htm b/contrib/ntp/html/mx4200data.htm
deleted file mode 100644
index bca0474..0000000
--- a/contrib/ntp/html/mx4200data.htm
+++ /dev/null
@@ -1,443 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<HTML>
-<HEAD>
- <TITLE>MX4200 Receiver Data Format</TITLE>
-</HEAD>
-<BODY>
-<h1>MX4200 Receiver Data Format</h1>
-
-<hr>
-<h2>Table of Contents</h2>
-
-<ul>
- <li><a href="#control">Control Port Sentences</a></li>
- <li><a href="#input">Control Port Input Sentences</a></li>
- <ul>
- <li><a href="#input_000">$PMVXG,000</a> Initialization/Mode Control - Part A</li>
- <li><a href="#input_001">$PMVXG,001</a> Initialization/Mode Control - Part B</li>
- <li><a href="#input_007">$PMVXG,007</a> Control Port Configuration</li>
- <li><a href="#input_023">$PMVXG,023</a> Time Recovery Configuration</li>
- <li><a href="#input_gpq">$CDGPQ,YYY</a> Query From a Remote Device / Request to Output a Sentence</li>
- </ul>
- <li><a href="#output">Control Port Output Sentences</a></li>
- <ul>
- <li><a href="#output_000">$PMVXG,000</a> Receiver Status</li>
- <li><a href="#output_021">$PMVXG,021</a> Position, Height, Velocity</li>
- <li><a href="#output_022">$PMVXG,022</a> DOPs</li>
- <li><a href="#output_030">$PMVXG,030</a> Software Configuration</li>
- <li><a href="#output_101">$PMVXG,101</a> Control Sentence Accept/Reject</li>
- <li><a href="#output_523">$PMVXG,523</a> Time Recovery Configuration</li>
- <li><a href="#output_830">$PMVXG,830</a> Time Recovery Results</li>
- </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>
-
-<table border>
- <tr> <th>Character <th>Meaning
- <tr> <td><code>$</code> <td>Sentence Start Character
- <tr> <td><code>P</code> <td>Special ID (P = Proprietary)
- <tr> <td><code>MVX</code> <td>Originator ID (MVX = Magnavox)
- <tr> <td><code>G</code> <td>Interface ID (G = GPS)
- <tr> <td><code>XXX</code> <td>Sentence Type
- <tr> <td><code>...</code> <td>Data
- <tr> <td><code>*</code> <td>Optional Checksum Field Delimiter
- <tr> <td><code>CK</code> <td>Optional Checksum
-</table>
-
-<h4><a name="table_2">Table 2. NMEA Sentence Reserved Characters</a></h4>
-
-<table border>
- <tr> <th>Character <th>Hex Value <th>Usage
- <tr> <td><code>$</code> <td>24 <td>Start of Sentence Identifier
- <tr> <td><code>{cr}{lf}</code> <td>0D 0A <td>End of Sentence Identifier
- <tr> <td><code>,</code> <td>2C <td>Sentence Delimiter
- <tr> <td><code>*</code> <td>2A <td>Optional Checksum Field Delimiter
-</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>8 (msb always 0)
- <tr> <td> Parity <td>None
- <tr> <td> Stop Bits <td>1
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>1 <td>Day <td>&nbsp <td>Int <td>&nbsp <td>1-31
- <tr> <td>2 <td>Month <td>&nbsp <td>Int <td>&nbsp <td>1-12
- <tr> <td>3 <td>Year <td>&nbsp <td>Int <td>&nbsp <td>1991-9999
- <tr> <td>4 <td>GMT Time <td>HHMMSS <td>Int <td>&nbsp <td>000000-235959
- <tr> <td>5 <td>WGS-84 Latitude <td>DDMM.MMMM<td>Float<td>0.0 <td>0 - 8959.9999
- <tr> <td>6 <td>North/South Indicator <td>&nbsp <td>Char <td>N <td>N,S
- <tr> <td>7 <td>WGS-84 Longitude <td>DDDMM.MMMM<td>Float<td>0.0 <td>0 - 17959.9999
- <tr> <td>8 <td>East/West Indicator <td>&nbsp <td>Char <td>E <td>E,W
- <tr> <td>9 <td>Altitude (height above Mean Sea Level) in meters (WGS-84) <td>Meters<td>Float<td>0.0<td>+/-99999.0
- <tr> <td>10 <td>Not Used <td>&nbsp <td>&nbsp <td>&nbsp <td>&nbsp
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>*1 <td>Constrain Altitude <td>&nbsp <td>Int <td>1 <td>0=3D Only<br>1=Auto<br>2=2D Only
- <tr> <td>2 <td>Not Used <td>&nbsp <td>&nbsp<td>&nbsp <td>&nbsp
- <tr> <td>*3 <td>Horizontal Acceleration Factor<td>m/sec^2 <td>Float <td>1.0 <td>0.5-10.0
- <tr> <td>*4 <td>Not Used <td>&nbsp <td>&nbsp<td>&nbsp <td>&nbsp
- <tr> <td>*5 <td>VDOP Limit <td>&nbsp <td>Int <td>10 <td>1-9999
- <tr> <td>*6 <td>HDOP Limit <td>&nbsp <td>Int <td>10 <td>1-9999
- <tr> <td>7 <td>Elevation Limit <td>Deg <td>Int <td>5 <td>0-90
- <tr> <td>8 <td>Time Output Mode <td>&nbsp <td>Char <td>U <td>U=UTC<br>L=Local Time
- <tr> <td>9 <td>Local Time Offset <td>HHMM <td>Int <td>0 <td>+/- 0-2359
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>1 <td>Control Port Output Block Label<td>&nbsp<td>Char <td>&nbsp <td>&nbsp
- <tr> <td>2 <td>Clear Current Output List<td>&nbsp<td>Int <td>&nbsp <td>0=No<br>1=Yes
- <tr> <td>3 <td>Add/Delete Sentence from List<td>&nbsp<td>Int <td>&nbsp <td>1=Append<br>2=Delete
- <tr> <td>4 <td>Not Used <td>&nbsp <td>&nbsp <td>&nbsp <td>&nbsp
- <tr> <td>5 <td>Sentence Output Rate <td>Sec <td>Int <td>&nbsp <td>1-9999
- <tr> <td>6 <td># digits of Precision for CGA and GLL sentences<td>&nbsp <td>Int <td>2 <td>2-4
- <tr> <td>7 <td>Not Used <td>&nbsp <td>&nbsp <td>&nbsp <td>&nbsp
- <tr> <td>8 <td>Not Used <td>&nbsp <td>&nbsp <td>&nbsp <td>&nbsp
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>*1 <td>Time Recovery Mode <td>&nbsp <td>Char <td>D <td>D=Dynamic<br>S=Static<br>K=Known Position<br>N=No Time Recovery
- <tr> <td>2 <td>Time Synchronization <td>&nbsp <td>Char <td>G <td>U=UTC<br>G=GPS
- <tr> <td>3 <td>Time Mark Mode <td>&nbsp <td>Char <td>A <td>A=Always<br>V=Valid Pulses Only
- <tr> <td>4 <td>Maximum Time Error <td>Nsec <td>Int <td>100 <td>50-1000
- <tr> <td>5 <td>User Time Bias <td>Nsec <td>Int <td>0 <td>+/- 99999
- <tr> <td>6 <td>ASCII Time Message Control<td>&nbsp<td>Int <td>0 <td>0=No Output<br>1=830 to Control Port<br>2=830 to Equipment Port
- <tr> <td>7 <td>Known Pos PRN <td>&nbsp <td>Int <td>0 <td>1-32<br>0=Track All Sats
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>1:CD <td>ID of Remote Device <td>&nbsp <td>Char <td>&nbsp <td>(See <cite>NMEA-0183</cite>)
- <tr> <td>2:GP <td>GPS <td>&nbsp <td>Char <td>&nbsp <td>(See <cite>NMEA-0183</cite>)
- <tr> <td>3:Q <td>Query <td>&nbsp <td>Char <td>&nbsp <td>(See <cite>NMEA-0183</cite>)
- <tr> <td>4:YYY <td>Label of Desired Sentence<td>&nbsp<td>Char <td>&nbsp <td>Any Valid NMEA or Magnavox Sentence Type
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Current Receiver Status <td>&nbsp <td>Char <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
- <tr> <td>2 <td>Number of Satellites that should be Visible <td>&nbsp<td>Int <td>0-12
- <tr> <td>3 <td>Number of Satellites being Tracked <td>&nbsp <td>Int <td>0-12
- <tr> <td>4 <td>Time since Last Navigation <td>HHMM <td>Int <td>0-2359
- <tr> <td>5 <td>Initialization Status <td>&nbsp <td>Int <td>0=Waiting for Initialization<br>1=Initialization Complete
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>UTC Measurement Time <td>Seconds into the week<td>Float<td>0-604800.00
- <tr> <td>2 <td>WGS-84 Latitude <td>DDMM.MMMM<td>Float <td>0-89.9999
- <tr> <td>3 <td>North/South Indicator <td>&nbsp <td>Char <td>N, S
- <tr> <td>4 <td>WGS-84 Longitude <td>DDDMM.MMMM <td>Float <td>0-179.9999
- <tr> <td>5 <td>East/West Indicator <td>&nbsp <td>Char <td>E, W
- <tr> <td>6 <td>Altitude (MSL) <td>Meters <td>Float <td>&nbsp
- <tr> <td>7 <td>Geoidal Height <td>Meters <td>Float <td>&nbsp
- <tr> <td>8 <td>Velocity East <td>M/Sec <td>Float <td>&nbsp
- <tr> <td>9 <td>Velocity North <td>M/Sec <td>Float <td>&nbsp
- <tr> <td>10 <td>Navigation Mode <td>&nbsp <td>Int <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
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>UTC Measurement Time <td>Seconds into the week<td>Float<td>0-604800.00
- <tr> <td>2 <td>East DOP (EDOP) <td>&nbsp <td>Float <td>&nbsp
- <tr> <td>3 <td>North DOP (NDOP) <td>&nbsp <td>Float <td>&nbsp
- <tr> <td>4 <td>Vertical DOP (VDOP) <td>&nbsp <td>Float <td>&nbsp
- <tr> <td>5 <td>PRN on Channel #1 <td>&nbsp <td>Int <td>1-32
- <tr> <td>6 <td>PRN on Channel #2 <td>&nbsp <td>Int <td>1-32
- <tr> <td>7 <td>PRN on Channel #3 <td>&nbsp <td>Int <td>1-32
- <tr> <td>8 <td>PRN on Channel #4 <td>&nbsp <td>Int <td>1-32
- <tr> <td>9 <td>PRN on Channel #5 <td>&nbsp <td>Int <td>1-32
- <tr> <td>10 <td>PRN on Channel #6 <td>&nbsp <td>Int <td>1-32
- <tr> <td>11 <td>PRN on Channel #7 <td>&nbsp <td>Int <td>1-32
- <tr> <td>12 <td>PRN on Channel #8 <td>&nbsp <td>Int <td>1-32
- <tr> <td>13 <td>PRN on Channel #9 <td>&nbsp <td>Int <td>1-32
- <tr> <td>14 <td>PRN on Channel #10 <td>&nbsp <td>Int <td>1-32
- <tr> <td>15 <td>PRN on Channel #11 <td>&nbsp <td>Int <td>1-32
- <tr> <td>16 <td>PRN on Channel #12 <td>&nbsp <td>Int <td>1-32
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Nav Processor Version Number <td>&nbsp <td>Char <td>&nbsp
- <tr> <td>2 <td>Baseband Firmware Version Number <td>&nbsp <td>Char <td>&nbsp
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Sentence ID <td>&nbsp <td>Char <td>&nbsp
- <tr> <td>2 <td>Accept/Reject Status <td>&nbsp <td>Int <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
- <tr> <td>3 <td>Bad Field Index <td>&nbsp <td>Int <td>&nbsp
- <tr> <td>4 <td>Requested Sentence ID (If field #1 = GPQ) <td>&nbsp <td>Char <td>&nbsp
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Time Recovery Mode <td>&nbsp <td>Char <td>D=Dynamic<br>S=Static<br>K=Known Position<br>N=No Time Recovery
- <tr> <td>2 <td>Time Synchronization <td>&nbsp <td>Char <td>U=UTC Time<br>G=GPS Time
- <tr> <td>3 <td>Time Mark Mode <td>&nbsp <td>Char <td>A=Always Output Time Pulse<br>V=Only when Valid
- <tr> <td>4 <td>Maximum Time Error for which a time mark will be considered valid <td>Nsec <td>Int <td>&nbsp
- <tr> <td>5 <td>User Time Bias <td>Nsec <td>Int <td>&nbsp
- <tr> <td>6 <td>Time Message Control <td>&nbsp <td>Int <td>0=No Message<br>1=830 to Control Port<br>2=830 to Equipment Port
- <tr> <td>7 <td>Not Used <td>&nbsp <td>&nbsp <td>&nbsp
-</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>
-<table border>
- <tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Time Mark Valid <td>&nbsp <td>Char <td>T=Valid<br>F=Not Valid
- <tr> <td>2 <td>Year <td>&nbsp <td>Int <td>1993-
- <tr> <td>3 <td>Month <td>&nbsp <td>Int <td>1-12
- <tr> <td>4 <td>Day <td>Nsec <td>Int <td>1-31
- <tr> <td>5 <td>Time <td>HH:MM:SS<td>Int <td>00:00:00-23:59:59
- <tr> <td>6 <td>Time Synchronization <td>&nbsp <td>Char <td>U=UTC<br>G=GPS
- <tr> <td>7 <td>Operating Mode <td>&nbsp <td>Char <td>D=Dynamic<br>S=Static<br>K=Known Position
- <tr> <td>8 <td>Oscillator Offset - estimate of oscillator frequency error <td>PPB <td>Int <td>&nbsp
- <tr> <td>9 <td>Time Mark Error of last pulse <td>Nsec <td>Int <td>&nbsp
- <tr> <td>10 <td>User Time Bias <td>Nsec <td>Int <td>&nbsp
- <tr> <td>11 <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 occurence, 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>&nbsp <td>Int <td>-1,0,1
-</table>
-Example:<br>
-<code>$PMVXG,830,T,1998,10,12,15:30:46,U,S,000298,00003,000000,01*02</code>
-
-<hr>
-
-
-</BODY>
-</HTML>
diff --git a/contrib/ntp/html/mx4200data.html b/contrib/ntp/html/mx4200data.html
deleted file mode 100644
index c2ab03a..0000000
--- a/contrib/ntp/html/mx4200data.html
+++ /dev/null
@@ -1,1073 +0,0 @@
-<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.htm b/contrib/ntp/html/notes.htm
deleted file mode 100644
index c3f1ee0..0000000
--- a/contrib/ntp/html/notes.htm
+++ /dev/null
@@ -1,1547 +0,0 @@
-<HTML><HEAD><TITLE>
-Notes on Configuring NTP and Setting up a NTP Subnet</H3>
-</TITLE></HEAD><BODY><H3>
-Notes on Configuring NTP and Setting up a NTP Subnet</H3>
-</H3>
-
-<img align=left src=pic/tonea.gif>
-From NBS Special Publication 432 (out of print)
-<br clear=left>
-
-<H4>Introduction</H4>
-
-This document is a collection of notes concerning the use of ntpd and
-relatedprograms, 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><TT>ntpd</TT> includes a complete implementation of the NTP Version
-3 specification, as defined in:
-
-<ul>
-
-<p><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/~mills/database/rfc/rfc1305/rfc1305a.ps>
-PostScript</a> | <a
-href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305a.pdf>
-PDF</a>, Body: <a
-href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305b.ps>
-PostScript</a> | <a
-href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305b.pdf>
-PDF</a>, Appendices: <a
-href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305c.ps>
-PostScript</a> | <a
-href=http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305c.pdf>
-PDF</a>
-
-</ul>
-Additional features have are described for <A HREF="release.htm">NTP
-Version 4</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>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/~mills/database/rfc2030.txt">
-(ASCII)</A>.
-
-<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>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="biblio.htm">Further Information and Bibliography</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>The NTP Version 4 distribution includes, in addition to the daemon
-itself (<TT><A HREF="ntpd.htm">ntpd</A></TT>), several utility programs,
-including two remote-monitoring programs (<A HREF="ntpq.htm">
-<TT>ntpq</TT></A>, <TT><A HREF="ntpdc.htm">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>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.
-
-<H4>How NTP Works</H4>
-
-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>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>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>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 "best" 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>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>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>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>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.
-<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.htm">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/~ntp">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.htm">ntptrace</A></TT>
-and <TT><A HREF="ntpdc.htm">ntpdc</A></TT> programs.
-
-<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 "close" 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>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 cases 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>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>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>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>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>When planning your network you might, beyond this, keep in mind a few
-generic don'ts, in particular:
-<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>
-
-<BR>&nbsp;
-<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>
-<BR>&nbsp;
-<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.</LI>
-</UL>
-There are many useful exceptions to these rules. When in doubt, however,
-follow them.
-<H4>
-Configuring Your Server or Client</H4>
-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):
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # peer configuration for host whimsy
-&nbsp;&nbsp;&nbsp;&nbsp; # (expected to operate at stratum 2)
-
-&nbsp;&nbsp;&nbsp;&nbsp; server rackety.udel.edu
-&nbsp;&nbsp;&nbsp;&nbsp; server umd1.umd.edu
-&nbsp;&nbsp;&nbsp;&nbsp; server lilben.tn.cornell.edu
-
-&nbsp;&nbsp;&nbsp;&nbsp; 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>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>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>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>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.
-
-<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 "<TT>server</TT>" with
-values "<TT>rackety.udel.edu</TT>", "<TT>umd1.umd.edu</TT>", and
-"<TT>lilben.tn.cornell.edu</TT>"; and a property "<TT>driftfile</TT>"
-with the single value "<TT>/etc/ntp.drift</TT>".
-
-<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 "<TT>mimsy.mil version
-1</TT>" to the "<TT>server</TT>" property.
-
-<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.htm">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>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
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # specify NTP version 1
-
-&nbsp;&nbsp;&nbsp;&nbsp; server mimsy.mil version
-1&nbsp;&nbsp;&nbsp;&nbsp; # server running ntpd version 1
-&nbsp;&nbsp;&nbsp;&nbsp; server apple.com version
-2&nbsp;&nbsp;&nbsp;&nbsp; # 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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # disable monitoring feature
-&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp; (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.htm"><TT>ntpd</TT>
-</A>page.
-
-<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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # by default, don't trust and don't allow
-modifications
-
-&nbsp;&nbsp;&nbsp;&nbsp; restrict default notrust nomodify
-
-&nbsp;&nbsp;&nbsp;&nbsp; # these guys are trusted for time, but no
-modifications allowed
-
-&nbsp;&nbsp;&nbsp;&nbsp; restrict 128.100.0.0 mask 255.255.0.0 nomodify
-&nbsp;&nbsp;&nbsp;&nbsp; restrict 128.8.10.1 nomodify
-&nbsp;&nbsp;&nbsp;&nbsp; restrict 192.35.82.50 nomodify
-
-&nbsp;&nbsp;&nbsp;&nbsp; # the local addresses are unrestricted
-
-&nbsp;&nbsp;&nbsp;&nbsp; restrict 128.100.100.7
-&nbsp;&nbsp;&nbsp;&nbsp; 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.
-<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.htm">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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # peer configuration for 128.100.100.7
-&nbsp;&nbsp;&nbsp;&nbsp; # (expected to operate at stratum 2)
-&nbsp;&nbsp;&nbsp;&nbsp; # fully authenticated this time
-
-&nbsp;&nbsp;&nbsp;&nbsp; peer 128.100.49.105 key 22 #
-suzuki.ccie.utoronto.ca
-&nbsp;&nbsp;&nbsp;&nbsp; peer 128.8.10.1 key 4&nbsp;&nbsp;&nbsp; #
-umd1.umd.edu
-&nbsp;&nbsp;&nbsp;&nbsp; peer 192.35.82.50 key 6&nbsp; #
-lilben.tn.cornell.edu
-
-&nbsp;&nbsp;&nbsp;&nbsp; keys /usr/local/etc/ntp.keys&nbsp; # path for
-key file
-&nbsp;&nbsp;&nbsp;&nbsp; trustedkey 1 2 14 15&nbsp;&nbsp;&nbsp;&nbsp; #
-define trusted keys
-&nbsp;&nbsp;&nbsp;&nbsp; requestkey
-15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
-key (7) for accessing server variables
-&nbsp;&nbsp;&nbsp;&nbsp; controlkey
-15&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
-key (6) for accessing server variables
-
-&nbsp;&nbsp;&nbsp;&nbsp; authdelay
-0.000094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 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. This can be computed for your CPU by the <A
-HREF="authspeed.htm"><TT>authspeed</TT>
-</A>program included in the distribution. The usage is illustrated by
-the
-following:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # for DES keys
-
-&nbsp;&nbsp;&nbsp;&nbsp; authspeed -n 30000 auth.samplekeys
-&nbsp;&nbsp;&nbsp;&nbsp; # for MD5 keys
-
-&nbsp;&nbsp;&nbsp;&nbsp; authspeed -mn 30000 auth.samplekeys</PRE>
-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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # ntp keys file (ntp.keys)
-&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; N&nbsp;&nbsp;&nbsp;
-29233E0461ECD6AE&nbsp;&nbsp;&nbsp; # des key in NTP format
-&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; M&nbsp;&nbsp;&nbsp;
-RIrop8KPPvQvYotM&nbsp;&nbsp;&nbsp; # md5 key as an ASCII random string
-&nbsp;&nbsp;&nbsp;&nbsp; 14&nbsp;&nbsp; M&nbsp;&nbsp;&nbsp;
-sundial&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
-;&nbsp; # md5 key as an ASCII string
-&nbsp;&nbsp;&nbsp;&nbsp; 15&nbsp;&nbsp; A&nbsp;&nbsp;&nbsp;
-sundial&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
-;&nbsp; # des key as an ASCII string
-
-&nbsp;&nbsp;&nbsp;&nbsp; # the following 3 keys are identical
-
-&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; A&nbsp;&nbsp;&nbsp; SeCReT
-&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; N&nbsp;&nbsp;&nbsp;
-d3e54352e5548080
-&nbsp;&nbsp;&nbsp;&nbsp; 10&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp;
-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.htm">Release
-Notes</A> page.
-<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><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.
-<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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Action
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
-p; The daemon passes the leap bits of its
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-synchronisation source (usual mode of operation)
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 01/10&nbsp;&nbsp; A leap
-second is added/deleted
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
-p; Leap information from the synchronization source
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp; # specify mode-6 and mode-7 trusted keys
-
-&nbsp;&nbsp;&nbsp;&nbsp; requestkey 65535&nbsp;&nbsp;&nbsp; # for mode-7
-requests
-&nbsp;&nbsp;&nbsp;&nbsp; controlkey 65534&nbsp;&nbsp;&nbsp; # 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.
-<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>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.
-<H4>
-<A NAME="frequency_tolerance">Dealing with Frequency Tolerance
-Violations</A>
- (<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>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>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>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>
-We have a report that says starting with Solaris 2.6 we should
-leave <I>dosynctodr</I> alone.
-<A HREF="solaris-dosynctodr.html">Here is the report</A>.
-
-<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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; <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.
-<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.htm">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 "best" 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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # preferred server declaration
-
-&nbsp;&nbsp;&nbsp;&nbsp; peer rackety.udel.edu prefer&nbsp;&nbsp;&nbsp;
-# 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.
-<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:
-<PRE>&nbsp;&nbsp;&nbsp;&nbsp; # radio clock fudge fiddles
-&nbsp;&nbsp;&nbsp;&nbsp; server 127.127.3.1
-&nbsp;&nbsp;&nbsp;&nbsp; fudge 127.127.3.1 time1 0.0075 time2 0.0265
-&nbsp;&nbsp;&nbsp;&nbsp; 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.htm">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>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>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.htm">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="gadget.htm">Gadget
-Box PPS Level Converter and CHU Modem </A>document 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>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.
-<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><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/notes.html b/contrib/ntp/html/notes.html
deleted file mode 100644
index 96fc1db..0000000
--- a/contrib/ntp/html/notes.html
+++ /dev/null
@@ -1,279 +0,0 @@
-<!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.htm b/contrib/ntp/html/ntpd.htm
deleted file mode 100644
index 62aa26a..0000000
--- a/contrib/ntp/html/ntpd.htm
+++ /dev/null
@@ -1,457 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntpd - Network Time Protocol (NTP) daemon</title>
-</head>
-<body>
-<h3><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</h3>
-
-<img align="left" src="pic/alice47.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>The mushroom knows all the command line options.<br clear=
-"left">
-</p>
-
-<hr>
-<h4>Synopsis</h4>
-
-<tt>ntpd [ -aAbdgLmNPqx ] [ -c <i>conffile</i> ] [ -f <i>
-driftfile</i> ] [ -g ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ]
-[ -N high ] [ -p <i>pidfile</i> ] [ -r <i>broadcastdelay</i> ] [ -s
-<i>statsdir</i> ] [ -t <i>key</i> ] [ -v <i>variable</i> ] [ -V <i>
-variable</i> ] [ -x ]</tt>
-
-<h4>Description</h4>
-
-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.
-
-<h4>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 exahanges 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 0-16s. 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.htm">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 ordinariy 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>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>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.htm">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 a minute. 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>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 consequenses 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 minumum 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>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.htm">
-Miscellaneous Options</a> page.</p>
-
-<h4>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>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.htm">ntpq</a></tt> and <tt><a href=
-"ntpdc.htm">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>Command Line Options</h4>
-
-<dl>
-<dt><tt>-a</tt></dt>
-
-<dd>Enable authentication mode (default).</dd>
-
-<dt><tt>-A</tt></dt>
-
-<dd>Disable authentication mode.</dd>
-
-<dt><tt>-b</tt></dt>
-
-<dd>Synchronize using NTP broadcast messages.</dd>
-
-<dt><tt>-c <i>conffile</i></tt></dt>
-
-<dd>Specify the name and path of the configuration file. (Disable
-netinfo?)</dd>
-
-<dt><tt>-d</tt></dt>
-
-<dd>Specify debugging mode. This flag may occur multiple times,
-with each occurrence indicating greater detail of display.</dd>
-
-<dt><tt>-D <i>level</i></tt></dt>
-
-<dd>Specify debugging level directly.</dd>
-
-<dt><tt>-f <i>driftfile</i></tt></dt>
-
-<dd>Specify the name and path of the drift file.</dd>
-
-<dt><tt>-g</tt></dt>
-
-<dd>Normally, <tt>ntpd</tt> exits if the offset exceeds the sanity
-limit, which is 1000 s by default. If the sanity limit is set to
-zero, no sanity checking is performed and any offset is acceptable.
-This option overrides the limit and allows the time to be set to
-any value without restriction; however, this can happen only once.
-After that, <tt>ntpd</tt> will exit if the limit is exceeded. This
-option can be used with the <tt>-q</tt> option.</dd>
-
-<dt><tt>-k <i>keyfile</i></tt></dt>
-
-<dd>Specify the name and path of the file containing the NTP
-authentication keys.</dd>
-
-<dt><tt>-l <i>logfile</i></tt></dt>
-
-<dd>Specify the name and path of the log file. The default is the
-system log facility.</dd>
-
-<dt><tt>-L</tt></dt>
-
-<dd>Listen to virtual IPs.</dd>
-
-<dt><tt>-m</tt></dt>
-
-<dd>Synchronize using NTP multicast messages on the IP multicast
-group address 224.0.1.1 (requires multicast kernel).</dd>
-
-<dt><tt>-n</tt></dt>
-
-<dd>Don't fork.</dd>
-
-<dt><tt>-N <i>priority</i></tt></dt>
-
-<dd>To the extent permitted by the operating system, run the <tt>
-ntpd</tt> at a high priority.</dd>
-
-<dt><tt>-p <i>pidfile</i></tt></dt>
-
-<dd>Specify the name and path to record the <tt>ntpd</tt>'s process
-ID.</dd>
-
-<dt><tt>-P</tt></dt>
-
-<dd>Override the priority limit set by the operating system. Not
-recommended for sissies.</dd>
-
-<dt><tt>-q</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-r <i>broadcastdelay</i></tt></dt>
-
-<dd>Specify the default propagation delay from the
-broadcast/multicast server and this computer. This is necessary
-only if the delay cannot be computed automatically by the
-protocol.</dd>
-
-<dt><tt>-s <i>statsdir</i></tt></dt>
-
-<dd>Specify the directory path for files created by the statistics
-facility.</dd>
-
-<dt><tt>-t <i>key</i></tt></dt>
-
-<dd>Add a key number to the trusted key list.</dd>
-
-<dt><tt>-v <i>variable</i></tt></dt>
-
-<dt><tt>-V <i>variable</i></tt></dt>
-
-<dd>Add a system variable listed by default.</dd>
-
-<dt><tt>-x</tt></dt>
-
-<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 forces the time to be slewed in all
-cases. If the step threshold is set to zero, all offsets are
-stepped, regardless of value and regardless of the <tt>-x</tt>
-option. In general, this is not a good idea, as it bypasses the
-clock state machine which is designed to cope with large time and
-frequency errors Note: Since the slew rate is limited to 0.5 ms/s,
-each second of adjustment requires an amortization interval of 2000
-s. Thus, an adjustment of many seconds can take hours or days to
-amortize. This option can be used with the <tt>-q</tt> option.</dd>
-</dl>
-
-<h4>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>
-
-<p><a href="confopt.htm">Configuration Options</a><br>
-<a href="authopt.htm">Authentication Options</a><br>
-<a href="monopt.htm">Monitoring Options</a><br>
-<a href="accopt.htm">Access Control Options</a><br>
-<a href="clockopt.htm">Reference Clock Options</a><br>
-<a href="miscopt.htm">Miscellaneous Options</a></p>
-
-<h4>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
-
-<h4>Bugs</h4>
-
-<tt>ntpd</tt> has gotten rather fat. While not huge, it has gotten
-larger than might be desirable for an elevated-priority <tt>
-ntpd</tt> running on a workstation, particularly since many of the
-fancy features which consume the space were designed more with a
-busy primary server, rather than a high stratum workstation in
-mind.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/ntpd.html b/contrib/ntp/html/ntpd.html
deleted file mode 100644
index ccfd9d4..0000000
--- a/contrib/ntp/html/ntpd.html
+++ /dev/null
@@ -1,184 +0,0 @@
-<!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.htm b/contrib/ntp/html/ntpdate.htm
deleted file mode 100644
index c2d32bb..0000000
--- a/contrib/ntp/html/ntpdate.htm
+++ /dev/null
@@ -1,186 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntpdate - set the date and time via NTP</title>
-</head>
-<body>
-<h3><tt>ntpdate</tt> - set the date and time via NTP</h3>
-
-<img align="left" src="pic/rabbit.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>I told you it was eyeball and wristwatch.<br clear="left">
-</p>
-
-<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.htm"><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>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>-a <i>key</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>-B</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-b</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-d</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-e <i>authdelay</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>-k <i>keyfile</i></tt></dt>
-
-<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>.</dd>
-
-<dt><tt>-o <i>version</i></tt></dt>
-
-<dd>Specify the NTP version for outgoint 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.</dd>
-
-<dt><tt>-p <i>samples</i></tt></dt>
-
-<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.</dd>
-
-<dt><i><tt>-q</tt></i></dt>
-
-<dd>Query only - don't set the clock.</dd>
-
-<dt><tt>-s</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-t <i>timeout</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>-u</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-<i>v</i></tt></dt>
-
-<dd>Be verbose. This option will cause <tt>ntpdate</tt>'s version
-identification string to be logged.</dd>
-</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>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/ntpdate.html b/contrib/ntp/html/ntpdate.html
deleted file mode 100644
index fe51195..0000000
--- a/contrib/ntp/html/ntpdate.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!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.htm b/contrib/ntp/html/ntpdc.htm
deleted file mode 100644
index ffb2cc0..0000000
--- a/contrib/ntp/html/ntpdc.htm
+++ /dev/null
@@ -1,573 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntpdc - special NTP query program</title>
-</head>
-<body>
-<h3><tt>ntpdc</tt> - special NTP query program</h3>
-
-<img align="left" src="pic/alice31.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>This program is a big puppy.<br clear="left">
-</p>
-
-<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 compatable 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>
-
-<h4>Command Line Options</h4>
-
-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.
-
-<dl>
-<dt><tt>-c <i>command</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>-i</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-l</tt></dt>
-
-<dd>Obtain a list of peers which are known to the server(s). This
-switch is equivalent to <tt>-c listpeers</tt>.</dd>
-
-<dt><tt>-n</tt></dt>
-
-<dd>Output all host addresses in dotted-quad numeric format rather
-than converting to the canonical host names.</dd>
-
-<dt><tt>-p</tt></dt>
-
-<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>.</dd>
-
-<dt><tt>-s</tt></dt>
-
-<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>.</dd>
-</dl>
-
-<h4>Interactive Commands</h4>
-
-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>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></dt>
-
-<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 funcation and usage
-information about the command. This command is probably a better
-source of information about <tt>ntpq</tt> than this manual
-page.</dd>
-
-<dt><tt>delay <i>milliseconds</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>host <i>hostname</i></tt></dt>
-
-<dd>Set the host to which future queries will be sent. Hostname may
-be either a host name or a numeric address.</dd>
-
-<dt><tt>hostnames [ yes | no ]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>keyid <i>keyid</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>quit</tt></dt>
-
-<dd>Exit <tt>ntpdc</tt>.</dd>
-
-<dt><tt>passwd</tt></dt>
-
-<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.</dd>
-
-<dt><tt>timeout <i>millseconds</i></tt></dt>
-
-<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.</dd>
-</dl>
-
-<h4>Control Message Commands</h4>
-
-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.
-
-<dl>
-<dt><tt>listpeers</tt></dt>
-
-<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
-synchonization candidates.</dd>
-
-<dt><tt>peers</tt></dt>
-
-<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 synchonizing
-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>
-</dd>
-
-<dt><tt>dmpeers</tt></dt>
-
-<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.</dd>
-
-<dt><tt>showpeer <i>peer_address</i> [...]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>pstats <i>peer_address</i> [...]</tt></dt>
-
-<dd>Show per-peer statistic counters associated with the specified
-peer(s).</dd>
-
-<dt><tt>clockinfo <i>clock_peer_address</i> [...]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>kerninfo</tt></dt>
-
-<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.</dd>
-
-<dt><tt>loopinfo [ oneline | multiline ]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>sysinfo</tt></dt>
-
-<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>
-</dd>
-
-<dt><tt>sysstats</tt></dt>
-
-<dd>Print statistics counters maintained in the protocol
-module.</dd>
-
-<dt><tt>memstats</tt></dt>
-
-<dd>Print statistics counters related to memory allocation
-code.</dd>
-
-<dt><tt>iostats</tt></dt>
-
-<dd>Print statistics counters maintained in the input-output
-module.</dd>
-
-<dt><tt>timerstats</tt></dt>
-
-<dd>Print statistics counters maintained in the timer/event queue
-support code.</dd>
-
-<dt><tt>reslist</tt></dt>
-
-<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.</dd>
-
-<dt><tt>monlist [ <i>version</i> ]</tt></dt>
-
-<dd>Obtain and print traffic counts collected and maintained by the
-monitor facility. The version number should not normally need to be
-specified.</dd>
-
-<dt><tt>clkbug <i>clock_peer_address</i> [...]</tt></dt>
-
-<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.</dd>
-</dl>
-
-<h4>Runtime Configuration Requests</h4>
-
-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 xtnpdc. 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>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></dt>
-
-<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.</dd>
-
-<dt><tt>addserver <i>peer_address</i> [ <i>keyid</i> ] [ <i>
-version</i> ] [ <i>prefer</i> ]</tt></dt>
-
-<dd>Identical to the addpeer command, except that the operating
-mode is client.</dd>
-
-<dt><tt>broadcast <i>peer_address</i> [ <i>keyid</i> ] [ <i>
-version</i> ] [ <i>prefer</i> ]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>unconfig <i>peer_address</i> [...]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>fudge <i>peer_address</i> [ <i>time1</i> ] [ <i>time2</i> ]
-[ <i>stratum</i> ] [ <i>refid</i> ]</tt></dt>
-
-<dd>This command provides a way to set certain data for a reference
-clock. See the source listing for further information.</dd>
-
-<dt><tt>enable [ <i>flag</i> ] [ ... ]</tt><br>
-<tt>disable [ <i>flag</i> ] [ ... ]</tt></dt>
-
-<dd>These commands operate in the same way as the <tt>enable</tt>
-and <tt>disable</tt> configuration file commands of <tt>ntpd</tt>.
-Following is a description of the flags. Note that only the <tt>
-auth</tt>, <tt>bclient</tt>, <tt>monitor</tt>, <tt>pll</tt>, <tt>
-pps</tt> and <tt>stats</tt> flags can be set by <tt>ntpdc</tt>; the
-<tt>pll_kernel</tt> and <tt>pps_kernel</tt> flags are
-read-only.</dd>
-
-<dd>
-<dl>
-<dt><tt>auth</tt></dt>
-
-<dd>Enables the server to synchronize with unconfigured peers only
-if the peer has been correctly authenticated using a trusted key
-and key identifier. The default for this flag is enable.</dd>
-
-<dt><tt>bclient</tt></dt>
-
-<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.</dd>
-
-<dt><tt>monitor</tt></dt>
-
-<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.</dd>
-
-<dt><tt>pll</tt></dt>
-
-<dd>Enables the server to adjust its local clock by means of NTP.
-If disabled, the local clock free-runs at its intrinsic time and
-frequency offset. This flag is useful in case the local clock is
-controlled by some other device or protocol and NTP is used only to
-provide synchronization to other clients. In this case, the local
-clock driver is used. See the <a href="refclock.htm">Reference
-Clock Drivers</a> page for further information. The default for
-this flag is enable.</dd>
-
-<dt><tt>pps</tt></dt>
-
-<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.htm">A Kernel Model for Precision Timekeeping</a>
-page for further information. The default for this flag is
-disable.</dd>
-
-<dt><tt>stats</tt></dt>
-
-<dd>Enables the statistics facility. See the <a href="monopt.htm">
-Monitoring Options</a> page for further information. The default
-for this flag is enable.</dd>
-
-<dt><tt>pll_kernel</tt></dt>
-
-<dd>When the precision time kernel modifications are installed,
-this indicates the kernel controls the clock discipline; otherwise,
-the daemon controls the clock discipline.</dd>
-
-<dt><tt>pps_kernel</tt></dt>
-
-<dd>When the precision time kernel modifications are installed and
-a pulse-per-second (PPS) signal is available, this indicates the
-PPS signal controls the clock discipline; otherwise, the daemon or
-kernel controls the clock discipline, as indicated by the <tt>
-pll_kernel</tt> flag.</dd>
-</dl>
-</dd>
-
-<dt><tt>restrict <i>address mask flag</i> [ <i>flag</i> ]</tt></dt>
-
-<dd>This command operates in the same way as the <tt>restrict</tt>
-configuration file commands of <tt>ntpd</tt>.</dd>
-
-<dt><tt>unrestrict <i>address mask flag</i> [ <i>flag</i>
-]</tt></dt>
-
-<dd>Unrestrict the matching entry from the restrict list.</dd>
-
-<dt><tt>delrestrict <i>address mask [ ntpport ]</i></tt></dt>
-
-<dd>Delete the matching entry from the restrict list.</dd>
-
-<dt><tt>readkeys</tt></dt>
-
-<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.</dd>
-
-<dt><tt>trustedkey <i>keyid</i> [...]</tt></dt>
-
-<dt><tt>untrustedkey <i>keyid</i> [...]</tt></dt>
-
-<dd>These commands operate in the same way as the <tt>
-trustedkey</tt> and <tt>untrustedkey</tt> configuration file
-commands of <tt>ntpd</tt>.</dd>
-
-<dt><tt>authinfo</tt></dt>
-
-<dd>Returns information concerning the authentication module,
-including known keys and counts of encryptions and decryptions
-which have been done.</dd>
-
-<dt><tt>traps</tt></dt>
-
-<dd>Display the traps set in the server. See the source listing for
-further information.</dd>
-
-<dt><tt>addtrap [ <i>address</i> [ <i>port</i> ] [ <i>interface</i>
-]</tt></dt>
-
-<dd>Set a trap for asynchronous messages. See the source listing
-for further information.</dd>
-
-<dt><tt>clrtrap [ <i>address</i> [ <i>port</i> ] [ <i>
-interface</i>]</tt></dt>
-
-<dd>Clear a trap for asynchronous messages. See the source listing
-for further information.</dd>
-
-<dt><tt>reset</tt></dt>
-
-<dd>Clear the statistics counters in various modules of the server.
-See the source listing for further information.</dd>
-</dl>
-
-<h4>Bugs</h4>
-
-<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.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/ntpdc.html b/contrib/ntp/html/ntpdc.html
deleted file mode 100644
index c29c0a2..0000000
--- a/contrib/ntp/html/ntpdc.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<!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
deleted file mode 100644
index 25dc293..0000000
--- a/contrib/ntp/html/ntpdsim.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!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.htm b/contrib/ntp/html/ntpq.htm
deleted file mode 100644
index 908eb5e..0000000
--- a/contrib/ntp/html/ntpq.htm
+++ /dev/null
@@ -1,658 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntpq - standard NTP query program</title>
-</head>
-<body>
-<h3><tt>ntpq</tt> - standard NTP query program</h3>
-
-<img align="left" src="pic/bustardfly.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>A typical NTP monitoring packet.<br clear="left">
-</p>
-
-<hr>
-<h4>Synopsis</h4>
-
-<tt>ntpq [-inp] [-c <i>command</i>] [<i>host</i>] [...]</tt>
-
-<h4>Description</h4>
-
-The <tt>ntpq</tt> utility program is used to query NTP servers
-which implement the recommended NTP mode 6 control message format
-about current state and to request changes in that state. The
-program may 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. <tt>ntpq</tt> can also obtain and print a
-list of peers in a common format by sending multiple queries to the
-server.
-
-<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>For examples and usage, see the <a href="debug.htm">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>-c</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-i</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-n</tt></dt>
-
-<dd>Output all host addresses in dotted-quad numeric format rather
-than converting to the canonical host names.</dd>
-
-<dt><tt>-p</tt></dt>
-
-<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.</dd>
-</dl>
-
-<h4>Internal Commands</h4>
-
-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. 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.
-
-<dl>
-<dt><tt>? [<i>command_keyword</i>]</tt><br>
-<tt>helpl [<i>command_keyword</i>]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>addvars <i>variable_name</i> [ = <i>value</i>]
-[...]</tt><br>
-<tt>rmvars <i>variable_name</i> [...]</tt><br>
-<tt>clearvars</tt></dt>
-
-<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.</dd>
-
-<dt><tt>authenticate yes | no</tt></dt>
-
-<dd>Normally <tt>ntpq</tt> does not authenticate requests unless
-they are write requests. The command <tt>authenticate yes</tt>
-causes <tt>ntpq</tt> to send authentication with all requests it
-makes. Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a <tt>
-peer</tt> display. [I didn't know that - Ed.]</dd>
-
-<dt><tt>cooked</tt></dt>
-
-<dd>Causes output from query commands to be "cooked", 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>.</dd>
-
-<dt><tt>debug more | less | off</tt></dt>
-
-<dd>Turns internal query program debugging on and off.</dd>
-
-<dt><tt>delay <i>milliseconds</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>host <i>hostname</i></tt></dt>
-
-<dd>Set the host to which future queries will be sent. Hostname may
-be either a host name or a numeric address.</dd>
-
-<dt><tt>hostnames [yes | no]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>keyid <i>keyid</i></tt></dt>
-
-<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.</dd>
-
-<dt><tt>ntpversion 1 | 2 | 3 | 4</tt></dt>
-
-<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. There appear
-to be no servers left which demand version 1.</dd>
-
-<dt><tt>quit</tt></dt>
-
-<dd>Exit <tt>ntpq</tt>.</dd>
-
-<dt><tt>passwd</tt></dt>
-
-<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.</dd>
-
-<dt><tt>raw</tt></dt>
-
-<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.</dd>
-
-<dt><tt>timeout <i>millseconds</i></tt></dt>
-
-<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.</dd>
-</dl>
-
-<h4>Control Message Commands</h4>
-
-Each peer known to an NTP server has a 16 bit integer association
-identifier assigned to it. 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>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></dt>
-
-<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"</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 and index may be
-used as an alternative.</dd>
-
-<dt><tt>clockvar [<i>assocID</i>] [<i>variable_name</i> [ = <i>
-value</i> [...]] [...]</tt></dt>
-
-<dt><tt>cv [<i>assocID</i>] [<i>variable_name</i> [ = <i>value</i>
-[...] ][...]</tt></dt>
-
-<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.</dd>
-
-<dt><tt>lassocations</tt></dt>
-
-<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>.</dd>
-
-<dt><tt>lpassociations</tt></dt>
-
-<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.</dd>
-
-<dt><tt>lpeers</tt></dt>
-
-<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.</dd>
-
-<dt><tt>mreadlist <i>assocID</i> <i>assocID</i></tt><br>
-<tt>mrl <i>assocID</i> <i>assocID</i></tt></dt>
-
-<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.</dd>
-
-<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></dt>
-
-<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.</dd>
-
-<dt><tt>opeers</tt></dt>
-
-<dd>An old form of the <tt>peers</tt> command with the reference ID
-replaced by the local interface address.</dd>
-
-<dt><tt>passociations</tt></dt>
-
-<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.</dd>
-
-<dt><tt>peers</tt></dt>
-
-<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.</dd>
-
-<dd>The character in the left margin indicates the fate of this
-peer 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.</dd>
-
-<dd>
-<dl>
-<dt><tt>space reject</tt></dt>
-
-<dd>The peer is discarded as unreachable, synchronized to this
-server (synch loop) or outrageous synchronization distance.</dd>
-
-<dt><tt>x&nbsp;&nbsp;falsetick</tt></dt>
-
-<dd>The peer is discarded by the intersection algorithm as a
-falseticker.</dd>
-
-<dt><tt>.&nbsp;&nbsp;excess</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-&nbsp;&nbsp;outlyer</tt></dt>
-
-<dd>The peer is discarded by the clustering algorithm as an
-outlyer.</dd>
-
-<dt><tt>+&nbsp;&nbsp;candidat</tt></dt>
-
-<dd>The peer is a survivor and a candidate for the combining
-algorithm.</dd>
-
-<dt><tt>#&nbsp;&nbsp;selected</tt></dt>
-
-<dd>The peer is a survivor, but not among the first six peers
-sorted by synchronization distance. If the assocation is ephemeral,
-it may be demobilized to conserve resources.</dd>
-
-<dt><tt>*&nbsp;&nbsp;sys.peer</tt></dt>
-
-<dd>The peer has been declared the system peer and lends its
-variables to the system variables.</dd>
-
-<dt><tt>o&nbsp;&nbsp;pps.peer</tt></dt>
-
-<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.</dd>
-</dl>
-</dd>
-
-<dd>The <tt>flash</tt> variable is a valuable debugging aid. It
-displays the results of the original sanity checks defined in the
-NTP specification RFC-1305 and additional ones added in NTP Version
-4. There are eleven tests called <tt>TEST1</tt> through <tt>
-TEST11</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
-first initialized to zero. If after each set of tests one or more
-bits are set, the packet is discarded.
-
-<p>Tests <tt>TEST4</tt> and <tt>TEST5</tt> check the access
-permissions and cryptographic message digest. If any bits are set
-after that, the packet is discarded. Tests <tt>TEST10</tt> and <tt>
-TEST11</tt> check the authentication state using Autokey public-key
-cryptography, as described in the <a href="authopt.htm">
-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>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. 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. Test <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>The <tt>flash</tt> bits for each test read in increasing order
-from the least significant bit are defined as follows.</p>
-</dd>
-
-<dd>
-<dl>
-<dt><tt>TEST1</tt></dt>
-
-<dd>Duplicate packet. The packet is at best a casual retransmission
-and at worst a malicious replay.</dd>
-
-<dt><tt>TEST2</tt></dt>
-
-<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.</dd>
-
-<dt><tt>TEST3</tt></dt>
-
-<dd>Unsynchronized. One or more timestamp fields are invalid. This
-normally happens when the first packet from a peer is
-received.</dd>
-
-<dt><tt>TEST4</tt></dt>
-
-<dd>Access is denied. See the <a href="accopt.htm">Access Control
-Options</a> page.</dd>
-
-<dt><tt>TEST5</tt></dt>
-
-<dd>Cryptographic authentication fails. See the <a href=
-"authopt.htm">Authentication Options</a> page.</dd>
-
-<dt><tt>TEST6</tt></dt>
-
-<dd>The server is unsynchronized. Wind up its clock first.</dd>
-
-<dt><tt>TEST7</tt></dt>
-
-<dd>The server stratum is at the maximum than 15. It is probably
-unsynchronized and its clock needs to be wound up.</dd>
-
-<dt><tt>TEST8</tt></dt>
-
-<dd>Either the root delay or dispersion is greater than one second,
-which is highly unlikely unless the peer is synchronized to
-Mars.</dd>
-
-<dt><tt>TEST9</tt></dt>
-
-<dd>Either the peer delay or dispersion is greater than one second,
-which is higly unlikely unless the peer is on Mars.</dd>
-
-<dt><tt>TEST10</tt></dt>
-
-<dd>The autokey protocol has detected an authentication failure.
-See the <a href="authopt.htm">Authentication Options</a> page.</dd>
-
-<dt><tt>TEST11</tt></dt>
-
-<dd>The autokey protocol has not verified the server or peer is
-authentic and has valid public key credentials. See the <a href=
-"authopt.htm">Authentication Options</a> page.</dd>
-
-<dt>Additional system variables used by the NTP Version 4 Autokey
-support include the following:</dt>
-
-<dd>
-<dl>
-<dt><tt>certificate <i>filestamp</i></tt></dt>
-
-<dd>Shows the NTP seconds when the certificate file was
-created.</dd>
-
-<dt><tt>hostname <i>host</i></tt></dt>
-
-<dd>Shows the name of the host as returned by the Unix <tt>
-gethostname()</tt> library function.</dd>
-
-<dt><tt>flags <i>hex</i></tt></dt>
-
-<dd>Shows the current flag bits, where the <tt><i>hex</i></tt> bits
-are interpreted as follows:</dd>
-
-<dd>
-<dl>
-<dt><tt>0x01</tt></dt>
-
-<dd>autokey enabled</dd>
-
-<dt><tt>0x02</tt></dt>
-
-<dd>RSA public/private key files present</dd>
-
-<dt><tt>0x04</tt></dt>
-
-<dd>PKI certificate file present</dd>
-
-<dt><tt>0x08</tt></dt>
-
-<dd>Diffie-Hellman parameters file present</dd>
-
-<dt><tt>0x10</tt></dt>
-
-<dd>NIST leapseconds table file present</dd>
-</dl>
-</dd>
-
-<dt><tt>leapseconds <i>filestamp</i></tt></dt>
-
-<dd>Shows the NTP seconds when the NIST leapseconds table file was
-created.</dd>
-
-<dt><tt>params <i>filestamp</i></tt></dt>
-
-<dd>Shows the NTP seconds when the Diffie-Hellman agreement
-parameter file was created.</dd>
-
-<dt><tt>publickey <i>filestamp</i></tt></dt>
-
-<dd>Shows the NTP seconds when the RSA public/private key files
-were created.</dd>
-
-<dt><tt>refresh <i>timestamp</i></tt></dt>
-
-<dd>Shows the NTP seconds when the public cryptographic values were
-refreshed and signed.</dd>
-
-<dt><tt>tai <i>offset</i></tt></dt>
-
-<dd>Shows the TAI-UTC offset in seconds obtained from the NIST
-leapseconds table.</dd>
-</dl>
-</dd>
-
-<dt>Additional peer variables used by the NTP Version 4 Autokey
-support include the following:</dt>
-
-<dd>
-<dl>
-<dt><tt>certificate <i>filestamp</i></tt></dt>
-
-<dd>Shows the NTP seconds when the certificate file was
-created.</dd>
-
-<dt><tt>flags <i>hex</i></tt></dt>
-
-<dd>Shows the current flag bits, where the <i>hex</i> bits are
-interpreted as in the system variable of the same name. The bits
-are set in the first autokey message received from the server and
-then reset as the associated data are obtained from the server and
-stored.</dd>
-
-<dt><tt>hcookie <i>hex</i></tt></dt>
-
-<dd>Shows the host cookie used in the key agreement algorithm.</dd>
-
-<dt><tt>initkey <i>key</i></tt></dt>
-
-<dd>Shows the initial key used by the key list generator in the
-autokey protocol.</dd>
-
-<dt><tt>initsequence <i>index</i></tt></dt>
-
-<dd>Shows the initial index used by the key list generator in the
-autokey protocol.</dd>
-
-<dt><tt>pcookie <i>hex</i></tt></dt>
-
-<dd>Specifies the peer cookie used in the key agreement
-algorithm.</dd>
-
-<dt><tt>timestamp <i>time</i></tt></dt>
-
-<dd>Shows the NTP seconds when the last autokey key list was
-generated and signed.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-
-<dt><tt>pstatus <i>assocID</i></tt></dt>
-
-<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 hexidecimal and in
-pidgeon English.</dd>
-
-<dt><tt>readlist [ <i>assocID</i> ]</tt><br>
-<tt>rl [ <i>assocID</i> ]</tt></dt>
-
-<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.</dd>
-
-<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></dt>
-
-<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.</dd>
-
-<dt><tt>writevar <i>assocID</i> <i>variable_name</i> [ = <i>
-value</i> [ ...]</tt></dt>
-
-<dd>Like the readvar request, except the specified variables are
-written instead of read.</dd>
-
-<dt><tt>writelist [ <i>assocID</i> ]</tt></dt>
-
-<dd>Like the readlist request, except the internal list variables
-are written instead of read.</dd>
-</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>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/ntpq.html b/contrib/ntp/html/ntpq.html
deleted file mode 100644
index ce6baa5..0000000
--- a/contrib/ntp/html/ntpq.html
+++ /dev/null
@@ -1,262 +0,0 @@
-<!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.htm b/contrib/ntp/html/ntptime.htm
deleted file mode 100644
index c192c13..0000000
--- a/contrib/ntp/html/ntptime.htm
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntptime - read kernel time variables</title>
-</head>
-<body>
-<h3><tt>ntptime</tt> - read kernel time variables</h3>
-
-<img align="left" src="pic/pogo5.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
-Walt Kelly</a>
-
-<p>The turtle is been swimming in the kernel.<br clear="left">
-</p>
-
-<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>
-
-This program is useful only with special kernels described in the
-<a href="kern.htm">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.
-
-<h4>Options</h4>
-
-<dl>
-<dt><tt>-c</tt></dt>
-
-<dd>Display the execution time of <tt>ntptime</tt> itself.</dd>
-
-<dt><tt>-e <i>est_error</i></tt></dt>
-
-<dd>Specify estimated error, in microseconds.</dd>
-
-<dt><tt>-f <i>frequency</i></tt></dt>
-
-<dd>Specify frequency offset, in parts per million.</dd>
-
-<dt><tt>-h</tt></dt>
-
-<dd>Display help information.</dd>
-
-<dt><tt>-m <i>max_error</i></tt></dt>
-
-<dd>Specify max possible errors, in microseconds.</dd>
-
-<dt><tt>-o <i>offset</i></tt></dt>
-
-<dd>Specify clock offset, in microseconds.</dd>
-
-<dt><tt>-r</tt></dt>
-
-<dd>Display Unix and NTP times in raw format.</dd>
-
-<dt><tt>-s <i>status</i></tt></dt>
-
-<dd>Specify clock status. Better know what you are doing.</dd>
-
-<dt><tt>-t <i>time_constant</i></tt></dt>
-
-<dd>Specify time constant, an integer in the range 0-10.</dd>
-</dl>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/ntptime.html b/contrib/ntp/html/ntptime.html
deleted file mode 100644
index 0ddd8e4..0000000
--- a/contrib/ntp/html/ntptime.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!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.htm b/contrib/ntp/html/ntptrace.htm
deleted file mode 100644
index 28313a5..0000000
--- a/contrib/ntp/html/ntptrace.htm
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//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>
-</head>
-<body>
-<h3><tt>ntptrace</tt> - trace a chain of NTP servers back to the
-primary source</h3>
-
-<img align="left" src="pic/alice13.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>The rabbit knows the way back.<br clear="left">
-</p>
-
-<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>
-
-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 "<tt>localhost</tt>"), 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.
-
-<h4>Options</h4>
-
-<dl>
-<dt><tt>-d</tt></dt>
-
-<dd>Turns on some debugging output.</dd>
-
-<dt><tt>-n</tt></dt>
-
-<dd>Turns off the printing of host names; instead, host IP
-addresses are given. This may be useful if a nameserver is
-down.</dd>
-
-<dt><tt>-r <i>retries</i></tt></dt>
-
-<dd>Sets the number of retransmission attempts for each host
-(default = 5).</dd>
-
-<dt><tt>-t <i>timeout</i></tt></dt>
-
-<dd>Sets the retransmission timeout (in seconds) (default =
-2).</dd>
-
-<dt><tt>-v</tt></dt>
-
-<dd>Prints verbose information about the NTP servers.</dd>
-</dl>
-
-<h4>Bugs</h4>
-
-This program makes no attempt to improve accuracy by doing multiple
-samples.
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/ntptrace.html b/contrib/ntp/html/ntptrace.html
deleted file mode 100644
index 76002bf..0000000
--- a/contrib/ntp/html/ntptrace.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!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.htm b/contrib/ntp/html/parsedata.htm
deleted file mode 100644
index a756079..0000000
--- a/contrib/ntp/html/parsedata.htm
+++ /dev/null
@@ -1,407 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<TITLE>NTP PARSE clock data formats</TITLE>
-<h1>NTP PARSE clock data formats</h1>
-
-<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).
-
-<hr>
-<h2>Meinberg clocks</h2>
-<pre>
-Meinberg: start=&lt;STX&gt;, end=&lt;ETX&gt;, sync on start
- pattern="\2D: . . ;T: ;U: . . ; \3"
- pattern="\2 . . ; ; : : ; \3"
- pattern="\2 . . ; ; : : ; : ; ; . . "
-</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: info@meinberg.de">info@meinberg.de</A>
-
- <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.
- <pre>
- The preferred tty setting for Meinberg is:
- CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
- IFLAG (IGNBRK|IGNPAR|ISTRIP)
- OFLAG 0
- LFLAG 0
- </pre>
- <pre>
- The tty setting for Meinberg GPS 166/167 receivers is:
- 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:
- <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 !
-<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
-
-<br>
-<h2>Raw DCF77 Data via serial line</h2>
-<p>RAWDCF: end=TIMEOUT&gt;1.5s, sync each char (any char),generate psuedo time
- codes, fixed format
-<p>
- direct DCF77 code input
-
- <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.
-
-<pre>
- The preferred tty setting is:
- CFLAG (B50|CS8|CREAD|CLOCAL)
- IFLAG 0
- OFLAG 0
- LFLAG 0
-</pre>
-
-<h2>DCF77 raw time code</h2>
-
-
-<p>From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig
-und Berlin, März 1989
-<br>
-<pre>
- Timecode transmission:
-
- 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
-
- FM:
-
- see the spec. (basically a (non-)inverted psuedo random phase shift)
-
- Encoding:
-
- 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 -> 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>
-<h2>Schmid clock</h2>
-
-<p>
- Schmid clock: needs poll, binary input, end='\xFC', sync start
-
- <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.
-<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).
-
-<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>
-<h2>Trimble SV6 ASCII time code (TAIP)</h2>
-
-<p>
- Trimble SV6: needs poll, ascii timecode, start='&gt;', end='&lt;',
- query='&gt;QTM&lt;', eol='&lt;'
-
-<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;').
-<pre>
- TTY setup is:
- CFLAG (B4800|CS8|CREAD)
- IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
- OFLAG (OPOST|ONLCR)
- LFLAG (ICANON|ECHOK)
-
- Special flags are:
- 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>
-<h2>ELV DCF7000</h2>
-<p>
- ELV DCF7000: end='\r', pattern=" - - - - - - - \r"
-<p>
- The ELV DCF7000 is a cheap DCF77 receiver sending each second
- a time code (though not very precise!) delimited by '`r'
-<pre>
- Timecode
- YY-MM-DD-HH-MM-SS-FF\r
-
- FF&0x1 - DST
- FF&0x2 - DST switch warning
- FF&0x4 - unsynchronised
-</pre>
-<hr>
-<h2>HOPF 6021 und Kompatible</h2>
-
-<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.
-
-<pre>
- hopf Funkuhr 6021
- used with 9600,8N1,
- UTC via serial line
- "Sekundenvorlauf" ON
- ETX zum Sekundenvorlauf ON
- dataformat 6021
- output time and date
- transmit with control characters
- transmit evry second
-
- Type 6021 Serial Output format
-
- 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>
-<h2>Diem Computime Clock</h2>
-
-<p>
- The Computime receiver sends a datagram in the following format every minute
-<pre>
- Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
- Pos 0123456789012345678901 2 3
- 0000000000111111111122 2 2
- Parse T: : : : : : : \r\n
-
- T Startcharacter "T" 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>
-<h2>WHARTON 400A Series Clock with a 404.2 Serial interface</h2>
-
-<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 :
-<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>
- WHARTON 400A Series output format 1 is as follows :
-<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>
diff --git a/contrib/ntp/html/parsedata.html b/contrib/ntp/html/parsedata.html
deleted file mode 100644
index d5b2383..0000000
--- a/contrib/ntp/html/parsedata.html
+++ /dev/null
@@ -1,336 +0,0 @@
-<!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.htm b/contrib/ntp/html/parsenew.htm
deleted file mode 100644
index 0ef60bc..0000000
--- a/contrib/ntp/html/parsenew.htm
+++ /dev/null
@@ -1,237 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
-<TITLE>Making PARSE Clocks</TITLE>
-<h1>How to build new PARSE clocks</h1>
-
-<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>Prerequisites:
-<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>Make a conversion module (libparse/clk_*.c)
-
-<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:
-<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:
- <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>Conversion is done in the cvt_* routine in parse/clk_*.c files. look in
- them for examples. The basic structure is:
-
-<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.
-
-<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>In order to make your clk_*.c file usable a reference to the clockformat
- structure must be put into parse_conf.c.
-</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 "IP" 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 "poll" 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 "DCF") */
- 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 loosing synch
- */
- seconds a clock can be trusted after loosing synchronisation.
-
- u_long cl_speed; /* terminal input & 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>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>For questions: <a href="mailto: kardel@acm.org">kardel@acm.org</a>.
-
-<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).
-<hr><p>
-<a href="http://www4.informatik.uni-erlangen.de/~kardel">Frank Kardel</a>
diff --git a/contrib/ntp/html/parsenew.html b/contrib/ntp/html/parsenew.html
deleted file mode 100644
index 0f0e0b3..0000000
--- a/contrib/ntp/html/parsenew.html
+++ /dev/null
@@ -1,195 +0,0 @@
-<!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.htm b/contrib/ntp/html/patches.htm
deleted file mode 100644
index ed4c8dd..0000000
--- a/contrib/ntp/html/patches.htm
+++ /dev/null
@@ -1,42 +0,0 @@
-<html><head><title>
-Patching Procedures
-</title></head><body><h3>
-Patching Procedures
-</h3>
-
-<img align=left src=pic/alice38.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>
-from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>The Mad Hatter needs patches.
-<br clear=left><hr>
-
-<p>A distribution so widely used as this one eventually develops numerous barnacles as the result of <a href=porting.htm>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.
-
-<ol>
-
-<p><li>Please submit patches to <a href=mailto:bugs@mail.ntp.org>Bugs &lt;bugs@mail.ntp.org&gt;</a> in the form of either unified-diffs (<tt>diff -u</tt>) or context-diffs (<tt>diff -c</tt>).</li>
-
-<p><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>
-
-<p><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</li>
-
-<p><tt>patch -p &lt;your_patch&gt;</tt></li>
-
-<p><li>Please avoid patching the RCS subdirectories; better yet, clean them out before submitting patches.</li>
-
-<p><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 zip or the stock Unix <tt>compress</tt> utility.</li>
-
-<p><li>Don't forget the documentation that may be affected by the patch. Send us patches for the <tt>./htm</tt> files as well. See the <a href=htmlprimer.htm>A Beginner's Guide to HTML</a> page for a tutorial.</li>
-
-<p><li>We would be glad to include your name, electric address and descriptive phrase in the <a href=copyright.htm>Copyright</a> page, if you wish.</li>
-
-</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 occured 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>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>The best way to see what's changed between two distributions is to run a <tt>diff</tt> against them.
-
-<p>Thanks for your contribution and happy chime.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/patches.html b/contrib/ntp/html/patches.html
deleted file mode 100644
index cd6e550..0000000
--- a/contrib/ntp/html/patches.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!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.htm b/contrib/ntp/html/porting.htm
deleted file mode 100644
index 4015d61..0000000
--- a/contrib/ntp/html/porting.htm
+++ /dev/null
@@ -1,84 +0,0 @@
-<html><head><title>
-Porting Hints
-</title></head><body><h3>
-Porting Hints
-</h3>
-
-<img align=left src=pic/wingdorothy.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>from <i>The
-Wizard of Oz</i>, L. Frank Baum</a>
-
-<p>Porting Dorothy in Oz.
-<br clear=left><hr>
-
-<p>NOTE: The following procedures have been replaced by GNU automake and
-autoconfigure. This page is to be updated in the next release.
-
-<p>Porting to a new machine or operating system ordinarily requires
-updating the <code>./machines</code> directory and the
-<code>./compilers</code> directories in order to define the build
-environment and autoconfigure means. You will probably have to modify
-the <code>ntp_machines.h</code> file and <code>"l_stdlib.h"</code> files
-as well. The two most famous trouble spots are the I/O code in
-<code>./ntpd/ntp_io.c</code> and the clock adjustment code in
-<code>./ntpd/ntp_unixclock.c</code>.
-
-<p>These are the rules so that older bsd systems and the POSIX standard
-system can coexist together.
-
-<ol>
-
-<li>If you use <code>select</code> then include
-<code>"ntp_select.h"</code>. <code>select</code> 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
-<code>"ntp_select.h"</code>.
-
-<p><li>Always use POSIX definition of strings. Include
-<code>"ntp_string.h"</code> instead of <code>&lt;string.h&gt;</code>.
-
-<p><li>Always include <code>"ntp_malloc.h"</code> if you use
-<code>malloc</code>.
-
-<p><li>Always include <code>"ntp_io.h"</code> instead of
-<code>&lt;sys/file.h&gt;</code> or <code>&lt;fnctl.h&gt;</code> to get
-<code>O_*</code> flags.
-
-<p><li>Always include <code>"ntp_if.h"</code> instead of
-<code>&lt;net/if.h&gt;</code>.
-
-<p><li>Always include <code>"ntp_stdlib.h"</code> instead of
-<code>&lt;stdlib.h&gt;</code>.
-
-<p><li>Define any special defines needed for a system in
-<code>./include/ntp_machine.h</code> based on system identifier. This
-file is included by the <code>"ntp_types.h"</code> file and should
-always be placed first after the <code>&lt;&gt;</code> defines.
-
-<p><li>Define any special library prototypes left over from the system
-library and include files in the <code>"l_stdlib.h"</code> file. This
-file is included by the <code>"ntp_stdlib.h"</code> file and should
-ordinarily be placed last in the includes list.
-
-<p><li>Don't define a include file by the same name as a system include
-file.
-
-</ol>
-
-<p><code>"l_stdlib.h"</code> can contain any extra definitions that are
-needed so that <code>gcc</code> 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>See <code>include/ntp_machines.h</code> for the various compile time
-options.
-
-<p>When you are satisfied the port works and that other ports are not
-adversely affected, please send <a href="patches.htm">patches</a> for
-the system files you have changed, as well as any documentation that
-should be updated, including the advice herein.
-
-<p>Good luck.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/porting.html b/contrib/ntp/html/porting.html
deleted file mode 100644
index 44db2ab..0000000
--- a/contrib/ntp/html/porting.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!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.htm b/contrib/ntp/html/pps.htm
deleted file mode 100644
index a20dd4d..0000000
--- a/contrib/ntp/html/pps.htm
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Pulse-per-second (PPS) Signal Interfacing</title>
-</head>
-<body>
-<h3>Pulse-per-second (PPS) Signal Interfacing</h3>
-
-<img align="left" src="pic/alice32.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>Alice is trying to find the PPS signal connector.<br clear=
-"left">
-</p>
-
-<hr>
-<p>Some radio clocks and related timekeeping gear have a
-pulse-per-second (PPS) signal that can be used to discipline the
-local clock oscillator 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. 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.
-Connection via a serial port may require signal conversion and
-regeneration to RS232 levels, which can be done using a circuit
-such as described in the <a href="gadget.htm">Gadget Box PPS Level
-Converter and CHU Modem</a> page. Note that NTP no longer supports
-connection via the data leads of a serial port.</p>
-
-<p>Both the serial and parallel port connection require operating
-system support, which is available in only a few operating systems,
-including Linux, FreeBSD and latest Solaris beginning with 2.7.
-Support on an experimental basis is available for several older
-systems, including SunOS, Digital Ultrix and HP-UX, and in current
-Digital Tru64 (Alpha). The PPS application program interface
-defined in RFC-2783 (PPSAPI) 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 PPSAPI inerface requires a <tt>
-/usr/include/sys/ppstime.h</tt> header file. This file is included
-in Linux and FreeBSD distributions, but not in other distributions
-or standard workstation products at this time. Header files for
-other systems, including Solaris, can be found in the <tt>
-nanokernel.tar.gz</tt> distribution, which can be found via the
-Collaboration Resources link at www.ntp.org. The top level
-directory contains a number of subdirectories for each
-architecture, including Solaris. The <tt>ppstime.h</tt> file for
-each architecture can be found in the subdirectory of the same
-name.</p>
-
-<p>In the preferred mode of operation, PPS signals are processed by
-the <a href="driver22.htm">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.htm">Mitigation Rules and the <tt>
-prefer</tt> Keyword</a> page. One of the drivers described in the
-<a href="refclock.htm">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.htm">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>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a><br>
-<br>
-
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/pps.html b/contrib/ntp/html/pps.html
deleted file mode 100644
index c060148..0000000
--- a/contrib/ntp/html/pps.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!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.htm b/contrib/ntp/html/prefer.htm
deleted file mode 100644
index 57a047a..0000000
--- a/contrib/ntp/html/prefer.htm
+++ /dev/null
@@ -1,93 +0,0 @@
-<html><head><title>
-Mitigation Rules and the <tt>prefer</tt> Keyword
-</title></head><body><h3>
-Mitigation Rules and the <tt>prefer</tt> Keyword
-</h3>
-
-<img align=left src=pic/alice11.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>
-from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>Listen carefully to what I say; it is very complicated.
-<br clear=left><hr>
-
-<h4>Introduction</h4>
-
-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>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>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.
-
-<h4>The <tt>prefer</tt> Peer</h4>
-
-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>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 the 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>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 algorithms, 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>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.
-
-<h4>Peer Classification</h4>
-
-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:
-
-<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>
-
-<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>
-
-<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>
-
-<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>
-
-<li>Where support is available, the PPS signal may be processed directly by the kernel, as described in the <A HREF="kern.htm">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.</li>
-
-</ol>
-
-<p>Reference clock drivers operate in the manner described in the <A HREF="refclock.htm">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>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>First the clock selection algorithm can select one or more remote servers or 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>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.htm">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.
-
-<h4>Mitigation Rules</h4>
-
-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 operation, 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>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>The mitigation rules establish the choice of <i>system peer</i>, which determine the stratum, reference identifier and several other system variables which are visible to clients of the local server. In addition, they establish which source or combination of sources control the local clock.
-
-<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>
-
-<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>
-
-<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>
-
-<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>
-
-<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.</li>
-
-</ol>
-
-<h4>Using the Pulse-per-Second (PPS) Signal</h4>
-
-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></tt>, is limited to a millisecond at best and a few milliseconds in typical cases. However, some radios produce a PPS signal which can be used to improve the accuracy with typical workstation servers to the order of a few tens of microseconds. The details of how this can be accomplished are discussed in the <A HREF="pps.htm">Pulse-per-second (PPS) Signal Interfacing</A> page. The following paragraphs discuss how the PPS signal is affected by the mitigation rules.
-
-<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>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="driver22.htm">PPS Clock Discipline</A> page, the other using PPS signal support in the kernel, as described in the <A HREF="kern.htm">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>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>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>PPS support requires the PPS driver (type 22) and PPSAPI interface described in the <a href=pps.htm>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.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/prefer.html b/contrib/ntp/html/prefer.html
deleted file mode 100644
index fe909b7..0000000
--- a/contrib/ntp/html/prefer.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!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/qth.htm b/contrib/ntp/html/qth.htm
deleted file mode 100644
index 1756edb..0000000
--- a/contrib/ntp/html/qth.htm
+++ /dev/null
@@ -1,76 +0,0 @@
-<html><head><title>
-Stations, Frequencies and Geographic Coordinates
-</title></head><body><h3>
-Stations, Frequencies and Geographic Coordinates
-</h3><hr>
-
-The following data were obtained from the International Frequency List
-published by the ITU and other sources.
-
-<p><table cols=3 width=100%>
-
-<tr>
-<td>Station</td>
-<td>Frequencies</td>
-<td>Coordinates</td>
-</tr>
-
-<tr>
-<td>WWV Ft. Collins, CO</td>
-<td>2.5/5/10/15/20 MHz</td>
-<td>40:40:49.0N 105:02:27.0W</td>
-</tr>
-
-<tr>
-<td>WWVB Ft. Collins, CO</td>
-<td>60 kHz</td>
-<td>40:40:28.3N 105:02:39.5W</td>
-</tr>
-
-<tr>
-<td>WWVH Kauai, HI</td>
-<td>2.5/5/10/15 MHz</td>
-<td>21:59:26.0N 159:46:00.0W</td>
-</tr>
-
-<tr>
-<td>CHU Ottawa, CA</td>
-<td>3330/7335/14670 kHz</td>
-<td>45:18N 75:45N</td>
-</tr>
-
-<tr>
-<td>DCF77 Mainflingen, DE</td>
-<td>77.5 kHz</td>
-<td>50:01N 9:00E</td>
-</tr>
-
-<tr>
-<td>MSF Rugby, UK</td>
-<td>60 kHz</td>
-<td>52:22N 1:11W</td>
-</tr>
-
-<tr>
-<td>TDF Allouis, FR</td>
-<td>162 kHz</td>
-<td>47:10N 2:12E</td>
-</tr>
-
-<tr>
-<td><a class="StationInfo" href="http://jjy.crl.go.jp/">JJY</a> ( Fukushima, JAPAN )</td>
-<td>40 KHz</td>
-<td>37:22 N &nbsp; 140:51 E</td>
-</tr>
-
-<tr>
-<td><a class="StationInfo" href="http://jjy.crl.go.jp/">JJY</a> ( Saga, JAPAN )</td>
-<td>60 KHz</td>
-<td>33:28 N &nbsp; 130:11 E</td>
-</tr>
-
-</table>
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills &lt;mills@udel.edu&gt;</a>
-</address></a></body></html>
diff --git a/contrib/ntp/html/quick.htm b/contrib/ntp/html/quick.htm
deleted file mode 100644
index 4eecf82..0000000
--- a/contrib/ntp/html/quick.htm
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Quick Start</title>
-</head>
-<body>
-<h3>Quick Start</h3>
-
-<img align="left" src="pic/panda.gif" alt="gif">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/~mills/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.<br clear="left">
-</p>
-
-<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.htm">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. Strictly speaking, the
-file 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. Links to public
-time servers operated by National Institutes of Science and
-Technology (NIST), US Naval Observatory (USNO), Canadian Metrology
-Centre (CMC) and many others are given in the home page of this
-document collection. 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 if enabled. If the <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. Thus, for most applications an additional line should be
-added to the file of the form</p>
-
-<p><tt>driftfile /etc/ntp.drift</tt></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.htm"><tt>ntpq</tt></a> utility, although the <a href=
-"ntpdc.htm"><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.htm">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.htm">Notes on Configuring NTP and Setting up a NTP
-Subnet</a> page contains an extended discussion of these
-options.</p>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/quick.html b/contrib/ntp/html/quick.html
deleted file mode 100644
index 151ea1b2..0000000
--- a/contrib/ntp/html/quick.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!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.htm b/contrib/ntp/html/rdebug.htm
deleted file mode 100644
index bc998ca..0000000
--- a/contrib/ntp/html/rdebug.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<html><head><title>
-Debugging Hints for Reference Clock Drivers
-</title></head><body><h3>
-Debugging Hints for Reference Clock Drivers
-</h3>
-
-<img align=left src=pic/oz2.gif><a href=http://www.eecis.udel.edu/~mills/pictures.htm>from <i>The
-Wizard of Oz</i>, L. Frank Baum</a>
-
-<p>Call the girls and the'll sweep your bugs.
-<br clear=left><hr>
-
-<p>The <a href=ntpq.htm><tt>ntpq</tt></a> and <a href=ntpdc.htm><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.htm><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 occured 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>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>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>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>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>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.
-
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a href=mailto:mills@udel.edu>David L. Mills &lt;mills@udel.edu&gt;</a></address></a></body></html>
diff --git a/contrib/ntp/html/rdebug.html b/contrib/ntp/html/rdebug.html
deleted file mode 100644
index 87598ed..0000000
--- a/contrib/ntp/html/rdebug.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!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.htm b/contrib/ntp/html/refclock.htm
deleted file mode 100644
index df4af3a..0000000
--- a/contrib/ntp/html/refclock.htm
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-
- <meta name="generator" content="HTML Tidy, see www.w3.org">
- <title>Reference Clock Drivers</title>
-</head>
- <body>
-
-<h3>Reference Clock Drivers</h3>
- <img align="left" src="pic/stack1a.jpg" alt="gif">
-Master Time Facility at the <a
- href="http://www.eecis.udel.edu/%7Emills/lab.htm"> UDel Internet Research
-Laboratory</a>: <br clear="left">
-
-<hr>
-<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.htm"><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.htm">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="driver1.htm">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.htm">External Clock Discipline
-and the Local Clock Driver</a> page.</p>
-
-<h4>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="qth.htm">Stations, Frequencies and Geographic
-Coordinates</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.htm">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>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.htm">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
-"clockhopping" 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.htm">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.htm">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.htm">Line Disciplines and Streams Drivers</a> page.</p>
-
-<h4>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.htm">Copyright Notice</a> page.</p>
-
-<p><a href="driver1.htm">Type 1</a> Undisciplined Local Clock (<tt>LOCAL</tt>)<br>
- <a href="driver2.htm">Type 2</a> Trak 8820 GPS Receiver (<tt>GPS_TRAK</tt>)<br>
- <a href="driver3.htm">Type 3</a> PSTI/Traconex 1020 WWV/WWVH Receiver (<tt>WWV_PST</tt>)<br>
- <a href="driver4.htm">Type 4</a> Spectracom WWVB and GPS Receivers (<tt>WWVB_SPEC</tt>)<br>
- <a href="driver5.htm">Type 5</a> TrueTime GPS/GOES/OMEGA Receivers (<tt>TRUETIME</tt>)<br>
- <a href="driver6.htm">Type 6</a> IRIG Audio Decoder (<tt>IRIG_AUDIO</tt>)<br>
- <a href="driver7.htm">Type 7</a> Radio CHU Audio Demodulator/Decoder (<tt>CHU</tt>)<br>
- <a href="driver8.htm">Type 8</a> Generic Reference Driver (<tt>PARSE</tt>)<br>
- <a href="driver9.htm">Type 9</a> Magnavox MX4200 GPS Receiver (<tt>GPS_MX4200</tt>)<br>
- <a href="driver10.htm">Type 10</a> Austron 2200A/2201A GPS Receivers (<tt>GPS_AS2201</tt>)<br>
- <a href="driver11.htm">Type 11</a> Arbiter 1088A/B GPS Receiver (<tt>GPS_ARBITER</tt>)<br>
- <a href="driver12.htm">Type 12</a> KSI/Odetics TPRO/S IRIG Interface (<tt>IRIG_TPRO</tt>)<br>
- Type 13 Leitch CSD 5300 Master Clock Controller (<tt>ATOM_LEITCH</tt>)<br>
- Type 14 EES M201 MSF Receiver (<tt>MSF_EES</tt>)<br>
- <a href="driver5.htm">Type 15</a> * TrueTime generic receivers<br>
- <a href="driver16">Type 16</a> Bancomm GPS/IRIG Receiver (<tt>GPS_BANCOMM</tt>)<br>
- Type 17 Datum Precision Time System (<tt>GPS_DATUM</tt>)<br>
- <a href="driver18.htm">Type 18</a> NIST Modem Time Service (<tt>ACTS_NIST</tt>)<br>
- <a href="driver19.htm">Type 19</a> Heath WWV/WWVH Receiver (<tt>WWV_HEATH</tt>)<br>
- <a href="driver20.htm">Type 20</a> Generic NMEA GPS Receiver (<tt>NMEA</tt>)<br>
- Type 21 TrueTime GPS-VME Interface (<tt>GPS_VME</tt>)<br>
- <a href="driver22.htm">Type 22</a> PPS Clock Discipline (<tt>PPS</tt>)<br>
- <a href="driver23.htm">Type 23</a> PTB Modem Time Service (<tt>ACTS_PTB</tt>)<br>
- <a href="driver24.htm">Type 24</a> USNO Modem Time Service (<tt>ACTS_USNO</tt>)<br>
- <a href="driver5.htm">Type 25</a> * TrueTime generic receivers<br>
- <a href="driver26.htm">Type 26</a> Hewlett Packard 58503A GPS Receiver (<tt>GPS_HP</tt>)<br>
- <a href="driver27.htm">Type 27</a> Arcron MSF Receiver (<tt>MSF_ARCRON</tt>)<br>
- <a href="driver28.htm">Type 28</a> Shared Memory Driver (<tt>SHM</tt>)<br>
- <a href="driver29.htm">Type 29</a> Trimble Navigation Palisade GPS (<tt>GPS_PALISADE</tt>)<br>
- <a href="driver30.htm">Type 30</a> Motorola UT Oncore GPS (<tt>GPS_ONCORE</tt>)<br>
- Type 31 Rockwell Jupiter GPS (<tt>GPS_JUPITER</tt>)<br>
- <a href="driver32.htm">Type 32</a> Chrono-log K-series WWVB receiver (<tt>CHRONOLOG</tt>)<br>
- <a href="driver33.htm">Type 33</a> Dumb Clock (<tt>DUMBCLOCK</tt>)<br>
- <a href="driver34.htm">Type 34</a> Ultralink WWVB Receivers (<tt>ULINK</tt>)<br>
- <a href="driver35.htm">Type 35</a> Conrad Parallel Port Radio Clock (<tt>PCF</tt>)<br>
- <a href="driver36.htm">Type 36</a> Radio WWV/H Audio Demodulator/Decoder
-(<tt>WWV</tt>)<br>
- <a href="driver37.htm">Type 37</a> Forum Graphic GPS Dating station (<tt>FG</tt>)<br>
- <a href="driver38.htm">Type 38</a> hopf GPS/DCF77 6021/komp for Serial Line
-(<tt>HOPF_S</tt>)<br>
- <a href="driver39.htm">Type 39</a> hopf GPS/DCF77 6039 for PCI-Bus (<tt>HOPF_P</tt>)<br>
- <a href="driver40.htm">Type 40</a> JJY Receivers (<tt>JJY</tt>)<br>
-<a href="driver44.htm">Type 44</a> NeoClock4X DCF77 / TDF receiver<br>
- </p>
-
-<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>
-
-<p>Additional Information</p>
-
-<p><a href="prefer.htm">Mitigation Rules and the <tt>prefer</tt> Keyword</a><br>
- <a href="rdebug.htm">Debugging Hints for Reference Clock Drivers</a><br>
- <a href="kern.htm">A Kernel Model for Precision Timekeeping</a><br>
- <a href="ldisc.htm">Line Disciplines and Streams Drivers</a><br>
- <a href="audio.htm">Reference Clock Audio Drivers</a><br>
- <a href="pps.htm">Pulse-per-second (PPS) Signal Interfacing</a><br>
- <a href="howto.htm">How To Write a Reference Clock Driver</a></p>
-
-<hr> <a href="index.htm"><img align="left" src="pic/home.gif" alt="gif">
-</a>
-<address><a href="mailto:mills@udel.edu">David L. Mills &lt;mills@udel.edu&gt;</a></address>
- <br>
-</body>
-</html>
diff --git a/contrib/ntp/html/refclock.html b/contrib/ntp/html/refclock.html
deleted file mode 100644
index a9f74ab..0000000
--- a/contrib/ntp/html/refclock.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!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.htm b/contrib/ntp/html/release.htm
deleted file mode 100644
index 9dcef7c..0000000
--- a/contrib/ntp/html/release.htm
+++ /dev/null
@@ -1,290 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>NTP Version 4 Release Notes</title>
-</head>
-<body>
-<h3>NTP Version 4 Release Notes</h3>
-
-<img align="left" src="pic/hornraba.gif" alt="gif"><a href=
-"http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Alice's
-Adventures in Wonderland</i>, Lewis Carroll</a>
-
-<p>The rabbit toots to make sure you read this.<br clear="left">
-</p>
-
-<hr>
-<p>This document was last updated 4 May 2001</p>
-
-<h4>NTP Version 4 Release Notes</h4>
-
-<p>This release of the NTP Version 4 (NTPv4) daemon for Unix, VMS
-and Windows (NT4 and 2000) incorporates new features and
-refinements to the NTP Version 3 (NTPv3) algorithms. However, it
-continues the tradition of retaining backwards compatibility with
-older versions, except for symmetric mode in NTPv1. Client/server
-mode continues to be supported in NTPv1. 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 current NTPv3, although this version is not
-actively maintained by the NTPv4 developer's group.</p>
-
-<p>The primary purpose of this release is to verify the remaining
-new code compiles and runs in the various architectures, operating
-systems and hardware complement that can't be verified here. Of
-particular interest are Windows 2000, VMS and various reference
-clock drivers. As always, corrections and bugfixes are warmly
-received, especially in the form of context diffs.</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 in the <a href="biblio.htm">Protocol
-Conformance Statement</a> page.</p>
-
-<ol>
-<li>
-<p>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.</p>
-</li>
-
-<li>
-<p>The clock discipline algorithm has been redesigned to improve
-accuracy, reduce the impact of network jitter and allow an increase
-in poll intervals to well over one day with only moderate sacrifice
-in accuracy. 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.</p>
-</li>
-
-<li>
-<p>This release includes support for the <a href=
-"http://www.eecis.udel.edu/~mills/resource.htm"><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 less than one microsecond.
-The older precision time kernel for the Alpha continues to be
-supported.</p>
-</li>
-
-<li>
-<p>This release includes support for Autokey public-key
-cryptography, which is the preferred scheme for authenticating
-servers to clients. It uses NTP header extensions fields documented
-in: Mills, D.L. Public-Key cryptography for the Network Time
-Protocol. Internet Draft draft-ietf-stime-ntpauth-00.txt,
-University of Delaware, June 2000, 36 pp. <a href=
-"http://www.eecis.udel.edu/~mills/database/memos/draft-ietf-stime-ntpauth-00.txt">
-ASCII</a> and implemented in this release. The design provides for
-orderly key refreshment and does not require public keys and
-related media to be copied from one machine to another. Specific
-information about Autokey cryptography is contained in the <a href=
-"authopt.htm">Authentication Options</a> page and links from
-there.</p>
-</li>
-
-<li>
-<p>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 for automatic discovery and
-configuration 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. Upon receiving the message, a
-client exchanges several messages with the server in order to
-calibrate the multicast propagation delay between the client and
-server. 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 in
-ordinary client/server operation. The manycast scheme can provide
-somewhat better accuracy than the multicast scheme at the price of
-additional network overhead. See the <a href="assoc.htm">
-Association Management</a> page for further information.</p>
-</li>
-
-<li>
-<p>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.htm">Association Management</a> page for further
-information.</p>
-</li>
-
-<li>
-<p>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 this interface, but some,
-including the PARSE subinterface, have yet to be overhauled. New
-drivers have been added for several GPS receivers now on the market
-for a total of 39 drivers. 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
-the Sun audio port <tt>/dev/audio</tt>.</p>
-</li>
-
-<li>
-<p>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.</p>
-</li>
-
-<li>
-<p>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.</p>
-</li>
-
-<li>
-<p>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.</p>
-</li>
-</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>
-<p>As required by Defense Trade Regulations (DTR), the
-cryptographic routines supporting the Data Encryption Standard
-(DES) have been removed from the base distribution. These routines
-are readily available in most countries from RSA Laboratories.
-Directions for their use are in the <a href="build.htm">Building
-and Installing the Distribution</a> page.</p>
-</li>
-
-<li>
-<p>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. Developers
-should note the NTP authentication routines use the interface
-defined in the <tt>rsaref2.0</tt> package available from RSA
-laboratories.</p>
-</li>
-
-<li>
-<p>The enable and disable commands have a few changes in their
-arguments see the <tt>ntpd</tt> <a href="confopt.htm">Configuration
-Options</a> page for details. Note that the <tt>authenticate</tt>
-command has been removed.</p>
-</li>
-
-<li>
-<p>The <tt>ppsclock</tt> line discipline/streams module is no
-longer supported. This function is now handled by the <a href=
-"driver22.htm">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.htm">Pulse-per-second (PPS)
-Signal Interfacing</a> page for further information.</p>
-</li>
-
-<li>
-<p>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.htm"><tt>ntpd</tt> -
-Network Time Protocol (NTP) daemon</a> page for the new
-features.</p>
-</li>
-
-<li>
-<p>To help reduce the level of spurious network traffic due to
-obsolete configuration files, a special control message called the
-kiss-of-death packet has been implemented. If enabled and a packet
-is denied service or exceeds the client limie, 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.htm">Authentication Options</a> page for further
-information.</p>
-</li>
-
-<li>
-<p>An experimental filter algorithm called huff-n'-puff has been
-implemented to reduce errors under conditions of severe assymetric
-delays characteristic of <tt>ppp</tt> connections with telephone
-modems and downloading or uploading considerable traffic. See the
-<a href="ntpd.htm">ntpd - Network Time Protocol (NTP) daemon</a>
-page for further information.</p>
-</li>
-</ol>
-
-<h4>Caveats</h4>
-
-<p>This release has been compiled and tested on several systems,
-including SunOS 4.1.3, Solaris 2.5.1-2.8, Alpha 4.0, Ultrix 4.4,
-Linux, FreeBSD and HP-UX 10.02. It has been compiled and tested on
-Windows NT, but not yet on any other Windows version or for VMS. We
-are relying on the NTP volunteer corps to do that. Known problems
-are summarized below:</p>
-
-<ol>
-<li>
-<p>The latest NTPv4 <tt>ntpdc</tt> does not work with previous
-versions of <tt>ntpd</tt> and previous versions of <tt>ntpdc</tt>
-do not work with latest <tt>ntpd</tt>. This situation is
-regrettable and may be fixed in future; however, it is necessary in
-order for the autokey function to retrieve canonical names and
-certificates from directory services such as Secure DNS.</p>
-</li>
-
-<li>
-<p>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 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>.</p>
-</li>
-
-<li>
-<p>The HTML documentation has been partially updated. However, most
-of the NTPv3 documentation continues to apply to NTPv4. Until the
-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.</p>
-</li>
-</ol>
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/release.html b/contrib/ntp/html/release.html
deleted file mode 100644
index 6c8d90f..0000000
--- a/contrib/ntp/html/release.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!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
deleted file mode 100644
index 7fc6dd8..0000000
--- a/contrib/ntp/html/scripts/footer.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644
index 880e379..0000000
--- a/contrib/ntp/html/scripts/links10.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index 2f497f0..0000000
--- a/contrib/ntp/html/scripts/links11.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index 7ca9249..0000000
--- a/contrib/ntp/html/scripts/links12.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index fa476e2..0000000
--- a/contrib/ntp/html/scripts/links7.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index 51c3a38..0000000
--- a/contrib/ntp/html/scripts/links8.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-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
deleted file mode 100644
index 06e3462..0000000
--- a/contrib/ntp/html/scripts/links9.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-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
deleted file mode 100644
index 7d7b276..0000000
--- a/contrib/ntp/html/scripts/style.css
+++ /dev/null
@@ -1,64 +0,0 @@
-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
deleted file mode 100644
index de7b6f7..0000000
--- a/contrib/ntp/html/sntp.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!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.htm b/contrib/ntp/html/tickadj.htm
deleted file mode 100644
index 3d9745e..0000000
--- a/contrib/ntp/html/tickadj.htm
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
-<head>
-<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>tickadj - set time-related kernel variables</title>
-</head>
-<body>
-<h3><tt>tickadj</tt> - set time-related kernel variables</h3>
-
-<hr>
-<h4>Synopsis</h4>
-
-<tt>tickadj [ -Aqs ] [ -a <i>tickadj</i> ] [ -t <i>tick</i> ]</tt>
-
-<h4>Description</h4>
-
-The <tt>tickadj</tt> program reads, and optionally modifies,
-several timekeeping-related variables in the running kernel in some
-machines, via <tt>/dev/kmem</tt>. The particular variables it is
-concerned with are <tt>tick</tt>, which is the number of
-microseconds added to the system time during 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>Note that this program does NOT work in some kernels, in
-particular Solaris 2.6 or later. See the <a href=
-"solaris-dosynctodr.html">report</a>.</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 "optimal" 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></dt>
-
-<dd>Set the kernel variable <tt>tickadj</tt> to the value <i><tt>
-tickadj</tt></i>specified.</dd>
-
-<dt><tt>-A</tt></dt>
-
-<dd>Set the kernel variable <tt>tickadj</tt> to an internally
-computed "optimal" value.</dd>
-
-<dt><tt>-t <i>tick</i></tt></dt>
-
-<dd>Set the kernel variable <tt>tick</tt> to the value <i><tt>
-tick</tt></i> specified.</dd>
-
-<dt><tt>-s</tt></dt>
-
-<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.</dd>
-
-<dt><tt>-q</tt></dt>
-
-<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.</dd>
-</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.&nbsp;
-
-<hr>
-<a href="index.htm"><img align="left" src="pic/home.gif" alt=
-"gif"></a>
-<address><a href="mailto:mills@udel.edu">David L. Mills
-&lt;mills@udel.edu&gt;</a></address>
-</body>
-</html>
-
diff --git a/contrib/ntp/html/tickadj.html b/contrib/ntp/html/tickadj.html
deleted file mode 100644
index 7153f77..0000000
--- a/contrib/ntp/html/tickadj.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!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
deleted file mode 100644
index 8f8b934..0000000
--- a/contrib/ntp/include/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-#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 \
- ascii.h \
- audio.h \
- binio.h \
- global.h \
- gps.h \
- hopf6039.h \
- icom.h \
- ieee754io.h \
- iosignal.h \
- l_stdlib.h \
- mbg_gps166.h \
- mx4200.h \
- ntif.h \
- ntp.h \
- ntp_calendar.h \
- ntp_cmdargs.h \
- ntp_config.h \
- ntp_control.h \
- ntp_crypto.h \
- ntp_datum.h \
- ntp_filegen.h \
- ntp_fp.h \
- ntp_if.h \
- 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 \
- ntp_syslog.h \
- ntp_tty.h \
- 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
deleted file mode 100644
index d0a6882..0000000
--- a/contrib/ntp/include/Makefile.in
+++ /dev/null
@@ -1,501 +0,0 @@
-# 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
-SUBDIRS = isc
-
-noinst_HEADERS = \
- adjtime.h \
- audio.h \
- ascii.h \
- audio.h \
- binio.h \
- global.h \
- gps.h \
- hopf6039.h \
- icom.h \
- ieee754io.h \
- iosignal.h \
- l_stdlib.h \
- mbg_gps166.h \
- mx4200.h \
- ntif.h \
- ntp.h \
- ntp_calendar.h \
- ntp_cmdargs.h \
- ntp_config.h \
- ntp_control.h \
- ntp_crypto.h \
- ntp_datum.h \
- ntp_filegen.h \
- ntp_fp.h \
- ntp_if.h \
- 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 \
- ntp_syslog.h \
- ntp_tty.h \
- 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)
-
-
-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) && $(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) $(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; }'`; \
- 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=`$(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
- 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-recursive
-all-am: Makefile $(HEADERS)
-installdirs: installdirs-recursive
-installdirs-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-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:
-
-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-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-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) 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.
-.NOEXPORT:
diff --git a/contrib/ntp/include/README b/contrib/ntp/include/README
deleted file mode 100644
index 5d818dc..0000000
--- a/contrib/ntp/include/README
+++ /dev/null
@@ -1,4 +0,0 @@
-README file for directory ./include of the NTP Version 4 distribution
-
-This directory contains the include files used by most programs in this
-distribution.
diff --git a/contrib/ntp/include/adjtime.h b/contrib/ntp/include/adjtime.h
deleted file mode 100644
index b6e2a3e..0000000
--- a/contrib/ntp/include/adjtime.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*************************************************************************/
-/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
-/* Hewlett-Packard Laboratories. */
-/* */
-/* Permission is hereby granted for unlimited modification, use, and */
-/* distribution. This software is made available with no warranty of */
-/* any kind, express or implied. This copyright notice must remain */
-/* intact in all versions of this software. */
-/* */
-/* The author would appreciate it if any bug fixes and enhancements were */
-/* to be sent back to him for incorporation into future versions of this */
-/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
-/*************************************************************************/
-
-/* "adjtime.h,v 3.1 1993/07/06 01:04:43 jbj Exp" */
-/* adjtime.h,v
- * Revision 3.1 1993/07/06 01:04:43 jbj
- * NTP release 3.1
- *
- *
- * Revision 1.5 90/02/07 15:34:18 15:34:18 src (Source Hacker)
- * CHANGED KEY !!!
- *
- * Revision 1.4 89/02/09 12:26:35 12:26:35 tai (Tai Jin (Guest))
- * *** empty log message ***
- *
- * Revision 1.4 89/02/09 12:26:35 12:26:35 tai (Tai Jin)
- * added comment
- *
- * Revision 1.3 88/08/30 01:08:29 01:08:29 tai (Tai Jin)
- * fix copyright notice again
- *
- * Revision 1.2 88/08/30 00:51:55 00:51:55 tai (Tai Jin)
- * fix copyright notice
- *
- * Revision 1.1 88/04/02 14:56:54 14:56:54 tai (Tai Jin)
- * Initial revision
- * */
-
-#include "ntp_types.h"
-
-#ifdef __QNXNTO__
-int adjtime( const struct timeval * oldtime, struct timeval * newtime );
-#else /* not __QNXNTO__ */
-
-#define KEY 659847L
-
-typedef union {
- struct msgbuf msgp;
- struct {
- long mtype;
- int code;
- struct timeval tv;
- } msgb;
-} MsgBuf;
-
-#define MSGSIZE (sizeof(int) + sizeof(struct timeval))
-/*
- * mtype values
- */
-#define CLIENT 1L
-#define SERVER 2L
-/*
- * code values
- */
-#define DELTA1 0
-#define DELTA2 1
-
-#endif /* not __QNXNTO__ */
diff --git a/contrib/ntp/include/ascii.h b/contrib/ntp/include/ascii.h
deleted file mode 100644
index c679362..0000000
--- a/contrib/ntp/include/ascii.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/ascii.h,v 4.1 1998/07/11 10:05:22 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jul 20 11:42:53 1997 $
- *
- * Copyright (C) 1997 by Frank Kardel
- */
-#ifndef ASCII_H
-#define ASCII_H
-
-/*
- * just name the common ASCII control codes
- */
-#define NUL 0
-#define SOH 1
-#define STX 2
-#define ETX 3
-#define EOT 4
-#define ENQ 5
-#define ACK 6
-#define BEL 7
-#define BS 8
-#define HT 9
-#define NL 10
-#define VT 11
-#define NP 12
-#define CR 13
-#define SO 14
-#define SI 15
-#define DLE 16
-#define DC1 17
-#define DC2 18
-#define DC3 19
-#define DC4 20
-#define NAK 21
-#define SYN 22
-#define ETB 23
-#define CAN 24
-#define EM 25
-#define SUB 26
-#define ESC 27
-#define FS 28
-#define GS 29
-#define RS 30
-#define US 31
-#define SP 32
-#define DEL 127
-
-#endif
-/*
- * ascii.h,v
- * Revision 4.1 1998/07/11 10:05:22 kardel
- * Release 4.0.73d reconcilation
- *
- * Revision 4.0 1998/04/10 19:50:38 kardel
- * Start 4.0 release version numbering
- *
- * Revision 4.0 1998/04/10 19:50:38 kardel
- * Start 4.0 release version numbering
- *
- */
diff --git a/contrib/ntp/include/audio.h b/contrib/ntp/include/audio.h
deleted file mode 100644
index 6d16347..0000000
--- a/contrib/ntp/include/audio.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Header file for audio drivers
- */
-#include "ntp_types.h"
-
-#define MAXGAIN 255 /* max codec gain */
-#define MONGAIN 127 /* codec monitor gain */
-
-/*
- * Function prototypes
- */
-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/binio.h b/contrib/ntp/include/binio.h
deleted file mode 100644
index 49feee9..0000000
--- a/contrib/ntp/include/binio.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/binio.h,v 4.2 1998/06/28 16:52:15 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jul 20 13:03:05 1997 $
- *
- * Copyright (C) 1997-1998 by Frank Kardel
- */
-#ifndef BINIO_H
-#define BINIO_H
-
-#include "ntp_stdlib.h"
-
-long get_lsb_short P((unsigned char **));
-void put_lsb_short P((unsigned char **, long));
-long get_lsb_long P((unsigned char **));
-void put_lsb_long P((unsigned char **, long));
-
-long get_msb_short P((unsigned char **));
-void put_msb_short P((unsigned char **, long));
-long get_msb_long P((unsigned char **));
-void put_msb_long P((unsigned char **, long));
-
-#endif
-/*
- * binio.h,v
- * Revision 4.2 1998/06/28 16:52:15 kardel
- * added binio MSB prototypes for {get,put}_msb_{short,long}
- *
- * Revision 4.1 1998/06/12 15:07:40 kardel
- * fixed prototyping
- *
- * Revision 4.0 1998/04/10 19:50:38 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.1 1998/04/10 19:27:32 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- * Revision 1.1 1997/10/06 20:55:37 kardel
- * new parse structure
- *
- */
diff --git a/contrib/ntp/include/global.h b/contrib/ntp/include/global.h
deleted file mode 100644
index 742f84c..0000000
--- a/contrib/ntp/include/global.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* GLOBAL.H - RSAREF types and constants */
-
-/* Copyright (C) RSA Laboratories, a division of RSA Data Security,
- Inc., created 1991. All rights reserved.
- */
-
-/*
- * Note: the modifications are necessary for little-endian machines
- */
-#include "ntp_types.h" /* local modification */
-
-#ifndef _GLOBAL_H_
-#define _GLOBAL_H_ 1
-
-/* PROTOTYPES should be set to one if and only if the compiler supports
- function argument prototyping.
- The following makes PROTOTYPES default to 1 if it has not already been
- defined as 0 with C compiler flags.
- */
-#ifdef HAVE_PROTOTYPES
-#define PROTOTYPES 1
-#endif
-
-/* POINTER defines a generic pointer type */
-typedef unsigned char *POINTER;
-
-/* UINT2 defines a two byte word */
-typedef unsigned short int UINT2;
-
-/* UINT4 defines a four byte word */
-typedef u_int32 UINT4; /* local modification */
-
-/* BYTE defines a unsigned character */
-typedef unsigned char BYTE; /* local modification for RSAEuro */
-
-#ifndef NULL_PTR
-#define NULL_PTR ((POINTER)0)
-#endif
-
-#ifndef UNUSED_ARG
-#define UNUSED_ARG(x) x = *(&x);
-#endif
-
-/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
- If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
- returns an empty list.
- */
-#if PROTOTYPES
-#define PROTO_LIST(list) list
-#else
-#define PROTO_LIST(list) ()
-#endif
-
-#endif /* end _GLOBAL_H_ */
diff --git a/contrib/ntp/include/gps.h b/contrib/ntp/include/gps.h
deleted file mode 100644
index d4f2dbc..0000000
--- a/contrib/ntp/include/gps.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************/
-/* gps.h */
-/* TrueTime GPS-VME and VME-SG */
-/* VME controller hardware commands and parameters. */
-/* created 010694 res */
-/* History: revised for 747i 3/94 */
-/****************************************************************************/
-
-
-#define GPS_VME "/dev/vme2" /* the device file for the GPS board */
- /* change it to whatever yours is */
-#define PRIO 120 /* set the realtime priority */
-#define NREGS 7 /* number of registers we will use */
-
-#define GFRZ1 0x0020 /* freeze cmd addr gen reg. 1 */
-#define GREG1A 0x0021 /* Gen reg. 1 Word A (units microsec to 0.001 sec) */
-#define GREG1B 0x0040 /* Gen reg. 1 Word B (units 0.01 sec to tens sec ) */
-#define GREG1C 0x0041 /* Gen reg 1 Word C (units mins and hours) */
-#define GREG1D 0x0042 /* Gen reg. 1 Word D (units days and status) */
-#define GREG1E 0x0043 /* Gen reg. 1 Word E (units Years ) */
-#define GUFRZ1 0x0022 /* unfreeze cmd addr gen reg 1 */
-
-#define MASKDAY 0x0FFF /* mask for units days */
-#define MASKHI 0xFF00
-#define MASKLO 0x00FF
-/* Use the following ASCII hex values: N(0x004e),S(0x0053),E(0x0045),
- W(0x0057), +(0x002B), - (0x002D) */
-
-#define LAT1 0x0048 /* Lat (degrees) */
-#define LAT2 0x0049 /* Lat (min, sec) */
-#define LAT3 0x004A /* Lat (N/S, tenths sec) */
-#define LON1 0x004B /* Lon (degrees) */
-#define LON2 0x004C /* Lon (min, sec) */
-#define LON3 0x004D /* Lon (E/W, tenths sec) */
-#define ELV1 0x004E /* Elev. (sign, 10,000 and 1000 ) */
-#define ELV2 0x004F /* Elev. (100, 10s, units, and .1) */
-
-#define CFREG1 0x0050 /* config. register 1 */
-#define CFREG2 0x00A0 /* config. register 2 */
-#define PMODE 0x00A4 /* Position mode */
-#define LOCAL 0x0051 /* Local hours offset */
-#define RATE 0x0054 /* Pulse rate output select */
-#define DAC 0x0055 /* OSC Control (DAC) select */
-
-#define PUMS 0x0056 /* Gen. preset register unit millisec */
-#define PMS 0x0057 /* Gen. preset register units hundreds and tens ms */
-#define PSEC 0x0058 /* Gen. preset register units tens and unit seconds */
-#define PMIN 0x0059 /* Gen. preset register units tens and unit minutes */
-#define PHRS 0x005A /* Gen. preset register units tens and unit hours */
-#define PDYS1 0x005B /* Gen. preset register units tens and unit days */
-#define PDYS2 0x005C /* Gen. preset register units hundreds days */
-#define PYRS1 0x005D /* Gen. preset register units tens and unit years */
-#define PYRS2 0x005E /* Gen. preset reg. units thousands and hundreds yrs */
diff --git a/contrib/ntp/include/hopf6039.h b/contrib/ntp/include/hopf6039.h
deleted file mode 100644
index 8532099..0000000
--- a/contrib/ntp/include/hopf6039.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/****************************************************************************/
-/* hopf6039.h */
-/* hopf Elektronik 6039 PCI radio clock header */
-/* (c) 1999, 2000 Bernd Altmeier <altmeier@ATLSoft.de> */
-/* Rev. 1.00 Date 25.03.2000 */
-/* History: */
-/****************************************************************************/
-
-#ifndef _hopf6039_H_
-#define _hopf6039_H_
-
-#define HOPF_MAXVERSION 8
-#define HOPF_CNTR_MEM_LEN 0x7f
-#define HOPF_DATA_MEM_LEN 0x3ff /* this is our memory size */
-
-/* macros and definition for 32 to 16 to 8 bit conversion */
-
-typedef unsigned long DWORD;
-typedef unsigned char BYTE;
-typedef unsigned short WORD;
-
-#define LOWORD(l) ((WORD)(l))
-#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
-#define LOBYTE(w) ((BYTE)(w))
-#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
-
-/* iocntl codes for driver access */
-
-#define HOPF_CLOCK_CMD_MASK 0xff000
-
-#define HOPF_CLOCK_GET_LOCAL 0x10000
-#define HOPF_CLOCK_GET_UTC 0x20000
-#define HOPF_CLOCK_GET_ANTENNA 0x30000
-#define HOPF_CLOCK_GET_DIFFERENCE 0x40000
-#define HOPF_CLOCK_GET_VERSION 0x50000
-#define HOPF_CLOCK_GET_POSITION 0x60000
-#define HOPF_CLOCK_GET_SATDATA 0x70000
-#define HOPF_CLOCK_GET_SYSTEMBYTE 0x80000
-#define HOPF_CLOCK_GET_IRIG 0x90000
-
-#define HOPF_CLOCK_SET_DIFFERENCE 0x01000
-#define HOPF_CLOCK_SET_ANTENNA 0x02000
-#define HOPF_CLOCK_SET_TIME 0x03000
-#define HOPF_CLOCK_SET_POSITION 0x04000
-#define HOPF_CLOCK_SET_SATMODE 0x05000
-#define HOPF_CLOCK_SET_SYSTEMBYTE 0x06000
-#define HOPF_CLOCK_SET_RESET 0x07000
-#define HOPF_CLOCK_SET_IRIG 0x08000
-
-/* clock command codes */
-
-#define HOPF_CLOCK_HARDRESET 0x00008000
-#define HOPF_CLOCK_SOFTRESET 0x00004000
-
-/* sat-information */
-
-typedef struct SatStat{
- BYTE wVisible;
- BYTE wMode;
- BYTE wSat0;
- BYTE wRat0;
- BYTE wSat1;
- BYTE wRat1;
- BYTE wSat2;
- BYTE wRat2;
- BYTE wSat3;
- BYTE wRat3;
- BYTE wSat4;
- BYTE wRat4;
- BYTE wSat5;
- BYTE wRat5;
- BYTE wSat6;
- BYTE wRat6;
- BYTE wSat7;
- BYTE wRat7;
-} SatStat;
-
-/* GPS position */
-
-typedef struct GPSPos { /* Position */
- long wAltitude;
- long wLongitude;
- long wLatitude;
-} GPSPos;
-
-/* clock hardware version */
-
-typedef struct ClockVersion {
- char cVersion[255]; /* Hardware Version like " DCF-RECEIVER, VERSION 01.01, DAT: 23.NOV.1999" */
- char dVersion[255]; /* Driver Version */
-} ClockVersion;
-
-/* hopftime what you think */
-
-typedef struct HOPFTIME {
- unsigned int wYear;
- unsigned int wMonth;
- unsigned int wDayOfWeek;
- unsigned int wDay;
- unsigned int wHour;
- unsigned int wMinute;
- unsigned int wSecond;
- unsigned int wMilliseconds;
- unsigned int wStatus;
-} HOPFTIME;
-
-/* DCF77 antenna alignment */
-
-typedef struct DcfAntenne {
- BYTE bStatus;
- BYTE bStatus1;
- WORD wAntValue;
-} DcfAntenne;
-
-/* hopf PCI clock */
-
-typedef struct hopfCard {
- char name[32];
- unsigned irq;
- unsigned long membase; /* without mmap */
- unsigned int port;
-
- int versionlen;
- char versionbuf[1024];
- char *version[HOPF_MAXVERSION];
- char cardname[32];
- int interrupt;
- void *mbase; /* this will be our memory base address */
-
-} hopfCard;
-
-typedef struct cardparams {
- unsigned int port;
- unsigned irq;
- int cardtype;
- int cardnr;
- unsigned int membase;
-} cardparams;
-
-
-#define WRITE_REGISTER 0x00
-#define READ_REGISTER 0x01
-
-#endif /* _hopf6039_H_ */
diff --git a/contrib/ntp/include/icom.h b/contrib/ntp/include/icom.h
deleted file mode 100755
index aac62c8..0000000
--- a/contrib/ntp/include/icom.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Header file for ICOM radios
- */
-#include "ntp_types.h"
-
-/*
- * Common definitions
- */
-#define P_ERMSG 0x1 /* trace bus error messages */
-#define P_TRACE 0x2 /* trace CI-V messges */
-#define RETRY 3 /* max packet retries */
-#define IBAUD B1200 /* autotune port speed */
-
-/*
- * Radio identifier codes
- */
-#define IC1271 0x24
-#define IC1275 0x18
-#define IC271 0x20
-#define IC275 0x10
-#define IC375 0x12
-#define IC471 0x22
-#define IC475 0x14
-#define IC575 0x16
-#define IC725 0x28
-#define IC726 0x30
-#define IC735 0x04
-#define IC751 0x1c
-#define IC761 0x1e
-#define IC765 0x2c
-#define IC775 0x46
-#define IC781 0x26
-#define IC970 0x2e
-#define R7000 0x08
-#define R71 0x1a
-#define R7100 0x34
-#define R72 0x32
-#define R8500 0x4a
-#define R9000 0x2a
-
-/*
- * CI-V frame codes
- */
-#define PR 0xfe /* preamble */
-#define TX 0xe0 /* controller address */
-#define FI 0xfd /* end of message */
-#define ACK 0xfb /* controller normal reply */
-#define NAK 0xfa /* controller error reply */
-#define PAD 0xff /* transmit padding */
-
-/*
- * CI-V controller commands
- */
-#define V_FREQT 0x00 /* freq set (transceive) */
-#define V_MODET 0x01 /* set mode (transceive) */
-#define V_RBAND 0x02 /* read band edge */
-#define V_RFREQ 0x03 /* read frequency */
-#define V_RMODE 0x04 /* read mode */
-#define V_SFREQ 0x05 /* set frequency */
-#define V_SMODE 0x06 /* set mode */
-#define V_SVFO 0x07 /* select vfo */
-#define V_SMEM 0x08 /* select channel/bank */
-#define V_WRITE 0x09 /* write channel */
-#define V_VFOM 0x0a /* memory -> vfo */
-#define V_CLEAR 0x0b /* clear channel */
-#define V_ROFFS 0x0c /* read tx offset */
-#define V_SOFFS 0x0d /* write tx offset */
-#define V_SCAN 0x0e /* scan control */
-#define V_SPLIT 0x0f /* split control */
-#define V_DIAL 0x10 /* set dial tuning step */
-#define V_ATTEN 0x11 /* set attenuator */
-#define V_SANT 0x12 /* select antenna */
-#define V_ANNC 0x13 /* announce control */
-#define V_WRCTL 0x14 /* write controls */
-#define V_RDCTL 0x15 /* read controls */
-#define V_TOGL 0x16 /* set switches */
-#define V_ASCII 0x17 /* send CW message */
-#define V_POWER 0x18 /* power control */
-#define V_RDID 0x19 /* read model ID */
-#define V_SETW 0x1a /* read/write channel/bank data */
-#define V_CTRL 0x7f /* miscellaneous control */
-
-/*
- * Function prototypes
- */
-int icom_init P((char *, int, int));
-int icom_freq P((int, int, double));
diff --git a/contrib/ntp/include/ieee754io.h b/contrib/ntp/include/ieee754io.h
deleted file mode 100644
index f691acc..0000000
--- a/contrib/ntp/include/ieee754io.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/ieee754io.h,v 4.0 1998/04/10 19:50:40 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jul 13 12:22:11 1997 $
- *
- * Copyright (C) 1997 by Frank Kardel
- */
-#ifndef IEEE754IO_H
-#define IEEE754IO_H
-
-#define IEEE_SINGLE 1
-#define IEEE_DOUBLE 2
-
-#define IEEE_MSB 1
-#define IEEE_LSB 2
-
-#define IEEE_OK 0 /* conversion ok */
-#define IEEE_BADCALL 1 /* bad call parameters */
-#define IEEE_NAN 2 /* found an NaN */
-#define IEEE_POSINFINITY 3 /* positive infinity */
-#define IEEE_NEGINFINITY 4 /* negative infinity */
-#define IEEE_POSOVERFLOW 5 /* positive overflow */
-#define IEEE_NEGOVERFLOW 6 /* negative overflow */
-
-#define IEEE_OFFSETS 8 /* number of byte positions */
-typedef unsigned char offsets_t[IEEE_OFFSETS];
-
-int fetch_ieee754 P((unsigned char **bufp, int size, l_fp *lfpp, offsets_t offsets));
-int put_ieee754 P((unsigned char **bufpp, int size, l_fp *lfpp, offsets_t offsets));
-
-#endif
-/*
- * ieee754io.h,v
- * Revision 4.0 1998/04/10 19:50:40 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.1 1998/04/10 19:27:33 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- * Revision 1.1 1997/10/06 20:55:37 kardel
- * new parse structure
- *
- */
diff --git a/contrib/ntp/include/iosignal.h b/contrib/ntp/include/iosignal.h
deleted file mode 100644
index bd74e09..0000000
--- a/contrib/ntp/include/iosignal.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#if !defined _ntp_iosignaled_h
-#define _ntp_iosignaled_h
-
-#include "ntp_refclock.h"
-
-#if defined(HAVE_SIGNALED_IO)
-extern void block_sigio P((void));
-extern void unblock_sigio P((void));
-extern int init_clock_sig P((struct refclockio *));
-extern void init_socket_sig P((int));
-extern void set_signal P((void));
-RETSIGTYPE sigio_handler P((int));
-
-# define BLOCKIO() ((void) block_sigio())
-# define UNBLOCKIO() ((void) unblock_sigio())
-
-#else
-
-# define BLOCKIO()
-# define UNBLOCKIO()
-#endif /* HAVE_SIGNALED_IO */
-
-#endif
diff --git a/contrib/ntp/include/isc/Makefile.am b/contrib/ntp/include/isc/Makefile.am
deleted file mode 100644
index a5b253c..0000000
--- a/contrib/ntp/include/isc/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-#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
deleted file mode 100644
index 3270f4a..0000000
--- a/contrib/ntp/include/isc/Makefile.in
+++ /dev/null
@@ -1,380 +0,0 @@
-# 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
deleted file mode 100644
index 5aa3d23..0000000
--- a/contrib/ntp/include/isc/app.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 45855c6..0000000
--- a/contrib/ntp/include/isc/assertions.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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
deleted file mode 100644
index d10007b..0000000
--- a/contrib/ntp/include/isc/boolean.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 1dc0774..0000000
--- a/contrib/ntp/include/isc/error.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
deleted file mode 100644
index e9b9169..0000000
--- a/contrib/ntp/include/isc/formatcheck.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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
deleted file mode 100644
index d30e6dc..0000000
--- a/contrib/ntp/include/isc/int.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
deleted file mode 100644
index fbd1b82..0000000
--- a/contrib/ntp/include/isc/interfaceiter.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 18893b7..0000000
--- a/contrib/ntp/include/isc/ipv6.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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
deleted file mode 100644
index b3ba590..0000000
--- a/contrib/ntp/include/isc/lang.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 7feef43..0000000
--- a/contrib/ntp/include/isc/lib.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
deleted file mode 100644
index d0ae7a9..0000000
--- a/contrib/ntp/include/isc/list.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
deleted file mode 100644
index ff3df24..0000000
--- a/contrib/ntp/include/isc/magic.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
deleted file mode 100644
index f8e73d0..0000000
--- a/contrib/ntp/include/isc/mem.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
deleted file mode 100644
index d2bf1e1..0000000
--- a/contrib/ntp/include/isc/msgcat.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
deleted file mode 100644
index b166199..0000000
--- a/contrib/ntp/include/isc/msgs.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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
deleted file mode 100644
index fd6f3ec..0000000
--- a/contrib/ntp/include/isc/mutex.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 25924fe..0000000
--- a/contrib/ntp/include/isc/net.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 811e8dd..0000000
--- a/contrib/ntp/include/isc/netaddr.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 709bde4..0000000
--- a/contrib/ntp/include/isc/offset.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
deleted file mode 100644
index f57d621..0000000
--- a/contrib/ntp/include/isc/once.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
deleted file mode 100644
index bd11a25..0000000
--- a/contrib/ntp/include/isc/platform.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 7a1bc83..0000000
--- a/contrib/ntp/include/isc/print.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
deleted file mode 100644
index bf6b992..0000000
--- a/contrib/ntp/include/isc/result.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 5257b05..0000000
--- a/contrib/ntp/include/isc/sockaddr.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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
deleted file mode 100644
index ca428af..0000000
--- a/contrib/ntp/include/isc/strerror.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
deleted file mode 100644
index e16219f..0000000
--- a/contrib/ntp/include/isc/string.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
deleted file mode 100644
index b30f55e..0000000
--- a/contrib/ntp/include/isc/types.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 6144e11..0000000
--- a/contrib/ntp/include/isc/util.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 3f242b7..0000000
--- a/contrib/ntp/include/l_stdlib.h
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * Proto types for machines that are not ANSI and POSIX compliant.
- * This is optional
- */
-
-#ifndef _l_stdlib_h
-#define _l_stdlib_h
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
-# 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
-
-/* Needed for speed_t. */
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
-
-#include "ntp_types.h"
-#include "ntp_proto.h"
-
-/* Let's try to keep this more or less alphabetized... */
-
-#ifdef DECL_ADJTIME_0
-struct timeval;
-extern int adjtime P((struct timeval *, struct timeval *));
-#endif
-
-#ifdef DECL_BCOPY_0
-#ifndef bcopy
-extern void bcopy P((const char *, char *, int));
-#endif
-#endif
-
-#ifdef DECL_BZERO_0
-#ifndef bzero
-extern void bzero P((char *, int));
-#endif
-#endif
-
-#ifdef DECL_CFSETISPEED_0
-struct termios;
-extern int cfsetispeed P((struct termios *, speed_t));
-extern int cfsetospeed P((struct termios *, speed_t));
-#endif
-
-extern char * getpass P((const char *));
-
-#ifdef DECL_HSTRERROR_0
-extern const char * hstrerror P((int));
-#endif
-
-#ifdef DECL_INET_NTOA_0
-struct in_addr;
-extern char * inet_ntoa P((struct in_addr));
-#endif
-
-#ifdef DECL_IOCTL_0
-extern int ioctl P((int, u_long, char *));
-#endif
-
-#ifdef DECL_IPC_0
-struct sockaddr;
-extern int bind P((int, struct sockaddr *, int));
-extern int connect P((int, struct sockaddr *, int));
-extern int recv P((int, char *, int, int));
-extern int recvfrom P((int, char *, int, int, struct sockaddr *, int *));
-extern int send P((int, char *, int, int));
-extern int sendto P((int, char *, int, int, struct sockaddr *, int));
-extern int setsockopt P((int, int, int, char *, int));
-extern int socket P((int, int, int));
-#endif
-
-#ifdef DECL_MEMMOVE_0
-extern void * memmove P((void *, const void *, size_t));
-#endif
-
-#ifdef DECL_MEMSET_0
-extern char * memset P((char *, int, int));
-#endif
-
-#ifdef DECL_MKSTEMP_0
-extern int mkstemp P((char *));
-#endif
-
-#ifdef DECL_MKTEMP_0
-extern char *mktemp P((char *));
-#endif
-
-#ifdef DECL_MRAND48_0
-extern long mrand48 P((void));
-#endif
-
-#ifdef DECL_NLIST_0
-struct nlist;
-extern int nlist P((const char *, struct nlist *));
-#endif
-
-#ifdef DECL_PLOCK_0
-extern int plock P((int));
-#endif
-
-#ifdef DECL_RENAME_0
-extern int rename P((const char *, const char *));
-#endif
-
-#ifdef DECL_SELECT_0
-#ifdef _ntp_select_h
-extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
-#endif
-#endif
-
-#ifdef DECL_SETITIMER_0
-struct itimerval;
-extern int setitimer P((int , struct itimerval *, struct itimerval *));
-#endif
-
-#ifdef PRIO_PROCESS
-#ifdef DECL_SETPRIORITY_0
-extern int setpriority P((int, int, int));
-#endif
-#ifdef DECL_SETPRIORITY_1
-extern int setpriority P((int, id_t, int));
-#endif
-#endif
-
-#ifdef DECL_SIGVEC_0
-struct sigvec;
-extern int sigvec P((int, struct sigvec *, struct sigvec *));
-#endif
-
-#ifndef HAVE_SNPRINTF
-/* PRINTFLIKE3 */
-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
-
-#ifdef DECL_STDIO_0
-#if defined(FILE) || defined(BUFSIZ)
-extern int _flsbuf P((int, FILE *));
-extern int _filbuf P((FILE *));
-extern int fclose P((FILE *));
-extern int fflush P((FILE *));
-extern int fprintf P((FILE *, const char *, ...));
-extern int fscanf P((FILE *, const char *, ...));
-extern int fputs P((const char *, FILE *));
-extern int fputc P((int, FILE *));
-extern int fread P((char *, int, int, FILE *));
-extern void perror P((const char *));
-extern int printf P((const char *, ...));
-extern int setbuf P((FILE *, char *));
-# ifdef HAVE_SETLINEBUF
-extern int setlinebuf P((FILE *));
-# endif
-extern int setvbuf P((FILE *, char *, int, int));
-extern int scanf P((const char *, ...));
-extern int sscanf P((const char *, const char *, ...));
-extern int vfprintf P((FILE *, const char *, ...));
-extern int vsprintf P((char *, const char *, ...));
-#endif
-#endif
-
-#ifdef DECL_STIME_0
-extern int stime P((const time_t *));
-#endif
-
-#ifdef DECL_STIME_1
-extern int stime P((long *));
-#endif
-
-#ifdef DECL_STRERROR_0
-extern char * strerror P((int errnum));
-#endif
-
-#ifdef DECL_STRTOL_0
-extern long strtol P((const char *, char **, int));
-#endif
-
-#ifdef DECL_SYSCALL
-extern int syscall P((int, ...));
-#endif
-
-#ifdef DECL_SYSLOG_0
-extern void closelog P((void));
-#ifndef LOG_DAEMON
-extern void openlog P((const char *, int));
-#else
-extern void openlog P((const char *, int, int));
-#endif
-extern int setlogmask P((int));
-extern void syslog P((int, const char *, ...));
-#endif
-
-#ifdef DECL_TIME_0
-extern time_t time P((time_t *));
-#endif
-
-#ifdef DECL_TIMEOFDAY_0
-#ifdef SYSV_TIMEOFDAY
-extern int gettimeofday P((struct timeval *));
-extern int settimeofday P((struct timeval *));
-#else /* not SYSV_TIMEOFDAY */
-struct timezone;
-extern int gettimeofday P((struct timeval *, struct timezone *));
-extern int settimeofday P((struct timeval *, void *));
-#endif /* not SYSV_TIMEOFDAY */
-#endif
-
-#ifdef DECL_TOLOWER_0
-extern int tolower P((int));
-#endif
-
-#ifdef DECL_TOUPPER_0
-extern int toupper P((int));
-#endif
-
-/*
- * Necessary variable declarations.
- */
-#ifdef DECL_ERRNO
-extern int errno;
-#endif
-
-#if defined(DECL_H_ERRNO) && !defined(h_errno)
-extern int h_errno;
-#endif
-
-/*******************************************************/
-
-#if 0
-/*
- * Unprotoyped library functions for SunOS 4.x.x
- */
-#ifdef SYS_SUNOS4
-extern void closelog P((void));
-extern void openlog P((char *, int, int));
-extern void syslog P((int, char *, ...));
-extern int setlogmask P((int));
-
-extern char * getpass P((char *));
-
-extern int setpriority P((int ,int ,int));
-
-extern long strtol P((char *, char **, int));
-
-#if !defined(NTP_POSIX_SOURCE)
-extern int atoi P((char *));
-extern int dup2 P((int, int));
-extern int execve P((char *, char **,char **));
-extern int fork P((void));
-extern int getdtablesize P((void));
-extern int qsort (void *, int , int,
- int P((*compar)(void *, void *)));
-extern long random P((void));
-extern long mrand48 P((void));
-extern int setpgrp P((int, int));
-extern void srandom P((unsigned int));
-extern void bcopy P((const char *, char *, int));
-#endif
-
-#ifndef bzero /* XXX macro prototyping clash */
-extern void bzero P((char *, int));
-extern int bcmp P((char *, char *, int));
-extern void bcopy P((const char *, char *, int));
-#endif
-extern char *mktemp P((char *));
-
-extern int tolower P((int));
-
-extern int isatty P((int));
-
-extern unsigned sleep P((unsigned ));
-extern unsigned int alarm P((unsigned int));
-extern int pause P((void));
-
-extern int getpid P((void));
-extern int getppid P((void));
-
-extern int close P((int));
-extern int ioctl P((int, int, char *));
-extern int rename P((char *, char *));
-#if 0
-extern int read P((int, void *, size_t));
-extern int write P((int, const void *, size_t));
-#endif
-extern int unlink P((const char *));
-extern int link P((const char *, const char *));
-
-#ifdef FILE
-extern int fclose P((FILE *));
-extern int fflush P((FILE *));
-extern int fprintf P((FILE *, char *, ...));
-extern int fscanf P((FILE *, char *, ...));
-extern int fputs P((char *, FILE *));
-extern int fputc P((char, FILE *));
-extern int fread P((char *, int, int, FILE *));
-extern int printf P((char *, ...));
-extern int setbuf P((FILE *, char *));
-extern int setvbuf P((FILE *, char *, int, int));
-extern int scanf P((char *, ...));
-extern int sscanf P((char *, char *, ...));
-extern int vsprintf P((char *, char *, ...));
-extern int _flsbuf P((int, FILE *));
-extern int _filbuf P((FILE *));
-extern void perror P((char *));
-#ifdef HAVE_SETLINEBUF
-extern int setlinebuf P((FILE *));
-#endif
-#endif
-
-#ifdef _ntp_string_h
-#ifdef NTP_POSIX_SOURCE /* these are builtins */
-#ifndef NTP_NEED_BOPS /* but may be emulated by bops */
-extern char *memcpy P(());
-extern char *memset P(());
-extern int memcmp P(());
-#endif
-#endif
-#endif
-
-#ifdef _sys_socket_h
-extern int bind P((int, struct sockaddr *, int));
-extern int connect P((int, struct sockaddr *, int));
-extern int sendto P((int, char *, int, int, struct sockaddr *, int));
-extern int setsockopt P((int, int, int, char *, int));
-extern int socket P((int, int, int));
-extern int recvfrom P((int, char *, int, int, struct sockaddr *, int *));
-#endif /* _sys_socket_h */
-
-#ifdef _ntp_select_h
-extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
-#endif
-
-#ifdef _sys_time_h
-extern int adjtime P((struct timeval *, struct timeval *));
-extern int setitimer P((int , struct itimerval *, struct itimerval *));
-#ifdef SYSV_TIMEOFDAY
-extern int gettimeofday P((struct timeval *));
-extern int settimeofday P((struct timeval *));
-#else /* ! SYSV_TIMEOFDAY */
-extern int gettimeofday P((struct timeval *, struct timezone *));
-extern int settimeofday P((struct timeval *, struct timezone *));
-#endif /* SYSV_TIMEOFDAY */
-#endif /* _sys_time_h */
-
-#ifdef __time_h
-extern time_t time P((time_t *));
-#endif
-
-#ifdef __setjmp_h
-extern int setjmp P((jmp_buf));
-extern void longjmp P((jmp_buf, int));
-#endif
-
-#ifdef _sys_resource_h
-extern int getrusage P((int, struct rusage *));
-#endif
-
-#ifdef _nlist_h
-extern int nlist P((char *, struct nlist *));
-#endif
-
-#endif /* SYS_SUNOS4 */
-
-/*
- * Unprototyped library functions for DEC OSF/1
- */
-#ifdef SYS_DECOSF1
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-extern u_short htons P((u_short));
-extern u_short ntohs P((u_short));
-extern u_int32 htonl P((u_int32));
-extern u_int32 ntohl P((u_int32));
-#endif /* _MACHINE_ENDIAN_H_ */
-
-/*
-extern char * getpass P((char *));
-*/
-extern char * mktemp P((char *));
-#ifndef SYS_IX86OSF1
-extern int ioctl P((int, u_long, char *));
-extern void bzero P((char *, int));
-#endif
-
-#ifdef SOCK_DGRAM
-extern int bind P((int, const struct sockaddr *, int));
-extern int connect P((int, const struct sockaddr *, int));
-extern int socket P((int, int, int));
-extern int sendto P((int, const void *, int, int, const struct sockaddr *, int));
-extern int setsockopt P((int, int, int, const void *, int));
-extern int recvfrom P((int, void *, int, int, struct sockaddr *, int *));
-#endif /* SOCK_STREAM */
-
-#ifdef _ntp_select_h
-extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
-#endif
-
-#endif /* DECOSF1 */
-
-/*
- * Unprototyped library functions for Ultrix
- */
-#ifdef SYS_ULTRIX
-extern int close P((int));
-extern char * getpass P((char *));
-extern int getpid P((void));
-extern int ioctl P((int, int, char *));
-extern char *mktemp P((char *));
-extern int unlink P((const char *));
-extern int link P((const char *, const char *));
-
-extern void closelog P((void));
-extern void syslog P((int, char *, ...));
-#ifndef LOG_DAEMON
-extern void openlog P((char *, int));
-#else
-extern void openlog P((char *, int, int));
-#endif
-
-extern int setpriority P((int ,int ,int ));
-
-#ifdef SOCK_DGRAM
-extern int bind P((int, struct sockaddr *, int));
-extern int connect P((int, struct sockaddr *, int));
-extern int socket P((int, int, int));
-extern int sendto P((int, char *, int, int, struct sockaddr *, int));
-extern int setsockopt P((int, int, int, char *, int));
-extern int recvfrom P((int, char *, int, int, struct sockaddr *, int *));
-#endif /* SOCK_STREAM */
-
-#ifdef _TIME_H_
-extern int gettimeofday P((struct timeval *, struct timezone *));
-extern int settimeofday P((struct timeval *, struct timezone *));
-extern int adjtime P((struct timeval *, struct timeval *));
-extern int select P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
-extern int setitimer P((int , struct itimerval *, struct itimerval *));
-#endif /* _TIME_H_ */
-
-#ifdef N_UNDF
-extern int nlist P((char *, struct nlist *));
-#endif
-
-#ifndef bzero /* XXX macro prototyping clash */
-extern void bzero P((char *, int));
-extern int bcmp P((char *, char *, int));
-extern void bcopy P((const char *, char *, int));
-#endif
-
-#ifndef NTP_POSIX_SOURCE
-extern int atoi P((char *));
-extern void bzero P((char *, int));
-extern int bcmp P((char *, char *, int));
-extern void bcopy P((const char *, char *, int));
-extern int execve P((char *, char **,char **));
-extern int fork P((void));
-extern int getdtablesize P((void));
-extern int ran P((void));
-extern int rand P((void));
-extern void srand P((unsigned int));
-#ifdef _TIME_H_
-extern int gettimeofday P((struct timeval *, struct timezone *));
-extern int settimeofday P((struct timeval *, struct timezone *));
-#endif
-#endif
-
-#ifdef _RESOURCE_H_
-extern int getrusage P((int, struct rusage *));
-#endif
-
-#endif /* SYS_ULTRIX */
-
-#if defined(__convex__)
-extern char * getpass P((char *));
-#endif
-
-#ifdef SYS_IRIX4
-extern char * getpass P((char *));
-#endif /* IRIX4 */
-
-#ifdef SYS_VAX
-extern char * getpass P((char *));
-#endif /* VAX */
-
-#ifdef SYS_DOMAINOS
-extern char * getpass P((char *));
-#endif /* SYS_DOMAINOS */
-
-#ifdef SYS_BSD
-#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
-#endif
-
-#endif /* 0 */
-#endif /* l_stdlib_h */
diff --git a/contrib/ntp/include/mbg_gps166.h b/contrib/ntp/include/mbg_gps166.h
deleted file mode 100644
index 7110751..0000000
--- a/contrib/ntp/include/mbg_gps166.h
+++ /dev/null
@@ -1,538 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/mbg_gps166.h,v 4.1 1998/06/12 15:07:30 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jul 20 09:20:50 1997 $
- *
- * Copyright (C) 1997, 1998 by Frank Kardel
- */
-#ifndef MBG_GPS166_H
-#define MBG_GPS166_H
-
-
-/***************************************************************************/
-/* */
-/* File: GPSSERIO.H 4.1 */
-/* */
-/* Project: Common C Library */
-/* */
-/* Compiler: Borland C++ */
-/* */
-/* Author: M. Burnicki, Meinberg Funkuhren */
-/* */
-/* */
-/* Description: */
-/* This file defines structures and codes to be used to access GPS166 */
-/* via its serial interface COM0. COM0 should be set to a high baud */
-/* rate, default is 19200. */
-/* */
-/* Standard GPS166 serial operation is to send a time string that is */
-/* compatible with Meinberg UA31 or PZF535 DCF77 radio remote clocks. */
-/* That string can be transmitted automatically once per second, once */
-/* per minute or on request per ASCII '?'. */
-/* */
-/* Parameter setup or parameter readout works using blocks of binary */
-/* data which have to be isolated from the standard string. A block of */
-/* data starts with a SOH code (ASCII Start Of Header, 0x01) followed */
-/* by a message header with constant length and a data portion with */
-/* variable length. The first field (cmd) of the message header holds */
-/* the command code rsp. the type of data to be transmitted. The next */
-/* field (len) gives the number of data bytes that are transmitted */
-/* after the header. This number ranges from 0 to sizeof( MSG_DATA ). */
-/* The third field (data_csum) holds a checksum of all data bytes and */
-/* the last field of the header finally holds the checksum of the. */
-/* header. */
-/* */
-/***************************************************************************/
-
-/* the control codes defined below are to be or'ed with a command/type code */
-
-#define GPS_REQACK 0x8000 /* to GPS166: request acknowledge */
-#define GPS_ACK 0x4000 /* from GPS166: acknowledge a command */
-#define GPS_NACK 0x2000 /* from GPS166: error receiving command */
-
-#define GPS_CTRL_MSK 0xF000 /* masks control code from command */
-
-
-/* The codes below specify commands/types of data to be supplied to GPS166: */
-
-/* GPS166 auto-message to host */
-/* þ host request, GPS166 response */
-/* þ þ host download to GPS166 */
-/* þ þ þ */
-enum { /* þ þ þ */
- /* system data */
- GPS_AUTO_ON = 0x000, /* þ þ þ X þ enable auto-messages from GPS166 */
- GPS_AUTO_OFF, /* þ þ þ X þ disable auto-messages from GPS166 */
- GPS_SW_REV, /* þ þ X þ þ request software revision */
- GPS_STAT, /* þ þ X þ þ request status of buffered variables */
- GPS_TIME, /* þ X þ þ X þ current time or capture or init board time */
- GPS_POS_XYZ, /* þ þ X þ X þ current position in ECEF coords */
- GPS_POS_LLA, /* þ þ X þ X þ current position in geographic coords */
- GPS_TZDL, /* þ þ X þ X þ time zone / daylight saving */
- GPS_PORT_PARM, /* þ þ X þ X þ parameters of the serial ports */
- GPS_SYNTH, /* þ þ X þ X þ synthesizer's frequency and phase */
- GPS_ANT_INFO, /* þ X þ X þ þ time diff after antenna disconnect */
- GPS_UCAP, /* þ X þ X þ þ user capture */
-
- /* GPS data */
- GPS_CFGH = 0x100, /* þ þ X þ X þ SVs' configuration and health codes */
- GPS_ALM, /* þ þ X þ X þ one SV's almanac */
- GPS_EPH, /* þ þ X þ X þ one SV's ephemeris */
- GPS_UTC, /* þ þ X þ X þ UTC correction parameters */
- GPS_IONO, /* þ þ X þ X þ ionospheric correction parameters */
- GPS_ASCII_MSG /* þ þ X þ þ the GPS ASCII message */
-};
-
-/*
- * modelled after GPSDEFS.H Revision 1.5
- */
-/***************************************************************************/
-/* */
-/* File: GPSDEFS.H 4.1 */
-/* */
-/* Project: Common C Library */
-/* */
-/* Compiler: Borland C++ */
-/* */
-/* Author: M. Burnicki, Meinberg Funkuhren */
-/* */
-/* */
-/* Description: */
-/* General definitions to be used with GPS166 */
-/* GPS166 Rev. 1.23 or above */
-/* */
-/* Modifications: see file GPSLIB.TXT */
-/* */
-/***************************************************************************/
-#define _GPSDEFS_H
-/* the type of various checksums */
-
-#ifndef _CSUM_DEFINED
- typedef unsigned short CSUM;
-# define _CSUM_DEFINED
-#endif
-
-/* the message header */
-
-typedef struct {
- unsigned short gps_cmd;
- unsigned short gps_len;
- unsigned short gps_data_csum;
- unsigned short gps_hdr_csum;
-} GPS_MSG_HDR;
-
-/* a struct used to hold the software revision information */
-
-typedef struct {
- unsigned short code; /* e.g. 0x0120 means rev. 1.20 */
- unsigned char name[17]; /* used to identify customized versions */
-} SW_REV;
-
-/* GPS ASCII message */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
- char s[23]; /* 22 chars GPS ASCII message plus trailing zero */
-} ASCII_MSG;
-
-#define MIN_SVNO 1 /* min. SV number */
-#define MAX_SVNO 32 /* max. SV number */
-#define N_SVNO ( MAX_SVNO - MIN_SVNO + 1) /* number of possibly active SVs */
-
-
-typedef short SVNO; /* the number of a SV */
-typedef unsigned short HEALTH; /* a SV's health code */
-typedef unsigned short CFG; /* a SV's configuration code */
-typedef unsigned short IOD; /* Issue-Of-Data code */
-
-/* Date and time referred to the linear time scale defined by GPS. */
-/* GPS time is defined by the number of weeks since midnight from */
-/* January 5, 1980 to January 6, 1980 plus the number of seconds of */
-/* the current week plus fractions of a second. GPS time differs from */
-/* UTC because UTC is corrected with leap seconds while GPS time scale */
-/* is continuous. */
-
-typedef struct {
- unsigned short wn; /* the week number since GPS has been installed */
- unsigned long sec; /* the second of that week */
- unsigned long tick; /* fractions of a second; scale: 1E-7 */
-} T_GPS;
-
-
-/* Local date and time computed from GPS time. The current number */
-/* of leap seconds have to be added to get UTC from GPS time. */
-/* Additional corrections could have been made according to the */
-/* time zone/daylight saving parameters (TZDL, see below) defined */
-/* by the user. The status field can be checked to see which corrections */
-/* have been applied. */
-
-#ifndef _TM_DEFINED
- typedef struct {
- short year; /* 0..9999 */
- char month; /* 1..12 */
- char mday; /* 1..31 */
- short yday; /* 1..366 */
- char wday; /* 0..6 == Sun..Sat */
- char hour; /* 0..23 */
- char minute; /* 0..59 */
- char second; /* 0..59 */
- long frac; /* fractions of a second, scale 1E-7 */
- long offs_from_utc; /* local time's offset from UTC */
- unsigned short status; /* flags */
- } TM;
-
- /* status flags used with conversion from GPS time to local time */
-
-# define TM_UTC 0x01 /* UTC correction has been made */
-# define TM_LOCAL 0x02 /* UTC has been converted to local time */
-# define TM_DL_ANN 0x04 /* state of daylight saving is going to change */
-# define TM_DL_ENB 0x08 /* daylight saving is enabled */
-# define TM_LS_ANN 0x10 /* leap second will be inserted */
-# define TM_LS_ENB 0x20 /* current second is leap second */
-
-# define _TM_DEFINED
-#endif
-
-
-/* the status flags below are defined starting with rev. 1.32 */
-
-#define TM_ANT_DISCONN 0x1000 /* antenna currently disconnected */
-#define TM_SYN_FLAG 0x2000 /* TIME_SYN output is low */
-#define TM_NO_SYNC 0x4000 /* not sync'ed after reset */
-#define TM_NO_POS 0x8000 /* position not computed after reset, */
- /* LOCK LED off */
-
-/* a struct used to transmit information on date and time */
-
-typedef struct {
- short channel; /* -1: the current time; 0, 1: capture 0, 1 */
- T_GPS t; /* time in GPS format */
- TM tm; /* that time converted to local time */
-} TTM;
-
-
-
-/* Two types of variables used to store a position. Type XYZ is */
-/* used with a position in earth centered, earth fixed (ECEF) */
-/* coordinates whereas type LLA holds such a position converted */
-/* to geographic coordinates as defined by WGS84 (World Geodetic */
-/* System from 1984). */
-
-#ifndef _XYZ_DEFINED
- /* sequence and number of components of a cartesian position */
- enum { XP, YP, ZP, N_XYZ };
-
- /* a type of array holding a cartesian position */
- typedef l_fp XYZ[N_XYZ]; /* values are in [m] */
-
-# define _XYZ_DEFINED
-#endif
-
-
-#ifndef _LLA_DEFINED
- /* sequence and number of components of a geographic position */
- enum { LAT, LON, ALT, N_LLA }; /* latitude, longitude, altitude */
-
- /* a type of array holding a geographic position */
- typedef l_fp LLA[N_LLA]; /* lon, lat in [rad], alt in [m] */
-
-# define _LLA_DEFINED
-#endif
-
-/* Synthesizer parameters. Synthesizer frequency is expressed as a */
-/* four digit decimal number (freq) to be multiplied by 0.1 Hz and an */
-/* base 10 exponent (range). If the effective frequency is less than */
-/* 10 kHz its phase is synchronized corresponding to the variable phase. */
-/* Phase may be in a range from -360° to +360° with a resolution of 0.1°, */
-/* so the resulting numbers to be stored are in a range of -3600 to +3600. */
-
-/* Example: */
-/* Assume the value of freq is 2345 (decimal) and the value of phase is 900. */
-/* If range == 0 the effective frequency is 234.5 Hz with a phase of +90°. */
-/* If range == 1 the synthesizer will generate a 2345 Hz output frequency */
-/* and so on. */
-
-/* Limitations: */
-/* If freq == 0 the synthesizer is disabled. If range == 0 the least */
-/* significant digit of freq is limited to 0, 3, 5 or 6. The resulting */
-/* frequency is shown in the examples below: */
-/* freq == 1230 --> 123.0 Hz */
-/* freq == 1233 --> 123 1/3 Hz (real 1/3 Hz, NOT 123.3 Hz) */
-/* freq == 1235 --> 123.5 Hz */
-/* freq == 1236 --> 123 2/3 Hz (real 2/3 Hz, NOT 123.6 Hz) */
-
-/* If range == MAX_RANGE the value of freq must not exceed 1200, so the */
-/* output frequency is limited to 12 MHz. */
-
-/* Phase will be ignored if the resulting frequency is greater or equal */
-/* to 10 kHz. */
-
-#define MAX_SYNTH_FREQ 1200 /* if range == MAX_SYNTH_RANGE */
-#define MIN_SYNTH_RANGE 0
-#define MAX_SYNTH_RANGE 5
-#define MAX_SYNTH_PHASE 3600
-
-typedef struct {
- short freq; /* four digits used; scale: 0.1; e.g. 1234 -> 123.4 Hz */
- short range; /* scale factor for freq; 0..MAX_SYNTH_RANGE */
- short phase; /* -MAX_SYNTH_PHASE..+MAX_SYNTH_PHASE; >0 -> pulses later */
-} SYNTH;
-
-
-
-/* Time zone/daylight saving parameters. */
-
-/* the name of a time zone, 5 characters plus trailing zero */
-typedef char TZ_NAME[6];
-
-typedef struct {
- long offs; /* offset from UTC to local time [sec] */
- long offs_dl; /* additional offset if daylight saving enabled [sec] */
- TM tm_on; /* date/time when daylight saving starts */
- TM tm_off; /* date/time when daylight saving ends */
- TZ_NAME name[2]; /* names without and with daylight saving enabled */
-} TZDL;
-
-/* The constant below is defined beginning with software rev. 1.29. */
-/* If the year in tzdl.tmon and tzdl.tm_off is or'ed with that constant, */
-/* the receiver automatically generates daylight saving year by year. */
-/* See GPSLIB.TXT for more information. */
-
-#define DL_AUTO_FLAG 0x8000
-
-/* Example: */
-/* for automatic daylight saving enable/disable in Central Europe, */
-/* the variables are to be set as shown below: */
-/* offs = 3600L one hour from UTC */
-/* offs_dl = 3600L one additional hour if daylight saving enabled */
-/* tm_on = first Sunday from March 25, 02:00:00h ( year |= DL_AUTO_FLAG ) */
-/* tm_off = first Sunday from Sept 24, 03:00:00h ( year |= DL_AUTO_FLAG ) */
-/* name[0] == "MEZ " name if daylight saving not enabled */
-/* name[1] == "MESZ " name if daylight saving is enabled */
-
-
-
-
-/* the structure below was defined in rev. 1.31. It reflects the status */
-/* of the antenna, the times of last disconnect/reconnect and the boards */
-/* clock offset after the phase of disconnection. */
-
-typedef struct {
- short status; /* current status of antenna */
- TM tm_disconn; /* time of antenna disconnect */
- TM tm_reconn; /* time of antenna reconnect */
- long delta_t; /* clock offset at reconnect time, units: TICKS_PER_SEC */
-} ANT_INFO;
-
-
-/* the status field may be set to one of the values below: */
-
-enum {
- ANT_INVALID, /* struct not set yet because ant. has not been disconn. */
- ANT_DISCONN, /* ant. now disconn., tm_reconn and delta_t not set */
- ANT_RECONN /* ant. has been disconn. and reconn., all fields valid */
-};
-
-
-/* Summary of configuration and health data of all SVs. */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- T_GPS tot_51; /* time of transmission, page 51 */
- T_GPS tot_63; /* time of transmission, page 63 */
- T_GPS t0a; /* complete reference time almanac */
-
- CFG cfg[N_SVNO]; /* SV configuration from page 63 */
- HEALTH health[N_SVNO]; /* SV health from pages 51, 63 */
-} CFGH;
-
-
-
-/* UTC correction parameters */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- T_GPS t0t; /* Reference Time UTC Parameters [sec] */
- l_fp A0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp A1; /* ± Clock Correction Coefficient 1 [sec/sec] */
-
- ushort WNlsf; /* week number of nearest leap second */
- short DNt; /* the day number at the end of which LS is inserted */
- char delta_tls; /* */
- char delta_tlsf; /* */
-
-} UTC;
-
-/* a struct used to hold the settings of a serial port */
-
-#ifndef _COM_PARM_DEFINED
- typedef long BAUD_RATE;
-
- /* indices used to identify a parameter in the framing string */
- enum { F_DBITS, F_PRTY, F_STBITS };
-
- /* types of handshake */
- enum { HS_NONE, HS_XONXOFF, HS_RTSCTS };
-
- typedef struct {
- BAUD_RATE baud_rate; /* e.g. 19200L */
- char framing[4]; /* e.g. "8N1" */
- short handshake; /* a numeric value, only HS_NONE supported yet */
- } COM_PARM;
-
-#define _COM_PARM_DEFINED
-#endif
-
-
-
-/* the codes below define what has to comes out of the serial ports */
-
-enum { STR_ON_REQ, STR_PER_SEC,
- STR_PER_MIN, N_STR_MODE_0, /* COM0 and COM1 */
- STR_UCAP = N_STR_MODE_0,
- STR_UCAP_REQ, N_STR_MODE_1 /* COM1 only */
- };
-
-
-#define N_COM 2 /* the number of serial ports */
-
-/* the structure used to store the modes of both serial ports */
-
-typedef struct {
- COM_PARM com[N_COM]; /* COM0 and COM1 settings */
- u_char mode[N_COM]; /* COM0 and COM1 output mode */
-} PORT_PARM;
-
-/* Ephemeris parameters of one specific SV. Needed to compute the position */
-/* of a satellite at a given time with high precision. Valid for an */
-/* interval of 4 to 6 hours from start of transmission. */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- HEALTH health; /* health indication of transmitting SV [---] */
- IOD IODC; /* Issue Of Data, Clock */
- IOD IODE2; /* Issue of Data, Ephemeris (Subframe 2) */
- IOD IODE3; /* Issue of Data, Ephemeris (Subframe 3) */
- T_GPS tt; /* time of transmission */
- T_GPS t0c; /* Reference Time Clock [---] */
- T_GPS t0e; /* Reference Time Ephemeris [---] */
-
- l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
- l_fp e; /* Eccentricity [---] */
- l_fp M0; /* ± Mean Anomaly at Ref. Time [rad] */
- l_fp omega; /* ± Argument of Perigee [rad] */
- l_fp OMEGA0; /* ± Longit. of Asc. Node of orbit plane [rad] */
- l_fp OMEGADOT; /* ± Rate of Right Ascension [rad/sec] */
- l_fp deltan; /* ± Mean Motion Diff. from computed value [rad/sec] */
- l_fp i0; /* ± Inclination Angle [rad] */
- l_fp idot; /* ± Rate of Inclination Angle [rad/sec] */
- l_fp crc; /* ± Cosine Corr. Term to Orbit Radius [m] */
- l_fp crs; /* ± Sine Corr. Term to Orbit Radius [m] */
- l_fp cuc; /* ± Cosine Corr. Term to Arg. of Latitude [rad] */
- l_fp cus; /* ± Sine Corr. Term to Arg. of Latitude [rad] */
- l_fp cic; /* ± Cosine Corr. Term to Inclination Angle [rad] */
- l_fp cis; /* ± Sine Corr. Term to Inclination Angle [rad] */
-
- l_fp af0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp af1; /* ± Clock Correction Coefficient 1 [sec/sec] */
- l_fp af2; /* ± Clock Correction Coefficient 2 [sec/sec²] */
- l_fp tgd; /* ± estimated group delay differential [sec] */
-
- u_short URA; /* predicted User Range Accuracy */
-
- u_char L2code; /* code on L2 channel [---] */
- u_char L2flag; /* L2 P data flag [---] */
-
-} EPH;
-
-/* Almanac parameters of one specific SV. A reduced precision set of */
-/* parameters used to check if a satellite is in view at a given time. */
-/* Valid for an interval of more than 7 days from start of transmission. */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- HEALTH health; /* [---] */
- T_GPS t0a; /* Reference Time Almanac [sec] */
-
- l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
- l_fp e; /* Eccentricity [---] */
-
- l_fp M0; /* ± Mean Anomaly at Ref. Time [rad] */
- l_fp omega; /* ± Argument of Perigee [rad] */
- l_fp OMEGA0; /* ± Longit. of Asc. Node of orbit plane [rad] */
- l_fp OMEGADOT; /* ± Rate of Right Ascension [rad/sec] */
- l_fp deltai; /* ± [rad] */
- l_fp af0; /* ± Clock Correction Coefficient 0 [sec] */
- l_fp af1; /* ± Clock Correction Coefficient 1 [sec/sec] */
-} ALM;
-
-
-/* ionospheric correction parameters */
-
-typedef struct {
- CSUM csum; /* checksum of the remaining bytes */
- short valid; /* flag data are valid */
-
- l_fp alpha_0; /* Ionosph. Corr. Coeff. Alpha 0 [sec] */
- l_fp alpha_1; /* Ionosph. Corr. Coeff. Alpha 1 [sec/deg] */
- l_fp alpha_2; /* Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2] */
- l_fp alpha_3; /* Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3] */
-
- l_fp beta_0; /* Ionosph. Corr. Coeff. Beta 0 [sec] */
- l_fp beta_1; /* Ionosph. Corr. Coeff. Beta 1 [sec/deg] */
- l_fp beta_2; /* Ionosph. Corr. Coeff. Beta 2 [sec/deg^2] */
- l_fp beta_3; /* Ionosph. Corr. Coeff. Beta 3 [sec/deg^3] */
-
-} IONO;
-
-void mbg_tm_str P((unsigned char **, TM *));
-void mbg_tgps_str P((unsigned char **, T_GPS *));
-void get_mbg_header P((unsigned char **, GPS_MSG_HDR *));
-void put_mbg_header P((unsigned char **, GPS_MSG_HDR *));
-void get_mbg_sw_rev P((unsigned char **, SW_REV *));
-void get_mbg_ascii_msg P((unsigned char **, ASCII_MSG *));
-void get_mbg_svno P((unsigned char **, SVNO *));
-void get_mbg_health P((unsigned char **, HEALTH *));
-void get_mbg_cfg P((unsigned char **, CFG *));
-void get_mbg_tgps P((unsigned char **, T_GPS *));
-void get_mbg_tm P((unsigned char **, TM *));
-void get_mbg_ttm P((unsigned char **, TTM *));
-void get_mbg_synth P((unsigned char **, SYNTH *));
-void get_mbg_tzdl P((unsigned char **, TZDL *));
-void get_mbg_antinfo P((unsigned char **, ANT_INFO *));
-void get_mbg_cfgh P((unsigned char **, CFGH *));
-void get_mbg_utc P((unsigned char **, UTC *));
-void get_mbg_lla P((unsigned char **, LLA));
-void get_mbg_xyz P((unsigned char **, XYZ));
-void get_mbg_portparam P((unsigned char **, PORT_PARM *));
-void get_mbg_eph P((unsigned char **, EPH *));
-void get_mbg_alm P((unsigned char **, ALM *));
-void get_mbg_iono P((unsigned char **, IONO *));
-
-unsigned long mbg_csum P((unsigned char *, unsigned int));
-
-#endif
-/*
- * mbg_gps166.h,v
- * Revision 4.1 1998/06/12 15:07:30 kardel
- * fixed prototyping
- *
- * Revision 4.0 1998/04/10 19:50:42 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.1 1998/04/10 19:27:34 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- * Revision 1.1 1997/10/06 20:55:38 kardel
- * new parse structure
- *
- */
diff --git a/contrib/ntp/include/md5.h b/contrib/ntp/include/md5.h
deleted file mode 100644
index 8241647..0000000
--- a/contrib/ntp/include/md5.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/include/mx4200.h b/contrib/ntp/include/mx4200.h
deleted file mode 100644
index 6ea2c60..0000000
--- a/contrib/ntp/include/mx4200.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/* records transmitted from extern CDU to MX 4200 */
-#define PMVXG_S_INITMODEA 0 /* initialization/mode part A */
-#define PMVXG_S_INITMODEB 1 /* initialization/mode part B*/
-#define PMVXG_S_SATHEALTH 2 /* satellite health control */
-#define PMVXG_S_DIFFNAV 3 /* differential navigation control */
-#define PMVXG_S_PORTCONF 7 /* control port configuration */
-#define PMVXG_S_GETSELFTEST 13 /* self test (request results) */
-#define PMVXG_S_RTCMCONF 16 /* RTCM port configuration */
-#define PMVXG_S_PASSTHRU 17 /* equipment port pass-thru config */
-#define PMVXG_S_RESTART 18 /* restart control */
-#define PMVXG_S_OSCPARAM 19 /* oscillator parameter */
-#define PMVXG_S_DOSELFTEST 20 /* self test (activate a test) */
-#define PMVXG_S_TRECOVCONF 23 /* time recovery configuration */
-#define PMVXG_S_RAWDATASEL 24 /* raw data port data selection */
-#define PMVXG_S_EQUIPCONF 26 /* equipment port configuration */
-#define PMVXG_S_RAWDATACONF 27 /* raw data port configuration */
-
-/* records transmitted from MX 4200 to external CDU */
-#define PMVXG_D_STATUS 0 /* status */
-#define PMVXG_D_POSITION 1 /* position */
-#define PMVXG_D_OPDOPS 3 /* (optimum) DOPs */
-#define PMVXG_D_MODEDATA 4 /* mode data */
-#define PMVXG_D_SATPRED 5 /* satellite predictions */
-#define PMVXG_D_SATHEALTH 6 /* satellite health status */
-#define PMVXG_D_UNRECOG 7 /* unrecognized request response */
-#define PMVXG_D_SIGSTRLOC 8 /* sig strength & location (sats 1-4) */
-#define PMVXG_D_SPEEDHEAD 11 /* speed/heading data */
-#define PMVXG_D_OSELFTEST 12 /* (old) self-test results */
-#define PMVXG_D_SIGSTRLOC2 18 /* sig strength & location (sats 5-8) */
-#define PMVXG_D_OSCPARAM 19 /* oscillator parameter */
-#define PMVXG_D_SELFTEST 20 /* self test results */
-#define PMVXG_D_PHV 21 /* position, height & velocity */
-#define PMVXG_D_DOPS 22 /* DOPs */
-#define PMVXG_D_SOFTCONF 30 /* software configuration */
-#define PMVXG_D_DIFFGPSMODE 503 /* differential gps moding */
-#define PMVXG_D_TRECOVUSEAGE 523 /* time recovery usage */
-#define PMVXG_D_RAWDATAOUT 524 /* raw data port data output */
-#define PMVXG_D_TRECOVRESULT 828 /* time recovery results */
-#define PMVXG_D_TRECOVOUT 830 /* time recovery output message */
diff --git a/contrib/ntp/include/ntif.h b/contrib/ntp/include/ntif.h
deleted file mode 100644
index 8377852..0000000
--- a/contrib/ntp/include/ntif.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* this is a hacked version of if.h from unix to contain the stuff we need only to build named (bind) with
- the minimal amount of changes... by l. kahn */
-
- /*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- */
-
-#ifndef _NET_IF_H
-#define _NET_IF_H
-
-
-/* #pragma ident "@(#)if.h 1.3 93/06/30 SMI"
-/* if.h 1.26 90/05/29 SMI; from UCB 7.1 6/4/86 */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Structures defining a network interface, providing a packet
- * transport mechanism (ala level 0 of the PUP protocols).
- *
- * Each interface accepts output datagrams of a specified maximum
- * length, and provides higher level routines with input datagrams
- * received from its medium.
- *
- * Output occurs when the routine if_output is called, with three parameters:
- * (*ifp->if_output)(ifp, m, dst)
- * Here m is the mbuf chain to be sent and dst is the destination address.
- * The output routine encapsulates the supplied datagram if necessary,
- * and then transmits it on its medium.
- *
- * On input, each interface unwraps the data received by it, and either
- * places it on the input queue of a internetwork datagram routine
- * and posts the associated software interrupt, or passes the datagram to a raw
- * packet input routine.
- *
- * Routines exist for locating interfaces by their addresses
- * or for locating a interface on a certain network, as well as more general
- * routing and gateway routines maintaining information used to locate
- * interfaces. These routines live in the files if.c and route.c
- */
-
-/*
- * Structure defining a queue for a network interface.
- *
- * (Would like to call this struct ``if'', but C isn't PL/1.)
- */
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-#ifdef FD_SETSIZE
-#undef FD_SETSIZE
-#endif
-#define FD_SETSIZE 512
-#include <winsock.h>
-typedef char *caddr_t;
-
-int get_winnt_interfaces();
-
-struct ifreq {
-#define IFNAMSIZ 16
- char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr ifru_addr;
- char nt_mask[IFNAMSIZ]; /* new field to store mask returned from nt lookup l. kahn */
-
-#define ifr_addr ifru_addr /* address */
-#define ifr_mask nt_mask /* nt mask in character form */
-
-};
-
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-struct ifconf {
- int ifc_len; /* size of associated 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 */
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NET_IF_H */
-
diff --git a/contrib/ntp/include/ntp.h b/contrib/ntp/include/ntp.h
deleted file mode 100644
index 1ce302b..0000000
--- a/contrib/ntp/include/ntp.h
+++ /dev/null
@@ -1,874 +0,0 @@
-/*
- * 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
- */
-#define YEAR_BREAK 500 /* years < this are tm_year values:
- * Break < AnyFourDigitYear && Break >
- * Anytm_yearYear */
-
-#define YEAR_PIVOT 98 /* 97/98: years < this are year 2000+
- * FYI: official UNIX pivot year is
- * 68/69 */
-
-/*
- * Number of Days since 1 BC Gregorian to 1 January of given year
- */
-#define julian0(year) (((year) * 365 ) + ((year) > 0 ? (((year) + 3) \
- / 4 - ((year - 1) / 100) + ((year - 1) / \
- 400)) : 0))
-
-/*
- * Number of days since start of NTP time to 1 January of given year
- */
-#define ntp0(year) (julian0(year) - julian0(1900))
-
-/*
- * Number of days since start of UNIX time to 1 January of given year
- */
-#define unix0(year) (julian0(year) - julian0(1970))
-
-/*
- * LEAP YEAR test for full 4-digit years (e.g, 1999, 2010)
- */
-#define isleap_4(y) ((y) % 4 == 0 && !((y) % 100 == 0 && !(y % \
- 400 == 0)))
-
-/*
- * LEAP YEAR test for tm_year (struct tm) years (e.g, 99, 110)
- */
-#define isleap_tm(y) ((y) % 4 == 0 && !((y) % 100 == 0 && !(((y) \
- + 1900) % 400 == 0)))
-
-/*
- * to convert simple two-digit years to tm_year style years:
- *
- * if (year < YEAR_PIVOT)
- * year += 100;
- *
- * to convert either two-digit OR tm_year years to four-digit years:
- *
- * if (year < YEAR_PIVOT)
- * year += 100;
- *
- * if (year < YEAR_BREAK)
- * year += 1900;
- */
-
-/*
- * How to get signed characters. On machines where signed char works,
- * use it. On machines where signed char doesn't work, char had better
- * be signed.
- */
-#ifdef NEED_S_CHAR_TYPEDEF
-# if SIZEOF_SIGNED_CHAR
-typedef signed char s_char;
-# else
-typedef char s_char;
-# endif
- /* XXX: Why is this sequent bit INSIDE this test? */
-# ifdef sequent
-# undef SO_RCVBUF
-# undef SO_SNDBUF
-# endif
-#endif
-#ifndef TRUE
-# define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-# define FALSE 0
-#endif /* FALSE */
-
-/*
- * NTP protocol parameters. See section 3.2.6 of the specification.
- */
-#define NTP_VERSION ((u_char)4) /* current version number */
-#define NTP_OLDVERSION ((u_char)1) /* oldest credible version */
-#define NTP_PORT 123 /* included for non-unix machines */
-
-/*
- * Poll interval parameters
- */
-#define NTP_UNREACH 16 /* poll interval backoff count */
-#define NTP_MINPOLL 4 /* log2 min poll interval (16 s) */
-#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 */
-
-/*
- * 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).
- *
- * Note that we carefully separate the jitter component from the
- * dispersion component (frequency error plus precision). The frequency
- * error component is computed as CLOCK_PHI times the difference between
- * the epoch of the time measurement and the reference time. The
- * precision componen is computed as the square root of the mean of the
- * squares of a zero-mean, uniform distribution of unit maximum
- * amplitude. Whether this makes statistical sense may be arguable.
- */
-#define SQUARE(x) ((x) * (x))
-#define SQRT(x) (sqrt(x))
-#define DIFF(x, y) (SQUARE((x) - (y)))
-#define LOGTOD(a) ((a) < 0 ? 1. / (1L << -(a)) : \
- 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 EVENT_TIMEOUT 0 /* one second, that is */
-
-/*
- * The interface structure is used to hold the addresses and socket
- * numbers of each of the interfaces we are using.
- */
-struct 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 */
-};
-
-/*
- * Flags for interfaces
- */
-#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)
- * These reveal the state at the last grumble from the peer and are
- * most handy for diagnosing problems, even if not strictly a state
- * variable in the spec. These are recorded in the peer structure.
- */
-#define TEST1 0x0001 /* duplicate packet received */
-#define TEST2 0x0002 /* bogus packet received */
-#define TEST3 0x0004 /* protocol unsynchronized */
-#define TEST4 0x0008 /* access denied */
-#define TEST5 0x0010 /* authentication failed */
-#define TEST6 0x0020 /* peer clock unsynchronized */
-#define TEST7 0x0040 /* peer stratum out of bounds */
-#define TEST8 0x0080 /* root delay/dispersion bounds check */
-#define TEST9 0x0100 /* peer delay/dispersion bounds check */
-#define TEST10 0x0200 /* autokey failed */
-#define TEST11 0x0400 /* proventic not confirmed */
-
-/*
- * The peer structure. Holds state information relating to the guys
- * we are peering with. Most of this stuff is from section 3.2 of the
- * spec.
- */
-struct peer {
- struct peer *next; /* pointer to next association */
- struct peer *ass_next; /* link pointer in associd hash */
- 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 */
- u_char hmode; /* local association mode */
- u_char hpoll; /* local poll interval */
- u_char kpoll; /* last poll interval */
- u_char minpoll; /* min poll interval */
- u_char maxpoll; /* max poll interval */
- u_char burst; /* packets remaining in burst */
- u_int flags; /* association flags */
- u_char cast_flags; /* additional flags */
- 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 ttl; /* ttl/refclock mode */
-
- /*
- * Variables used by reference clock support
- */
- struct refclockproc *procptr; /* refclock structure pointer */
- u_char refclktype; /* reference clock type */
- u_char refclkunit; /* reference clock unit number */
- u_char sstclktype; /* clock type for system status word */
-
- /*
- * Variables set by received packet
- */
- u_char leap; /* local leap indicator */
- u_char pmode; /* remote association mode */
- u_char stratum; /* remote stratum */
- s_char precision; /* remote clock precision */
- u_char ppoll; /* remote poll interval */
- u_int32 refid; /* remote reference ID */
- l_fp reftime; /* update epoch */
-
- /*
- * Variables used by authenticated client
- */
- keyid_t keyid; /* current key ID */
-#ifdef OPENSSL
-#define clear_to_zero assoc
- associd_t assoc; /* peer association ID */
- u_int32 crypto; /* peer status word */
- 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 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 value encrypt; /* send encrypt values */
- struct value sndval; /* send autokey values */
-#else /* OPENSSL */
-#define clear_to_zero status
-#endif /* OPENSSL */
-
- /*
- * Ephemeral state variables
- */
- u_char status; /* peer status */
- u_char reach; /* reachability register */
- u_long epoch; /* reference epoch */
- u_short filter_nextpt; /* index into filter shift register */
- double filter_delay[NTP_SHIFT]; /* delay shift register */
- double filter_offset[NTP_SHIFT]; /* offset shift register */
- double filter_disp[NTP_SHIFT]; /* dispersion shift register */
- u_long filter_epoch[NTP_SHIFT]; /* epoch shift register */
- u_char filter_order[NTP_SHIFT]; /* filter sort index */
- l_fp org; /* originate time stamp */
- l_fp rec; /* receive time stamp */
- l_fp xmt; /* transmit time stamp */
- double offset; /* peer clock offset */
- double delay; /* peer roundtrip delay */
- 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
- */
- double rootdelay; /* roundtrip delay to primary clock */
- double rootdispersion; /* dispersion to primary clock */
-
- /*
- * End of clear-to-zero area
- */
- 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 */
- /*
- * Statistic counters
- */
- u_long timereset; /* time stat counters were reset */
- u_long timereceived; /* last packet received time */
- u_long timereachable; /* last reachable/unreachable time */
-
- u_long sent; /* packets sent */
- u_long received; /* packets received */
- u_long processed; /* packets processed by the protocol */
- u_long badauth; /* packets cryptosum failed */
- u_long bogusorg; /* packets bogus origin */
- 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 */
-};
-
-/*
- * Values for peer.leap, sys_leap
- */
-#define LEAP_NOWARNING 0x0 /* normal, no leap second warning */
-#define LEAP_ADDSECOND 0x1 /* last minute of day has 61 seconds */
-#define LEAP_DELSECOND 0x2 /* last minute of day has 59 seconds */
-#define LEAP_NOTINSYNC 0x3 /* overload, clock is free running */
-
-/*
- * Values for peer.mode
- */
-#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 */
-#define MODE_SERVER 4 /* server mode */
-#define MODE_BROADCAST 5 /* broadcast mode */
-#define MODE_CONTROL 6 /* control mode packet */
-#define MODE_PRIVATE 7 /* implementation defined function */
-#define MODE_BCLIENT 8 /* broadcast client mode */
-
-/*
- * Values for peer.stratum, sys_stratum
- */
-#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 */
-
-/*
- * Values for peer.flags
- */
-#define FLAG_CONFIG 0x0001 /* association was configured */
-#define FLAG_AUTHENABLE 0x0002 /* authentication required */
-#define FLAG_AUTHENTIC 0x0004 /* last message was authentic */
-#define FLAG_SKEY 0x0008 /* autokey authentication */
-#define FLAG_MCAST 0x0010 /* multicast client mode */
-#define FLAG_REFCLOCK 0x0020 /* this is actually a reference clock */
-#define FLAG_SYSPEER 0x0040 /* this is one of the selected peers */
-#define FLAG_PREFER 0x0080 /* this is the preferred 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_ASSOC 0x0800 /* autokey request */
-
-/*
- * Definitions for the clear() routine. We use memset() to clear
- * the parts of the peer structure which go to zero. These are
- * used to calculate the start address and length of the area.
- */
-#define CLEAR_TO_ZERO(p) ((char *)&((p)->clear_to_zero))
-#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) \
- - CRYPTO_TO_ZERO((struct peer *)0))
-
-/*
- * Reference clock identifiers (for pps signal)
- */
-#define PPSREFID (u_int32)"PPS " /* used when pps controls stratum>1 */
-
-/*
- * Reference clock types. Added as necessary.
- */
-#define REFCLK_NONE 0 /* unknown or missing */
-#define REFCLK_LOCALCLOCK 1 /* external (e.g., lockclock) */
-#define REFCLK_GPS_TRAK 2 /* TRAK 8810 GPS Receiver */
-#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_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 */
-#define REFCLK_GPS_AS2201 10 /* Austron 2201A GPS */
-#define REFCLK_GPS_ARBITER 11 /* Arbiter 1088A/B/ GPS */
-#define REFCLK_IRIG_TPRO 12 /* KSI/Odetics TPRO-S IRIG */
-#define REFCLK_ATOM_LEITCH 13 /* Leitch CSD 5300 Master Clock */
-#define REFCLK_MSF_EES 14 /* EES M201 MSF Receiver */
-#define REFCLK_GPSTM_TRUE 15 /* OLD TrueTime GPS/TM-TMD Receiver */
-#define REFCLK_IRIG_BANCOMM 16 /* Bancomm GPS/IRIG Interface */
-#define REFCLK_GPS_DATUM 17 /* Datum Programmable Time System */
-#define REFCLK_NIST_ACTS 18 /* NIST Auto Computer Time Service */
-#define REFCLK_WWV_HEATH 19 /* Heath GC1000 WWV/WWVH Receiver */
-#define REFCLK_GPS_NMEA 20 /* NMEA based GPS clock */
-#define REFCLK_GPS_VME 21 /* TrueTime GPS-VME Interface */
-#define REFCLK_ATOM_PPS 22 /* 1-PPS Clock Discipline */
-#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_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_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 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 /* 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
- * clocks an address of the form 127.127.t.u, where t is the type and
- * u is the unit number. We define some of this here since we will need
- * some sanity checks to make sure this address isn't interpretted as
- * that of a normal peer.
- */
-#define REFCLOCK_ADDR 0x7f7f0000 /* 127.127.0.0 */
-#define REFCLOCK_MASK 0xffff0000 /* 255.255.0.0 */
-
-#define ISREFCLOCKADR(srcadr) ((SRCADR(srcadr) & REFCLOCK_MASK) \
- == REFCLOCK_ADDR)
-
-/*
- * Macro for checking for invalid addresses. This is really, really
- * gross, but is needed so no one configures a host on net 127 now that
- * we're encouraging it the the configuration file.
- */
-#define LOOPBACKADR 0x7f000001
-#define LOOPNETMASK 0xff000000
-
-#define ISBADADR(srcadr) (((SRCADR(srcadr) & LOOPNETMASK) \
- == (LOOPBACKADR & LOOPNETMASK)) \
- && (SRCADR(srcadr) != LOOPBACKADR))
-
-/*
- * Utilities for manipulating addresses and port numbers
- */
-#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.
- * See Appendix A in the specification.
- *
- * Note that all u_fp and l_fp values arrive in network byte order
- * and must be converted (except the mac, which isn't, really).
- */
-struct pkt {
- u_char li_vn_mode; /* leap indicator, version and mode */
- u_char stratum; /* peer stratum */
- u_char ppoll; /* peer poll interval */
- s_char precision; /* peer clock precision */
- u_fp rootdelay; /* distance to primary clock */
- u_fp rootdispersion; /* clock dispersion */
- u_int32 refid; /* reference clock ID */
- l_fp reftime; /* time peer clock was last updated */
- l_fp org; /* originate time stamp */
- l_fp rec; /* receive time stamp */
- l_fp xmt; /* transmit time stamp */
-
-#define LEN_PKT_NOMAC 12 * sizeof(u_int32) /* min header length */
-#define LEN_PKT_MAC LEN_PKT_NOMAC + sizeof(u_int32)
-#define MIN_MAC_LEN 3 * sizeof(u_int32) /* DES */
-#define MAX_MAC_LEN 5 * sizeof(u_int32) /* MD5 */
-
- /*
- * The length of the packet less MAC must be a multiple of 64
- * with an RSA modulus and Diffie-Hellman prime of 64 octets
- * and maximum host name of 128 octets, the maximum autokey
- * command is 152 octets and maximum autokey response is 460
- * octets. A packet can contain no more than one command and one
- * response, so the maximum total extension field length is 672
- * octets. But, to handle humungus certificates, the bank must
- * be broke.
- */
-#ifdef OPENSSL
- u_int32 exten[NTP_MAXEXTEN / 4]; /* max extension field */
-#else /* OPENSSL */
- u_int32 exten[1]; /* misused */
-#endif /* OPENSSL */
- u_char mac[MAX_MAC_LEN]; /* mac */
-};
-
-/*
- * Stuff for extracting things from li_vn_mode
- */
-#define PKT_MODE(li_vn_mode) ((u_char)((li_vn_mode) & 0x7))
-#define PKT_VERSION(li_vn_mode) ((u_char)(((li_vn_mode) >> 3) & 0x7))
-#define PKT_LEAP(li_vn_mode) ((u_char)(((li_vn_mode) >> 6) & 0x3))
-
-/*
- * Stuff for putting things back into li_vn_mode
- */
-#define PKT_LI_VN_MODE(li, vn, md) \
- ((u_char)((((li) << 6) & 0xc0) | (((vn) << 3) & 0x38) | ((md) & 0x7)))
-
-
-/*
- * Dealing with stratum. 0 gets mapped to 16 incoming, and back to 0
- * on output.
- */
-#define PKT_TO_STRATUM(s) ((u_char)(((s) == (STRATUM_PKT_UNSPEC)) ?\
- (STRATUM_UNSPEC) : (s)))
-
-#define STRATUM_TO_PKT(s) ((u_char)(((s) == (STRATUM_UNSPEC)) ?\
- (STRATUM_PKT_UNSPEC) : (s)))
-
-/*
- * Event codes. Used for reporting errors/events to the control module
- */
-#define PEER_EVENT 0x080 /* this is a peer event */
-#define CRPT_EVENT 0x100 /* this is a crypto event */
-
-/*
- * System event codes
- */
-#define EVNT_UNSPEC 0 /* unspecified */
-#define EVNT_SYSRESTART 1 /* system restart */
-#define EVNT_SYSFAULT 2 /* wsystem or hardware fault */
-#define EVNT_SYNCCHG 3 /* new leap or synch change */
-#define EVNT_PEERSTCHG 4 /* new source or stratum */
-#define EVNT_CLOCKRESET 5 /* clock reset */
-#define EVNT_BADDATETIM 6 /* invalid time or date */
-#define EVNT_CLOCKEXCPT 7 /* reference clock exception */
-
-/*
- * Peer event codes
- */
-#define EVNT_PEERIPERR (1 | PEER_EVENT) /* IP error */
-#define EVNT_PEERAUTH (2 | PEER_EVENT) /* authentication failure */
-#define EVNT_UNREACH (3 | PEER_EVENT) /* change to unreachable */
-#define EVNT_REACH (4 | PEER_EVENT) /* change to reachable */
-#define EVNT_PEERCLOCK (5 | PEER_EVENT) /* clock exception */
-
-/*
- * Clock event codes
- */
-#define CEVNT_NOMINAL 0 /* unspecified */
-#define CEVNT_TIMEOUT 1 /* poll timeout */
-#define CEVNT_BADREPLY 2 /* bad reply format */
-#define CEVNT_FAULT 3 /* hardware or software fault */
-#define CEVNT_PROP 4 /* propagation failure */
-#define CEVNT_BADDATE 5 /* bad date format or value */
-#define CEVNT_BADTIME 6 /* bad time format or value */
-#define CEVNT_MAX CEVNT_BADTIME
-
-/*
- * Very misplaced value. Default port through which we send traps.
- */
-#define TRAPPORT 18447
-
-
-/*
- * To speed lookups, peers are hashed by the low order bits of the
- * remote IP address. These definitions relate to that.
- */
-#define HASH_SIZE 128
-#define HASH_MASK (HASH_SIZE-1)
-#define HASH_ADDR(src) sock_hash(src)
-
-/*
- * How we randomize polls. The poll interval is a power of two.
- * We chose a random value which is between 1/4 and 3/4 of the
- * poll interval we would normally use and which is an even multiple
- * of the EVENT_TIMEOUT. The random number routine, given an argument
- * spread value of n, returns an integer between 0 and (1<<n)-1. This
- * is shifted by EVENT_TIMEOUT and added to the base value.
- */
-#if defined(HAVE_MRAND48)
-# define RANDOM (mrand48())
-# define SRANDOM(x) (srand48(x))
-#else
-# define RANDOM (random())
-# define SRANDOM(x) (srandom(x))
-#endif
-
-#define RANDPOLL(x) ((1 << (x)) - 1 + (RANDOM & 0x3))
-#define RANDOM_SPREAD(poll) ((poll) - (EVENT_TIMEOUT+1))
-#define RANDOM_POLL(poll, rval) ((((rval)+1)<<EVENT_TIMEOUT) + (1<<((poll)-2)))
-
-/*
- * min, min3 and max. Makes it easier to transliterate the spec without
- * thinking about it.
- */
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#define min3(a,b,c) min(min((a),(b)), (c))
-
-
-/*
- * Configuration items. These are for the protocol module (proto_config())
- */
-#define PROTO_BROADCLIENT 1
-#define PROTO_PRECISION 2 /* (not used) */
-#define PROTO_AUTHENTICATE 3
-#define PROTO_BROADDELAY 4
-#define PROTO_AUTHDELAY 5 /* (not used) */
-#define PROTO_MULTICAST_ADD 6
-#define PROTO_MULTICAST_DEL 7
-#define PROTO_NTP 8
-#define PROTO_KERNEL 9
-#define PROTO_MONITOR 10
-#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
- */
-#define LOOP_DRIFTINIT 1 /* set initial frequency offset */
-#define LOOP_DRIFTCOMP 2 /* set frequency offset */
-#define LOOP_MAX 3 /* set step offset */
-#define LOOP_PANIC 4 /* set panic offseet */
-#define LOOP_PHI 5 /* set dispersion rate */
-#define LOOP_MINSTEP 6 /* set step timeout */
-#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
- */
-#define STATS_FREQ_FILE 1 /* configure drift file */
-#define STATS_STATSDIR 2 /* directory prefix for stats files */
-#define STATS_PID_FILE 3 /* configure ntpd PID file */
-
-#define MJD_1900 15020 /* MJD for 1 Jan 1900 */
-
-/*
- * Default parameters. We use these in the absence of something better.
- */
-#define DEFBROADDELAY 4e-3 /* default broadcast offset */
-#define INADDR_NTP 0xe0000101 /* NTP multicast address 224.0.1.1 */
-
-/*
- * Structure used optionally for monitoring when this is turned on.
- */
-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 */
- 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 */
- u_char version; /* version of incoming packet */
- u_char cast_flags; /* flags MDF_?CAST */
-};
-
-/*
- * Values for cast_flags
- */
-#define MDF_UCAST 0x01 /* unicast */
-#define MDF_MCAST 0x02 /* multicast */
-#define MDF_BCAST 0x04 /* broadcast */
-#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
- */
-#define MON_OFF 0x00 /* no monitoring */
-#define MON_ON 0x01 /* monitoring explicitly enabled */
-#define MON_RES 0x02 /* implicit monitoring for RES_LIMITED */
-/*
- * Structure used for restrictlist entries
- */
-struct restrictlist {
- struct restrictlist *next; /* link to next entry */
- 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 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_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
- */
-#define RESM_INTERFACE 0x1 /* this is an interface */
-#define RESM_NTPONLY 0x2 /* match ntp port only */
-
-/*
- * Restriction configuration ops
- */
-#define RESTRICT_FLAGS 1 /* add flags to restrict entry */
-#define RESTRICT_UNFLAG 2 /* remove flags from restrict entry */
-#define RESTRICT_REMOVE 3 /* remove a restrict entry */
-
-/*
- * Endpoint structure for the select algorithm
- */
-struct endpoint {
- double val; /* offset of endpoint */
- int type; /* interval entry/exit */
-};
-
-/*
- * Defines for association matching
- */
-#define AM_MODES 10 /* total number of modes */
-#define NO_PEER 0 /* action when no peer is found */
-
-/*
- * Association matching AM[] return codes
- */
-#define AM_ERR -1
-#define AM_NOMATCH 0
-#define AM_PROCPKT 1
-#define AM_FXMIT 2
-#define AM_MANYCAST 3
-#define AM_NEWPASS 4
-#define AM_NEWBCL 5
-#define AM_POSSBCL 6
-
-/* NetInfo configuration locations */
-#ifdef HAVE_NETINFO
-#define NETINFO_CONFIG_DIR "/config/ntp"
-#endif
-
-#endif /* NTP_H */
diff --git a/contrib/ntp/include/ntp_calendar.h b/contrib/ntp/include/ntp_calendar.h
deleted file mode 100644
index 95e2c12..0000000
--- a/contrib/ntp/include/ntp_calendar.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * ntp_calendar.h - definitions for the calendar time-of-day routine
- */
-#ifndef NTP_CALENDAR_H
-#define NTP_CALENDAR_H
-
-#include "ntp_types.h"
-
-struct calendar {
- u_short year; /* year (A.D.) */
- u_short yearday; /* day of year, 1 = January 1 */
- u_char month; /* month, 1 = January */
- u_char monthday; /* day of month */
- u_char hour; /* hour of day, midnight = 0 */
- u_char minute; /* minute of hour */
- u_char second; /* second of minute */
-};
-
-/*
- * Days in each month. 30 days hath September...
- */
-#define JAN 31
-#define FEB 28
-#define FEBLEAP 29
-#define MAR 31
-#define APR 30
-#define MAY 31
-#define JUN 30
-#define JUL 31
-#define AUG 31
-#define SEP 30
-#define OCT 31
-#define NOV 30
-#define DEC 31
-
-/*
- * We deal in a 4 year cycle starting at March 1, 1900. We assume
- * we will only want to deal with dates since then, and not to exceed
- * the rollover day in 2036.
- */
-#define SECSPERMIN (60) /* seconds per minute */
-#define MINSPERHR (60) /* minutes per hour */
-#define HRSPERDAY (24) /* hours per day */
-#define DAYSPERYEAR (365) /* days per year */
-
-#define SECSPERDAY (SECSPERMIN*MINSPERHR*HRSPERDAY)
-#define SECSPERYEAR (365 * SECSPERDAY) /* regular year */
-#define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */
-
-#define MAR1900 ((JAN+FEB) * SECSPERDAY) /* no leap year in 1900 */
-#define DAYSPERCYCLE (365+365+365+366) /* 3 normal years plus leap */
-#define SECSPERCYCLE (DAYSPERCYCLE*SECSPERDAY)
-#define YEARSPERCYCLE 4
-
-/*
- * Gross hacks. I have illicit knowlege that there won't be overflows
- * here, the compiler often can't tell this.
- */
-#define TIMES60(val) ((((val)<<4) - (val))<<2) /* *(16 - 1) * 4 */
-#define TIMES24(val) (((val)<<4) + ((val)<<3)) /* *16 + *8 */
-#define TIMES7(val) (((val)<<3) - (val)) /* *8 - *1 */
-#define TIMESDPERC(val) (((val)<<10) + ((val)<<8) \
- + ((val)<<7) + ((val)<<5) \
- + ((val)<<4) + ((val)<<2) + (val)) /* *big* hack */
-
-/*
- * Another big hack. Cycle 22 started on March 1, 1988. This is
- * STARTCYCLE22 seconds after the start of cycle 0.
- */
-#define CYCLE22 (22)
-#define STARTCYCLE22 (u_long)(0xa586b500) /* 2777068800 */
-#define MAR1988 (u_long)(STARTCYCLE22 + (u_long)MAR1900)
-
-/*
- * The length of January + February in leap and non-leap years.
- */
-#define JANFEBNOLEAP ((JAN+FEB) * SECSPERDAY)
-#define JANFEBLEAP ((JAN+FEBLEAP) * SECSPERDAY)
-
-
-extern void caljulian P((u_long, struct calendar *));
-extern u_long caltontp P((const struct calendar *));
-
-/*
- * Additional support stuff for Ed Rheingold's calendrical calculations
- */
-
-/*
- * Start day of NTP time as days past the imaginary date 12/1/1 BC.
- * P((This is the beginning of the Christian Era, or BCE.))
- */
-#define DAY_NTP_STARTS 693596
-/*
- * The Gregorian calendar is based on a 400 year cycle. This is the number
- * of days in each cycle.
- */
-#define GREGORIAN_CYCLE_DAYS 146097
-
-/*
- * Days in a normal 100 year leap year calendar. We lose a leap year day
- * in years evenly divisible by 100 but not by 400.
- */
-#define GREGORIAN_NORMAL_CENTURY_DAYS 36524
-
-/*
- * Days in a normal 4 year leap year calendar cycle.
- */
-#define GREGORIAN_NORMAL_LEAP_CYCLE_DAYS 1461
-
-#define is_leapyear(y) (y%4 == 0 && !(y%100 == 0 && !(y%400 == 0)))
-
-#endif
diff --git a/contrib/ntp/include/ntp_cmdargs.h b/contrib/ntp/include/ntp_cmdargs.h
deleted file mode 100644
index e9ab9b1..0000000
--- a/contrib/ntp/include/ntp_cmdargs.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "ntp_types.h"
-
-extern void getstartup P((int, char **));
-extern void getCmdOpts P((int, char **));
diff --git a/contrib/ntp/include/ntp_config.h b/contrib/ntp/include/ntp_config.h
deleted file mode 100644
index 01478d2..0000000
--- a/contrib/ntp/include/ntp_config.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Configuration file name
- */
-#ifndef CONFIG_FILE
-# ifndef SYS_WINNT
-# define CONFIG_FILE "/etc/ntp.conf"
-# 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 */
-
-/*
- * Types of entries we understand.
- */
-#define CONFIG_UNKNOWN 0
-
-/*
- * Command keywords
- */
-#define CONFIG_PEER 1
-#define CONFIG_SERVER 2
-#define CONFIG_AUTOMAX 3
-#define CONFIG_DRIFTFILE 4
-#define CONFIG_BROADCAST 5
-#define CONFIG_BROADCASTCLIENT 6
-#define CONFIG_AUTHENTICATE 7
-#define CONFIG_KEYS 8
-#define CONFIG_REVOKE 9
-#define CONFIG_PPS 10
-#define CONFIG_RESTRICT 11
-#define CONFIG_BDELAY 12
-#define CONFIG_TRUSTEDKEY 13
-#define CONFIG_REQUESTKEY 14
-#define CONFIG_CONTROLKEY 15
-#define CONFIG_TRAP 16
-#define CONFIG_FUDGE 17
-#define CONFIG_TINKER 18
-#define CONFIG_STATSDIR 19
-#define CONFIG_FILEGEN 20
-#define CONFIG_STATISTICS 21
-#define CONFIG_PIDFILE 22
-#define CONFIG_SETVAR 23
-#define CONFIG_DISCARD 24
-#define CONFIG_ADJ 25
-#define CONFIG_MULTICASTCLIENT 26
-#define CONFIG_ENABLE 27
-#define CONFIG_DISABLE 28
-#define CONFIG_PHONE 29
-#define CONFIG_LOGFILE 30
-#define CONFIG_LOGCONFIG 31
-#define CONFIG_MANYCASTCLIENT 32
-#define CONFIG_MANYCASTSERVER 33
-#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
- */
-#define CONF_MOD_VERSION 1
-#define CONF_MOD_KEY 2
-#define CONF_MOD_MINPOLL 3
-#define CONF_MOD_MAXPOLL 4
-#define CONF_MOD_PREFER 5
-#define CONF_MOD_BURST 6
-#define CONF_MOD_IBURST 7
-#define CONF_MOD_SKEY 8
-#define CONF_MOD_TTL 9
-#define CONF_MOD_MODE 10
-#define CONF_MOD_NOSELECT 11
-
-/*
- * "restrict" modifier keywords
- */
-#define CONF_RES_MASK 1
-#define CONF_RES_IGNORE 2
-#define CONF_RES_NOSERVE 3
-#define CONF_RES_NOTRUST 4
-#define CONF_RES_NOQUERY 5
-#define CONF_RES_NOMODIFY 6
-#define CONF_RES_NOPEER 7
-#define CONF_RES_NOTRAP 8
-#define CONF_RES_LPTRAP 9
-#define CONF_RES_NTPPORT 10
-#define CONF_RES_LIMITED 11
-#define CONF_RES_VERSION 12
-#define CONF_RES_DEMOBILIZE 13
-
-/*
- * "trap" modifier keywords
- */
-#define CONF_TRAP_PORT 1
-#define CONF_TRAP_INTERFACE 2
-
-/*
- * "fudge" modifier keywords
- */
-#define CONF_FDG_TIME1 1
-#define CONF_FDG_TIME2 2
-#define CONF_FDG_STRATUM 3
-#define CONF_FDG_REFID 4
-#define CONF_FDG_FLAG1 5
-#define CONF_FDG_FLAG2 6
-#define CONF_FDG_FLAG3 7
-#define CONF_FDG_FLAG4 8
-
-/*
- * "filegen" modifier keywords
- */
-#define CONF_FGEN_FILE 1
-#define CONF_FGEN_TYPE 2
-#define CONF_FGEN_FLAG_LINK 3
-#define CONF_FGEN_FLAG_NOLINK 4
-#define CONF_FGEN_FLAG_ENABLE 5
-#define CONF_FGEN_FLAG_DISABLE 6
-
-/*
- * "pps" modifier keywords
- */
-#define CONF_PPS_ASSERT 1
-#define CONF_PPS_CLEAR 2
-#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_ALLAN 5
-#define CONF_CLOCK_HUFFPUFF 6
-#define CONF_CLOCK_FREQ 7
-
-/*
- * "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_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
deleted file mode 100644
index c75d38b..0000000
--- a/contrib/ntp/include/ntp_control.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * ntp_control.h - definitions related to NTP mode 6 control messages
- */
-
-#include "ntp_types.h"
-
-struct ntp_control {
- u_char li_vn_mode; /* leap, version, mode */
- u_char r_m_e_op; /* response, more, error, opcode */
- u_short sequence; /* sequence number of request */
- u_short status; /* status word for association */
- associd_t associd; /* association ID */
- u_short offset; /* offset of this batch of data */
- u_short count; /* count of data in this packet */
- u_char data[(480 + MAX_MAC_LEN)]; /* data + auth */
-};
-
-/*
- * Length of the control header, in octets
- */
-#define CTL_HEADER_LEN 12
-#define CTL_MAX_DATA_LEN 468
-
-
-/*
- * Limits and things
- */
-#define CTL_MAXTRAPS 3 /* maximum number of traps we allow */
-#define CTL_TRAPTIME (60*60) /* time out traps in 1 hour */
-#define CTL_MAXAUTHSIZE 64 /* maximum size of an authen'ed req */
-
-/*
- * Decoding for the r_m_e_op field
- */
-#define CTL_RESPONSE 0x80
-#define CTL_ERROR 0x40
-#define CTL_MORE 0x20
-#define CTL_OP_MASK 0x1f
-
-#define CTL_ISRESPONSE(r_m_e_op) (((r_m_e_op) & 0x80) != 0)
-#define CTL_ISMORE(r_m_e_op) (((r_m_e_op) & 0x20) != 0)
-#define CTL_ISERROR(r_m_e_op) (((r_m_e_op) & 0x40) != 0)
-#define CTL_OP(r_m_e_op) ((r_m_e_op) & CTL_OP_MASK)
-
-/*
- * Opcodes
- */
-#define CTL_OP_UNSPEC 0
-#define CTL_OP_READSTAT 1
-#define CTL_OP_READVAR 2
-#define CTL_OP_WRITEVAR 3
-#define CTL_OP_READCLOCK 4
-#define CTL_OP_WRITECLOCK 5
-#define CTL_OP_SETTRAP 6
-#define CTL_OP_ASYNCMSG 7
-#define CTL_OP_UNSETTRAP 31
-
-/*
- * {En,De}coding of the system status word
- */
-#define CTL_SST_TS_UNSPEC 0 /* time source unspecified */
-#define CTL_SST_TS_ATOM 1 /* time source calibrated atomic */
-#define CTL_SST_TS_LF 2 /* time source VLF or LF radio */
-#define CTL_SST_TS_HF 3 /* time source HF radio */
-#define CTL_SST_TS_UHF 4 /* time source UHF radio */
-#define CTL_SST_TS_LOCAL 5 /* time source LOCAL */
-#define CTL_SST_TS_NTP 6 /* time source NTP */
-#define CTL_SST_TS_UDPTIME 7 /* time source UDP/TIME */
-#define CTL_SST_TS_WRSTWTCH 8 /* time source is wristwatch */
-#define CTL_SST_TS_TELEPHONE 9 /* time source is telephone modem */
-#define CTL_SST_TS_PPS 0x20 /* time source is PPS signal */
-
-#define CTL_SYS_MAXEVENTS 15
-
-#define CTL_SYS_STATUS(li, source, nevnt, evnt) \
- (((((unsigned short)(li))<< 14)&0xc000) | \
- (((source)<<8)&0x3f00) | \
- (((nevnt)<<4)&0x00f0) | \
- ((evnt)&0x000f))
-
-#define CTL_SYS_LI(status) (((status)>>14) & 0x3)
-#define CTL_SYS_SOURCE(status) (((status)>>8) & 0x3f)
-#define CTL_SYS_NEVNT(status) (((status)>>4) & 0xf)
-#define CTL_SYS_EVENT(status) ((status) & 0xf)
-
-/*
- * {En,De}coding of the peer status word
- */
-#define CTL_PST_CONFIG 0x80
-#define CTL_PST_AUTHENABLE 0x40
-#define CTL_PST_AUTHENTIC 0x20
-#define CTL_PST_REACH 0x10
-#define CTL_PST_UNSPEC 0x08
-
-#define CTL_PST_SEL_REJECT 0 /* reject */
-#define CTL_PST_SEL_SANE 1 /* x falsetick */
-#define CTL_PST_SEL_CORRECT 2 /* . excess */
-#define CTL_PST_SEL_SELCAND 3 /* - outlyer */
-#define CTL_PST_SEL_SYNCCAND 4 /* + candidat */
-#define CTL_PST_SEL_DISTSYSPEER 5 /* # selected */
-#define CTL_PST_SEL_SYSPEER 6 /* * sys.peer */
-#define CTL_PST_SEL_PPS 7 /* o pps.peer */
-
-#define CTL_PEER_MAXEVENTS 15
-
-#define CTL_PEER_STATUS(status, nevnt, evnt) \
- ((((status)<<8) & 0xff00) | \
- (((nevnt)<<4) & 0x00f0) | \
- ((evnt) & 0x000f))
-
-#define CTL_PEER_STATVAL(status)(((status)>>8) & 0xff)
-#define CTL_PEER_NEVNT(status) (((status)>>4) & 0xf)
-#define CTL_PEER_EVENT(status) ((status) & 0xf)
-
-/*
- * {En,De}coding of the clock status word
- */
-#define CTL_CLK_OKAY 0
-#define CTL_CLK_NOREPLY 1
-#define CTL_CLK_BADFORMAT 2
-#define CTL_CLK_FAULT 3
-#define CTL_CLK_PROPAGATION 4
-#define CTL_CLK_BADDATE 5
-#define CTL_CLK_BADTIME 6
-
-#define CTL_CLK_STATUS(status, event) \
- ((((status)<<8) & 0xff00) | \
- ((event) & 0x00ff))
-
-/*
- * Error code responses returned when the E bit is set.
- */
-#define CERR_UNSPEC 0
-#define CERR_PERMISSION 1
-#define CERR_BADFMT 2
-#define CERR_BADOP 3
-#define CERR_BADASSOC 4
-#define CERR_UNKNOWNVAR 5
-#define CERR_BADVALUE 6
-#define CERR_RESTRICT 7
-
-#define CERR_NORESOURCE CERR_PERMISSION /* wish there was a different code */
-
-
-/*
- * System variables we understand
- */
-#define CS_LEAP 1
-#define CS_STRATUM 2
-#define CS_PRECISION 3
-#define CS_ROOTDELAY 4
-#define CS_ROOTDISPERSION 5
-#define CS_REFID 6
-#define CS_REFTIME 7
-#define CS_POLL 8
-#define CS_PEERID 9
-#define CS_STATE 10
-#define CS_OFFSET 11
-#define CS_DRIFT 12
-#define CS_JITTER 13
-#define CS_CLOCK 14
-#define CS_PROCESSOR 15
-#define CS_SYSTEM 16
-#define CS_VERSION 17
-#define CS_STABIL 18
-#define CS_VARLIST 19
-#ifdef OPENSSL
-#define CS_FLAGS 20
-#define CS_HOST 21
-#define CS_PUBLIC 22
-#define CS_CERTIF 23
-#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 /* OPENSSL */
-
-/*
- * Peer variables we understand
- */
-#define CP_CONFIG 1
-#define CP_AUTHENABLE 2
-#define CP_AUTHENTIC 3
-#define CP_SRCADR 4
-#define CP_SRCPORT 5
-#define CP_DSTADR 6
-#define CP_DSTPORT 7
-#define CP_LEAP 8
-#define CP_HMODE 9
-#define CP_STRATUM 10
-#define CP_PPOLL 11
-#define CP_HPOLL 12
-#define CP_PRECISION 13
-#define CP_ROOTDELAY 14
-#define CP_ROOTDISPERSION 15
-#define CP_REFID 16
-#define CP_REFTIME 17
-#define CP_ORG 18
-#define CP_REC 19
-#define CP_XMT 20
-#define CP_REACH 21
-#define CP_VALID 22
-#define CP_TIMER 23
-#define CP_DELAY 24
-#define CP_OFFSET 25
-#define CP_JITTER 26
-#define CP_DISPERSION 27
-#define CP_KEYID 28
-#define CP_FILTDELAY 29
-#define CP_FILTOFFSET 30
-#define CP_PMODE 31
-#define CP_RECEIVED 32
-#define CP_SENT 33
-#define CP_FILTERROR 34
-#define CP_FLASH 35
-#define CP_TTL 36
-#define CP_RANK 37
-#define CP_VARLIST 38
-#ifdef OPENSSL
-#define CP_FLAGS 39
-#define CP_HOST 40
-#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 /* OPENSSL */
-
-/*
- * Clock variables we understand
- */
-#define CC_TYPE 1
-#define CC_TIMECODE 2
-#define CC_POLL 3
-#define CC_NOREPLY 4
-#define CC_BADFORMAT 5
-#define CC_BADDATA 6
-#define CC_FUDGETIME1 7
-#define CC_FUDGETIME2 8
-#define CC_FUDGEVAL1 9
-#define CC_FUDGEVAL2 10
-#define CC_FLAGS 11
-#define CC_DEVICE 12
-#define CC_VARLIST 13
-
-#define CC_MAXCODE CC_VARLIST
-
-/*
- * Definition of the structure used internally to hold trap information.
- * ntp_request.c wants to see this.
- */
-struct ctl_trap {
- 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 */
- u_long tr_origtime; /* time trap was originally set */
- u_long tr_resets; /* count of resets for this trap */
- u_short tr_sequence; /* trap sequence id */
- u_char tr_flags; /* trap flags */
- u_char tr_version; /* version number of trapper */
-};
-
-/*
- * Flag bits
- */
-#define TRAP_INUSE 0x1 /* this trap is active */
-#define TRAP_NONPRIO 0x2 /* this trap is non-priority */
-#define TRAP_CONFIGURED 0x4 /* this trap was configured */
-
-/*
- * Types of things we may deal with
- * shared between ntpq and library
- */
-#define TYPE_SYS 1
-#define TYPE_PEER 2
-#define TYPE_CLOCK 3
diff --git a/contrib/ntp/include/ntp_crypto.h b/contrib/ntp/include/ntp_crypto.h
deleted file mode 100644
index fb1955c..0000000
--- a/contrib/ntp/include/ntp_crypto.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * ntp_crypto.h - definitions for cryptographic operations
- */
-#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 */
-
-#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 */
-
-/*
- * Flags used for certificate management
- */
-#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_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 */
-
-/*
- * 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 */
-
-/*
- * Configuration codes
- */
-#define CRYPTO_CONF_NONE 0 /* nothing doing */
-#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 */
-};
-
-/*
- * The certificate info/value structure
- */
-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 */
-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 sys_tai; /* current UTC offset from TAI */
-#endif /* OPENSSL */
diff --git a/contrib/ntp/include/ntp_datum.h b/contrib/ntp/include/ntp_datum.h
deleted file mode 100644
index 2aa2cb7..0000000
--- a/contrib/ntp/include/ntp_datum.h
+++ /dev/null
@@ -1,30 +0,0 @@
-struct btfp_time /* Structure for reading 5 time words */
- /* in one ioctl(2) operation. */
-{
- unsigned short btfp_time[5]; /* Time words 0,1,2,3, and 4. (16bit)*/
-};
-
-/***** Simple ioctl commands *****/
-
-#define RUNLOCK _IO('X',19) /* Release Capture Lockout */
-#define RCR0 _IOR('X',22,unsigned int) /* Read control register */
-#define WCR0 _IOW('X',23,unsigned int) /* Write control register */
-
-/***** Compound ioctl commands *****/
-
-/* Read all 5 time words in one call. */
-#define READTIME _IOR('X',32,struct btfp_time)
-#define VMEFD "/dev/btfp0"
-
- struct vmedate { /* structure returned by get_vmetime.c */
- unsigned short year;
- unsigned short doy;
- unsigned short hr;
- unsigned short mn;
- unsigned short sec;
- unsigned long frac;
- unsigned short status;
- };
-
-#define PRIO 120 /* set the realtime priority */
-#define NREGS 7 /* number of registers we will use */
diff --git a/contrib/ntp/include/ntp_filegen.h b/contrib/ntp/include/ntp_filegen.h
deleted file mode 100644
index 8217dbc..0000000
--- a/contrib/ntp/include/ntp_filegen.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * ntp_filegen.h,v 3.9 1996/12/01 16:02:45 kardel Exp
- *
- * definitions for NTP file generations support
- *
- *
- * Copyright (C) 1992, 1996 by Rainer Pruy
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * This code may be modified and used freely
- * provided the credits remain intact.
- */
-
-#include "ntp_types.h"
-
-/*
- * supported file generation types
- */
-
-#define FILEGEN_NONE 255 /* no generations - use plain file name */
-#define FILEGEN_PID 1 /* one filegen per process incarnation */
-#define FILEGEN_DAY 2 /* one filegen per day */
-#define FILEGEN_WEEK 3 /* one filegen per week */
-#define FILEGEN_MONTH 4 /* one filegen per month */
-#define FILEGEN_YEAR 5 /* one filegen per year */
-#define FILEGEN_AGE 6 /* change filegen each FG_AGE_SECS */
-
-/*
- * supported file generation flags
- */
-
-#define FGEN_FLAG_LINK 0x01 /* make a link to base name */
-
-#define FGEN_FLAG_ENABLED 0x80 /* set this to really create files */
- /* without this, open is suppressed */
-
-typedef struct FILEGEN
- {
- FILE *fp; /* file referring to current generation */
- char *prefix; /* filename prefix and basename to be used*/
- char *basename; /* for constructing filename of generation file */
- /* WARNING: must be malloced !!! will be fed to free()*/
- u_long id; /* id of current generation */
- u_char type; /* type of file generation */
- u_char flag; /* flags modifying processing of file generation */
- } FILEGEN;
-
-extern void filegen_setup P((FILEGEN *, u_long));
-extern void filegen_config P((FILEGEN *, char *, u_int, u_int));
-extern FILEGEN *filegen_get P((char *));
-extern void filegen_register P((const char *, FILEGEN *));
diff --git a/contrib/ntp/include/ntp_fp.h b/contrib/ntp/include/ntp_fp.h
deleted file mode 100644
index 256bab8..0000000
--- a/contrib/ntp/include/ntp_fp.h
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * ntp_fp.h - definitions for NTP fixed/floating-point arithmetic
- */
-
-#ifndef NTP_FP_H
-#define NTP_FP_H
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include "ntp_rfc2553.h"
-#include <netinet/in.h>
-
-#include "ntp_types.h"
-
-/*
- * NTP uses two fixed point formats. The first (l_fp) is the "long"
- * format and is 64 bits long with the decimal between bits 31 and 32.
- * This is used for time stamps in the NTP packet header (in network
- * byte order) and for internal computations of offsets (in local host
- * byte order). We use the same structure for both signed and unsigned
- * values, which is a big hack but saves rewriting all the operators
- * twice. Just to confuse this, we also sometimes just carry the
- * fractional part in calculations, in both signed and unsigned forms.
- * Anyway, an l_fp looks like:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Integral Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Fractional Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-typedef struct {
- union {
- u_int32 Xl_ui;
- int32 Xl_i;
- } Ul_i;
- union {
- u_int32 Xl_uf;
- int32 Xl_f;
- } Ul_f;
-} l_fp;
-
-#define l_ui Ul_i.Xl_ui /* unsigned integral part */
-#define l_i Ul_i.Xl_i /* signed integral part */
-#define l_uf Ul_f.Xl_uf /* unsigned fractional part */
-#define l_f Ul_f.Xl_f /* signed fractional part */
-
-/*
- * Fractional precision (of an l_fp) is actually the number of
- * bits in a long.
- */
-#define FRACTION_PREC (32)
-
-
-/*
- * The second fixed point format is 32 bits, with the decimal between
- * bits 15 and 16. There is a signed version (s_fp) and an unsigned
- * version (u_fp). This is used to represent synchronizing distance
- * and synchronizing dispersion in the NTP packet header (again, in
- * network byte order) and internally to hold both distance and
- * dispersion values (in local byte order). In network byte order
- * it looks like:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Integer Part | Fraction Part |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- */
-typedef int32 s_fp;
-typedef u_int32 u_fp;
-
-/*
- * A unit second in fp format. Actually 2**(half_the_bits_in_a_long)
- */
-#define FP_SECOND (0x10000)
-
-/*
- * Byte order conversions
- */
-#define HTONS_FP(x) (htonl(x))
-#define HTONL_FP(h, n) do { (n)->l_ui = htonl((h)->l_ui); \
- (n)->l_uf = htonl((h)->l_uf); } while (0)
-#define NTOHS_FP(x) (ntohl(x))
-#define NTOHL_FP(n, h) do { (h)->l_ui = ntohl((n)->l_ui); \
- (h)->l_uf = ntohl((n)->l_uf); } while (0)
-#define NTOHL_MFP(ni, nf, hi, hf) \
- do { (hi) = ntohl(ni); (hf) = ntohl(nf); } while (0)
-#define HTONL_MFP(hi, hf, ni, nf) \
- do { (ni) = ntohl(hi); (nf) = ntohl(hf); } while (0)
-
-/* funny ones. Converts ts fractions to net order ts */
-#define HTONL_UF(uf, nts) \
- do { (nts)->l_ui = 0; (nts)->l_uf = htonl(uf); } while (0)
-#define HTONL_F(f, nts) do { (nts)->l_uf = htonl(f); \
- if ((f) & 0x80000000) \
- (nts)->l_i = -1; \
- else \
- (nts)->l_i = 0; \
- } while (0)
-
-/*
- * Conversions between the two fixed point types
- */
-#define MFPTOFP(x_i, x_f) (((x_i) >= 0x00010000) ? 0x7fffffff : \
- (((x_i) <= -0x00010000) ? 0x80000000 : \
- (((x_i)<<16) | (((x_f)>>16)&0xffff))))
-#define LFPTOFP(v) MFPTOFP((v)->l_i, (v)->l_f)
-
-#define UFPTOLFP(x, v) ((v)->l_ui = (u_fp)(x)>>16, (v)->l_uf = (x)<<16)
-#define FPTOLFP(x, v) (UFPTOLFP((x), (v)), (x) < 0 ? (v)->l_ui -= 0x10000 : 0)
-
-#define MAXLFP(v) ((v)->l_ui = 0x7fffffff, (v)->l_uf = 0xffffffff)
-#define MINLFP(v) ((v)->l_ui = 0x80000000, (v)->l_uf = 0)
-
-/*
- * Primitive operations on long fixed point values. If these are
- * reminiscent of assembler op codes it's only because some may
- * be replaced by inline assembler for particular machines someday.
- * These are the (kind of inefficient) run-anywhere versions.
- */
-#define M_NEG(v_i, v_f) /* v = -v */ \
- do { \
- if ((v_f) == 0) \
- (v_i) = -((s_fp)(v_i)); \
- else { \
- (v_f) = -((s_fp)(v_f)); \
- (v_i) = ~(v_i); \
- } \
- } while(0)
-
-#define M_NEGM(r_i, r_f, a_i, a_f) /* r = -a */ \
- do { \
- if ((a_f) == 0) { \
- (r_f) = 0; \
- (r_i) = -(a_i); \
- } else { \
- (r_f) = -(a_f); \
- (r_i) = ~(a_i); \
- } \
- } while(0)
-
-#define M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += (a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } while (0)
-
-#define M_ADD3(r_ovr, r_i, r_f, a_ovr, a_i, a_f) /* r += a, three word */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- lo_tmp = ((r_f) & 0xffff) + ((a_f) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) + (((a_f) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- lo_tmp = ((r_i) & 0xffff) + ((a_i) & 0xffff); \
- if (hi_tmp & 0x10000) \
- lo_tmp++; \
- hi_tmp = (((r_i) >> 16) & 0xffff) + (((a_i) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_i) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_ovr) += (a_ovr); \
- if (hi_tmp & 0x10000) \
- (r_ovr)++; \
- } while (0)
-
-#define M_SUB(r_i, r_f, a_i, a_f) /* r -= a */ \
- do { \
- register u_int32 lo_tmp; \
- register u_int32 hi_tmp; \
- \
- if ((a_f) == 0) { \
- (r_i) -= (a_i); \
- } else { \
- lo_tmp = ((r_f) & 0xffff) + ((-((s_fp)(a_f))) & 0xffff); \
- hi_tmp = (((r_f) >> 16) & 0xffff) \
- + (((-((s_fp)(a_f))) >> 16) & 0xffff); \
- if (lo_tmp & 0x10000) \
- hi_tmp++; \
- (r_f) = ((hi_tmp & 0xffff) << 16) | (lo_tmp & 0xffff); \
- \
- (r_i) += ~(a_i); \
- if (hi_tmp & 0x10000) \
- (r_i)++; \
- } \
- } while (0)
-
-#define M_RSHIFTU(v_i, v_f) /* v >>= 1, v is unsigned */ \
- do { \
- (v_f) = (u_int32)(v_f) >> 1; \
- if ((v_i) & 01) \
- (v_f) |= 0x80000000; \
- (v_i) = (u_int32)(v_i) >> 1; \
- } while (0)
-
-#define M_RSHIFT(v_i, v_f) /* v >>= 1, v is signed */ \
- do { \
- (v_f) = (u_int32)(v_f) >> 1; \
- if ((v_i) & 01) \
- (v_f) |= 0x80000000; \
- if ((v_i) & 0x80000000) \
- (v_i) = ((v_i) >> 1) | 0x80000000; \
- else \
- (v_i) = (v_i) >> 1; \
- } while (0)
-
-#define M_LSHIFT(v_i, v_f) /* v <<= 1 */ \
- do { \
- (v_i) <<= 1; \
- if ((v_f) & 0x80000000) \
- (v_i) |= 0x1; \
- (v_f) <<= 1; \
- } while (0)
-
-#define M_LSHIFT3(v_ovr, v_i, v_f) /* v <<= 1, with overflow */ \
- do { \
- (v_ovr) <<= 1; \
- if ((v_i) & 0x80000000) \
- (v_ovr) |= 0x1; \
- (v_i) <<= 1; \
- if ((v_f) & 0x80000000) \
- (v_i) |= 0x1; \
- (v_f) <<= 1; \
- } while (0)
-
-#define M_ADDUF(r_i, r_f, uf) /* r += uf, uf is u_int32 fraction */ \
- M_ADD((r_i), (r_f), 0, (uf)) /* let optimizer worry about it */
-
-#define M_SUBUF(r_i, r_f, uf) /* r -= uf, uf is u_int32 fraction */ \
- M_SUB((r_i), (r_f), 0, (uf)) /* let optimizer worry about it */
-
-#define M_ADDF(r_i, r_f, f) /* r += f, f is a int32 fraction */ \
- do { \
- if ((f) > 0) \
- M_ADD((r_i), (r_f), 0, (f)); \
- else if ((f) < 0) \
- M_ADD((r_i), (r_f), (-1), (f));\
- } while(0)
-
-#define M_ISNEG(v_i, v_f) /* v < 0 */ \
- (((v_i) & 0x80000000) != 0)
-
-#define M_ISHIS(a_i, a_f, b_i, b_f) /* a >= b unsigned */ \
- (((u_int32)(a_i)) > ((u_int32)(b_i)) || \
- ((a_i) == (b_i) && ((u_int32)(a_f)) >= ((u_int32)(b_f))))
-
-#define M_ISGEQ(a_i, a_f, b_i, b_f) /* a >= b signed */ \
- (((int32)(a_i)) > ((int32)(b_i)) || \
- ((a_i) == (b_i) && ((u_int32)(a_f)) >= ((u_int32)(b_f))))
-
-#define M_ISEQU(a_i, a_f, b_i, b_f) /* a == b unsigned */ \
- ((a_i) == (b_i) && (a_f) == (b_f))
-
-/*
- * Operations on the long fp format
- */
-#define L_ADD(r, a) M_ADD((r)->l_ui, (r)->l_uf, (a)->l_ui, (a)->l_uf)
-#define L_SUB(r, a) M_SUB((r)->l_ui, (r)->l_uf, (a)->l_ui, (a)->l_uf)
-#define L_NEG(v) M_NEG((v)->l_ui, (v)->l_uf)
-#define L_ADDUF(r, uf) M_ADDUF((r)->l_ui, (r)->l_uf, (uf))
-#define L_SUBUF(r, uf) M_SUBUF((r)->l_ui, (r)->l_uf, (uf))
-#define L_ADDF(r, f) M_ADDF((r)->l_ui, (r)->l_uf, (f))
-#define L_RSHIFT(v) M_RSHIFT((v)->l_i, (v)->l_uf)
-#define L_RSHIFTU(v) M_RSHIFT((v)->l_ui, (v)->l_uf)
-#define L_LSHIFT(v) M_LSHIFT((v)->l_ui, (v)->l_uf)
-#define L_CLR(v) ((v)->l_ui = (v)->l_uf = 0)
-
-#define L_ISNEG(v) (((v)->l_ui & 0x80000000) != 0)
-#define L_ISZERO(v) ((v)->l_ui == 0 && (v)->l_uf == 0)
-#define L_ISHIS(a, b) ((a)->l_ui > (b)->l_ui || \
- ((a)->l_ui == (b)->l_ui && (a)->l_uf >= (b)->l_uf))
-#define L_ISGEQ(a, b) ((a)->l_i > (b)->l_i || \
- ((a)->l_i == (b)->l_i && (a)->l_uf >= (b)->l_uf))
-#define L_ISEQU(a, b) M_ISEQU((a)->l_ui, (a)->l_uf, (b)->l_ui, (b)->l_uf)
-
-/*
- * s_fp/double and u_fp/double conversions
- */
-#define FRIC 65536. /* 2^16 as a double */
-#define DTOFP(r) ((s_fp)((r) * FRIC))
-#define DTOUFP(r) ((u_fp)((r) * FRIC))
-#define FPTOD(r) ((double)(r) / FRIC)
-
-/*
- * l_fp/double conversions
- */
-#define FRAC 4294967296. /* 2^32 as a double */
-#define M_DTOLFP(d, r_i, r_uf) /* double to l_fp */ \
- do { \
- register double d_tmp; \
- \
- d_tmp = (d); \
- if (d_tmp < 0) { \
- d_tmp = -d_tmp; \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
- M_NEG((r_i), (r_uf)); \
- } else { \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
- } \
- } while (0)
-#define M_LFPTOD(r_i, r_uf, d) /* l_fp to double */ \
- do { \
- register l_fp l_tmp; \
- \
- l_tmp.l_i = (r_i); \
- l_tmp.l_f = (r_uf); \
- if (l_tmp.l_i < 0) { \
- M_NEG(l_tmp.l_i, l_tmp.l_uf); \
- (d) = -((double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC); \
- } else { \
- (d) = (double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC; \
- } \
- } while (0)
-#define DTOLFP(d, v) M_DTOLFP((d), (v)->l_ui, (v)->l_uf)
-#define LFPTOD(v, d) M_LFPTOD((v)->l_ui, (v)->l_uf, (d))
-
-/*
- * Prototypes
- */
-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, 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 *));
-extern char * prettydate P((l_fp *));
-extern char * gmprettydate P((l_fp *));
-extern char * uglydate P((l_fp *));
-extern void mfp_mul P((int32 *, u_int32 *, int32, u_int32, int32, u_int32));
-
-extern void get_systime P((l_fp *));
-extern int step_systime P((double));
-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 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)
-#define ulfptoa(_fpv, _ndec) dolfptoa((_fpv)->l_ui, (_fpv)->l_uf, 0, (_ndec), 0)
-#define ulfptoms(_fpv, _ndec) dolfptoa((_fpv)->l_ui, (_fpv)->l_uf, 0, (_ndec), 1)
-#define umfptoa(_fpi, _fpf, _ndec) dolfptoa((_fpi), (_fpf), 0, (_ndec), 0)
-
-#endif /* NTP_FP_H */
diff --git a/contrib/ntp/include/ntp_if.h b/contrib/ntp/include/ntp_if.h
deleted file mode 100644
index 3af5865..0000000
--- a/contrib/ntp/include/ntp_if.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Sockets are not standard.
- * So hide uglyness in include file.
- */
-/* was: defined(SYS_CONVEXOS9) */
-#if defined(HAVE__SYS_SYNC_QUEUE_H) && defined(HAVE__SYS_SYNC_SEMA_H)
-# include "/sys/sync/queue.h"
-# include "/sys/sync/sema.h"
-#endif
-
-/* was: (defined(SYS_SOLARIS) && !defined(bsd)) || defined(SYS_SUNOS4) */
-/* was: defined(SYS_UNIXWARE1) */
-#ifdef HAVE_SYS_SOCKIO_H
-# include <sys/sockio.h>
-#endif
-
-/* was: #if defined(SYS_PTX) || defined(SYS_SINIXM) */
-#ifdef HAVE_SYS_STREAM_H
-# include <sys/stream.h>
-#endif
-#ifdef HAVE_SYS_STROPTS_H
-# include <sys/stropts.h>
-#endif
-
-#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
deleted file mode 100644
index 983c6c7..0000000
--- a/contrib/ntp/include/ntp_io.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#if !defined _NTP_IO_H
-#define _NTP_IO_H
-/*
- * POSIX says use <fnct.h> to get O_* symbols and
- * SEEK_SET symbol form <unistd.h>.
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#include <stdio.h>
-#ifdef HAVE_SYS_FILE_H
-# include <sys/file.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-#if !defined(SEEK_SET) && defined(L_SET)
-# define SEEK_SET L_SET
-#endif
-
-#ifdef SYS_WINNT
-# include <io.h>
-# 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
deleted file mode 100644
index 65ef5be..0000000
--- a/contrib/ntp/include/ntp_machine.h
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- * Collect all machine dependent idiosyncrasies in one place.
- */
-
-#ifndef __ntp_machine
-#define __ntp_machine
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-#include "ntp_proto.h"
-
-/*
-
- HEY! CHECK THIS OUT!
-
- The first half of this file is obsolete, and is only there to help
- reconcile "what went before" with "current behavior".
-
- The per-system SYS_* #defins ARE NO LONGER USED, with the temporary
- exception of SYS_WINNT.
-
- If you find a hunk of code that is bracketed by a SYS_* macro and you
- *know* that it is still needed, please let us know. In many cases the
- code fragment is now handled somewhere else by autoconf choices.
-
-*/
-
-/*
-
-INFO ON NEW KERNEL PLL SYS CALLS
-
- NTP_SYSCALLS_STD - use the "normal" ones
- NTP_SYSCALL_GET - SYS_ntp_gettime id
- NTP_SYSCALL_ADJ - SYS_ntp_adjtime id
- NTP_SYSCALLS_LIBC - ntp_adjtime() and ntp_gettime() are in libc.
-
-HOW TO GET IP INTERFACE INFORMATION
-
- Some UNIX V.4 machines implement a sockets library on top of
- streams. For these systems, you must use send the SIOCGIFCONF down
- the stream in an I_STR ioctl. This ususally also implies
- USE_STREAMS_DEVICE FOR IF_CONFIG. Dell UNIX is a notable exception.
-
- STREAMS_TLI - use ioctl(I_STR) to implement ioctl(SIOCGIFCONF)
-
-WHAT DOES IOCTL(SIOCGIFCONF) RETURN IN THE BUFFER
-
- UNIX V.4 machines implement a sockets library on top of streams.
- When requesting the IP interface configuration with an ioctl(2) calll,
- an array of ifreq structures are placed in the provided buffer. Some
- implementations also place the length of the buffer information in
- the first integer position of the buffer.
-
- SIZE_RETURNED_IN_BUFFER - size integer is in the buffer
-
-WILL IOCTL(SIOCGIFCONF) WORK ON A SOCKET
-
- Some UNIX V.4 machines do not appear to support ioctl() requests for the
- IP interface configuration on a socket. They appear to require the use
- of the streams device instead.
-
- USE_STREAMS_DEVICE_FOR_IF_CONFIG - use the /dev/ip device for configuration
-
-MISC
-
- HAVE_PROTOTYPES - Prototype functions
- DOSYNCTODR - Resync TODR clock every hour.
- RETSIGTYPE - Define signal function type.
- NO_SIGNED_CHAR_DECL - No "signed char" see include/ntp.h
- LOCK_PROCESS - Have plock.
- UDP_WILDCARD_DELIVERY
- - these systems deliver broadcast packets to the wildcard
- port instead to a port bound to the interface bound
- to the correct broadcast address - are these
- implementations broken or did the spec change ?
-*/
-
-/*
- * Set up for prototyping (duplicated from ntp_types.h)
- */
-#ifndef P
-#if defined(__STDC__) || defined(HAVE_PROTOTYPES)
-#define P(x) x
-#else /* not __STDC__ and not HAVE_PROTOTYPES */
-#define P(x) ()
-#endif /* not __STDC__ and not HAVE_PROTOTYPES */
-#endif /* P */
-
-#if 0
-
-/*
- * IRIX 4.X and IRIX 5.x
- */
-#if defined(SYS_IRIX4)||defined(SYS_IRIX5)
-# define ADJTIME_IS_ACCURATE
-# define LOCK_PROCESS
-#endif
-
-/*
- * Ultrix
- * Note: posix version has NTP_POSIX_SOURCE and HAVE_SIGNALED_IO
- */
-#if defined(SYS_ULTRIX)
-# define S_CHAR_DEFINED
-# define NTP_SYSCALLS_STD
-# define HAVE_MODEM_CONTROL
-#endif
-
-/*
- * AUX
- */
-#if defined(SYS_AUX2) || defined(SYS_AUX3)
-# define NO_SIGNED_CHAR_DECL
-# define LOCK_PROCESS
-# define NTP_POSIX_SOURCE
-/*
- * This requires that _POSIX_SOURCE be forced on the
- * compiler command flag. We can't do it here since this
- * file is included _after_ the system header files and we
- * need to let _them_ know we're POSIX. We do this in
- * compilers/aux3.gcc...
- */
-# define LOG_NTP LOG_LOCAL1
-#endif
-
-/*
- * HPUX
- */
-#if defined(SYS_HPUX)
-# define getdtablesize() sysconf(_SC_OPEN_MAX)
-# define setlinebuf(f) setvbuf(f, NULL, _IOLBF, 0)
-# define NO_SIGNED_CHAR_DECL
-# define LOCK_PROCESS
-#endif
-
-/*
- * BSD/OS 2.0 and above
- */
-#if defined(SYS_BSDI)
-# define USE_FSETOWNCTTY /* this funny system demands a CTTY for FSETOWN */
-#endif
-
-/*
- * FreeBSD 2.0 and above
- */
-#ifdef SYS_FREEBSD
-# define KERNEL_PLL
-#endif
-
-/*
- * Linux
- */
-#if defined(SYS_LINUX)
-# define ntp_adjtime __adjtimex
-#endif
-
-/*
- * PTX
- */
-#if defined(SYS_PTX)
-# define LOCK_PROCESS
-struct timezone { int __0; }; /* unused placebo */
-/*
- * no comment !@!
- */
-typedef unsigned int u_int;
-# ifndef _NETINET_IN_SYSTM_INCLUDED /* i am about to comment... */
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned long u_long;
-# endif
-#endif
-
-/*
- * UNIX V.4 on and NCR 3000
- */
-#if defined(SYS_SVR4)
-# define STREAM
-# define LOCK_PROCESS
-# define SIZE_RETURNED_IN_BUFFER
-#endif
-
-/*
- * (Univel/Novell) Unixware1 SVR4 on intel x86 processor
- */
-#if defined(SYS_UNIXWARE1)
-/* #define _POSIX_SOURCE */
-# define STREAM
-# define STREAMS
-# undef STEP_SLEW /* TWO step */
-# define LOCK_PROCESS
-# define SIZE_RETURNED_IN_BUFFER
-# include <sys/sockio.h>
-# include <sys/types.h>
-# include <netinet/in_systm.h>
-#endif
-
-/*
- * DomainOS
- */
-#if defined(SYS_DOMAINOS)
-# define NTP_SYSCALLS_STD
-/* older versions of domain/os don't have class D */
-# ifndef IN_CLASSD
-# define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
-# define IN_CLASSD_NET 0xf0000000
-# define IN_CLASSD_NSHIFT 28
-# define IN_CLASSD_HOST 0xfffffff
-# define IN_MULTICAST(i) IN_CLASSD(i)
-# endif
-#endif
-
-/*
- * Fujitsu UXP/V
- */
-#if defined(SYS_UXPV)
-# define LOCK_PROCESS
-# define SIZE_RETURNED_IN_BUFFER
-#endif
-
-
-#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)
-# 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
-# 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));
-
-#if defined (SYS_CYGWIN32)
-#include <windows.h>
-#define __int64 long long
-#endif
-
-/*casey Tue May 27 15:45:25 SAT 1997*/
-#ifdef SYS_VXWORKS
-
-/* casey's new defines */
-#define NO_MAIN_ALLOWED 1
-#define NO_NETDB 1
-#define NO_RENAME 1
-
-/* in vxWorks we use FIONBIO, but the others are defined for old systems, so
- * all hell breaks loose if we leave them defined we define USE_FIONBIO to
- * undefine O_NONBLOCK FNDELAY O_NDELAY where necessary.
- */
-#define USE_FIONBIO 1
-/* end my new defines */
-
-#define TIMEOFDAY 0x0 /* system wide realtime clock */
-#define HAVE_GETCLOCK 1 /* configure does not set this ... */
-#define HAVE_NO_NICE 1 /* configure does not set this ... */
-#define HAVE_RANDOM 1 /* configure does not set this ... */
-#define HAVE_SRANDOM 1 /* configure does not set this ... */
-
-#define NODETACH 1
-
-/* vxWorks specific additions to take care of its
- * unix (non)complicance
- */
-
-#include "vxWorks.h"
-#include "ioLib.h"
-#include "taskLib.h"
-#include "time.h"
-
-extern int sysClkRateGet P(());
-
-/* usrtime.h
- * Bob Herlien's excellent time code find it at:
- * ftp://ftp.atd.ucar.edu/pub/vxworks/vx/usrTime.shar
- * I would recommend this instead of clock_[g|s]ettime() plus you get
- * adjtime() too ... casey
- */
-/*
-extern int gettimeofday P(( struct timeval *tp, struct timezone *tzp ));
-extern int settimeofday P((struct timeval *, struct timezone *));
-extern int adjtime P(( struct timeval *delta, struct timeval *olddelta ));
- */
-
-/* in machines.c */
-extern void sleep P((int seconds));
-extern void alarm P((int seconds));
-/* machines.c */
-
-
-/* this is really this */
-#define getpid taskIdSelf
-#define getclock clock_gettime
-#define fcntl ioctl
-#define _getch getchar
-#define random rand
-#define srandom srand
-
-/* define this away for vxWorks */
-#define openlog(x,y)
-/* use local defines for these */
-#undef min
-#undef max
-
-#endif /* SYS_VXWORKS */
-
-#ifdef NO_NETDB
-/* These structures are needed for gethostbyname() etc... */
-/* structures used by netdb.h */
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-extern int h_errno;
-
-#define TRY_AGAIN 2
-
-struct hostent *gethostbyname P((char * netnum));
-struct hostent *gethostbyaddr P((char * netnum, int size, int addr_type));
-/* type is the protocol */
-struct servent *getservbyname P((char *name, char *type));
-#endif /* NO_NETDB */
-
-#ifdef NO_MAIN_ALLOWED
-/* we have no main routines so lets make a plan */
-#define CALL(callname, progname, callmain) \
- extern int callmain (int,char**); \
- void callname (a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
- char *a0; \
- char *a1; \
- char *a2; \
- char *a3; \
- char *a4; \
- char *a5; \
- char *a6; \
- char *a7; \
- char *a8; \
- char *a9; \
- char *a10; \
- { \
- char *x[11]; \
- int argc; \
- char *argv[] = {progname,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; \
- int i; \
- for (i=0;i<11;i++) \
- x[i] = NULL; \
- x[0] = a0; \
- x[1] = a1; \
- x[2] = a2; \
- x[3] = a3; \
- x[4] = a4; \
- x[5] = a5; \
- x[6] = a6; \
- x[7] = a7; \
- x[8] = a8; \
- x[9] = a9; \
- x[10] = a10; \
- argc=1; \
- for (i=0; i<11;i++) \
- if (x[i]) \
- { \
- argv[argc++] = x[i]; \
- } \
- callmain(argc,argv); \
- }
-#endif /* NO_MAIN_ALLOWED */
-/*casey Tue May 27 15:45:25 SAT 1997*/
-
-/*
- * Here's where autoconfig starts to take over
- */
-#ifdef HAVE_SYS_STROPTS_H
-# ifdef HAVE_SYS_STREAM_H
-# define STREAM
-# endif
-#endif
-
-#ifndef RETSIGTYPE
-# if defined(NTP_POSIX_SOURCE)
-# define RETSIGTYPE void
-# else
-# define RETSIGTYPE int
-# endif
-#endif
-
-#ifdef NTP_SYSCALLS_STD
-# ifndef NTP_SYSCALL_GET
-# define NTP_SYSCALL_GET 235
-# endif
-# ifndef NTP_SYSCALL_ADJ
-# define NTP_SYSCALL_ADJ 236
-# endif
-#endif /* NTP_SYSCALLS_STD */
-
-#ifdef MPE
-# include <sys/types.h>
-# include <netinet/in.h>
-# include <stdio.h>
-# include <time.h>
-
-/* missing functions that are easily renamed */
-
-# define _getch getchar
-
-/* special functions that require MPE-specific wrappers */
-
-# define bind __ntp_mpe_bind
-# define fcntl __ntp_mpe_fcntl
-
-/* standard macros missing from MPE include files */
-
-# define IN_CLASSD(i) ((((long)(i))&0xf0000000)==0xe0000000)
-# define IN_MULTICAST IN_CLASSD
-# define ITIMER_REAL 0
-# define MAXHOSTNAMELEN 64
-
-/* standard structures missing from MPE include files */
-
-struct itimerval {
- struct timeval it_interval; /* timer interval */
- struct timeval it_value; /* current value */
-};
-
-/* various declarations to make gcc stop complaining */
-
-extern int __filbuf(FILE *);
-extern int __flsbuf(int, FILE *);
-extern int gethostname(char *, int);
-extern unsigned long inet_addr(char *);
-extern char *strdup(const char *);
-
-/* miscellaneous NTP macros */
-
-# define HAVE_NO_NICE
-#endif /* MPE */
-
-#ifdef HAVE_RTPRIO
-# define HAVE_NO_NICE
-#else
-# ifdef HAVE_SETPRIORITY
-# define HAVE_BSD_NICE
-# else
-# ifdef HAVE_NICE
-# define HAVE_ATT_NICE
-# endif
-# endif
-#endif
-
-#if !defined(HAVE_ATT_NICE) \
- && !defined(HAVE_BSD_NICE) \
- && !defined(HAVE_NO_NICE) \
- && !defined(SYS_WINNT)
-#include "ERROR: You must define one of the HAVE_xx_NICE defines!"
-#endif
-
-/*
- * use only one tty model - no use in initialising
- * a tty in three ways
- * HAVE_TERMIOS is preferred over HAVE_SYSV_TTYS over HAVE_BSD_TTYS
- */
-
-#ifdef HAVE_TERMIOS_H
-# define HAVE_TERMIOS
-#else
-# ifdef HAVE_TERMIO_H
-# define HAVE_SYSV_TTYS
-# else
-# ifdef HAVE_SGTTY_H
-# define HAVE_BSD_TTYS
-# endif
-# endif
-#endif
-
-#ifdef HAVE_TERMIOS
-# undef HAVE_BSD_TTYS
-# 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
-
-#if !defined(SYS_WINNT) && !defined(VMS) && !defined(SYS_VXWORKS)
-# if !defined(HAVE_SYSV_TTYS) \
- && !defined(HAVE_BSD_TTYS) \
- && !defined(HAVE_TERMIOS)
-#include "ERROR: no tty type defined!"
-# endif
-#endif /* SYS_WINNT || VMS || SYS_VXWORKS*/
-
-#ifdef WORDS_BIGENDIAN
-# define XNTP_BIG_ENDIAN 1
-#else
-# define XNTP_LITTLE_ENDIAN 1
-#endif
-
-/*
- * 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
- * end first machines, but at great expense to cleanliness.
- */
-#if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
- /*
- * Pick one or the other.
- */
- BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
-#endif
-
-#if defined(XNTP_BIG_ENDIAN) && defined(XNTP_LITTLE_ENDIAN)
- /*
- * Pick one or the other.
- */
- BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
-#endif
-
-#endif /* __ntp_machine */
diff --git a/contrib/ntp/include/ntp_malloc.h b/contrib/ntp/include/ntp_malloc.h
deleted file mode 100644
index 099c83e..0000000
--- a/contrib/ntp/include/ntp_malloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Define malloc and friends.
- */
-#ifndef _ntp_malloc_h
-#define _ntp_malloc_h
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#else /* HAVE_STDLIB_H */
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# endif
-#endif /* HAVE_STDLIB_H */
-
-#endif /* _ntp_malloc_h */
diff --git a/contrib/ntp/include/ntp_md5.h b/contrib/ntp/include/ntp_md5.h
deleted file mode 100644
index bb6985a..0000000
--- a/contrib/ntp/include/ntp_md5.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * 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_proto.h b/contrib/ntp/include/ntp_proto.h
deleted file mode 100644
index e6e7855..0000000
--- a/contrib/ntp/include/ntp_proto.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __ntp_proto_h
-#define __ntp_proto_h
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#define NTP_MAXFREQ 500e-6
-
-#endif /* __ntp_proto_h */
diff --git a/contrib/ntp/include/ntp_refclock.h b/contrib/ntp/include/ntp_refclock.h
deleted file mode 100644
index 5e33a8c..0000000
--- a/contrib/ntp/include/ntp_refclock.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * ntp_refclock.h - definitions for reference clock support
- */
-
-#ifndef NTP_REFCLOCK_H
-#define NTP_REFCLOCK_H
-
-#include "ntp_types.h"
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-# ifdef TERMIOS_NEEDS__SVID3
-# define _SVID3
-# endif
-# include <termios.h>
-# ifdef TERMIOS_NEEDS__SVID3
-# undef _SVID3
-# endif
-#endif
-
-#if defined(HAVE_SYS_MODEM_H)
-#include <sys/modem.h>
-#endif
-
-#if 0 /* If you need that, include ntp_io.h instead */
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(CLK) /* This is never defined, except perhaps by a system header file */
-#include <sys/clkdefs.h>
-#endif /* CLK */
-#endif /* STREAM */
-#endif
-
-#include "recvbuff.h"
-
-#if !defined(SYSV_TTYS) && !defined(STREAM) & !defined(BSD_TTYS)
-#define BSD_TTYS
-#endif /* SYSV_TTYS STREAM BSD_TTYS */
-
-#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
- * 127.127.t.u address
- */
-#define REFCLOCKTYPE(srcadr) ((SRCADR(srcadr) >> 8) & 0xff)
-#define REFCLOCKUNIT(srcadr) (SRCADR(srcadr) & 0xff)
-
-/*
- * List of reference clock names and descriptions. These must agree with
- * lib/clocktypes.c and ntpd/refclock_conf.c.
- */
-struct clktype {
- int code; /* driver "major" number */
- const char *clocktype; /* long description */
- const char *abbrev; /* short description */
-};
-
-/*
- * Configuration flag values
- */
-#define CLK_HAVETIME1 0x1
-#define CLK_HAVETIME2 0x2
-#define CLK_HAVEVAL1 0x4
-#define CLK_HAVEVAL2 0x8
-
-#define CLK_FLAG1 0x1
-#define CLK_FLAG2 0x2
-#define CLK_FLAG3 0x4
-#define CLK_FLAG4 0x8
-
-#define CLK_HAVEFLAG1 0x10
-#define CLK_HAVEFLAG2 0x20
-#define CLK_HAVEFLAG3 0x40
-#define CLK_HAVEFLAG4 0x80
-
-/*
- * Constant for disabling event reporting in
- * refclock_receive. ORed in leap
- * parameter
- */
-#define REFCLOCK_OWN_STATES 0x80
-
-/*
- * Structure for returning clock status
- */
-struct refclockstat {
- u_char type; /* clock type */
- u_char flags; /* clock flags */
- u_char haveflags; /* bit array of valid flags */
- u_short lencode; /* length of last timecode */
- const char *p_lastcode; /* last timecode received */
- u_int32 polls; /* transmit polls */
- u_int32 noresponse; /* no response to poll */
- u_int32 badformat; /* bad format timecode received */
- u_int32 baddata; /* invalid data timecode received */
- u_int32 timereset; /* driver resets */
- const char *clockdesc; /* ASCII description */
- double fudgetime1; /* configure fudge time1 */
- double fudgetime2; /* configure fudge time2 */
- int32 fudgeval1; /* configure fudge value1 */
- int32 fudgeval2; /* configure fudge value2 */
- u_char currentstatus; /* clock status */
- u_char lastevent; /* last exception event */
- u_char leap; /* leap bits */
- struct ctl_var *kv_list; /* additional variables */
-};
-
-/*
- * Reference clock I/O structure. Used to provide an interface between
- * the reference clock drivers and the I/O module.
- */
-struct refclockio {
- struct refclockio *next; /* link to next structure */
- void (*clock_recv) P((struct recvbuf *)); /* completion routine */
- int (*io_input) P((struct recvbuf *)); /* input routine -
- to avoid excessive buffer use
- due to small bursts
- of refclock input data */
- caddr_t srcclock; /* pointer to clock structure */
- int datalen; /* lenth of data */
- SOCKET fd; /* file descriptor */
- u_long recvcount; /* count of receive completions */
-};
-
-/*
- * Structure for returning debugging info
- */
-#define NCLKBUGVALUES 16
-#define NCLKBUGTIMES 32
-
-struct refclockbug {
- u_char nvalues; /* values following */
- u_char ntimes; /* times following */
- u_short svalues; /* values format sign array */
- u_int32 stimes; /* times format sign array */
- u_int32 values[NCLKBUGVALUES]; /* real values */
- l_fp times[NCLKBUGTIMES]; /* real times */
-};
-
-/*
- * Structure interface between the reference clock support
- * ntp_refclock.c and the driver utility routines
- */
-#define MAXSTAGE 60 /* max median filter stages */
-#define NSTAGE 5 /* default median filter stages */
-#define BMAX 128 /* max timecode length */
-#define GMT 0 /* I hope nobody sees this */
-#define MAXDIAL 60 /* max length of modem dial strings */
-
-/*
- * Line discipline flags. These require line discipline or streams
- * modules to be installed/loaded in the kernel. If specified, but not
- * installed, the code runs as if unspecified.
- */
-#define LDISC_STD 0x0 /* standard */
-#define LDISC_CLK 0x1 /* tty_clk \n intercept */
-#define LDISC_CLKPPS 0x2 /* tty_clk \377 intercept */
-#define LDISC_ACTS 0x4 /* tty_clk #* intercept */
-#define LDISC_CHU 0x8 /* depredated */
-#define LDISC_PPS 0x10 /* ppsclock, ppsapi */
-#define LDISC_RAW 0x20 /* raw binary */
-
-struct refclockproc {
- struct refclockio io; /* I/O handler structure */
- caddr_t unitptr; /* pointer to unit structure */
- u_char leap; /* leap/synchronization code */
- u_char currentstatus; /* clock status */
- u_char lastevent; /* last exception event */
- u_char type; /* clock type */
- const char *clockdesc; /* clock description */
-
- char a_lastcode[BMAX]; /* last timecode received */
- u_short lencode; /* length of last timecode */
-
- int year; /* year of eternity */
- int day; /* day of year */
- int hour; /* hour of day */
- int minute; /* minute of hour */
- int second; /* second of minute */
- long nsec; /* nanosecond of second */
- u_long yearstart; /* beginning of year */
- int coderecv; /* put pointer */
- int codeproc; /* get pointer */
- l_fp lastref; /* reference timestamp */
- l_fp lastrec; /* receive timestamp */
- double offset; /* mean offset */
- double disp; /* sample dispersion */
- double jitter; /* jitter (mean squares) */
- double filter[MAXSTAGE]; /* median filter */
-
- /*
- * Configuration data
- */
- double fudgetime1; /* fudge time1 */
- double fudgetime2; /* fudge time2 */
- u_char stratum; /* server stratum */
- u_int32 refid; /* reference identifier */
- u_char sloppyclockflag; /* fudge flags */
-
- /*
- * Status tallies
- */
- u_long timestarted; /* time we started this */
- u_long polls; /* polls sent */
- u_long noreply; /* no replies to polls */
- u_long badformat; /* bad format reply */
- u_long baddata; /* bad data reply */
-};
-
-/*
- * Structure interface between the reference clock support
- * ntp_refclock.c and particular clock drivers. This must agree with the
- * structure defined in the driver.
- */
-#define noentry 0 /* flag for null routine */
-#define NOFLAGS 0 /* flag for null flags */
-
-struct refclock {
- int (*clock_start) P((int, struct peer *));
- void (*clock_shutdown) P((int, struct peer *));
- void (*clock_poll) P((int, struct peer *));
- void (*clock_control) P((int, struct refclockstat *,
- struct refclockstat *, struct peer *));
- void (*clock_init) P((void));
- void (*clock_buginfo) P((int, struct refclockbug *, struct peer *));
- u_long clock_flags;
-};
-
-/*
- * Function prototypes
- */
-/*
- * auxiliary PPS interface (implemented by refclock_atom())
- */
-extern int pps_sample P((l_fp *));
-extern int io_addclock_simple P((struct refclockio *));
-extern int io_addclock P((struct refclockio *));
-extern void io_closeclock P((struct refclockio *));
-
-#ifdef REFCLOCK
-extern void refclock_buginfo P((struct sockaddr_storage *,
- struct refclockbug *));
-extern void refclock_control P((struct sockaddr_storage *,
- struct refclockstat *,
- struct refclockstat *));
-extern int refclock_open P((char *, int, int));
-extern void refclock_transmit P((struct peer *));
-extern int refclock_ioctl P((int, int));
-extern int refclock_process P((struct refclockproc *));
-extern void refclock_process_offset P((struct refclockproc *, l_fp, l_fp, double));
-extern void refclock_report P((struct peer *, int));
-extern int refclock_gtlin P((struct recvbuf *, char *, int,
- l_fp *));
-#endif /* REFCLOCK */
-
-#endif /* NTP_REFCLOCK_H */
diff --git a/contrib/ntp/include/ntp_request.h b/contrib/ntp/include/ntp_request.h
deleted file mode 100644
index 8166a4d..0000000
--- a/contrib/ntp/include/ntp_request.h
+++ /dev/null
@@ -1,884 +0,0 @@
-/*
- * ntp_request.h - definitions for the ntpd remote query facility
- */
-
-#ifndef _NTP_REQUEST_H
-#define _NTP_REQUEST_H
-
-#include "ntp_types.h"
-
-/*
- * A mode 7 packet is used exchanging data between an NTP server
- * and a client for purposes other than time synchronization, e.g.
- * monitoring, statistics gathering and configuration. A mode 7
- * packet has the following format:
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |R|M| VN | Mode|A| Sequence | Implementation| Req Code |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Err | Number of data items | MBZ | Size of data item |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | |
- * | Data (Minimum 0 octets, maximum 500 octets) |
- * | |
- * [...]
- * | |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Encryption Keyid (when A bit set) |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | |
- * | Message Authentication Code (when A bit set) |
- * | |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
- * where the fields are (note that the client sends requests, the server
- * responses):
- *
- * Response Bit: This packet is a response (if clear, packet is a request).
- *
- * More Bit: Set for all packets but the last in a response which
- * requires more than one packet.
- *
- * Version Number: 2 for current version
- *
- * Mode: Always 7
- *
- * Authenticated bit: If set, this packet is authenticated.
- *
- * Sequence number: For a multipacket response, contains the sequence
- * number of this packet. 0 is the first in the sequence,
- * 127 (or less) is the last. The More Bit must be set in
- * all packets but the last.
- *
- * Implementation number: The number of the implementation this request code
- * is defined by. An implementation number of zero is used
- * for requst codes/data formats which all implementations
- * agree on. Implementation number 255 is reserved (for
- * extensions, in case we run out).
- *
- * Request code: An implementation-specific code which specifies the
- * operation to be (which has been) performed and/or the
- * format and semantics of the data included in the packet.
- *
- * Err: Must be 0 for a request. For a response, holds an error
- * code relating to the request. If nonzero, the operation
- * requested wasn't performed.
- *
- * 0 - no error
- * 1 - incompatable implementation number
- * 2 - unimplemented request code
- * 3 - format error (wrong data items, data size, packet size etc.)
- * 4 - no data available (e.g. request for details on unknown peer)
- * 5-6 I don't know
- * 7 - authentication failure (i.e. permission denied)
- *
- * Number of data items: number of data items in packet. 0 to 500
- *
- * MBZ: A reserved data field, must be zero in requests and responses.
- *
- * Size of data item: size of each data item in packet. 0 to 500
- *
- * Data: Variable sized area containing request/response data. For
- * requests and responses the size in octets must be greater
- * than or equal to the product of the number of data items
- * and the size of a data item. For requests the data area
- * must be exactly 40 octets in length. For responses the
- * data area may be any length between 0 and 500 octets
- * inclusive.
- *
- * Message Authentication Code: Same as NTP spec, in definition and function.
- * May optionally be included in requests which require
- * authentication, is never included in responses.
- *
- * The version number, mode and keyid have the same function and are
- * in the same location as a standard NTP packet. The request packet
- * is the same size as a standard NTP packet to ease receive buffer
- * management, and to allow the same encryption procedure to be used
- * both on mode 7 and standard NTP packets. The mac is included when
- * it is required that a request be authenticated, the keyid should be
- * zero in requests in which the mac is not included.
- *
- * The data format depends on the implementation number/request code pair
- * and whether the packet is a request or a response. The only requirement
- * is that data items start in the octet immediately following the size
- * word and that data items be concatenated without padding between (i.e.
- * if the data area is larger than data_items*size, all padding is at
- * the end). Padding is ignored, other than for encryption purposes.
- * Implementations using encryption might want to include a time stamp
- * or other data in the request packet padding. The key used for requests
- * is implementation defined, but key 15 is suggested as a default.
- */
-
-/*
- * A request packet. These are almost a fixed length.
- */
-struct req_pkt {
- u_char rm_vn_mode; /* response, more, version, mode */
- u_char auth_seq; /* key, sequence number */
- u_char implementation; /* implementation number */
- u_char request; /* request number */
- u_short err_nitems; /* error code/number of data items */
- u_short mbz_itemsize; /* item size */
- 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 */
-};
-
-/*
- * The req_pkt_tail structure is used by ntpd to adjust for different
- * packet sizes that may arrive.
- */
-struct req_pkt_tail {
- 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 */
-};
-
-/*
- * Input packet lengths. One with the mac, one without.
- */
-#define REQ_LEN_HDR 8 /* 4 * u_char + 2 * u_short */
-#define REQ_LEN_MAC (sizeof(struct req_pkt))
-#define REQ_LEN_NOMAC (sizeof(struct req_pkt) - MAX_MAC_LEN)
-
-/*
- * A response packet. The length here is variable, this is a
- * maximally sized one. Note that this implementation doesn't
- * authenticate responses.
- */
-#define RESP_HEADER_SIZE (8)
-#define RESP_DATA_SIZE (500)
-
-struct resp_pkt {
- u_char rm_vn_mode; /* response, more, version, mode */
- u_char auth_seq; /* key, sequence number */
- u_char implementation; /* implementation number */
- u_char request; /* request number */
- u_short err_nitems; /* error code/number of data items */
- u_short mbz_itemsize; /* item size */
- char data[RESP_DATA_SIZE]; /* data area */
-};
-
-
-/*
- * Information error codes
- */
-#define INFO_OKAY 0
-#define INFO_ERR_IMPL 1 /* incompatable implementation */
-#define INFO_ERR_REQ 2 /* unknown request code */
-#define INFO_ERR_FMT 3 /* format error */
-#define INFO_ERR_NODATA 4 /* no data for this request */
-#define INFO_ERR_AUTH 7 /* authentication failure */
-
-/*
- * Maximum sequence number.
- */
-#define MAXSEQ 127
-
-
-/*
- * Bit setting macros for multifield items.
- */
-#define RESP_BIT 0x80
-#define MORE_BIT 0x40
-
-#define ISRESPONSE(rm_vn_mode) (((rm_vn_mode)&RESP_BIT)!=0)
-#define ISMORE(rm_vn_mode) (((rm_vn_mode)&MORE_BIT)!=0)
-#define INFO_VERSION(rm_vn_mode) ((u_char)(((rm_vn_mode)>>3)&0x7))
-#define INFO_MODE(rm_vn_mode) ((rm_vn_mode)&0x7)
-
-#define RM_VN_MODE(resp, more, version) \
- ((u_char)(((resp)?RESP_BIT:0)\
- |((more)?MORE_BIT:0)\
- |((version?version:(NTP_OLDVERSION+1))<<3)\
- |(MODE_PRIVATE)))
-
-#define INFO_IS_AUTH(auth_seq) (((auth_seq) & 0x80) != 0)
-#define INFO_SEQ(auth_seq) ((auth_seq)&0x7f)
-#define AUTH_SEQ(auth, seq) ((u_char)((((auth)!=0)?0x80:0)|((seq)&0x7f)))
-
-#define INFO_ERR(err_nitems) ((u_short)((ntohs(err_nitems)>>12)&0xf))
-#define INFO_NITEMS(err_nitems) ((u_short)(ntohs(err_nitems)&0xfff))
-#define ERR_NITEMS(err, nitems) (htons((u_short)((((u_short)(err)<<12)&0xf000)\
- |((u_short)(nitems)&0xfff))))
-
-#define INFO_MBZ(mbz_itemsize) ((ntohs(mbz_itemsize)>>12)&0xf)
-#define INFO_ITEMSIZE(mbz_itemsize) ((u_short)(ntohs(mbz_itemsize)&0xfff))
-#define MBZ_ITEMSIZE(itemsize) (htons((u_short)(itemsize)))
-
-
-/*
- * Implementation numbers. One for universal use and one for ntpd.
- */
-#define IMPL_UNIV 0
-#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
- * authenticated must include a time stamp which differs from
- * the receive time stamp by no more than 10 seconds.
- */
-#define INFO_TS_MAXSKEW 10.
-
-/*
- * Universal request codes go here. There aren't any.
- */
-
-/*
- * NTPD request codes go here.
- */
-#define REQ_PEER_LIST 0 /* return list of peers */
-#define REQ_PEER_LIST_SUM 1 /* return summary info for all peers */
-#define REQ_PEER_INFO 2 /* get standard information on peer */
-#define REQ_PEER_STATS 3 /* get statistics for peer */
-#define REQ_SYS_INFO 4 /* get system information */
-#define REQ_SYS_STATS 5 /* get system stats */
-#define REQ_IO_STATS 6 /* get I/O stats */
-#define REQ_MEM_STATS 7 /* stats related to peer list maint */
-#define REQ_LOOP_INFO 8 /* info from the loop filter */
-#define REQ_TIMER_STATS 9 /* get timer stats */
-#define REQ_CONFIG 10 /* configure a new peer */
-#define REQ_UNCONFIG 11 /* unconfigure an existing peer */
-#define REQ_SET_SYS_FLAG 12 /* set system flags */
-#define REQ_CLR_SYS_FLAG 13 /* clear system flags */
-#define REQ_MONITOR 14 /* (not used) */
-#define REQ_NOMONITOR 15 /* (not used) */
-#define REQ_GET_RESTRICT 16 /* return restrict list */
-#define REQ_RESADDFLAGS 17 /* add flags to restrict list */
-#define REQ_RESSUBFLAGS 18 /* remove flags from restrict list */
-#define REQ_UNRESTRICT 19 /* remove entry from restrict list */
-#define REQ_MON_GETLIST 20 /* return data collected by monitor */
-#define REQ_RESET_STATS 21 /* reset stat counters */
-#define REQ_RESET_PEER 22 /* reset peer stat counters */
-#define REQ_REREAD_KEYS 23 /* reread the encryption key file */
-#define REQ_DO_DIRTY_HACK 24 /* (not used) */
-#define REQ_DONT_DIRTY_HACK 25 /* (not used) */
-#define REQ_TRUSTKEY 26 /* add a trusted key */
-#define REQ_UNTRUSTKEY 27 /* remove a trusted key */
-#define REQ_AUTHINFO 28 /* return authentication info */
-#define REQ_TRAPS 29 /* return currently set traps */
-#define REQ_ADD_TRAP 30 /* add a trap */
-#define REQ_CLR_TRAP 31 /* clear a trap */
-#define REQ_REQUEST_KEY 32 /* define a new request keyid */
-#define REQ_CONTROL_KEY 33 /* define a new control keyid */
-#define REQ_GET_CTLSTATS 34 /* get stats from the control module */
-#define REQ_GET_LEAPINFO 35 /* (not used) */
-#define REQ_GET_CLOCKINFO 36 /* get clock information */
-#define REQ_SET_CLKFUDGE 37 /* set clock fudge factors */
-#define REQ_GET_KERNEL 38 /* get kernel pll/pps information */
-#define REQ_GET_CLKBUGINFO 39 /* get clock debugging info */
-#define REQ_SET_PRECISION 41 /* (not used) */
-#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
- */
-#define INFO_FLAG_CONFIG 0x1
-#define INFO_FLAG_SYSPEER 0x2
-#define INFO_FLAG_BURST 0x4
-#define INFO_FLAG_REFCLOCK 0x8
-#define INFO_FLAG_PREFER 0x10
-#define INFO_FLAG_AUTHENABLE 0x20
-#define INFO_FLAG_SEL_CANDIDATE 0x40
-#define INFO_FLAG_SHORTLIST 0x80
-
-/*
- * Flags in the system information returns
- */
-#define INFO_FLAG_BCLIENT 0x1
-#define INFO_FLAG_AUTHENTICATE 0x2
-#define INFO_FLAG_NTP 0x4
-#define INFO_FLAG_KERNEL 0x8
-#define INFO_FLAG_MONITOR 0x40
-#define INFO_FLAG_FILEGEN 0x80
-#define INFO_FLAG_CAL 0x10
-#define INFO_FLAG_PPS_SYNC 0x20
-
-/*
- * Peer list structure. Used to return raw lists of peers. It goes
- * without saying that everything returned is in network byte order.
- * Well, it *would* have gone without saying, but somebody said it.
- */
-struct info_peer_list {
- 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 */
-};
-
-
-/*
- * Peer summary structure. Sort of the info that ntpdc returns by default.
- */
-struct info_peer_summary {
- u_int32 dstadr; /* local address (zero for undetermined) */
- u_int32 srcadr; /* source address */
- u_short srcport; /* source port */
- u_char stratum; /* stratum of peer */
- s_char hpoll; /* host polling interval */
- s_char ppoll; /* peer polling interval */
- u_char reach; /* reachability register */
- u_char flags; /* flags, from above */
- u_char hmode; /* peer mode */
- 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) */
-};
-
-
-/*
- * Peer information structure.
- */
-struct info_peer {
- u_int32 dstadr; /* local address */
- u_int32 srcadr; /* source address */
- u_short srcport; /* remote port */
- u_char flags; /* peer flags */
- u_char leap; /* peer.leap */
- u_char hmode; /* peer.hmode */
- u_char pmode; /* peer.pmode */
- u_char stratum; /* peer.stratum */
- u_char ppoll; /* peer.ppoll */
- u_char hpoll; /* peer.hpoll */
- s_char precision; /* peer.precision */
- u_char version; /* peer.version */
- u_char unused8;
- u_char reach; /* peer.reach */
- u_char unreach; /* peer.unreach */
- u_char flash; /* old peer.flash */
- u_char ttl; /* peer.ttl */
- u_short flash2; /* new peer.flash */
- associd_t associd; /* association ID */
- keyid_t keyid; /* peer.keyid */
- u_int32 pkeyid; /* unused */
- u_int32 refid; /* peer.refid */
- u_int32 timer; /* peer.timer */
- s_fp rootdelay; /* peer.distance */
- u_fp rootdispersion; /* peer.dispersion */
- l_fp reftime; /* peer.reftime */
- l_fp org; /* peer.org */
- l_fp rec; /* peer.rec */
- l_fp xmt; /* peer.xmt */
- s_fp filtdelay[NTP_SHIFT]; /* delay shift register */
- l_fp filtoffset[NTP_SHIFT]; /* offset shift register */
- u_char order[NTP_SHIFT]; /* order of peers from last filter */
- s_fp delay; /* peer.estdelay */
- u_fp dispersion; /* peer.estdisp */
- l_fp offset; /* peer.estoffset */
- u_fp selectdisp; /* peer select dispersion */
- int32 unused1; /* (obsolete) */
- int32 unused2;
- int32 unused3;
- int32 unused4;
- int32 unused5;
- 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) */
-};
-
-
-/*
- * Peer statistics structure
- */
-struct info_peer_stats {
- u_int32 dstadr; /* local address */
- u_int32 srcadr; /* remote address */
- u_short srcport; /* remote port */
- u_short flags; /* peer flags */
- u_int32 timereset; /* time counters were reset */
- u_int32 timereceived; /* time since a packet received */
- u_int32 timetosend; /* time until a packet sent */
- u_int32 timereachable; /* time peer has been reachable */
- u_int32 sent; /* number sent */
- u_int32 unused1; /* (unused) */
- u_int32 processed; /* number processed */
- u_int32 unused2; /* (unused) */
- u_int32 badauth; /* bad authentication */
- u_int32 bogusorg; /* bogus origin */
- u_int32 oldpkt; /* duplicate */
- u_int32 unused3; /* (unused) */
- u_int32 unused4; /* (unused) */
- u_int32 seldisp; /* bad dispersion */
- u_int32 selbroken; /* bad reference time */
- u_int32 unused5; /* (unused) */
- u_char candidate; /* select order */
- 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 */
-};
-
-
-/*
- * Loop filter variables
- */
-struct info_loop {
- l_fp last_offset;
- l_fp drift_comp;
- u_int32 compliance;
- u_int32 watchdog_timer;
-};
-
-
-/*
- * System info. Mostly the sys.* variables, plus a few unique to
- * the implementation.
- */
-struct info_sys {
- 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 */
- s_char precision; /* local clock precision */
- s_fp rootdelay; /* distance from sync source */
- u_fp rootdispersion; /* dispersion from sync source */
- u_int32 refid; /* reference ID of sync source */
- l_fp reftime; /* system reference time */
- u_int32 poll; /* system poll interval */
- u_char flags; /* system flags */
- u_char unused1; /* unused */
- u_char unused2; /* unused */
- u_char unused3; /* unused */
- s_fp bdelay; /* default broadcast offset */
- 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) */
-};
-
-
-/*
- * System stats. These are collected in the protocol module
- */
-struct info_sys_stats {
- 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; /* bad authentication */
- u_int32 received; /* packets received */
- u_int32 limitrejected; /* rate exceeded */
-};
-
-
-/*
- * System stats - old version
- */
-struct old_info_sys_stats {
- 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; /* bad authentication */
- u_int32 wanderhold; /* (not used) */
-};
-
-
-/*
- * Peer memory statistics. Collected in the peer module.
- */
-struct info_mem_stats {
- u_int32 timereset; /* time since reset */
- u_short totalpeermem;
- u_short freepeermem;
- u_int32 findpeer_calls;
- u_int32 allocations;
- u_int32 demobilizations;
- u_char hashcount[HASH_SIZE];
-};
-
-
-/*
- * I/O statistics. Collected in the I/O module
- */
-struct info_io_stats {
- u_int32 timereset; /* time since reset */
- u_short totalrecvbufs; /* total receive bufs */
- u_short freerecvbufs; /* free buffers */
- u_short fullrecvbufs; /* full buffers */
- u_short lowwater; /* number of times we've added buffers */
- u_int32 dropped; /* dropped packets */
- u_int32 ignored; /* ignored packets */
- u_int32 received; /* received packets */
- u_int32 sent; /* packets sent */
- u_int32 notsent; /* packets not sent */
- u_int32 interrupts; /* interrupts we've handled */
- u_int32 int_received; /* received by interrupt handler */
-};
-
-
-/*
- * Timer stats. Guess where from.
- */
-struct info_timer_stats {
- u_int32 timereset; /* time since reset */
- u_int32 alarms; /* alarms we've handled */
- u_int32 overflows; /* timer overflows */
- u_int32 xmtcalls; /* calls to xmit */
-};
-
-
-/*
- * Structure for passing peer configuration information
- */
-struct old_conf_peer {
- u_int32 peeraddr; /* address to poll */
- u_char hmode; /* mode, either broadcast, active or client */
- u_char version; /* version number to poll with */
- u_char minpoll; /* min host poll interval */
- 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 */
- keyid_t keyid; /* key to use for this association */
-};
-
-struct conf_peer {
- u_int32 peeraddr; /* address to poll */
- u_char hmode; /* mode, either broadcast, active or client */
- u_char version; /* version number to poll with */
- u_char minpoll; /* min host poll interval */
- 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 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
-#define CONF_FLAG_PREFER 0x02
-#define CONF_FLAG_BURST 0x04
-#define CONF_FLAG_IBURST 0x08
-#define CONF_FLAG_NOSELECT 0x10
-#define CONF_FLAG_SKEY 0x20
-
-/*
- * Structure for passing peer deletion information. Currently
- * we only pass the address and delete all configured peers with
- * this addess.
- */
-struct conf_unpeer {
- u_int32 peeraddr; /* address of peer */
- u_int v6_flag; /* is this v6 or not */
- struct in6_addr peeraddr6; /* address of peer (v6) */
-};
-
-/*
- * Structure for carrying system flags.
- */
-struct conf_sys_flags {
- u_int32 flags;
-};
-
-/*
- * System flags we can set/clear
- */
-#define SYS_FLAG_BCLIENT 0x01
-#define SYS_FLAG_PPS 0x02
-#define SYS_FLAG_NTP 0x04
-#define SYS_FLAG_KERNEL 0x08
-#define SYS_FLAG_MONITOR 0x10
-#define SYS_FLAG_FILEGEN 0x20
-#define SYS_FLAG_AUTH 0x40
-#define SYS_FLAG_CAL 0x80
-
-/*
- * Structure used for returning restrict entries
- */
-struct info_restrict {
- u_int32 addr; /* match address */
- u_int32 mask; /* match mask */
- 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) */
-};
-
-
-/*
- * Structure used for specifying restrict entries
- */
-struct conf_restrict {
- 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) */
-};
-
-
-/*
- * Structure used for returning monitor data
- */
-struct info_monitor_1 {
- u_int32 lasttime; /* last packet from this host */
- 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 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 */
-};
-
-
-/*
- * Structure used for returning monitor data
- */
-struct info_monitor {
- u_int32 lasttime; /* last packet from this host */
- 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_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 */
-};
-
-/*
- * Structure used for returning monitor data (old format
- */
-struct old_info_monitor {
- u_int32 lasttime; /* last packet from this host */
- u_int32 firsttime; /* first time we received a packet */
- u_int32 count; /* count of packets received */
- u_int32 addr; /* host address */
- 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)*/
-};
-
-/*
- * Structure used for passing indication of flags to clear
- */
-struct reset_flags {
- u_int32 flags;
-};
-
-#define RESET_FLAG_ALLPEERS 0x01
-#define RESET_FLAG_IO 0x02
-#define RESET_FLAG_SYS 0x04
-#define RESET_FLAG_MEM 0x08
-#define RESET_FLAG_TIMER 0x10
-#define RESET_FLAG_AUTH 0x20
-#define RESET_FLAG_CTL 0x40
-
-#define RESET_ALLFLAGS \
- (RESET_FLAG_ALLPEERS|RESET_FLAG_IO|RESET_FLAG_SYS \
- |RESET_FLAG_MEM|RESET_FLAG_TIMER|RESET_FLAG_AUTH|RESET_FLAG_CTL)
-
-/*
- * Structure used to return information concerning the authentication
- * module.
- */
-struct info_auth {
- u_int32 timereset; /* time counters were reset */
- u_int32 numkeys; /* number of keys we know */
- u_int32 numfreekeys; /* number of free keys */
- u_int32 keylookups; /* calls to authhavekey() */
- u_int32 keynotfound; /* requested key unknown */
- u_int32 encryptions; /* number of encryptions */
- u_int32 decryptions; /* number of decryptions */
- u_int32 expired; /* number of expired keys */
- u_int32 keyuncached; /* calls to encrypt/decrypt with uncached key */
-};
-
-
-/*
- * Structure used to pass trap information to the client
- */
-struct info_trap {
- 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; /* 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) */
-};
-
-
-/*
- * Structure used to return statistics from the control module
- */
-struct info_control {
- u_int32 ctltimereset;
- u_int32 numctlreq; /* number of requests we've received */
- u_int32 numctlbadpkts; /* number of bad control packets */
- u_int32 numctlresponses; /* # resp packets sent */
- u_int32 numctlfrags; /* # of fragments sent */
- u_int32 numctlerrors; /* number of error responses sent */
- u_int32 numctltooshort; /* number of too short input packets */
- u_int32 numctlinputresp; /* number of responses on input */
- u_int32 numctlinputfrag; /* number of fragments on input */
- u_int32 numctlinputerr; /* # input pkts with err bit set */
- u_int32 numctlbadoffset; /* # input pkts with nonzero offset */
- u_int32 numctlbadversion; /* # input pkts with unknown version */
- u_int32 numctldatatooshort; /* data too short for count */
- u_int32 numctlbadop; /* bad op code found in packet */
- u_int32 numasyncmsgs; /* # async messages we've sent */
-};
-
-
-/*
- * Structure used to return clock information
- */
-struct info_clock {
- u_int32 clockadr;
- u_char type;
- u_char flags;
- u_char lastevent;
- u_char currentstatus;
- u_int32 polls;
- u_int32 noresponse;
- u_int32 badformat;
- u_int32 baddata;
- u_int32 timestarted;
- l_fp fudgetime1;
- l_fp fudgetime2;
- int32 fudgeval1;
- int32 fudgeval2;
-};
-
-
-/*
- * Structure used for setting clock fudge factors
- */
-struct conf_fudge {
- u_int32 clockadr;
- u_int32 which;
- l_fp fudgetime;
- int32 fudgeval_flags;
-};
-
-#define FUDGE_TIME1 1
-#define FUDGE_TIME2 2
-#define FUDGE_VAL1 3
-#define FUDGE_VAL2 4
-#define FUDGE_FLAGS 5
-
-
-/*
- * Structure used for returning clock debugging info
- */
-#define NUMCBUGVALUES 16
-#define NUMCBUGTIMES 32
-
-struct info_clkbug {
- u_int32 clockadr;
- u_char nvalues;
- u_char ntimes;
- u_short svalues;
- u_int32 stimes;
- u_int32 values[NUMCBUGVALUES];
- l_fp times[NUMCBUGTIMES];
-};
-
-/*
- * Structure used for returning kernel pll/PPS information
- */
-struct info_kernel {
- int32 offset;
- int32 freq;
- int32 maxerror;
- int32 esterror;
- u_short status;
- u_short shift;
- int32 constant;
- int32 precision;
- int32 tolerance;
-
-/*
- * Variables used only if PPS signal discipline is implemented
- */
- int32 ppsfreq;
- int32 jitter;
- int32 stabil;
- int32 jitcnt;
- int32 calcnt;
- int32 errcnt;
- int32 stbcnt;
-};
-
-/*
- * Info returned with IP -> hostname lookup
- */
-/* 144 might need to become 32, matching data[] member of req_pkt */
-#define NTP_MAXHOSTNAME (32 - sizeof(u_int32) - sizeof(u_short))
-struct info_dns_assoc {
- u_int32 peeraddr; /* peer address (HMS: being careful...) */
- 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
deleted file mode 100644
index 28ff004..0000000
--- a/contrib/ntp/include/ntp_rfc2553.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * 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_select.h b/contrib/ntp/include/ntp_select.h
deleted file mode 100644
index 79c0fc0..0000000
--- a/contrib/ntp/include/ntp_select.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Not all machines define FD_SET in sys/types.h
- */
-#ifndef _ntp_select_h
-#define _ntp_select_h
-
-/* Was: (defined(RS6000)||defined(SYS_PTX))&&!defined(_BSD) */
-/* Could say: !defined(FD_SET) && defined(HAVE_SYS_SELECT_H) */
-#if defined(HAVE_SYS_SELECT_H) && !defined(_BSD)
-#ifndef SYS_VXWORKS
-#include <sys/select.h>
-#else
-#include <sockLib.h>
-extern int select P((int width, fd_set *pReadFds, fd_set *pWriteFds,
- fd_set *pExceptFds, struct timeval *pTimeOut));
-
-#endif
-#endif
-
-#if !defined(FD_SET) && !defined(SYS_WINNT)
-#define NFDBITS 32
-#define FD_SETSIZE 32
-#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
-#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
-#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
-#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
-#endif
-
-#if defined(VMS)
-typedef struct {
- unsigned int fds_bits[1];
-} fd_set;
-#endif
-
-#endif /* _ntp_select_h */
diff --git a/contrib/ntp/include/ntp_sprintf.h b/contrib/ntp/include/ntp_sprintf.h
deleted file mode 100644
index a456a89..0000000
--- a/contrib/ntp/include/ntp_sprintf.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 3dc6fe0..0000000
--- a/contrib/ntp/include/ntp_stdlib.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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"
-#include "l_stdlib.h"
-
-/*
- * Handle gcc __attribute__ if available.
- */
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (defined(__STRICT_ANSI__))
-# define __attribute__(Spec) /* empty */
-# endif
-/* The __-protected variants of `format' and `printf' attributes
- are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-# define __format__ format
-# define __printf__ printf
-# endif
-#endif
-
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
-# 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));
-extern int auth_havekey P((keyid_t));
-extern int authdecrypt P((keyid_t, u_int32 *, int, int));
-extern int authencrypt P((keyid_t, u_int32 *, int));
-extern int authhavekey P((keyid_t));
-extern int authistrusted P((keyid_t));
-extern int authreadkeys P((const char *));
-extern void authtrust P((keyid_t, u_long));
-extern int authusekey P((keyid_t, int, const u_char *));
-
-extern u_long calleapwhen P((u_long));
-extern u_long calyearstart P((u_long));
-extern const char *clockname P((int));
-extern int clocktime P((int, int, int, int, int, u_long, u_long *, u_int32 *));
-#if defined SYS_WINNT && defined DEBUG
-# define emalloc(_c) debug_emalloc(_c, __FILE__, __LINE__)
-extern void * debug_emalloc P((u_int, char *, int));
-#else
-extern void * emalloc P((u_int));
-#endif
-extern int ntp_getopt P((int, char **, const char *));
-extern void init_auth P((void));
-extern void init_lib P((void));
-extern void init_random P((void));
-extern struct savekey *auth_findkey P((keyid_t));
-extern int auth_moremem P((void));
-extern int ymd2yd P((int, int, int));
-
-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 *));
-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, 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));
-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 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((struct sockaddr_storage *));
-extern int tsftomsu P((u_long, int));
-extern char * uinttoa P((u_long));
-
-extern int decodenetnum P((const char *, struct sockaddr_storage *));
-
-extern const char * FindConfig P((const char *));
-
-extern void signal_no_reset P((int, RETSIGTYPE (*func)(int)));
-
-extern void getauthkeys P((char *));
-extern void auth_agekeys P((void));
-extern void rereadkeys P((void));
-
-/*
- * Variable declarations for libntp.
- */
-
-/*
- * Defined by any program.
- */
-extern volatile int debug; /* debugging flag */
-
-/* authkeys.c */
-extern u_long authkeynotfound; /* keys not found */
-extern u_long authkeylookups; /* calls to lookup keys */
-extern u_long authnumkeys; /* number of active keys */
-extern u_long authkeyexpired; /* key lifetime expirations */
-extern u_long authkeyuncached; /* cache misses */
-extern u_long authencryptions; /* calls to encrypt */
-extern u_long authdecryptions; /* calls to decrypt */
-
-extern int authnumfreekeys;
-
-/*
- * The key cache. We cache the last key we looked at here.
- */
-extern keyid_t cache_keyid; /* key identifier */
-extern u_char * cache_key; /* key pointer */
-extern u_int cache_keylen; /* key length */
-
-/* clocktypes.c */
-#ifdef NTP_REFCLOCK_H
-struct clktype;
-extern struct clktype clktypes[];
-#endif
-
-/* getopt.c */
-extern char * ntp_optarg; /* global argument pointer */
-extern int ntp_optind; /* global argv index */
-
-/* machines.c */
-extern const char *set_tod_using;
-
-/* mexit.c */
-#if defined SYS_WINNT || defined SYS_CYGWIN32
-extern HANDLE hServDoneEvent;
-#endif
-
-/* systime.c */
-extern double sys_tick; /* adjtime() resolution */
-
-/* version.c */
-extern const char *Version; /* version declaration */
diff --git a/contrib/ntp/include/ntp_string.h b/contrib/ntp/include/ntp_string.h
deleted file mode 100644
index f7f0092..0000000
--- a/contrib/ntp/include/ntp_string.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Define string ops: strchr strrchr memcmp memmove memset
- */
-
-#ifndef _ntp_string_h
-#define _ntp_string_h
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_MEMORY_H
-# include <memory.h>
-#endif
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-
-#ifdef HAVE_BSTRING_H
-# include <bstring.h>
-#endif
-
-#ifndef STDC_HEADERS
-# ifndef HAVE_STRCHR
-# include <strings.h>
-# define strchr index
-# define strrchr rindex
-# endif
-# ifndef __GNUC__
-char *strchr(), *strrchr();
-# endif
-# ifndef HAVE_MEMCPY
-# define NTP_NEED_BOPS
-# endif
-#endif /* STDC_HEADERS */
-
-#ifdef NTP_NEED_BOPS
-# define memcmp(a,b,c) bcmp(a,b,(int)c)
-# define memmove(t,f,c) bcopy(f,t,(int)c)
-# define memcpy(t,f,c) bcopy(f,t,(int)c)
-# define memset(a,x,c) if (x == 0x00) bzero(a,(int)c); else ntp_memset((char*)a,x,c)
-
-void ntp_memset P((char *, int, int));
-
-#endif /* NTP_NEED_BOPS */
-
-#endif /* _ntp_string_h */
diff --git a/contrib/ntp/include/ntp_syscall.h b/contrib/ntp/include/ntp_syscall.h
deleted file mode 100644
index 521e753..0000000
--- a/contrib/ntp/include/ntp_syscall.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * ntp_syscall.h - various ways to perform the ntp_adjtime() and ntp_gettime()
- * system calls.
- */
-
-#ifndef NTP_SYSCALL_H
-#define NTP_SYSCALL_H
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_SYS_TIMEX_H
-# include <sys/timex.h>
-#endif
-
-#ifndef NTP_SYSCALLS_LIBC
-#ifdef NTP_SYSCALLS_STD
-# define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
-# define ntp_gettime(t) syscall(SYS_ntp_gettime, (t))
-#else /* !NTP_SYSCALLS_STD */
-# ifdef HAVE___ADJTIMEX
-extern int __adjtimex P((struct timex *));
-
-# define ntp_adjtime(t) __adjtimex((t))
-
-static inline int
-ntp_gettime(
- struct ntptimeval *ntv
- )
-{
- struct timex tntx;
- int result;
-
- tntx.modes = 0;
- result = __adjtimex (&tntx);
- ntv->time = tntx.time;
- ntv->maxerror = tntx.maxerror;
- ntv->esterror = tntx.esterror;
-#ifdef NTP_API
-# if NTP_API > 3
- ntv->tai = tntx.tai;
-# endif
-#endif
- return(result);
-}
-# else /* !HAVE__ADJTIMEX */
-# ifdef HAVE___NTP_GETTIME
-# define ntp_gettime(t) __ntp_gettime((t))
-# endif
-# endif /* !HAVE_ADJTIMEX */
-#endif /* !NTP_SYSCALLS_STD */
-#endif /* !NTP_SYSCALLS_LIBC */
-
-#endif /* NTP_SYSCALL_H */
diff --git a/contrib/ntp/include/ntp_syslog.h b/contrib/ntp/include/ntp_syslog.h
deleted file mode 100644
index 38021e2..0000000
--- a/contrib/ntp/include/ntp_syslog.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * A hack for platforms which require specially built syslog facilities
- */
-
-#ifndef NTP_SYSLOG_H
-#define NTP_SYSLOG_H
-
-# ifdef VMS
-extern void msyslog();
-# else
-# ifndef SYS_VXWORKS
-# include <syslog.h>
-# endif
-# endif /* VMS */
-# include <stdio.h>
-
-extern int syslogit;
-extern FILE *syslog_file;
-
-#if defined(VMS) || defined (SYS_VXWORKS)
-#define LOG_EMERG 0 /* system is unusable */
-#define LOG_ALERT 1 /* action must be taken immediately */
-#define LOG_CRIT 2 /* critical conditions */
-#define LOG_ERR 3 /* error conditions */
-#define LOG_WARNING 4 /* warning conditions */
-#define LOG_NOTICE 5 /* normal but signification condition */
-#define LOG_INFO 6 /* informational */
-#define LOG_DEBUG 7 /* debug-level messages */
-#endif /* VMS || VXWORKS */
-
-/*
- * syslog output control
- */
-#define NLOG_INFO 0x00000001
-#define NLOG_EVENT 0x00000002
-#define NLOG_STATUS 0x00000004
-#define NLOG_STATIST 0x00000008
-
-#define NLOG_OSYS 0 /* offset for system flags */
-#define NLOG_SYSMASK 0x0000000F /* system log events */
-#define NLOG_SYSINFO 0x00000001 /* system info log events */
-#define NLOG_SYSEVENT 0x00000002 /* system events */
-#define NLOG_SYSSTATUS 0x00000004 /* system status (sync/unsync) */
-#define NLOG_SYSSTATIST 0x00000008 /* system statistics output */
-
-#define NLOG_OPEER 4 /* offset for peer flags */
-#define NLOG_PEERMASK 0x000000F0 /* peer log events */
-#define NLOG_PEERINFO 0x00000010 /* peer info log events */
-#define NLOG_PEEREVENT 0x00000020 /* peer events */
-#define NLOG_PEERSTATUS 0x00000040 /* peer status (sync/unsync) */
-#define NLOG_PEERSTATIST 0x00000080 /* peer statistics output */
-
-#define NLOG_OCLOCK 8 /* offset for clock flags */
-#define NLOG_CLOCKMASK 0x00000F00 /* clock log events */
-#define NLOG_CLOCKINFO 0x00000100 /* clock info log events */
-#define NLOG_CLOCKEVENT 0x00000200 /* clock events */
-#define NLOG_CLOCKSTATUS 0x00000400 /* clock status (sync/unsync) */
-#define NLOG_CLOCKSTATIST 0x00000800 /* clock statistics output */
-
-#define NLOG_OSYNC 12 /* offset for sync flags */
-#define NLOG_SYNCMASK 0x0000F000 /* sync log events */
-#define NLOG_SYNCINFO 0x00001000 /* sync info log events */
-#define NLOG_SYNCEVENT 0x00002000 /* sync events */
-#define NLOG_SYNCSTATUS 0x00004000 /* sync status (sync/unsync) */
-#define NLOG_SYNCSTATIST 0x00008000 /* sync statistics output */
-
-extern unsigned long ntp_syslogmask;
-#define NLOG(_X_) if (ntp_syslogmask & (_X_))
-
-#endif /* NTP_SYSLOG_H */
diff --git a/contrib/ntp/include/ntp_tty.h b/contrib/ntp/include/ntp_tty.h
deleted file mode 100644
index 3e12c8d..0000000
--- a/contrib/ntp/include/ntp_tty.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * ntp_tty.h - header file for serial lines handling
- */
-
-#ifndef NTP_TTY_H
-#define NTP_TTY_H
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#define TTY struct sgttyb
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#define TTY struct termio
-#ifndef tcsetattr
-#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
-#endif
-#ifndef TCSANOW
-#define TCSANOW TCSETA
-#endif
-#ifndef TCIFLUSH
-#define TCIFLUSH 0
-#endif
-#ifndef TCOFLUSH
-#define TCOFLUSH 1
-#endif
-#ifndef TCIOFLUSH
-#define TCIOFLUSH 2
-#endif
-#ifndef tcflush
-#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
-#endif
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-# ifdef TERMIOS_NEEDS__SVID3
-# define _SVID3
-# endif
-# include <termios.h>
-# ifdef TERMIOS_NEEDS__SVID3
-# undef _SVID3
-# endif
-#define TTY struct termios
-#endif
-
-#if defined(HAVE_SYS_MODEM_H)
-#include <sys/modem.h>
-#endif
-
-#if !defined(SYSV_TTYS) && !defined(STREAM) & !defined(BSD_TTYS)
-#define BSD_TTYS
-#endif /* SYSV_TTYS STREAM BSD_TTYS */
-
-/*
- * Line discipline flags. These require line discipline or streams
- * modules to be installed/loaded in the kernel. If specified, but not
- * installed, the code runs as if unspecified.
- */
-#define LDISC_STD 0x0 /* standard */
-#define LDISC_CLK 0x1 /* tty_clk \n intercept */
-#define LDISC_CLKPPS 0x2 /* tty_clk \377 intercept */
-#define LDISC_ACTS 0x4 /* tty_clk #* intercept */
-#define LDISC_CHU 0x8 /* depredated */
-#define LDISC_PPS 0x10 /* ppsclock, ppsapi */
-#define LDISC_RAW 0x20 /* raw binary */
-
-#endif /* NTP_TTY_H */
diff --git a/contrib/ntp/include/ntp_types.h b/contrib/ntp/include/ntp_types.h
deleted file mode 100644
index 348e95e..0000000
--- a/contrib/ntp/include/ntp_types.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * ntp_types.h - defines how int32 and u_int32 are treated.
- * For 64 bit systems like the DEC Alpha, they have to be defined
- * as int and u_int.
- * For 32 bit systems, define them as long and u_long
- */
-#include "ntp_machine.h"
-
-#ifndef _NTP_TYPES_
-#define _NTP_TYPES_
-
-/*
- * This is another naming conflict.
- * On NetBSD for MAC the macro "mac" is defined as 1
- * this is fun for us as a packet structure contains an
- * optional "mac" member - severe confusion results 8-)
- * As we hopefully do not have to rely on that macro we
- * just undefine that.
- */
-#ifdef mac
-#undef mac
-#endif
-
-/*
- * Set up for prototyping
- */
-#ifndef P
-#if defined(__STDC__) || defined(HAVE_PROTOTYPES)
-#define P(x) x
-#else /* not __STDC__ and not HAVE_PROTOTYPES */
-#define P(x) ()
-#endif /* not __STDC__ and HAVE_PROTOTYPES */
-#endif /* P */
-
-/*
- * VMS DECC (v4.1), {u_char,u_short,u_long} are only in SOCKET.H,
- * and u_int isn't defined anywhere
- */
-#if defined(VMS)
-#include <socket.h>
-typedef unsigned int u_int;
-/*
- * Note: VMS DECC has long == int (even on __alpha),
- * so the distinction below doesn't matter
- */
-#endif /* VMS */
-
-#if (SIZEOF_INT == 4)
-# ifndef int32
-# define int32 int
-# endif
-# ifndef u_int32
-# define u_int32 unsigned int
-# endif
-#else /* not sizeof(int) == 4 */
-# if (SIZEOF_LONG == 4)
-# else /* not sizeof(long) == 4 */
-# ifndef int32
-# define int32 long
-# endif
-# ifndef u_int32
-# define u_int32 unsigned long
-# endif
-# endif /* not sizeof(long) == 4 */
-# include "Bletch: what's 32 bits on this machine?"
-#endif /* not sizeof(int) == 4 */
-
-typedef unsigned short associd_t; /* association ID */
-typedef u_int32 keyid_t; /* cryptographic key ID */
-typedef u_int32 tstamp_t; /* NTP seconds timestamp */
-
-#endif /* _NTP_TYPES_ */
-
diff --git a/contrib/ntp/include/ntp_unixtime.h b/contrib/ntp/include/ntp_unixtime.h
deleted file mode 100644
index ce96980..0000000
--- a/contrib/ntp/include/ntp_unixtime.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * ntp_unixtime.h - contains constants and macros for converting between
- * NTP time stamps (l_fp) and Unix times (struct timeval)
- */
-
-#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>
-int getclock (int clock_type, struct timespec *tp);
-/* Don't #define GETTIMEOFDAY because we shouldn't be using it in this case. */
-# define SETTIMEOFDAY(a, b) (settimeofday(a, b))
-# else /* not (HAVE_SYS_TIMERS_H && HAVE_GETCLOCK) */
-# ifdef SYSV_TIMEOFDAY
-# define GETTIMEOFDAY(a, b) (gettimeofday(a))
-# define SETTIMEOFDAY(a, b) (settimeofday(a))
-# else /* ! SYSV_TIMEOFDAY */
-#if defined SYS_CYGWIN32
-# define GETTIMEOFDAY(a, b) (gettimeofday(a, b))
-# define SETTIMEOFDAY(a, b) (settimeofday_NT(a))
-#else
-# define GETTIMEOFDAY(a, b) (gettimeofday(a, b))
-# define SETTIMEOFDAY(a, b) (settimeofday(a, b))
-#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,
- * Unix in 1970.
- */
-#define JAN_1970 0x83aa7e80 /* 2208988800 1970 - 1900 in seconds */
-
-/*
- * These constants are used to round the time stamps computed from
- * a struct timeval to the microsecond (more or less). This keeps
- * things neat.
- */
-#define TS_MASK 0xfffff000 /* mask to usec, for time stamps */
-#define TS_ROUNDBIT 0x00000800 /* round at this bit */
-
-
-/*
- * Convert usec to a time stamp fraction. If you use this the program
- * must include the following declarations:
- */
-extern u_long ustotslo[];
-extern u_long ustotsmid[];
-extern u_long ustotshi[];
-
-#define TVUTOTSF(tvu, tsf) \
- (tsf) = ustotslo[(tvu) & 0xff] \
- + ustotsmid[((tvu) >> 8) & 0xff] \
- + ustotshi[((tvu) >> 16) & 0xf]
-
-/*
- * Convert a struct timeval to a time stamp.
- */
-#define TVTOTS(tv, ts) \
- do { \
- (ts)->l_ui = (u_long)(tv)->tv_sec; \
- TVUTOTSF((tv)->tv_usec, (ts)->l_uf); \
- } while(0)
-
-#define sTVTOTS(tv, ts) \
- do { \
- int isneg = 0; \
- long usec; \
- (ts)->l_ui = (tv)->tv_sec; \
- usec = (tv)->tv_usec; \
- if (((tv)->tv_sec < 0) || ((tv)->tv_usec < 0)) { \
- usec = -usec; \
- (ts)->l_ui = -(ts)->l_ui; \
- isneg = 1; \
- } \
- TVUTOTSF(usec, (ts)->l_uf); \
- if (isneg) { \
- L_NEG((ts)); \
- } \
- } while(0)
-
-/*
- * TV_SHIFT is used to turn the table result into a usec value. To round,
- * add in TV_ROUNDBIT before shifting
- */
-#define TV_SHIFT 3
-#define TV_ROUNDBIT 0x4
-
-
-/*
- * Convert a time stamp fraction to microseconds. The time stamp
- * fraction is assumed to be unsigned. To use this in a program, declare:
- */
-extern long tstouslo[];
-extern long tstousmid[];
-extern long tstoushi[];
-
-#define TSFTOTVU(tsf, tvu) \
- (tvu) = (tstoushi[((tsf) >> 24) & 0xff] \
- + tstousmid[((tsf) >> 16) & 0xff] \
- + tstouslo[((tsf) >> 9) & 0x7f] \
- + TV_ROUNDBIT) >> TV_SHIFT
-/*
- * Convert a time stamp to a struct timeval. The time stamp
- * has to be positive.
- */
-#define TSTOTV(ts, tv) \
- do { \
- (tv)->tv_sec = (ts)->l_ui; \
- TSFTOTVU((ts)->l_uf, (tv)->tv_usec); \
- if ((tv)->tv_usec == 1000000) { \
- (tv)->tv_sec++; \
- (tv)->tv_usec = 0; \
- } \
- } while (0)
-
-/*
- * Convert milliseconds to a time stamp fraction. This shouldn't be
- * here, but it is convenient since the guys who use the definition will
- * often be including this file anyway.
- */
-extern u_long msutotsflo[];
-extern u_long msutotsfhi[];
-
-#define MSUTOTSF(msu, tsf) \
- (tsf) = msutotsfhi[((msu) >> 5) & 0x1f] + msutotsflo[(msu) & 0x1f]
-
-extern char * tvtoa P((const struct timeval *));
-extern char * utvtoa P((const struct timeval *));
diff --git a/contrib/ntp/include/ntpd.h b/contrib/ntp/include/ntpd.h
deleted file mode 100644
index 54d3e13..0000000
--- a/contrib/ntp/include/ntpd.h
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * ntpd.h - Prototypes for ntpd.
- */
-
-#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"
-
-#ifdef SYS_WINNT
-#define exit service_exit
-extern void service_exit (int);
-/* declare the service threads */
-void service_main (DWORD, LPTSTR *);
-void service_ctrl (DWORD);
-void worker_thread (void *);
-#define sleep(x) Sleep((DWORD) x * 1000 /* milliseconds */ );
-#endif /* SYS_WINNT */
-
-/* ntp_config.c */
-extern void getconfig P((int, char **));
-
-/* ntp_config.c */
-extern void ctl_clr_stats P((void));
-extern int ctlclrtrap P((struct sockaddr_storage *, struct interface *, int));
-extern u_short ctlpeerstatus P((struct peer *));
-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));
-extern void report_event P((int, struct peer *));
-
-extern double fabs P((double));
-extern double sqrt P((double));
-
-/* ntp_control.c */
-/*
- * Structure for translation tables between internal system
- * variable indices and text format.
- */
-struct ctl_var {
- u_short code;
- u_short flags;
- char *text;
-};
-/*
- * Flag values
- */
-#define CAN_READ 0x01
-#define CAN_WRITE 0x02
-
-#define DEF 0x20
-#define PADDING 0x40
-#define EOV 0x80
-
-#define RO (CAN_READ)
-#define WO (CAN_WRITE)
-#define RW (CAN_READ|CAN_WRITE)
-
-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 *, u_long, u_short));
-extern void set_sys_var P((char *, u_long, u_short));
-
-/* ntp_intres.c */
-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_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((struct sockaddr_storage));
-extern void io_multicast_del P((struct sockaddr_storage));
-extern void kill_asyncio P((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));
-extern void block_io_and_alarm P((void));
-#endif
-
-/* ntp_leap.c */
-extern void init_leap P((void));
-extern void leap_process P((void));
-extern int leap_setleap P((int, int));
-/*
- * there seems to be a bug in the IRIX 4 compiler which prevents
- * u_char from beeing used in prototyped functions.
- * This is also true AIX compiler.
- * So give up and define it to be int. WLJ
- */
-extern int leap_actual P((int));
-
-/* ntp_loopfilter.c */
-extern void init_loopfilter P((void));
-extern int local_clock P((struct peer *, double, double));
-extern void adj_host_clock P((void));
-extern void loop_config P((int, double));
-extern void huffpuff P((void));
-
-/* ntp_monitor.c */
-extern void init_mon P((void));
-extern void mon_start P((int));
-extern void mon_stop P((int));
-extern void ntp_monitor P((struct recvbuf *));
-
-/* ntp_peer.c */
-extern void init_peer P((void));
-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_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_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_storage *, struct interface *, int));
-extern void unpeer P((struct peer *));
-extern void clear_all P((void));
-#ifdef OPENSSL
-extern void expire_all P((void));
-#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 *, 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
- * u_char from beeing used in prototyped functions.
- * This is also true AIX compiler.
- * So give up and define it to be int. WLJ
- */
-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, struct sockaddr_storage*));
-extern void proto_clr_stats P((void));
-
-#ifdef REFCLOCK
-/* ntp_refclock.c */
-extern int refclock_newpeer P((struct peer *));
-extern void refclock_unpeer P((struct peer *));
-extern void refclock_receive P((struct peer *));
-extern void refclock_transmit P((struct peer *));
-extern void init_refclock P((void));
-#endif /* REFCLOCK */
-
-/* ntp_request.c */
-extern void init_request P((void));
-extern void process_private P((struct recvbuf *, int));
-
-/* ntp_restrict.c */
-extern void init_restrict P((void));
-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 OPENSSL
-extern char *sys_hostname;
-extern l_fp sys_revoketime;
-#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_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_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.
- */
-
-/* ntp_config.c */
-extern char const * progname;
-extern char sys_phone[][MAXDIAL]; /* ACTS phone numbers */
-extern char pps_device[]; /* PPS device name */
-#if defined(HAVE_SCHED_SETSCHEDULER)
-extern int config_priority_override;
-extern int config_priority;
-#endif
-
-/* ntp_control.c */
-#if 0
-struct ctl_trap;
-extern struct ctl_trap ctl_trap[];
-#endif
-extern int num_ctl_traps;
-extern keyid_t ctl_auth_keyid; /* keyid used for authenticating write requests */
-
-/*
- * Statistic counters to keep track of requests and responses.
- */
-extern u_long ctltimereset; /* time stats reset */
-extern u_long numctlreq; /* number of requests we've received */
-extern u_long numctlbadpkts; /* number of bad control packets */
-extern u_long numctlresponses; /* number of resp packets sent with data */
-extern u_long numctlfrags; /* number of fragments sent */
-extern u_long numctlerrors; /* number of error responses sent */
-extern u_long numctltooshort; /* number of too short input packets */
-extern u_long numctlinputresp; /* number of responses on input */
-extern u_long numctlinputfrag; /* number of fragments on input */
-extern u_long numctlinputerr; /* number of input pkts with err bit set */
-extern u_long numctlbadoffset; /* number of input pkts with nonzero offset */
-extern u_long numctlbadversion; /* number of input pkts with unknown version */
-extern u_long numctldatatooshort; /* data too short for count */
-extern u_long numctlbadop; /* bad op code found in packet */
-extern u_long numasyncmsgs; /* number of async messages we've sent */
-
-/* ntp_intres.c */
-extern keyid_t req_keyid; /* request keyid */
-extern char * req_file; /* name of the file with configuration info */
-
-/*
- * Other statistics of possible interest
- */
-extern volatile u_long packets_dropped; /* total number of packets dropped on reception */
-extern volatile u_long packets_ignored; /* packets received on wild card interface */
-extern volatile u_long packets_received;/* total number of packets received */
-extern u_long packets_sent; /* total number of packets sent */
-extern u_long packets_notsent; /* total number of packets which couldn't be sent */
-
-extern volatile u_long handler_calls; /* number of calls to interrupt handler */
-extern volatile u_long handler_pkts; /* number of pkts received by handler */
-extern u_long io_timereset; /* time counters were reset */
-
-/*
- * Interface stuff
- */
-extern struct interface *any_interface; /* default ipv4 interface */
-extern struct interface *any6_interface;/* default ipv6 interface */
-extern struct interface *loopback_interface; /* loopback interface */
-
-/*
- * File descriptor masks etc. for call to select
- */
-extern fd_set activefds;
-extern int maxactivefd;
-
-/* ntp_loopfilter.c */
-extern double drift_comp; /* clock frequency (s/s) */
-extern double clock_stability; /* clock stability (s/s) */
-extern double clock_max; /* max offset before step (s) */
-extern double clock_panic; /* max offset before panic (s) */
-extern double clock_phi; /* dispersion rate (s/s) */
-extern double clock_minstep; /* step timeout (s) */
-extern u_long pps_control; /* last pps sample time */
-#ifdef KERNEL_PLL
-extern int pll_status; /* status bits for kernel pll */
-#endif /* KERNEL_PLL */
-
-/*
- * Clock state machine control flags
- */
-extern int ntp_enable; /* clock discipline enabled */
-extern int pll_control; /* kernel support available */
-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_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 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 double allan_xpt; /* Allan intercept (s) */
-extern double sys_error; /* system RMS error (s) */
-extern double sys_jitter; /* system RMS jitter (s) */
-
-/* ntp_monitor.c */
-extern struct mon_data mon_mru_list;
-extern struct mon_data mon_fifo_list;
-extern int mon_enabled;
-
-/* ntp_peer.c */
-extern struct peer *peer_hash[]; /* peer hash table */
-extern int peer_hash_count[]; /* count of peers in each bucket */
-extern struct peer *assoc_hash[]; /* association ID hash table */
-extern int assoc_hash_count[];
-extern int peer_free_count;
-
-/*
- * Miscellaneous statistic counters which may be queried.
- */
-extern u_long peer_timereset; /* time stat counters were zeroed */
-extern u_long findpeer_calls; /* number of calls to findpeer */
-extern u_long assocpeer_calls; /* number of calls to findpeerbyassoc */
-extern u_long peer_allocations; /* number of allocations from the free list */
-extern u_long peer_demobilizations; /* number of structs freed to free list */
-extern int total_peer_structs; /* number of peer structs in circulation */
-extern int peer_associations; /* number of active associations */
-
-/* ntp_proto.c */
-/*
- * System variables are declared here. See Section 3.2 of the
- * specification.
- */
-extern u_char sys_leap; /* system leap indicator */
-extern u_char sys_stratum; /* stratum of system */
-extern s_char sys_precision; /* local clock precision */
-extern double sys_rootdelay; /* distance to current sync source */
-extern double sys_rootdispersion; /* dispersion of system clock */
-extern u_int32 sys_refid; /* reference source for local clock */
-extern l_fp sys_reftime; /* time we were last updated */
-extern struct peer *sys_peer; /* our current peer */
-extern struct peer *sys_prefer; /* our cherished peer */
-extern u_long sys_automax; /* maximum session key lifetime */
-
-/*
- * Nonspecified system state variables.
- */
-extern int sys_bclient; /* we set our time to broadcasts */
-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; /* 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_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; /* bad length or format */
-extern u_long sys_processed; /* packets processed */
-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
-#if defined(PPS) || defined(HAVE_PPSAPI)
-extern int fdpps; /* pps file descriptor */
-#endif /* PPS */
-#endif
-
-/* ntp_request.c */
-extern keyid_t info_auth_keyid; /* keyid used to authenticate requests */
-
-/* ntp_restrict.c */
-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_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;
-extern u_long timer_overflows;
-extern u_long timer_xmtcalls;
-
-/* ntp_util.c */
-extern int stats_control; /* write stats to fileset? */
-
-/* ntpd.c */
-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
-extern struct refclock *refclock_conf[]; /* refclock configuration table */
-extern u_char num_refclock_conf;
-#endif
diff --git a/contrib/ntp/include/ntpsim.h b/contrib/ntp/include/ntpsim.h
deleted file mode 100644
index c48dc59..0000000
--- a/contrib/ntp/include/ntpsim.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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/parse.h b/contrib/ntp/include/parse.h
deleted file mode 100644
index 56a92e9..0000000
--- a/contrib/ntp/include/parse.h
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/parse.h,v 4.5 1998/08/09 22:23:32 kardel RELEASE_19990228_A
- *
- * parse.h,v 4.5 1998/08/09 22:23:32 kardel RELEASE_19990228_A
- *
- * Copyright (C) 1989-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifndef __PARSE_H__
-#define __PARSE_H__
-#if !(defined(lint) || defined(__GNUC__))
- static char parsehrcsid[]="parse.h,v 4.5 1998/08/09 22:23:32 kardel RELEASE_19990228_A";
-#endif
-
-#include "ntp_types.h"
-
-#include "parse_conf.h"
-
-/*
- * we use the following datastructures in two modes
- * either in the NTP itself where we use NTP time stamps at some places
- * or in the kernel, where only struct timeval will be used.
- */
-#undef PARSEKERNEL
-#if defined(KERNEL) || defined(_KERNEL)
-#ifndef PARSESTREAM
-#define PARSESTREAM
-#endif
-#endif
-#if defined(PARSESTREAM) && defined(HAVE_SYS_STREAM_H)
-#define PARSEKERNEL
-#endif
-#ifdef PARSEKERNEL
-#ifndef _KERNEL
-extern caddr_t kmem_alloc P((unsigned int));
-extern caddr_t kmem_free P((caddr_t, unsigned int));
-extern unsigned int splx P((unsigned int));
-extern unsigned int splhigh P((void));
-extern unsigned int splclock P((void));
-#define MALLOC(_X_) (char *)kmem_alloc(_X_)
-#define FREE(_X_, _Y_) kmem_free((caddr_t)_X_, _Y_)
-#else
-#include <sys/kmem.h>
-#define MALLOC(_X_) (char *)kmem_alloc(_X_, KM_SLEEP)
-#define FREE(_X_, _Y_) kmem_free((caddr_t)_X_, _Y_)
-#endif
-#else
-#define MALLOC(_X_) malloc(_X_)
-#define FREE(_X_, _Y_) free(_X_)
-#endif
-
-#if defined(PARSESTREAM) && defined(HAVE_SYS_STREAM_H)
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#else /* STREAM */
-#include <stdio.h>
-#include "ntp_syslog.h"
-#ifdef DEBUG
-#define DD_PARSE 5
-#define DD_RAWDCF 4
-#define parseprintf(LEVEL, ARGS) if (debug > LEVEL) printf ARGS
-#else /* DEBUG */
-#define parseprintf(LEVEL, ARGS)
-#endif /* DEBUG */
-#endif /* PARSESTREAM */
-
-#if defined(timercmp) && defined(__GNUC__)
-#undef timercmp
-#endif
-
-#if !defined(timercmp)
-#define timercmp(tvp, uvp, cmp) \
- ((tvp)->tv_sec cmp (uvp)->tv_sec || \
- ((tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec))
-#endif
-
-#ifndef TIMES10
-#define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1))
-#endif
-
-/*
- * state flags
- */
-#define PARSEB_POWERUP 0x00000001 /* no synchronisation */
-#define PARSEB_NOSYNC 0x00000002 /* timecode currently not confirmed */
-
-/*
- * time zone information
- */
-#define PARSEB_ANNOUNCE 0x00000010 /* switch time zone warning (DST switch) */
-#define PARSEB_DST 0x00000020 /* DST in effect */
-#define PARSEB_UTC 0x00000040 /* UTC time */
-
-/*
- * leap information
- */
-#define PARSEB_LEAPDEL 0x00000100 /* LEAP deletion warning */
-#define PARSEB_LEAPADD 0x00000200 /* LEAP addition warning */
-#define PARSEB_LEAPS 0x00000300 /* LEAP warnings */
-#define PARSEB_LEAPSECOND 0x00000400 /* actual leap second */
-/*
- * optional status information
- */
-#define PARSEB_ALTERNATE 0x00001000 /* alternate antenna used */
-#define PARSEB_POSITION 0x00002000 /* position available */
-#define PARSEB_MESSAGE 0x00004000 /* addtitional message data */
-/*
- * feature information
- */
-#define PARSEB_S_LEAP 0x00010000 /* supports LEAP */
-#define PARSEB_S_ANTENNA 0x00020000 /* supports antenna information */
-#define PARSEB_S_PPS 0x00040000 /* supports PPS time stamping */
-#define PARSEB_S_POSITION 0x00080000 /* supports position information (GPS) */
-
-/*
- * time stamp availability
- */
-#define PARSEB_TIMECODE 0x10000000 /* valid time code sample */
-#define PARSEB_PPS 0x20000000 /* valid PPS sample */
-
-#define PARSE_TCINFO (PARSEB_ANNOUNCE|PARSEB_POWERUP|PARSEB_NOSYNC|PARSEB_DST|\
- PARSEB_UTC|PARSEB_LEAPS|PARSEB_ALTERNATE|PARSEB_S_LEAP|\
- PARSEB_S_LOCATION|PARSEB_TIMECODE|PARSEB_MESSAGE)
-
-#define PARSE_POWERUP(x) ((x) & PARSEB_POWERUP)
-#define PARSE_NOSYNC(x) (((x) & (PARSEB_POWERUP|PARSEB_NOSYNC)) == PARSEB_NOSYNC)
-#define PARSE_SYNC(x) (((x) & (PARSEB_POWERUP|PARSEB_NOSYNC)) == 0)
-#define PARSE_ANNOUNCE(x) ((x) & PARSEB_ANNOUNCE)
-#define PARSE_DST(x) ((x) & PARSEB_DST)
-#define PARSE_UTC(x) ((x) & PARSEB_UTC)
-#define PARSE_LEAPADD(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPADD))
-#define PARSE_LEAPDEL(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPDEL))
-#define PARSE_ALTERNATE(x) ((x) & PARSEB_ALTERNATE)
-#define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
-
-#define PARSE_S_LEAP(x) ((x) & PARSEB_S_LEAP)
-#define PARSE_S_ANTENNA(x) ((x) & PARSEB_S_ANTENNA)
-#define PARSE_S_PPS(x) ((x) & PARSEB_S_PPS)
-#define PARSE_S_POSITION(x) ((x) & PARSEB_S_POSITION)
-
-#define PARSE_TIMECODE(x) ((x) & PARSEB_TIMECODE)
-#define PARSE_PPS(x) ((x) & PARSEB_PPS)
-#define PARSE_POSITION(x) ((x) & PARSEB_POSITION)
-#define PARSE_MESSAGE(x) ((x) & PARSEB_MESSAGE)
-
-/*
- * operation flags - lower nibble contains fudge flags
- */
-#define PARSE_STATISTICS 0x08 /* enable statistics */
-#define PARSE_LEAP_DELETE 0x04 /* delete leap */
-#define PARSE_FIXED_FMT 0x10 /* fixed format */
-#define PARSE_PPSCLOCK 0x20 /* try to get PPS time stamp via ppsclock ioctl */
-
-/*
- * size of buffers
- */
-#define PARSE_TCMAX 400 /* maximum addition data size */
-
-typedef union timestamp
-{
- struct timeval tv; /* timeval - kernel view */
- l_fp fp; /* fixed point - ntp view */
-} timestamp_t;
-
-/*
- * standard time stamp structure
- */
-struct parsetime
-{
- u_long parse_status; /* data status - CVT_OK, CVT_NONE, CVT_FAIL ... */
- timestamp_t parse_time; /* PARSE timestamp */
- timestamp_t parse_stime; /* telegram sample timestamp */
- timestamp_t parse_ptime; /* PPS time stamp */
- long parse_usecerror; /* sampled usec error */
- u_long parse_state; /* current receiver state */
- unsigned short parse_format; /* format code */
- unsigned short parse_msglen; /* length of message */
- unsigned char parse_msg[PARSE_TCMAX]; /* original messages */
-};
-
-typedef struct parsetime parsetime_t;
-
-/*---------- STREAMS interface ----------*/
-
-#ifdef HAVE_SYS_STREAM_H
-/*
- * ioctls
- */
-#define PARSEIOC_ENABLE (('D'<<8) + 'E')
-#define PARSEIOC_DISABLE (('D'<<8) + 'D')
-#define PARSEIOC_SETFMT (('D'<<8) + 'f')
-#define PARSEIOC_GETFMT (('D'<<8) + 'F')
-#define PARSEIOC_SETCS (('D'<<8) + 'C')
-#define PARSEIOC_TIMECODE (('D'<<8) + 'T')
-
-#endif
-
-/*------ IO handling flags (sorry) ------*/
-
-#define PARSE_IO_CSIZE 0x00000003
-#define PARSE_IO_CS5 0x00000000
-#define PARSE_IO_CS6 0x00000001
-#define PARSE_IO_CS7 0x00000002
-#define PARSE_IO_CS8 0x00000003
-
-/*
- * ioctl structure
- */
-union parsectl
-{
- struct parsegettc
- {
- u_long parse_state; /* last state */
- u_long parse_badformat; /* number of bad packets since last query */
- unsigned short parse_format;/* last decoded format */
- unsigned short parse_count; /* count of valid time code bytes */
- char parse_buffer[PARSE_TCMAX+1]; /* timecode buffer */
- } parsegettc;
-
- struct parseformat
- {
- unsigned short parse_format;/* number of examined format */
- unsigned short parse_count; /* count of valid string bytes */
- char parse_buffer[PARSE_TCMAX+1]; /* format code string */
- } parseformat;
-
- struct parsesetcs
- {
- u_long parse_cs; /* character size (needed for stripping) */
- } parsesetcs;
-};
-
-typedef union parsectl parsectl_t;
-
-/*------ for conversion routines --------*/
-
-struct parse /* parse module local data */
-{
- int parse_flags; /* operation and current status flags */
-
- int parse_ioflags; /* io handling flags (5-8 Bit control currently) */
-
- /*
- * private data - fixed format only
- */
- unsigned short parse_plen; /* length of private data */
- void *parse_pdata; /* private data pointer */
-
- /*
- * time code input buffer (from RS232 or PPS)
- */
- unsigned short parse_index; /* current buffer index */
- char *parse_data; /* data buffer */
- unsigned short parse_dsize; /* size of data buffer */
- unsigned short parse_lformat; /* last format used */
- u_long parse_lstate; /* last state code */
- char *parse_ldata; /* last data buffer */
- unsigned short parse_ldsize; /* last data buffer length */
- u_long parse_badformat; /* number of unparsable pakets */
-
- timestamp_t parse_lastchar; /* last time a character was received */
- parsetime_t parse_dtime; /* external data prototype */
-};
-
-typedef struct parse parse_t;
-
-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 utctime; /* the actual time - alternative to date/time */
- u_long flags; /* current clock status */
-};
-
-typedef struct clocktime clocktime_t;
-
-/*
- * parser related return/error codes
- */
-#define CVT_MASK (unsigned)0x0000000F /* conversion exit code */
-#define CVT_NONE (unsigned)0x00000001 /* format not applicable */
-#define CVT_FAIL (unsigned)0x00000002 /* conversion failed - error code returned */
-#define CVT_OK (unsigned)0x00000004 /* conversion succeeded */
-#define CVT_SKIP (unsigned)0x00000008 /* conversion succeeded */
-#define CVT_ADDITIONAL (unsigned)0x00000010 /* additional data is available */
-#define CVT_BADFMT (unsigned)0x00000100 /* general format error - (unparsable) */
-#define CVT_BADDATE (unsigned)0x00000200 /* date field incorrect */
-#define CVT_BADTIME (unsigned)0x00000400 /* time field incorrect */
-
-/*
- * return codes used by special input parsers
- */
-#define PARSE_INP_SKIP 0x00 /* discard data - may have been consumed */
-#define PARSE_INP_TIME 0x01 /* time code assembled */
-#define PARSE_INP_PARSE 0x02 /* parse data using normal algorithm */
-#define PARSE_INP_DATA 0x04 /* additional data to pass up */
-#define PARSE_INP_SYNTH 0x08 /* just pass up synthesized time */
-
-/*
- * PPS edge info
- */
-#define SYNC_ZERO 0x00
-#define SYNC_ONE 0x01
-
-struct clockformat
-{
- /* special input protocol - implies fixed format */
- u_long (*input) P((parse_t *, unsigned int, timestamp_t *));
- /* conversion routine */
- u_long (*convert) P((unsigned char *, int, struct format *, clocktime_t *, void *));
- /* routine for handling RS232 sync events (time stamps) */
- /* PPS input routine */
- u_long (*syncpps) P((parse_t *, int, timestamp_t *));
- /* time code synthesizer */
-
- void *data; /* local parameters */
- const char *name; /* clock format name */
- unsigned short length; /* maximum length of data packet */
- unsigned short plen; /* length of private data - implies fixed format */
-};
-
-typedef struct clockformat clockformat_t;
-
-/*
- * parse interface
- */
-extern int parse_ioinit P((parse_t *));
-extern void parse_ioend P((parse_t *));
-extern int parse_ioread P((parse_t *, unsigned int, timestamp_t *));
-extern int parse_iopps P((parse_t *, int, timestamp_t *));
-extern void parse_iodone P((parse_t *));
-extern int parse_timecode P((parsectl_t *, parse_t *));
-extern int parse_getfmt P((parsectl_t *, parse_t *));
-extern int parse_setfmt P((parsectl_t *, parse_t *));
-extern int parse_setcs P((parsectl_t *, parse_t *));
-
-extern unsigned int parse_restart P((parse_t *, unsigned int));
-extern unsigned int parse_addchar P((parse_t *, unsigned int));
-extern unsigned int parse_end P((parse_t *));
-
-extern int Strok P((const unsigned char *, const unsigned char *));
-extern int Stoi P((const unsigned char *, long *, int));
-
-extern time_t parse_to_unixtime P((clocktime_t *, u_long *));
-extern u_long updatetimeinfo P((parse_t *, u_long));
-extern void syn_simple P((parse_t *, timestamp_t *, struct format *, u_long));
-extern u_long pps_simple P((parse_t *, int, timestamp_t *));
-extern u_long pps_one P((parse_t *, int, timestamp_t *));
-extern u_long pps_zero P((parse_t *, int, timestamp_t *));
-extern int parse_timedout P((parse_t *, timestamp_t *, struct timeval *));
-
-#endif
-
-/*
- * History:
- *
- * parse.h,v
- * Revision 4.5 1998/08/09 22:23:32 kardel
- * 4.0.73e2 adjustments
- *
- * Revision 4.4 1998/06/14 21:09:27 kardel
- * Sun acc cleanup
- *
- * Revision 4.3 1998/06/13 11:49:25 kardel
- * STREAM macro gone in favor of HAVE_SYS_STREAM_H
- *
- * Revision 4.2 1998/06/12 15:14:25 kardel
- * fixed prototypes
- *
- * Revision 4.1 1998/05/24 10:07:59 kardel
- * removed old data structure cruft (new input model)
- * new PARSE_INP* macros for input handling
- * removed old SYNC_* macros from old input model
- * (struct clockformat): removed old parse functions in favor of the
- * new input model
- * updated prototypes
- *
- * form V3 3.31 - log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/include/parse_conf.h b/contrib/ntp/include/parse_conf.h
deleted file mode 100644
index 0a30eb6..0000000
--- a/contrib/ntp/include/parse_conf.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/parse_conf.h,v 4.2 1998/06/14 21:09:28 kardel RELEASE_19990228_A
- *
- * parse_conf.h,v 4.2 1998/06/14 21:09:28 kardel RELEASE_19990228_A
- *
- * Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifndef __PARSE_CONF_H__
-#define __PARSE_CONF_H__
-#if !(defined(lint) || defined(__GNUC__))
- static char prshrcsid[] = "parse_conf.h,v 4.2 1998/06/14 21:09:28 kardel RELEASE_19990228_A";
-#endif
-
-/*
- * field location structure
- */
-#define O_DAY 0
-#define O_MONTH 1
-#define O_YEAR 2
-#define O_HOUR 3
-#define O_MIN 4
-#define O_SEC 5
-#define O_WDAY 6
-#define O_FLAGS 7
-#define O_ZONE 8
-#define O_UTCHOFFSET 9
-#define O_UTCMOFFSET 10
-#define O_UTCSOFFSET 11
-#define O_COUNT (O_UTCSOFFSET+1)
-
-#define MBG_EXTENDED 0x00000001
-
-/*
- * see below for field offsets
- */
-
-struct format
-{
- struct foff
- {
- unsigned short offset; /* offset into buffer */
- unsigned short length; /* length of field */
- } field_offsets[O_COUNT];
- const unsigned char *fixed_string; /* string with must be chars (blanks = wildcards) */
- u_long flags;
-};
-#endif
diff --git a/contrib/ntp/include/recvbuff.h b/contrib/ntp/include/recvbuff.h
deleted file mode 100644
index 4fde7f1..0000000
--- a/contrib/ntp/include/recvbuff.h
+++ /dev/null
@@ -1,113 +0,0 @@
-#if !defined __recvbuff_h
-#define __recvbuff_h
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp.h"
-#include "ntp_fp.h"
-#include "ntp_types.h"
-
-/*
- * recvbuf memory management
- */
-#define RECV_INIT 10 /* 10 buffers initially */
-#define RECV_LOWAT 3 /* when we're down to three buffers get more */
-#define RECV_INC 5 /* get 5 more at a time */
-#define RECV_TOOMANY 40 /* this is way too many buffers */
-
-#if defined HAVE_IO_COMPLETION_PORT
-# include "ntp_iocompletionport.h"
-#include "ntp_timer.h"
-
-# define RECV_BLOCK_IO() EnterCriticalSection(&RecvCritSection)
-# define RECV_UNBLOCK_IO() LeaveCriticalSection(&RecvCritSection)
-
-/* Return the event which is set when items are added to the full list
- */
-extern HANDLE get_recv_buff_event P((void));
-#else
-# define RECV_BLOCK_IO()
-# define RECV_UNBLOCK_IO()
-#endif
-
-
-/*
- * Format of a recvbuf. These are used by the asynchronous receive
- * routine to store incoming packets and related information.
- */
-
-/*
- * 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 1000 /* hail Mary */
-
-struct recvbuf {
- struct recvbuf *next; /* next buffer in chain */
- union {
- struct sockaddr_storage X_recv_srcadr;
- caddr_t X_recv_srcclock;
- struct peer *X_recv_peer;
- } X_from_where;
-#define recv_srcadr X_from_where.X_recv_srcadr
-#define recv_srcclock X_from_where.X_recv_srcclock
-#define recv_peer X_from_where.X_recv_peer
-#if defined HAVE_IO_COMPLETION_PORT
- IoCompletionInfo iocompletioninfo;
- WSABUF wsabuff;
- DWORD AddressLength;
-#else
- struct sockaddr_storage srcadr; /* where packet came from */
-#endif
- struct interface *dstadr; /* interface datagram arrived thru */
- 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 */
- union {
- struct pkt X_recv_pkt;
- u_char X_recv_buffer[RX_BUFF_SIZE];
- } recv_space;
-#define recv_pkt recv_space.X_recv_pkt
-#define recv_buffer recv_space.X_recv_buffer
-};
-
-extern void init_recvbuff P((int));
-
-/* freerecvbuf - make a single recvbuf available for reuse
- */
-extern void freerecvbuf P((struct recvbuf *));
-
-
-extern struct recvbuf * getrecvbufs P((void));
-
-/* Get a free buffer (typically used so an async
- * read can directly place data into the buffer
- *
- * The buffer is removed from the free list. Make sure
- * you put it back with freerecvbuf() or
- */
-extern struct recvbuf *get_free_recv_buffer P((void));
-
-/* Add a buffer to the full list
- */
-extern void add_full_recv_buffer P((struct recvbuf *));
-
-/*extern void process_recv_buffers P((void)); */
-
-/* number of recvbufs on freelist */
-extern u_long free_recvbuffs P((void));
-extern u_long full_recvbuffs P((void));
-extern u_long total_recvbuffs P((void));
-extern u_long lowater_additions P((void));
-
-/* Returns the next buffer in the full list.
- *
- */
-extern struct recvbuf *get_full_recv_buffer P((void));
-
-#endif /* defined __recvbuff_h */
-
diff --git a/contrib/ntp/include/rsa_md5.h b/contrib/ntp/include/rsa_md5.h
deleted file mode 100644
index 8241647..0000000
--- a/contrib/ntp/include/rsa_md5.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/include/trimble.h b/contrib/ntp/include/trimble.h
deleted file mode 100644
index 58a1a3a..0000000
--- a/contrib/ntp/include/trimble.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * /src/NTP/ntp-4/include/trimble.h,v 4.4 1999/02/28 11:41:11 kardel RELEASE_19990228_A
- *
- * $Created: Sun Aug 2 16:16:49 1998 $
- *
- * Copyright (C) 1998 by Frank Kardel
- */
-#ifndef TRIMBLE_H
-#define TRIMBLE_H
-
-/*
- * Trimble packet command codes - commands being sent/received
- * keep comments formatted as shown - they are used to generate
- * translation tables
- */
-#define CMD_CCLROSC 0x1D /* clear oscillator offset */
-#define CMD_CCLRRST 0x1E /* clear battery backup and RESET */
-#define CMD_CVERSION 0x1F /* return software version */
-#define CMD_CALMANAC 0x20 /* almanac */
-#define CMD_CCURTIME 0x21 /* current time */
-#define CMD_CMODESEL 0x22 /* mode select (2-d, 3-D, auto) */
-#define CMD_CINITPOS 0x23 /* initial position */
-#define CMD_CRECVPOS 0x24 /* receiver position fix mode */
-#define CMD_CRESET 0x25 /* soft reset & selftest */
-#define CMD_CRECVHEALTH 0x26 /* receiver health */
-#define CMD_CSIGNALLV 0x27 /* signal levels */
-#define CMD_CMESSAGE 0x28 /* GPS system message */
-#define CMD_CALMAHEALTH 0x29 /* almanac healt page */
-#define CMD_C2DALTITUDE 0x2A /* altitude for 2-D mode */
-#define CMD_CINITPOSLLA 0x2B /* initial position LLA */
-#define CMD_COPERPARAM 0x2C /* operating parameters */
-#define CMD_COSCOFFSET 0x2D /* oscillator offset */
-#define CMD_CSETGPSTIME 0x2E /* set GPS time */
-#define CMD_CUTCPARAM 0x2F /* UTC parameters */
-#define CMD_CACCPOSXYZ 0x31 /* accurate initial position (XYZ/ECEF) */
-#define CMD_CACCPOS 0x32 /* accurate initial position */
-#define CMD_CANALOGDIG 0x33 /* analog to digital */
-#define CMD_CSAT1SAT 0x34 /* satellite for 1-Sat mode */
-#define CMD_CIOOPTIONS 0x35 /* I/O options */
-#define CMD_CVELOCAID 0x36 /* velocity aiding of acquisition */
-#define CMD_CSTATLSTPOS 0x37 /* status and values of last pos. and vel. */
-#define CMD_CLOADSSATDT 0x38 /* load satellite system data */
-#define CMD_CSATDISABLE 0x39 /* satellite disable */
-#define CMD_CLASTRAW 0x3A /* last raw measurement */
-#define CMD_CSTATSATEPH 0x3B /* satellite ephemeris status */
-#define CMD_CSTATTRACK 0x3C /* tracking status */
-#define CMD_CCHANADGPS 0x3D /* configure channel A for differential GPS */
-#define CMD_CADDITFIX 0x3E /* additional fix data */
-#define CMD_CDGPSFIXMD 0x62 /* set/request differential GPS position fix mode */
-#define CMD_CDGPSCORR 0x65 /* differential correction status */
-#define CMD_CPOSFILT 0x71 /* position filter parameters */
-#define CMD_CHEIGHTFILT 0x73 /* height filter control */
-#define CMD_CHIGH8CNT 0x75 /* high-8 (best 4) / high-6 (overdetermined) control */
-#define CMD_CMAXDGPSCOR 0x77 /* maximum rate of DGPS corrections */
-#define CMD_CSUPER 0x8E /* super paket */
-
-#define CMD_RDATAA 0x3D /* data channel A configuration:trimble_channelA:RO */
-#define CMD_RALMANAC 0x40 /* almanac data for sat:gps_almanac:RO */
-#define CMD_RCURTIME 0x41 /* GPS time:gps_time:RO */
-#define CMD_RSPOSXYZ 0x42 /* single precision XYZ position:gps_position(XYZ):RO|DEF */
-#define CMD_RVELOXYZ 0x43 /* velocity fix (XYZ ECEF):gps_velocity(XYZ):RO|DEF */
-#define CMD_RBEST4 0x44 /* best 4 satellite selection:trimble_best4:RO|DEF */
-#define CMD_RVERSION 0x45 /* software version:trimble_version:RO|DEF */
-#define CMD_RRECVHEALTH 0x46 /* receiver health:trimble_receiver_health:RO|DEF */
-#define CMD_RSIGNALLV 0x47 /* signal levels of all satellites:trimble_signal_levels:RO */
-#define CMD_RMESSAGE 0x48 /* GPS system message:gps-message:RO|DEF */
-#define CMD_RALMAHEALTH 0x49 /* almanac health page for all satellites:gps_almanac_health:RO */
-#define CMD_RSLLAPOS 0x4A /* single LLA position:gps_position(LLA):RO|DEF */
-#define CMD_RMACHSTAT 0x4B /* machine code / status:trimble_status:RO|DEF */
-#define CMD_ROPERPARAM 0x4C /* operating parameters:trimble_opparam:RO */
-#define CMD_ROSCOFFSET 0x4D /* oscillator offset:trimble_oscoffset:RO */
-#define CMD_RSETGPSTIME 0x4E /* response to set GPS time:trimble_setgpstime:RO */
-#define CMD_RUTCPARAM 0x4F /* UTC parameters:gps_utc_correction:RO|DEF */
-#define CMD_RANALOGDIG 0x53 /* analog to digital:trimble_analogdigital:RO */
-#define CMD_RSAT1BIAS 0x54 /* one-satellite bias & bias rate:trimble_sat1bias:RO */
-#define CMD_RIOOPTIONS 0x55 /* I/O options:trimble_iooptions:RO */
-#define CMD_RVELOCFIX 0x56 /* velocity fix (ENU):trimble_velocfix */
-#define CMD_RSTATLSTFIX 0x57 /* status and values of last pos. and vel.:trimble_status_lastpos:RO */
-#define CMD_RLOADSSATDT 0x58 /* response to load satellite system data:trimble_loaddata:RO */
-#define CMD_RSATDISABLE 0x59 /* satellite disable:trimble_satdisble:RO */
-#define CMD_RLASTRAW 0x5A /* last raw measurement:trimble_lastraw:RO */
-#define CMD_RSTATSATEPH 0x5B /* satellite ephemeris status:trimble_ephstatus:RO */
-#define CMD_RSTATTRACK 0x5C /* tracking status:trimble_tracking_status:RO|DEF */
-#define CMD_RADDITFIX 0x5E /* additional fix data:trimble_addfix:RO */
-#define CMD_RALLINVIEW 0x6D /* all in view satellite selection:trimble_satview:RO|DEF */
-#define CMD_RPOSFILT 0x72 /* position filter parameters:trimble_posfilt:RO */
-#define CMD_RHEIGHTFILT 0x74 /* height filter control:trimble_heightfilt:RO */
-#define CMD_RHIGH8CNT 0x76 /* high-8 (best 4) / high-6 (overdetermined) control:trimble_high8control:RO */
-#define CMD_RMAXAGE 0x78 /* DC MaxAge:trimble_dgpsmaxage:RO */
-#define CMD_RDGPSFIX 0x82 /* differential position fix mode:trimble_dgpsfixmode:RO */
-#define CMD_RDOUBLEXYZ 0x83 /* double precision XYZ:gps_position_ext(XYZ):RO|DEF */
-#define CMD_RDOUBLELLA 0x84 /* double precision LLA:gps_position_ext(LLA):RO|DEF */
-#define CMD_RDGPSSTAT 0x85 /* differential correction status:trimble_dgpsstatus:RO */
-#define CMD_RSUPER 0x8F /* super paket::0 */
-
-typedef struct cmd_info
-{
- unsigned char cmd; /* command code */
- const char *cmdname; /* command name */
- const char *cmddesc; /* command description */
- const char *varname; /* name of variable */
- int varmode; /* mode of variable */
-} cmd_info_t;
-
-extern cmd_info_t trimble_rcmds[];
-extern cmd_info_t trimble_scmds[];
-
-extern cmd_info_t *trimble_convert P((unsigned int cmd, cmd_info_t *tbl));
-
-#endif
-/*
- * trimble.h,v
- * Revision 4.4 1999/02/28 11:41:11 kardel
- * (CMD_RUTCPARAM): control variable name unification
- *
- * Revision 4.3 1998/12/20 23:45:25 kardel
- * fix types and warnings
- *
- * Revision 4.2 1998/08/16 18:45:05 kardel
- * (CMD_RSTATTRACK): renamed mode 6 variable name
- *
- * Revision 4.1 1998/08/09 22:24:35 kardel
- * Trimble TSIP support
- *
- */
diff --git a/contrib/ntp/install-sh b/contrib/ntp/install-sh
deleted file mode 100755
index 6ce63b9..0000000
--- a/contrib/ntp/install-sh
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/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/kernel/Makefile.am b/contrib/ntp/kernel/Makefile.am
deleted file mode 100644
index b3cfc9d..0000000
--- a/contrib/ntp/kernel/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-#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
diff --git a/contrib/ntp/kernel/Makefile.in b/contrib/ntp/kernel/Makefile.in
deleted file mode 100644
index 07eb378..0000000
--- a/contrib/ntp/kernel/Makefile.in
+++ /dev/null
@@ -1,445 +0,0 @@
-# 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
-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 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
-
-.SUFFIXES:
-$(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) && $(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) $(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; }'`; \
- 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=`$(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
- 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-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-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-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:
-
-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-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-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) 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.
-.NOEXPORT:
diff --git a/contrib/ntp/kernel/README b/contrib/ntp/kernel/README
deleted file mode 100644
index 253d04e..0000000
--- a/contrib/ntp/kernel/README
+++ /dev/null
@@ -1,200 +0,0 @@
-Installing Line Disciplines and Streams Modules
-
-Description
-
-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
-timing jitter contributed by the serial port hardware and software
-discipline can accumulate to several milliseconds on a typical Unix
-workstation. In order to reduce these errors, a set of special line
-disciplines can be configured in the operating system process. These
-disciplines intercept special characters or signals provided by the
-radio or modem clock and save a local timestamp for later processing.
-
-The disciplines 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 reconfiguration of the Unix kernel and provisions in the NTP
-daemon xntpd. The streams modules can be pushed and popped from the
-streams stack using conventional System V streams program primitives.
-Note that not all Unix kernels support line disciplines and of those
-that do, not all support System V streams. The disciplines here are
-known to work correctly with SunOS 4.x kernels, but have not been tested
-for other kernels.
-
-There are two line disciplines included in the distribution. Support for
-each is enabled by adding flags to the DEFS_LOCAL line of the build
-configuration file ./Config.local. This can be done automatically by the
-autoconfiguration build procedures, or can be inserted/deleted after the
-process has completed.
-
-tty_clk (CLK)
-
- This discipline 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 timestamp in Unix timeval format. Both select() and
- SIGIO are supported by the discipline. The -DCLK flag is used to
- compile support for this disipline in the NTP daemon. This flag is
- included if the clkdefs.h file is found in the /sys/sys directory,
- or it can be added (or deleted) manually.
-
-tty_chu (CHU)
-
- This discipline is a special purpose line discipline for receiving
- a special timecode broadcast by Canadian time and frequency
- standard station CHU. The radio signal is first demodulated by the
- 300-baud modem included in the gadget box, then processed by the
- discipline and finally processed by the Scratchbuilt CHU Receiver
- discipline (type 7). This discipline should be used in raw mode.
- The -DCHU flag is used to compile support for this disipline in the
- NTP daemon. This flag is included if the chudefs.h file is found in
- the /sys/sys directory, or it can be added (or deleted) manually.
-
-There are two sets of line disciplines. The tty_clk.c and chu_clk.c are
-designed for use with older BSD systems and are compiled in the kernel.
-The tty_clk_STREAMS.c and chu_clk_STREAMS.c are designed for use with
-System V streams, in which case they can be either compiled in the
-kernel or dynamically loaded. Since these disciplines are small,
-unobtrusive, and to nothing unless specifically enabled by an
-application program, it probably doesn't matter which method is choosen.
-
-Compiling with the Kernel
-
-The following procedures are for the tty_clk line discipline; for the
-chu_clk, change "tty" to "chu".
-1. Copy tty_clk.c into /sys/os and clkdefs.h into /sys/sys.
-
-2. For SunOS 4.x systems, edit /sys/os/tty_conf.c using some facsimile
- of the following lines:
-
- #include "clk.h"
- ...
- #if NCLK > 0
- int clkopen(), clkclose(), clkwrite(), clkinput(), clkioctl();
- #endif
- ...
- #if NCLK > 0
- { clkopen, clkclose, ttread, clkwrite, clkioctl,
- clkinput, nodev, nulldev, ttstart, nullmodem, /* 10 CLK */
- ttselect },
- #else
- { nodev, nodev, nodev, nodev, nodev,
- nodev, nodev, nodev, nodev, nodev,
- nodev },
- #endif
-
- For Ultrix 4.x systems, edit /sys/data/tty_conf_data.c using some
- facsimile of the following lines:
-
- #include "clk.h"
- ...
- #if NCLK > 0
- int clkopen(), clkclose(), clkwrite(), clkinput(), clkioctl();
- #endif
- ...
- #if NCLK > 0
- clkopen, clkclose, ttread, clkwrite, clkioctl, /* 10 CLK */
- clkinput, nodev, nulldev, ttstart, nulldev,
- #else
- nodev, nodev, nodev, nodev, nodev,
- nodev, nodev, nodev, nodev, nodev,
- #endif
-
- If the kernel doesn't include the ??select() entry in the structure
- (i.e., there are only ten entry points in the structure) just leave
- it out. Also note that the number you give the line discipline (10
- in most kernels) will be specific to that kernel and will depend on
- what is in there already. The entries sould be in order with no
- missing space; that is, if there are only seven disciplines already
- defined and you want to use 10 for good reason, you should define a
- dummy 9th entry like this:
-
- nodev, nodev, nodev, nodev, nodev, /* 9 CLK */
- nodev, nodev, nodev, nodev, nodev,
-
-3. Edit /sys/h/ioctl.h and include a line somewhere near where other
- line disciplines are defined like:
-
- #define CLKLDISC 10 /* clock line discipline */
-
- The "10" should match what you used as the number in the preceding
- step.
-
-4. Edit /sys/conf/files and add a line which looks like:
-
- sys/tty_clk.c optional clk
-
-5. Edit the kernel configuration file to include the following:
-
- pseudo-device tty 4 # TTY clock support
-6. Run config, then make clean, then make depend, then make vmunix,
- then reboot the new kernel.
-
-Installing as a streams module
-
-The following procedures are for the tty_clk_STREAMS line discipline;
-for the tty_chu_STREAMS, change "clk" to "chu".
-
-1. Copy your choice to /sys/os, removing the "_STREAMS" in the
- filename.
-
-2. Copy the clkdefs.h file to /usr/include/sys, then construct a soft
- link to /sys/sys.
-
-3. Append to /sys/conf.common/files.cmn:
-
- os/tty_tty.c optional tty
-
-4. Edit /sys/sun/str_conf.c. You'll want to add lines in three places.
- It'll be sort of clear where when you see the file.
-
- #include "tty.h"
- ...
- #if NTTY > 0
- extern struct streamtab ttyinfo;
- #endif
- ...
- #if NTTY > 0
- { "tty", &ttyinfo },
- #endif
-
-5. Edit /sys/[arch]/conf/[k-name] (substituting the architecture and
- kernel name) to stick in:
-
- pseudo-device tty 4 # TTY clock support
-
- You can change "4" to anything you like. It will limit the number
- of instantiations of the tty discipline you can use at the same
- time.
-
-6. Run config, then make clean, then make depend, then make vmunix,
- then reboot the new kernel.
-
-Both disciplines can be dynamically loaded using streams procedures
-specific to the kernel. Before using the chu_clk discipline, all other
-streams modules that may already be on the stack should be popped, then
-the discipline should be pushed on the stack.
-
-How to Use the tty_clk Line Discipline
-
-The tty_clk line discipline defines a new ioctl(), CLK_SETSTR, which
-takes a pointer to a string of no more than CLK_MAXSTRSIZE characters.
-Until the first CLK_SETSTR is performed, the discipline will simply pass
-through characters. Once it is passed a string by CLK_SETSTR, any
-character in that string will be immediately followed by a timestamp in
-Unix timeval format. You can change the string whenever you want by
-doing another CLK_SETSTR. The character must be an exact, 8 bit match.
-The character '\000' cannot, unfortunately, be used, as it is the string
-terminator. Passing an empty string to CLK_SETSTR turns off stamping.
-Passing NULL will produce undefined results.
-
-How to Use the tty_chu Line Discipline
-The tty_chu line discipline translates data received from the CHU modem
-and returns chucode structures, as defined in chudefs.h, and expected by
-the Scratchbuilt CHU Receiver reference clock driver. Depending on the
-settings of PEDANTIC and ANAL_RETENTIVE used when compiling the kernel,
-some checking of the data may or may not be necessary.
-
-David L. Mills (mills@udel.edu)
diff --git a/contrib/ntp/kernel/chuinit.c b/contrib/ntp/kernel/chuinit.c
deleted file mode 100644
index 5d73e52..0000000
--- a/contrib/ntp/kernel/chuinit.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-** dynamically loadable chu driver
-**
-** /src/NTP/REPOSITORY/v3/kernel/chuinit.c,v 1.1.1.1 1994/07/11 07:56:25 kardel Exp
-**
-** william robertson <rob@agate.berkeley.edu>
-*/
-
-#include <sys/types.h>
-#include <sys/conf.h>
-#include <sys/errno.h>
-#include <sys/stream.h>
-#include <sys/syslog.h>
-
-#include <sun/openprom.h>
-#include <sun/vddrv.h>
-
-extern int findmod(); /* os/str_io.c */
-
-extern struct streamtab chuinfo;
-
-struct vdldrv vd = {
- VDMAGIC_USER,
- "chu"
- };
-
-
-int
-xxxinit(function_code, vdp, vdi, vds)
-unsigned int function_code;
-struct vddrv *vdp;
-addr_t vdi;
-struct vdstat *vds;
-{
- register int i = 0;
- register int j;
-
- switch (function_code) {
- case VDLOAD:
-
- if (findmod("chu") >= 0) {
- log(LOG_ERR, "chu stream module already loaded\n");
- return (EADDRINUSE);
- }
-
- i = findmod("\0");
-
- if (i == -1 || fmodsw[i].f_name[0] != '\0')
- return(-1);
-
- for (j = 0; vd.Drv_name[j] != '\0'; j++) /* XXX check bounds */
- fmodsw[i].f_name[j] = vd.Drv_name[j];
-
- fmodsw[i].f_name[j] = '\0';
- fmodsw[i].f_str = &chuinfo;
-
- vdp->vdd_vdtab = (struct vdlinkage *) &vd;
-
- return(0);
-
- case VDUNLOAD:
- if ((i = findmod(vd.Drv_name)) == -1)
- return(-1);
-
- fmodsw[i].f_name[0] = '\0';
- fmodsw[i].f_str = 0;
-
- return(0);
-
- case VDSTAT:
- return(0);
-
- default:
- return(EIO);
- }
-}
diff --git a/contrib/ntp/kernel/clkinit.c b/contrib/ntp/kernel/clkinit.c
deleted file mode 100644
index 1af57fd..0000000
--- a/contrib/ntp/kernel/clkinit.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-** dynamically loadable clk driver
-**
-** /src/NTP/REPOSITORY/v3/kernel/clkinit.c,v 1.1.1.1 1994/07/11 07:56:25 kardel Exp
-**
-** william robertson <rob@agate.berkeley.edu>
-*/
-
-#include <sys/types.h>
-#include <sys/conf.h>
-#include <sys/errno.h>
-#include <sys/stream.h>
-#include <sys/syslog.h>
-
-#include <sun/openprom.h>
-#include <sun/vddrv.h>
-
-extern int findmod(); /* os/str_io.c */
-
-extern struct streamtab clkinfo;
-
-struct vdldrv vd = {
- VDMAGIC_USER,
- "clk"
- };
-
-
-int
-xxxinit(function_code, vdp, vdi, vds)
-unsigned int function_code;
-struct vddrv *vdp;
-addr_t vdi;
-struct vdstat *vds;
-{
- register int i = 0;
- register int j;
-
- switch (function_code) {
- case VDLOAD:
-
- if (findmod("clk") >= 0) {
- log(LOG_ERR, "clk stream module already loaded\n");
- return (EADDRINUSE);
- }
-
- i = findmod("\0");
-
- if (i == -1 || fmodsw[i].f_name[0] != '\0')
- return(-1);
-
- for (j = 0; vd.Drv_name[j] != '\0'; j++) /* XXX check bounds */
- fmodsw[i].f_name[j] = vd.Drv_name[j];
-
- fmodsw[i].f_name[j] = '\0';
- fmodsw[i].f_str = &clkinfo;
-
- vdp->vdd_vdtab = (struct vdlinkage *) &vd;
-
- return(0);
-
- case VDUNLOAD:
- if ((i = findmod(vd.Drv_name)) == -1)
- return(-1);
-
- fmodsw[i].f_name[0] = '\0';
- fmodsw[i].f_str = 0;
-
- return(0);
-
- case VDSTAT:
- return(0);
-
- default:
- return(EIO);
- }
-}
diff --git a/contrib/ntp/kernel/sys/Makefile.am b/contrib/ntp/kernel/sys/Makefile.am
deleted file mode 100644
index e8465d9..0000000
--- a/contrib/ntp/kernel/sys/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-#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 tt560_api.h
-#EXTRA_DIST= TAGS
-# HMS: Avoid bug in automake
-#ETAGS_ARGS = ""
-ETAGS_ARGS = Makefile.am
diff --git a/contrib/ntp/kernel/sys/Makefile.in b/contrib/ntp/kernel/sys/Makefile.in
deleted file mode 100644
index e8635a3..0000000
--- a/contrib/ntp/kernel/sys/Makefile.in
+++ /dev/null
@@ -1,355 +0,0 @@
-# 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
-noinst_HEADERS = bsd_audioirig.h chudefs.h clkdefs.h i8253.h parsestreams.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) $(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 kernel/sys/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/kernel/sys/README b/contrib/ntp/kernel/sys/README
deleted file mode 100644
index b9d95d9..0000000
--- a/contrib/ntp/kernel/sys/README
+++ /dev/null
@@ -1,11 +0,0 @@
-README file for directory ./kernel/sys of the NTP Version 3 distribution
-
-This directory contains system header files used by the clock discipline
-and STREAMS modules in the .. (./kernel) directory.
-
-If the precision-time kernel (KERNEL_PLL define) is configured, the
-installation process requires the header file /usr/include/sys/timex.h
-for the particular architecture to be in place. The file timex.h included
-in this distribution is for Suns; the files for other systems can be
-found in the kernel distributions available from the manufacturer's
-representatives.
diff --git a/contrib/ntp/kernel/sys/bsd_audioirig.h b/contrib/ntp/kernel/sys/bsd_audioirig.h
deleted file mode 100644
index 9b7c690..0000000
--- a/contrib/ntp/kernel/sys/bsd_audioirig.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * $Header: bsd_audioirig.h,v 1.0 93/08/02 12:42:00
- */
-
-#ifndef _BSD_AUDIOIRIG_H_
-#define _BSD_AUDIOIRIG_H_
-
-#include <sys/time.h>
-
-/********************************************************************/
-/* user interface */
-
-/*
- * irig ioctls
- */
-#if defined(__STDC__) || (!defined(sun) && !defined(ibm032) && !defined(__GNUC))
-#define AUDIO_IRIG_OPEN _IO('A', 50)
-#define AUDIO_IRIG_CLOSE _IO('A', 51)
-#define AUDIO_IRIG_SETFORMAT _IOWR('A', 52, int)
-#else
-#define AUDIO_IRIG_OPEN _IO(A, 50)
-#define AUDIO_IRIG_CLOSE _IO(A, 51)
-#define AUDIO_IRIG_SETFORMAT _IOWR(A, 52, int)
-#endif
-
-/*
- * irig error codes
- */
-#define AUDIO_IRIG_BADSIGNAL 0x01
-#define AUDIO_IRIG_BADDATA 0x02
-#define AUDIO_IRIG_BADSYNC 0x04
-#define AUDIO_IRIG_BADCLOCK 0x08
-#define AUDIO_IRIG_OLDDATA 0x10
-
-/********************************************************************/
-
-/*
- * auib definitions
- */
-#define AUIB_SIZE (0x0040)
-#define AUIB_INC (0x0008)
-#define AUIB_MOD(k) ((k) & 0x0038)
-#define AUIB_INIT(ib) ((ib)->ib_head = (ib)->ib_tail = (ib)->ib_lock = \
- (ib)->phase = (ib)->shi = (ib)->slo = (ib)->high = \
- (ib)->level0 = (ib)->level1 = \
- (ib)->shift[0] = (ib)->shift[1] = (ib)->shift[2] = \
- (ib)->shift[3] = (ib)->sdata[0] = (ib)->sdata[1] = \
- (ib)->sdata[2] = (ib)->sdata[3] = (ib)->err = 0)
-#define AUIB_EMPTY(ib) ((ib)->ib_head == (ib)->ib_tail)
-#define AUIB_LEN(ib) (AUIB_MOD((ib)->ib_tail - (ib)->ib_head))
-#define AUIB_LEFT(ib) (AUIB_MOD((ib)->ib_head - (ib)->ib_tail - 1))
-#define IRIGDELAY 3
-#define IRIGLEVEL 1355
-
-#ifndef LOCORE
-/*
- * irig_time holds IRIG data for one second
- */
-struct irig_time {
- struct timeval stamp; /* timestamp */
- u_char bits[13]; /* 100 irig data bits */
- u_char status; /* status byte */
- char time[14]; /* time string */
-};
-
-/*
- * auib's are used for IRIG data communication between the trap
- * handler and the software interrupt.
- */
-struct auib {
- /* driver variables */
- u_short active; /* 0=inactive, else=active */
- u_short format; /* time output format */
- struct irig_time timestr; /* time structure */
- char buffer[14]; /* output formation buffer */
-
- /* hardware interrupt variables */
- struct timeval tv1,tv2,tv3; /* time stamps (median filter) */
- int level0,level1; /* lo/hi input levels */
- int level; /* decision level */
- int high; /* recent largest sample */
- int sl0,sl1; /* recent sample levels */
- int lasts; /* last sample value */
- u_short scount; /* sample count */
- u_long eacc; /* 10-bit element accumulator */
- u_long ebit; /* current bit in element */
- u_char r_level,mmr1; /* recording level 0-255 */
- int shi,slo,phase; /* AGC variables */
- u_long err; /* error status bits */
- int ecount; /* count of elements this second */
- long shift[4]; /* shift register of pos ident */
- long sdata[4]; /* shift register of symbols */
-
- int ib_head; /* queue head */
- int ib_tail; /* queue tail */
- u_short ib_lock; /* queue head lock */
- u_long ib_data[AUIB_SIZE]; /* data buffer */
-};
-#endif
-
-#endif /* _BSD_AUDIOIRIG_H_ */
diff --git a/contrib/ntp/kernel/sys/chudefs.h b/contrib/ntp/kernel/sys/chudefs.h
deleted file mode 100644
index f5549f5..0000000
--- a/contrib/ntp/kernel/sys/chudefs.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Definitions for the CHU line discipline v2.0
- */
-
-/*
- * The CHU time code consists of 10 BCD digits and is repeated
- * twice for a total of 10 characters. A time is taken after
- * the arrival of each character. The following structure is
- * used to return this stuff.
- */
-#define NCHUCHARS (10)
-
-struct chucode {
- u_char codechars[NCHUCHARS]; /* code characters */
- u_char ncodechars; /* number of code characters */
- u_char chutype; /* packet type */
- struct timeval codetimes[NCHUCHARS]; /* arrival times */
-};
-
-#define CHU_TIME 0 /* second half is equal to first half */
-#define CHU_YEAR 1 /* second half is one's complement */
-
diff --git a/contrib/ntp/kernel/sys/clkdefs.h b/contrib/ntp/kernel/sys/clkdefs.h
deleted file mode 100644
index afbc77a..0000000
--- a/contrib/ntp/kernel/sys/clkdefs.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Defines for the "clk" timestamping STREAMS module
- */
-
-#if defined(sun)
-#include <sys/ioccom.h>
-#else
-#include <sys/ioctl.h>
-#endif
-
-/*
- * First, we need to define the maximum size of the set of
- * characters to timestamp. 32 is MORE than enough.
- */
-
-#define CLK_MAXSTRSIZE 32
-struct clk_tstamp_charset { /* XXX to use _IOW not _IOWN */
- char val[CLK_MAXSTRSIZE];
-};
-
-/*
- * ioctl(fd, CLK_SETSTR, (char*)c );
- *
- * will tell the driver that any char in the null-terminated
- * string c should be timestamped. It is possible, though
- * unlikely that this ioctl number could collide with an
- * existing one on your system. If so, change the 'K'
- * to some other letter. However, once you've compiled
- * the kernel with this include file, you should NOT
- * change this file.
- */
-
-#if defined(__STDC__) /* XXX avoid __STDC__=0 on SOLARIS */
-#define CLK_SETSTR _IOW('K', 01, struct clk_tstamp_charset)
-#else
-#define CLK_SETSTR _IOW(K, 01, struct clk_tstamp_charset)
-#endif
-
diff --git a/contrib/ntp/kernel/sys/i8253.h b/contrib/ntp/kernel/sys/i8253.h
deleted file mode 100644
index 7096593..0000000
--- a/contrib/ntp/kernel/sys/i8253.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (c) 1995 Vixie Enterprises
- *
- * 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, and that
- * the name of Vixie Enterprises not be used in advertising or publicity
- * pertaining to distribution of the document or software without specific,
- * written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND VIXIE ENTERPRISES DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VIXIE ENTERPRISES
- * 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.
- */
-
-#ifndef _I8253_DEFINED
-#define _I8253_DEFINED
-
-typedef union {
- unsigned char i;
- struct {
- unsigned int bcd : 1;
-#define i8253_binary 0
-#define i8253_bcd 1
- unsigned int mode : 3;
-#define i8253_termcnt 0
-#define i8253_oneshot 1
-#define i8253_rategen 2
-#define i8253_sqrwave 3
-#define i8253_softstb 4
-#define i8253_hardstb 5
- unsigned int rl : 2;
-#define i8253_latch 0
-#define i8253_lsb 1
-#define i8253_msb 2
-#define i8253_lmb 3
- unsigned int cntr : 2;
-#define i8253_cntr_0 0
-#define i8253_cntr_1 1
-#define i8253_cntr_2 2
- } s;
-} i8253_ctrl;
-
-#endif /*_I8253_DEFINED*/
diff --git a/contrib/ntp/kernel/sys/parsestreams.h b/contrib/ntp/kernel/sys/parsestreams.h
deleted file mode 100644
index 47649b3..0000000
--- a/contrib/ntp/kernel/sys/parsestreams.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * /src/NTP/ntp-4/kernel/sys/parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A
- *
- * parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A
- *
- * Copyright (c) 1989-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#if !(defined(lint) || defined(__GNUC__))
- static char sysparsehrcsid[] = "parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A";
-#endif
-
-#undef PARSEKERNEL
-#if defined(KERNEL) || defined(_KERNEL)
-#ifndef PARSESTREAM
-#define PARSESTREAM
-#endif
-#endif
-#if defined(PARSESTREAM) && defined(HAVE_SYS_STREAM_H)
-#define PARSEKERNEL
-
-#ifdef HAVE_SYS_TERMIOS_H
-#include <sys/termios.h>
-#endif
-
-#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)
-/*
- * Sorry, but in SunOS 4.x AND Solaris 2.x kernels there are no
- * mem* operations. I don't want them - bcopy, bzero
- * are fine in the kernel
- */
-#undef HAVE_STRING_H /* don't include that at kernel level - prototype mismatch in Solaris 2.6 */
-#include "ntp_string.h"
-#else
-#include <stdio.h>
-#endif
-
-struct parsestream /* parse module local data */
-{
- queue_t *parse_queue; /* read stream for this channel */
- queue_t *parse_dqueue; /* driver queue entry (PPS support) */
- unsigned long parse_status; /* operation flags */
- void *parse_data; /* local data space (PPS support) */
- parse_t parse_io; /* io structure */
- struct ppsclockev parse_ppsclockev; /* copy of last pps event */
-};
-
-typedef struct parsestream parsestream_t;
-
-#define PARSE_ENABLE 0x0001
-
-/*--------------- debugging support ---------------------------------*/
-
-#define DD_OPEN 0x00000001
-#define DD_CLOSE 0x00000002
-#define DD_RPUT 0x00000004
-#define DD_WPUT 0x00000008
-#define DD_RSVC 0x00000010
-#define DD_PARSE 0x00000020
-#define DD_INSTALL 0x00000040
-#define DD_ISR 0x00000080
-#define DD_RAWDCF 0x00000100
-
-extern int parsedebug;
-
-#ifdef DEBUG_PARSE
-
-#define parseprintf(X, Y) if ((X) & parsedebug) printf Y
-
-#else
-
-#define parseprintf(X, Y)
-
-#endif
-#endif
-
-/*
- * parsestreams.h,v
- * Revision 4.4 1998/06/14 21:09:32 kardel
- * Sun acc cleanup
- *
- * Revision 4.3 1998/06/13 18:14:32 kardel
- * make mem*() to b*() mapping magic work on Solaris too
- *
- * Revision 4.2 1998/06/13 15:16:22 kardel
- * fix mem*() to b*() function macro emulation
- *
- * Revision 4.1 1998/06/13 11:50:37 kardel
- * STREAM macro gone in favor of HAVE_SYS_STREAM_H
- *
- * Revision 4.0 1998/04/10 19:51:30 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.2 1998/04/10 19:27:42 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- */
diff --git a/contrib/ntp/kernel/sys/pcl720.h b/contrib/ntp/kernel/sys/pcl720.h
deleted file mode 100644
index cf4eccd..0000000
--- a/contrib/ntp/kernel/sys/pcl720.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright (c) 1995 Vixie Enterprises
- *
- * 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, and that
- * the name of Vixie Enterprises not be used in advertising or publicity
- * pertaining to distribution of the document or software without specific,
- * written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND VIXIE ENTERPRISES DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VIXIE ENTERPRISES
- * 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.
- */
-
-#ifndef _PCL720_DEFINED
-#define _PCL720_DEFINED
-
-#define pcl720_data(base,bit) (base+(bit>>3))
-#define pcl720_data_0_7(base) (base+0)
-#define pcl720_data_8_15(base) (base+1)
-#define pcl720_data_16_23(base) (base+2)
-#define pcl720_data_24_31(base) (base+3)
-#define pcl720_cntr(base,cntr) (base+4+cntr) /* cntr: 0..2 */
-#define pcl720_cntr_0(base) (base+4)
-#define pcl720_cntr_1(base) (base+5)
-#define pcl720_cntr_2(base) (base+6)
-#define pcl720_ctrl(base) (base+7)
-
-#ifndef DEBUG_PCL720
-#define pcl720_inb(x) inb(x)
-#define pcl720_outb(x,y) outb(x,y)
-#else
-static unsigned char pcl720_inb(int addr) {
- unsigned char x = inb(addr);
- fprintf(DEBUG_PCL720, "inb(0x%x) -> 0x%x\n", addr, x);
- return (x);
-}
-static void pcl720_outb(int addr, unsigned char x) {
- outb(addr, x);
- fprintf(DEBUG_PCL720, "outb(0x%x, 0x%x)\n", addr, x);
-}
-#endif
-
-#define pcl720_load(Base,Cntr,Mode,Val) \
- ({ register unsigned int b = Base, c = Cntr, v = Val; \
- i8253_ctrl ctrl; \
- \
- ctrl.s.bcd = i8253_binary; \
- ctrl.s.mode = Mode; \
- ctrl.s.rl = i8253_lmb; \
- ctrl.s.cntr = c; \
- pcl720_outb(pcl720_ctrl(b), ctrl.i); \
- pcl720_outb(pcl720_cntr(b,c), v); \
- pcl720_outb(pcl720_cntr(b,c), v >> 8); \
- v; \
- })
-
-#define pcl720_read(Base,Cntr) \
- ({ register unsigned int b = Base, v; \
- i8253_ctrl ctrl; \
- \
- ctrl.s.rl = i8253_latch; \
- ctrl.s.cntr = i8253_cntr_0; \
- pcl720_outb(pcl720_ctrl(b), ctrl.i); \
- v = pcl720_inb(pcl720_cntr_0(b)); \
- v |= (pcl720_inb(pcl720_cntr_0(b)) << 8); \
- v; \
- })
-
-#define pcl720_input(Base) \
- ({ register unsigned int b = Base, v; \
- \
- v = pcl720_inb(pcl720_data_0_7(b)); \
- v |= (pcl720_inb(pcl720_data_8_15(b)) << 8); \
- v |= (pcl720_inb(pcl720_data_16_23(b)) << 16); \
- v |= (pcl720_inb(pcl720_data_24_31(b)) << 24); \
- v; \
- })
-
-#define pcl720_output(Base,Value) \
- ({ register unsigned int b = Base, v = Value; \
- \
- pcl720_outb(pcl720_data_0_7(b), v); \
- pcl720_outb(pcl720_data_8_15(b), v << 8); \
- pcl720_outb(pcl720_data_16_23(b), v << 16); \
- pcl720_outb(pcl720_data_24_31(b), v << 24); \
- v; \
- })
-
-#endif /*_PCL720_DEFINED*/
diff --git a/contrib/ntp/kernel/sys/ppsclock.h b/contrib/ntp/kernel/sys/ppsclock.h
deleted file mode 100644
index b0fe407..0000000
--- a/contrib/ntp/kernel/sys/ppsclock.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66.
- *
- * Copyright (c) 1992 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, Lawrence Berkeley Laboratory.
- * 4. The name of the University may not 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.
- */
-
-#ifndef TIOCGPPSEV
-#define PPSCLOCKSTR "ppsclock"
-
-#ifndef HAVE_STRUCT_PPSCLOCKEV
-struct ppsclockev {
- struct timeval tv;
- u_int serial;
-};
-#endif
-
-#if defined(__STDC__) || defined(SYS_HPUX)
-#ifdef _IOR
-#define CIOGETEV _IOR('C', 0, struct ppsclockev) /* get last pps event */
-#else /* XXX SOLARIS is different */
-#define CIO ('C'<<8)
-#define CIOGETEV (CIO|0) /* get last pps event */
-#endif /* _IOR */
-#else /* __STDC__ */
-#ifdef _IOR
-#define CIOGETEV _IOR(C, 0, struct ppsclockev) /* get last pps event */
-#else /* XXX SOLARIS is different */
-#define CIO ('C'<<8)
-#define CIOGETEV (CIO|0) /* get last pps event */
-#endif /* _IOR */
-#endif /* __STDC__ */
-#else
-#define CIOGETEV TIOCGPPSEV
-#endif
diff --git a/contrib/ntp/kernel/sys/timex.h b/contrib/ntp/kernel/sys/timex.h
deleted file mode 100644
index d42ec08..0000000
--- a/contrib/ntp/kernel/sys/timex.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/******************************************************************************
- * *
- * Copyright (c) David L. Mills 1993, 1994 *
- * *
- * 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 "as is" without express or implied warranty. *
- * *
- ******************************************************************************/
-
-/*
- * Modification history timex.h
- *
- * 26 Sep 94 David L. Mills
- * Added defines for hybrid phase/frequency-lock loop.
- *
- * 19 Mar 94 David L. Mills
- * Moved defines from kernel routines to header file and added new
- * defines for PPS phase-lock loop.
- *
- * 20 Feb 94 David L. Mills
- * Revised status codes and structures for external clock and PPS
- * signal discipline.
- *
- * 28 Nov 93 David L. Mills
- * Adjusted parameters to improve stability and increase poll
- * interval.
- *
- * 17 Sep 93 David L. Mills
- * Created file
- */
-/*
- * This header file defines the Network Time Protocol (NTP) interfaces
- * for user and daemon application programs. These are implemented using
- * private syscalls and data structures and require specific kernel
- * support.
- *
- * NAME
- * ntp_gettime - NTP user application interface
- *
- * SYNOPSIS
- * #include <sys/timex.h>
- *
- * int syscall(SYS_ntp_gettime, tptr)
- *
- * int SYS_ntp_gettime defined in syscall.h header file
- * struct ntptimeval *tptr pointer to ntptimeval structure
- *
- * NAME
- * ntp_adjtime - NTP daemon application interface
- *
- * SYNOPSIS
- * #include <sys/timex.h>
- *
- * int syscall(SYS_ntp_adjtime, mode, tptr)
- *
- * int SYS_ntp_adjtime defined in syscall.h header file
- * struct timex *tptr pointer to timex structure
- *
- */
-#ifndef _SYS_TIMEX_H_
-#define _SYS_TIMEX_H_ 1
-
-#ifndef MSDOS /* Microsoft specific */
-#include <sys/syscall.h>
-#endif /* MSDOS */
-
-/*
- * The following defines establish the engineering parameters of the
- * phase-lock loop (PLL) model used in the kernel implementation. These
- * parameters have been carefully chosen by analysis for good stability
- * and wide dynamic range.
- *
- * The hz variable is defined in the kernel build environment. It
- * establishes the timer interrupt frequency, 100 Hz for the SunOS
- * kernel, 256 Hz for the Ultrix kernel and 1024 Hz for the OSF/1
- * kernel. SHIFT_HZ expresses the same value as the nearest power of two
- * in order to avoid hardware multiply operations.
- *
- * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
- * for a slightly underdamped convergence characteristic. SHIFT_KH
- * establishes the damping of the FLL and is chosen by wisdom and black
- * art.
- *
- * MAXTC establishes the maximum time constant of the PLL. With the
- * SHIFT_KG and SHIFT_KF values given and a time constant range from
- * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours,
- * respectively.
- */
-#define SHIFT_HZ 7 /* log2(hz) */
-#define SHIFT_KG 6 /* phase factor (shift) */
-#define SHIFT_KF 16 /* PLL frequency factor (shift) */
-#define SHIFT_KH 2 /* FLL frequency factor (shift) */
-#define MAXTC 6 /* maximum time constant (shift) */
-
-/*
- * The following defines establish the scaling of the various variables
- * used by the PLL. They are chosen to allow the greatest precision
- * possible without overflow of a 32-bit word.
- *
- * SHIFT_SCALE defines the scaling (shift) of the time_phase variable,
- * which serves as a an extension to the low-order bits of the system
- * clock variable time.tv_usec.
- *
- * SHIFT_UPDATE defines the scaling (shift) of the time_offset variable,
- * which represents the current time offset with respect to standard
- * time.
- *
- * SHIFT_USEC defines the scaling (shift) of the time_freq and
- * time_tolerance variables, which represent the current frequency
- * offset and maximum frequency tolerance.
- *
- * FINEUSEC is 1 us in SHIFT_UPDATE units of the time_phase variable.
- */
-#define SHIFT_SCALE 22 /* phase scale (shift) */
-#define SHIFT_UPDATE (SHIFT_KG + MAXTC) /* time offset scale (shift) */
-#define SHIFT_USEC 16 /* frequency offset scale (shift) */
-#define FINEUSEC (1L << SHIFT_SCALE) /* 1 us in phase units */
-
-/*
- * The following defines establish the performance envelope of the PLL.
- * They insure it operates within predefined limits, in order to satisfy
- * correctness assertions. An excursion which exceeds these bounds is
- * clamped to the bound and operation proceeds accordingly. In practice,
- * this can occur only if something has failed or is operating out of
- * tolerance, but otherwise the PLL continues to operate in a stable
- * mode.
- *
- * MAXPHASE must be set greater than or equal to CLOCK.MAX (128 ms), as
- * defined in the NTP specification. CLOCK.MAX establishes the maximum
- * time offset allowed before the system time is reset, rather than
- * incrementally adjusted. Here, the maximum offset is clamped to
- * MAXPHASE only in order to prevent overflow errors due to defective
- * protocol implementations.
- *
- * MAXFREQ is the maximum frequency tolerance of the CPU clock
- * oscillator plus the maximum slew rate allowed by the protocol. It
- * should be set to at least the frequency tolerance of the oscillator
- * plus 100 ppm for vernier frequency adjustments. If the kernel
- * PPS discipline code is configured (PPS_SYNC), the oscillator time and
- * frequency are disciplined to an external source, presumably with
- * negligible time and frequency error relative to UTC, and MAXFREQ can
- * be reduced.
- *
- * MAXTIME is the maximum jitter tolerance of the PPS signal if the
- * kernel PPS discipline code is configured (PPS_SYNC).
- *
- * MINSEC and MAXSEC define the lower and upper bounds on the interval
- * between protocol updates.
- */
-#define MAXPHASE 512000L /* max phase error (us) */
-#ifdef PPS_SYNC
-#define MAXFREQ (512L << SHIFT_USEC) /* max freq error (100 ppm) */
-#define MAXTIME (200L << PPS_AVG) /* max PPS error (jitter) (200 us) */
-#else
-#define MAXFREQ (512L << SHIFT_USEC) /* max freq error (200 ppm) */
-#endif /* PPS_SYNC */
-#define MINSEC 16L /* min interval between updates (s) */
-#define MAXSEC 1200L /* max interval between updates (s) */
-
-#ifdef PPS_SYNC
-/*
- * The following defines are used only if a pulse-per-second (PPS)
- * signal is available and connected via a modem control lead, such as
- * produced by the optional ppsclock feature incorporated in the Sun
- * asynch driver. They establish the design parameters of the frequency-
- * lock loop used to discipline the CPU clock oscillator to the PPS
- * signal.
- *
- * PPS_AVG is the averaging factor for the frequency loop, as well as
- * the time and frequency dispersion.
- *
- * PPS_SHIFT and PPS_SHIFTMAX specify the minimum and maximum
- * calibration intervals, respectively, in seconds as a power of two.
- *
- * PPS_VALID is the maximum interval before the PPS signal is considered
- * invalid and protocol updates used directly instead.
- *
- * MAXGLITCH is the maximum interval before a time offset of more than
- * MAXTIME is believed.
- */
-#define PPS_AVG 2 /* pps averaging constant (shift) */
-#define PPS_SHIFT 2 /* min interval duration (s) (shift) */
-#define PPS_SHIFTMAX 8 /* max interval duration (s) (shift) */
-#define PPS_VALID 120 /* pps signal watchdog max (s) */
-#define MAXGLITCH 30 /* pps signal glitch max (s) */
-#endif /* PPS_SYNC */
-
-/*
- * The following defines and structures define the user interface for
- * the ntp_gettime() and ntp_adjtime() system calls.
- *
- * Control mode codes (timex.modes)
- */
-#define MOD_OFFSET 0x0001 /* set time offset */
-#define MOD_FREQUENCY 0x0002 /* set frequency offset */
-#define MOD_MAXERROR 0x0004 /* set maximum time error */
-#define MOD_ESTERROR 0x0008 /* set estimated time error */
-#define MOD_STATUS 0x0010 /* set clock status bits */
-#define MOD_TIMECONST 0x0020 /* set pll time constant */
-#define MOD_CANSCALE 0x0040 /* kernel can scale offset field */
-#define MOD_DOSCALE 0x0080 /* userland wants to scale offset field */
-
-/*
- * Status codes (timex.status)
- */
-#define STA_PLL 0x0001 /* enable PLL updates (rw) */
-#define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */
-#define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */
-#define STA_FLL 0x0008 /* select frequency-lock mode (rw) */
-
-#define STA_INS 0x0010 /* insert leap (rw) */
-#define STA_DEL 0x0020 /* delete leap (rw) */
-#define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */
-#define STA_FREQHOLD 0x0080 /* hold frequency (rw) */
-
-#define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */
-#define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */
-#define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */
-#define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */
-
-#define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */
-
-#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
- STA_PPSERROR | STA_CLOCKERR) /* read-only bits */
-
-/*
- * Clock states (time_state)
- */
-#define TIME_OK 0 /* no leap second warning */
-#define TIME_INS 1 /* insert leap second warning */
-#define TIME_DEL 2 /* delete leap second warning */
-#define TIME_OOP 3 /* leap second in progress */
-#define TIME_WAIT 4 /* leap second has occurred */
-#define TIME_ERROR 5 /* clock not synchronized */
-
-/*
- * NTP user interface (ntp_gettime()) - used to read kernel clock values
- *
- * Note: maximum error = NTP synch distance = dispersion + delay / 2;
- * estimated error = NTP dispersion.
- */
-struct ntptimeval {
- struct timeval time; /* current time (ro) */
- long maxerror; /* maximum error (us) (ro) */
- long esterror; /* estimated error (us) (ro) */
-};
-
-/*
- * NTP daemon interface - (ntp_adjtime()) used to discipline CPU clock
- * oscillator
- */
-struct timex {
- unsigned int modes; /* clock mode bits (wo) */
- long offset; /* time offset (us) (rw) */
- long freq; /* frequency offset (scaled ppm) (rw) */
- long maxerror; /* maximum error (us) (rw) */
- long esterror; /* estimated error (us) (rw) */
- int status; /* clock status bits (rw) */
- long constant; /* pll time constant (rw) */
- long precision; /* clock precision (us) (ro) */
- long tolerance; /* clock frequency tolerance (scaled
- * ppm) (ro) */
- /*
- * The following read-only structure members are implemented
- * only if the PPS signal discipline is configured in the
- * kernel.
- */
- long ppsfreq; /* pps frequency (scaled ppm) (ro) */
- long jitter; /* pps jitter (us) (ro) */
- int shift; /* interval duration (s) (shift) (ro) */
- long stabil; /* pps stability (scaled ppm) (ro) */
- long jitcnt; /* jitter limit exceeded (ro) */
- long calcnt; /* calibration intervals (ro) */
- long errcnt; /* calibration errors (ro) */
- long stbcnt; /* stability limit exceeded (ro) */
-
-};
-#ifdef __FreeBSD__
-
-/*
- * sysctl identifiers underneath kern.ntp_pll
- */
-#define NTP_PLL_GETTIME 1 /* used by ntp_gettime() */
-#define NTP_PLL_MAXID 2 /* number of valid ids */
-
-#define NTP_PLL_NAMES { \
- { 0, 0 }, \
- { "gettime", CTLTYPE_STRUCT }, \
- }
-
-#ifndef KERNEL
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int ntp_gettime __P((struct ntptimeval *));
-extern int ntp_adjtime __P((struct timex *));
-__END_DECLS
-
-#endif /* not KERNEL */
-
-#endif /* __FreeBSD__ */
-#endif /* _SYS_TIMEX_H_ */
diff --git a/contrib/ntp/kernel/sys/tpro.h b/contrib/ntp/kernel/sys/tpro.h
deleted file mode 100644
index f276f81..0000000
--- a/contrib/ntp/kernel/sys/tpro.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Structure for the KSI/Odetics TPRO-S data returned in reponse to a
- * read() call. Note that these are driver-specific and not dependent on
- * 32/64-bit architecture.
- */
-struct tproval {
- u_short day100; /* days * 100 */
- u_short day10; /* days * 10 */
- u_short day1; /* days * 1 */
- u_short hour10; /* hours * 10 */
- u_short hour1; /* hours * 1 */
- u_short min10; /* minutes * 10 */
- u_short min1; /* minutes * 1 */
- u_short sec10; /* seconds * 10 */
- u_short sec1; /* seconds * 1*/
- u_short ms100; /* milliseconds * 100 */
- u_short ms10; /* milliseconds * 10 */
- u_short ms1; /* milliseconds * 1 */
- u_short usec100; /* microseconds * 100 */
- u_short usec10; /* microseconds * 10 */
- u_short usec1; /* microseconds * 1 */
- long tv_sec; /* seconds */
- long tv_usec; /* microseconds */
- u_short status; /* status register */
-};
-
-/*
- * Status register bits
- */
-#define TIMEAVAIL 0x0001 /* time available */
-#define NOSIGNAL 0x0002 /* insufficient IRIG-B signal */
-#define NOSYNC 0x0004 /* local oscillator not synchronized */
-
-/* end of tpro.h */
diff --git a/contrib/ntp/kernel/sys/tt560_api.h b/contrib/ntp/kernel/sys/tt560_api.h
deleted file mode 100644
index c87a7b1..0000000
--- a/contrib/ntp/kernel/sys/tt560_api.h
+++ /dev/null
@@ -1,489 +0,0 @@
-/***********************************************************************
- *
- * 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/kernel/tty_chu.c b/contrib/ntp/kernel/tty_chu.c
deleted file mode 100644
index 4615875..0000000
--- a/contrib/ntp/kernel/tty_chu.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/* tty_chu.c,v 3.1 1993/07/06 01:07:30 jbj Exp
- * tty_chu.c - CHU line driver
- */
-
-#include "chu.h"
-#if NCHU > 0
-
-#include "../h/param.h"
-#include "../h/types.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/ioctl.h"
-#include "../h/tty.h"
-#include "../h/proc.h"
-#include "../h/file.h"
-#include "../h/conf.h"
-#include "../h/buf.h"
-#include "../h/uio.h"
-
-#include "../h/chudefs.h"
-
-/*
- * Line discipline for receiving CHU time codes.
- * Does elementary noise elimination, takes time stamps after
- * the arrival of each character, returns a buffer full of the
- * received 10 character code and the associated time stamps.
- */
-#define NUMCHUBUFS 3
-
-struct chudata {
- u_char used; /* Set to 1 when structure in use */
- u_char lastindex; /* least recently used buffer */
- u_char curindex; /* buffer to use */
- u_char sleeping; /* set to 1 when we're sleeping on a buffer */
- struct chucode chubuf[NUMCHUBUFS];
-} chu_data[NCHU];
-
-/*
- * Number of microseconds we allow between
- * character arrivals. The speed is 300 baud
- * so this should be somewhat more than 30 msec
- */
-#define CHUMAXUSEC (50*1000) /* 50 msec */
-
-int chu_debug = 0;
-
-/*
- * Open as CHU time discipline. Called when discipline changed
- * with ioctl, and changes the interpretation of the information
- * in the tty structure.
- */
-/*ARGSUSED*/
-chuopen(dev, tp)
- dev_t dev;
- register struct tty *tp;
-{
- register struct chudata *chu;
-
- /*
- * Don't allow multiple opens. This will also protect us
- * from someone opening /dev/tty
- */
- if (tp->t_line == CHULDISC)
- return (EBUSY);
- ttywflush(tp);
- for (chu = chu_data; chu < &chu_data[NCHU]; chu++)
- if (!chu->used)
- break;
- if (chu >= &chu[NCHU])
- return (EBUSY);
- chu->used++;
- chu->lastindex = chu->curindex = 0;
- chu->sleeping = 0;
- chu->chubuf[0].ncodechars = 0;
- tp->T_LINEP = (caddr_t) chu;
- return (0);
-}
-
-/*
- * Break down... called when discipline changed or from device
- * close routine.
- */
-chuclose(tp)
- register struct tty *tp;
-{
- register int s = spl5();
-
- ((struct chudata *) tp->T_LINEP)->used = 0;
- tp->t_cp = 0;
- tp->t_inbuf = 0;
- tp->t_rawq.c_cc = 0; /* clear queues -- paranoid */
- tp->t_canq.c_cc = 0;
- tp->t_line = 0; /* paranoid: avoid races */
- splx(s);
-}
-
-/*
- * Read a CHU buffer. Sleep on the current buffer
- */
-churead(tp, uio)
- register struct tty *tp;
- struct uio *uio;
-{
- register struct chudata *chu;
- register struct chucode *chucode;
- register int s;
-
- if ((tp->t_state&TS_CARR_ON)==0)
- return (EIO);
-
- chu = (struct chudata *) (tp->T_LINEP);
-
- s = spl5();
- chucode = &(chu->chubuf[chu->lastindex]);
- while (chu->curindex == chu->lastindex) {
- chu->sleeping = 1;
- sleep((caddr_t)chucode, TTIPRI);
- }
- chu->sleeping = 0;
- if (++(chu->lastindex) >= NUMCHUBUFS)
- chu->lastindex = 0;
- splx(s);
-
- return (uiomove((caddr_t)chucode, sizeof(*chucode), UIO_READ, uio));
-}
-
-/*
- * Low level character input routine.
- * If the character looks okay, grab a time stamp. If the stuff in
- * the buffer is too old, dump it and start fresh. If the character is
- * non-BCDish, everything in the buffer too.
- */
-chuinput(c, tp)
- register int c;
- register struct tty *tp;
-{
- register struct chudata *chu = (struct chudata *) tp->T_LINEP;
- register struct chucode *chuc;
- register int i;
- long sec, usec;
- struct timeval tv;
-
- /*
- * Do a check on the BSDness of the character. This delays
- * the time stamp a bit but saves a fair amount of overhead
- * when the static is bad.
- */
- if (((c) & 0xf) > 9 || (((c)>>4) & 0xf) > 9) {
- chuc = &(chu->chubuf[chu->curindex]);
- chuc->ncodechars = 0; /* blow all previous away */
- return;
- }
-
- /*
- * Call microtime() to get the current time of day
- */
- microtime(&tv);
-
- /*
- * Compute the difference in this character's time stamp
- * and the last. If it exceeds the margin, blow away all
- * the characters currently in the buffer.
- */
- chuc = &(chu->chubuf[chu->curindex]);
- i = (int)chuc->ncodechars;
- if (i > 0) {
- sec = tv.tv_sec - chuc->codetimes[i-1].tv_sec;
- usec = tv.tv_usec - chuc->codetimes[i-1].tv_usec;
- if (usec < 0) {
- sec -= 1;
- usec += 1000000;
- }
- if (sec != 0 || usec > CHUMAXUSEC) {
- i = 0;
- chuc->ncodechars = 0;
- }
- }
-
- /*
- * Store the character. If we're done, have to tell someone
- */
- chuc->codechars[i] = (u_char)c;
- chuc->codetimes[i] = tv;
-
- if (++i < NCHUCHARS) {
- /*
- * Not much to do here. Save the count and wait
- * for another character.
- */
- chuc->ncodechars = (u_char)i;
- } else {
- /*
- * Mark this buffer full and point at next. If the
- * next buffer is full we overwrite it by bumping the
- * next pointer.
- */
- chuc->ncodechars = NCHUCHARS;
- if (++(chu->curindex) >= NUMCHUBUFS)
- chu->curindex = 0;
- if (chu->curindex == chu->lastindex)
- if (++(chu->lastindex) >= NUMCHUBUFS)
- chu->lastindex = 0;
- chu->chubuf[chu->curindex].ncodechars = 0;
-
- /*
- * Wake up anyone sleeping on this. Also wake up
- * selectors and/or deliver a SIGIO as required.
- */
- if (tp->t_rsel) {
- selwakeup(tp->t_rsel, tp->t_state&TS_RCOLL);
- tp->t_state &= ~TS_RCOLL;
- tp->t_rsel = 0;
- }
- if (tp->t_state & TS_ASYNC)
- gsignal(tp->t_pgrp, SIGIO);
- if (chu->sleeping)
- (void) wakeup((caddr_t)chuc);
- }
-}
-
-/*
- * Handle ioctls. We reject all tty-style except those that
- * change the line discipline.
- */
-chuioctl(tp, cmd, data, flag)
- struct tty *tp;
- int cmd;
- caddr_t data;
- int flag;
-{
-
- if ((cmd>>8) != 't')
- return (-1);
- switch (cmd) {
- case TIOCSETD:
- case TIOCGETD:
- case TIOCGETP:
- case TIOCGETC:
- return (-1);
- }
- return (ENOTTY); /* not quite appropriate */
-}
-
-
-chuselect(dev, rw)
- dev_t dev;
- int rw;
-{
- register struct tty *tp = &cdevsw[major(dev)].d_ttys[minor(dev)];
- struct chudata *chu;
- int s = spl5();
-
- chu = (struct chudata *) (tp->T_LINEP);
-
- switch (rw) {
-
- case FREAD:
- if (chu->curindex != chu->lastindex)
- goto win;
- if (tp->t_rsel && tp->t_rsel->p_wchan == (caddr_t)&selwait)
- tp->t_state |= TS_RCOLL;
- else
- tp->t_rsel = u.u_procp;
- break;
-
- case FWRITE:
- goto win;
- }
- splx(s);
- return (0);
-win:
- splx(s);
- return (1);
-}
-#endif NCHU
diff --git a/contrib/ntp/kernel/tty_chu_STREAMS.c b/contrib/ntp/kernel/tty_chu_STREAMS.c
deleted file mode 100644
index f46e25d..0000000
--- a/contrib/ntp/kernel/tty_chu_STREAMS.c
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- * CHU STREAMS module for SunOS
- *
- * Version 2.6
- *
- * Copyright 1991-1994, Nick Sayer
- *
- * Special thanks to Greg Onufer for his debug assists.
- * Special thanks to Matthias Urlichs for the 4.1.x loadable driver support
- * code.
- * Special wet-noodle whippings to Sun for not properly documenting
- * ANYTHING that makes this stuff at all possible.
- *
- * Should be PUSHed directly on top of a serial I/O channel.
- * Provides complete chucode structures to user space.
- *
- * COMPILATION:
- *
- *
- * To make a SunOS 4.1.x compatable loadable module (from the ntp kernel
- * directory):
- *
- * % cc -c -I../include -DLOADABLE tty_chu_STREAMS.c
- *
- * The resulting .o file is the loadable module. Modload it
- * thusly:
- *
- * % modload tty_chu_STREAMS.o -entry _chuinit
- *
- * When none of the instances are pushed in a STREAM, you can
- * modunload the driver in the usual manner if you wish.
- *
- * As an alternative to loading it dynamically you can compile it
- * directly into the kernel by hacking str_conf.c. See the README
- * file for more details on doing it the old fashioned way.
- *
- *
- * To make a Solaris 2.x compatable module (from the ntp kernel
- * directory):
- *
- * % {gcc,cc} -c -I../include -DSOLARIS2 tty_chu_STREAMS.c
- * % ld -r -o /usr/kernel/strmod/chu tty_chu_STREAMS.o
- * % chmod 755 /usr/kernel/strmod/chu
- *
- * The OS will load it for you automagically when it is first pushed.
- *
- * If you get syntax errors from <sys/timer.h> (really references
- * to types that weren't typedef'd in gcc's version of types.h),
- * add -D_SYS_TIMER_H to blot out the miscreants.
- *
- * Under Solaris 2.2 and previous, do not attempt to modunload the
- * module unless you're SURE it's not in use. I haven't tried it, but
- * I've been told it won't do the right thing. Under Solaris 2.3 (and
- * presumably future revs) an attempt to unload the module when it's in
- * use will properly refuse with a "busy" message.
- *
- *
- * HISTORY:
- *
- * v2.6 - Mutexed the per-instance chucode just to be safe.
- * v2.5 - Fixed show-stopper bug in Solaris 2.x - qprocson().
- * v2.4 - Added dynamic allocation support for Solaris 2.x.
- * v2.3 - Added support for Solaris 2.x.
- * v2.2 - Added SERVICE IMMEDIATE hack.
- * v2.1 - Added 'sixth byte' heuristics.
- * v2.0 - first version with an actual version number.
- * Added support for new CHU 'second 31' data format.
- * Deleted PEDANTIC and ANAL_RETENTIVE.
- *
- */
-
-#ifdef SOLARIS2
-# ifndef NCHU
-# define NCHU 1
-# endif
-# define _KERNEL
-#elif defined(LOADABLE)
-# ifndef NCHU
-# define NCHU 3
-# define KERNEL
-# endif
-#else
-# include "chu.h"
-#endif
-
-#if NCHU > 0
-
-/*
- * Number of microseconds we allow between
- * character arrivals. The speed is 300 baud
- * so this should be somewhat more than 30 msec
- */
-#define CHUMAXUSEC (60*1000) /* 60 msec */
-
-#include <sys/types.h>
-#include <sys/stream.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/errno.h>
-#include <sys/user.h>
-#include <syslog.h>
-#include <sys/tty.h>
-
-#include <sys/chudefs.h>
-
-#ifdef SOLARIS2
-
-#include <sys/ksynch.h>
-#include <sys/kmem.h>
-#include <sys/cmn_err.h>
-#include <sys/conf.h>
-#include <sys/strtty.h>
-#include <sys/modctl.h>
-#include <sys/ddi.h>
-#include <sys/sunddi.h>
-
-#endif
-
-#ifdef LOADABLE
-
-#include <sys/kernel.h>
-#include <sys/conf.h>
-#include <sys/buf.h>
-#include <sundev/mbvar.h>
-#include <sun/autoconf.h>
-#include <sun/vddrv.h>
-
-#endif
-
-
-static struct module_info rminfo = { 0, "chu", 0, INFPSZ, 0, 0 };
-static struct module_info wminfo = { 0, "chu", 0, INFPSZ, 0, 0 };
-static int chuopen(), churput(), chuwput(), chuclose();
-
-static struct qinit rinit = { churput, NULL, chuopen, chuclose, NULL,
- &rminfo, NULL };
-
-static struct qinit winit = { chuwput, NULL, NULL, NULL, NULL,
- &wminfo, NULL };
-
-struct streamtab chuinfo = { &rinit, &winit, NULL, NULL };
-
-/*
- * Here's our private data type and structs
- */
-struct priv_data
-{
-#ifdef SOLARIS2
- kmutex_t chucode_mutex;
-#else
- char in_use;
-#endif
- struct chucode chu_struct;
-};
-
-#ifndef SOLARIS2
-struct priv_data our_priv_data[NCHU];
-#endif
-
-#ifdef SOLARIS2
-
-static struct fmodsw fsw =
-{
- "chu",
- &chuinfo,
- D_NEW | D_MP
-};
-
-extern struct mod_ops mod_strmodops;
-
-static struct modlstrmod modlstrmod =
-{
- &mod_strmodops,
- "CHU timecode decoder v2.6",
- &fsw
-};
-
-static struct modlinkage modlinkage =
-{
- MODREV_1,
- (void*) &modlstrmod,
- NULL
-};
-
-int _init()
-{
- return mod_install(&modlinkage);
-}
-
-int _info(foo)
-struct modinfo *foo;
-{
- return mod_info(&modlinkage,foo);
-}
-
-int _fini()
-{
- return mod_remove(&modlinkage);
-}
-
-#endif /* SOLARIS2 */
-
-#ifdef LOADABLE
-
-# ifdef sun
-
-static struct vdldrv vd =
-{
- VDMAGIC_PSEUDO,
- "chu",
- NULL, NULL, NULL, 0, 0, NULL, NULL, 0, 0,
-};
-
-static struct fmodsw *chu_fmod;
-
-/*ARGSUSED*/
-chuinit (fc, vdp, vdi, vds)
- unsigned int fc;
- struct vddrv *vdp;
- addr_t vdi;
- struct vdstat *vds;
-{
- switch (fc) {
- case VDLOAD:
- {
- int dev, i;
-
- /* Find free entry in fmodsw */
- for (dev = 0; dev < fmodcnt; dev++) {
- if (fmodsw[dev].f_str == NULL)
- break;
- }
- if (dev == fmodcnt)
- return (ENODEV);
- chu_fmod = &fmodsw[dev];
-
- /* If you think a kernel would have strcpy() you're mistaken. */
- for (i = 0; i <= FMNAMESZ; i++)
- chu_fmod->f_name[i] = wminfo.mi_idname[i];
-
- chu_fmod->f_str = &chuinfo;
- }
- vdp->vdd_vdtab = (struct vdlinkage *) & vd;
-
- {
- int i;
-
- for (i=0; i<NCHU; i++)
- our_priv_data[i].in_use=0;
- }
-
- return 0;
- case VDUNLOAD:
- {
- int dev;
-
- for (dev = 0; dev < NCHU; dev++)
- if (our_priv_data[dev].in_use) {
- /* One of the modules is still open */
- return (EBUSY);
- }
- }
- chu_fmod->f_name[0] = '\0';
- chu_fmod->f_str = NULL;
- return 0;
- case VDSTAT:
- return 0;
- default:
- return EIO;
- }
-}
-
-# endif /* sun */
-
-#endif /* LOADABLE */
-
-#if !defined(LOADABLE) && !defined(SOLARIS2)
-
-char chu_first_open=1;
-
-#endif
-
-/*ARGSUSED*/
-static int chuopen(q, dev, flag, sflag)
-queue_t *q;
-dev_t dev;
-int flag;
-int sflag;
-{
- int i;
-
-#if !defined(LOADABLE) && !defined(SOLARIS2)
- if (chu_first_open)
- {
- chu_first_open=0;
-
- for(i=0;i<NCHU;i++)
- our_priv_data[i].in_use=0;
- }
-#endif
-
-#ifdef SOLARIS2
- /* According to the docs, calling with KM_SLEEP can never
- fail */
-
- q->q_ptr = kmem_alloc( sizeof(struct priv_data), KM_SLEEP );
- ((struct priv_data *) q->q_ptr)->chu_struct.ncodechars = 0;
-
- mutex_init(&((struct priv_data *) q->q_ptr)->chucode_mutex,"Chucode Mutex",MUTEX_DRIVER,NULL);
- qprocson(q);
-
- if (!putnextctl1(WR(q), M_CTL, MC_SERVICEIMM))
- {
- qprocsoff(q);
- mutex_destroy(&((struct priv_data *)q->q_ptr)->chucode_mutex);
- kmem_free(q->q_ptr, sizeof(struct chucode) );
- return (EFAULT);
- }
-
- return 0;
-
-#else
- for(i=0;i<NCHU;i++)
- if (!our_priv_data[i].in_use)
- {
- ((struct priv_data *) (q->q_ptr))=&(our_priv_data[i]);
- our_priv_data[i].in_use++;
- our_priv_data[i].chu_struct.ncodechars = 0;
- if (!putctl1(WR(q)->q_next, M_CTL, MC_SERVICEIMM))
- {
- our_priv_data[i].in_use=0;
- u.u_error = EFAULT;
- return (OPENFAIL);
- }
- return 0;
- }
-
- u.u_error = EBUSY;
- return (OPENFAIL);
-#endif
-
-}
-
-/*ARGSUSED*/
-static int chuclose(q, flag)
-queue_t *q;
-int flag;
-{
-#ifdef SOLARIS2
- qprocsoff(q);
- mutex_destroy(&((struct priv_data *)q->q_ptr)->chucode_mutex);
- kmem_free(q->q_ptr, sizeof(struct chucode) );
-#else
- ((struct priv_data *) (q->q_ptr))->in_use=0;
-#endif
- return (0);
-}
-
-/*
- * Now the crux of the biscuit.
- *
- * We will be passed data from the man downstairs. If it's not a data
- * packet, it must be important, so pass it along unmunged. If, however,
- * it is a data packet, we're gonna do special stuff to it. We're going
- * to pass each character we get to the old line discipline code we
- * include below for just such an occasion. When the old ldisc code
- * gets a full chucode struct, we'll hand it back upstairs.
- *
- * chuinput takes a single character and q (as quickly as possible).
- * passback takes a pointer to a chucode struct and q and sends it upstream.
- */
-
-void chuinput();
-void passback();
-
-static int churput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- mblk_t *bp;
-
- switch(mp->b_datap->db_type)
- {
- case M_DATA:
- for(bp=mp; bp!=NULL; bp=bp->b_cont)
- {
- while(bp->b_rptr < bp->b_wptr)
- chuinput( ((u_char)*(bp->b_rptr++)) , q );
- }
- freemsg(mp);
- break;
- default:
- putnext(q,mp);
- break;
- }
-
-}
-
-/*
- * Writing to a chu device doesn't make sense, but we'll pass them
- * through in case they're important.
- */
-
-static int chuwput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- putnext(q,mp);
-}
-
-/*
- * Take a pointer to a filled chucode struct and a queue and
- * send the chucode stuff upstream
- */
-
-void passback(outdata,q)
-struct chucode *outdata;
-queue_t *q;
-{
- mblk_t *mp;
- int j;
-
- mp=(mblk_t*) allocb(sizeof(struct chucode),BPRI_LO);
-
- if (mp==NULL)
- {
-#ifdef SOLARIS2
- cmn_err(CE_WARN,"chu module couldn't allocate message block");
-#else
- log(LOG_ERR,"chu: cannot allocate message");
-#endif
- return;
- }
-
- for(j=0;j<sizeof(struct chucode); j++)
- *mp->b_wptr++ = *( ((char*)outdata) + j );
-
- putnext(q,mp);
-}
-
-/*
- * This routine was copied nearly verbatim from the old line discipline.
- */
-void chuinput(c,q)
-register u_char c;
-queue_t *q;
-{
- register struct chucode *chuc;
- register int i;
- long sec, usec;
- struct timeval tv;
-
- /*
- * Quick, Batman, get a timestamp! We need to do this
- * right away. The time between the end of the stop bit
- * and this point is critical, and should be as nearly
- * constant and as short as possible. (Un)fortunately,
- * the Sun's clock granularity is so big this isn't a
- * major problem.
- *
- * uniqtime() is totally undocumented, but there you are.
- */
- uniqtime(&tv);
-
-#ifdef SOLARIS2
- mutex_enter(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
-
- /*
- * Now, locate the chu struct once so we don't have to do it
- * over and over.
- */
- chuc=&(((struct priv_data *) (q->q_ptr))->chu_struct);
-
- /*
- * Compute the difference in this character's time stamp
- * and the last. If it exceeds the margin, blow away all
- * the characters currently in the buffer.
- */
- i = (int)chuc->ncodechars;
- if (i > 0)
- {
- sec = tv.tv_sec - chuc->codetimes[i-1].tv_sec;
- usec = tv.tv_usec - chuc->codetimes[i-1].tv_usec;
- if (usec < 0)
- {
- sec -= 1;
- usec += 1000000;
- }
- if (sec != 0 || usec > CHUMAXUSEC)
- {
- i = 0;
- chuc->ncodechars = 0;
- }
- }
-
- /*
- * Store the character.
- */
- chuc->codechars[i] = (u_char)c;
- chuc->codetimes[i] = tv;
-
- /*
- * Now we perform the 'sixth byte' heuristics.
- *
- * This is a long story.
- *
- * We used to be able to count on the first byte of the code
- * having a '6' in the LSD. This prevented most code framing
- * errors (garbage before the first byte wouldn't typically
- * have a 6 in the LSD). That's no longer the case.
- *
- * We can get around this, however, by noting that the 6th byte
- * must be either equal to or one's complement of the first.
- * If we get a sixth byte that ISN'T like that, then it may
- * well be that the first byte is garbage. The right thing
- * to do is to left-shift the whole buffer one count and
- * continue to wait for the sixth byte.
- */
- if (i == NCHUCHARS/2)
- {
- register u_char temp_byte;
-
- temp_byte=chuc->codechars[i] ^ chuc->codechars[0];
-
- if ( (temp_byte) && (temp_byte!=0xff) )
- {
- register int t;
- /*
- * No match. Left-shift the buffer and try again
- */
- for(t=0;t<=NCHUCHARS/2;t++)
- {
- chuc->codechars[t]=chuc->codechars[t+1];
- chuc->codetimes[t]=chuc->codetimes[t+1];
- }
-
- i--; /* This is because of the ++i immediately following */
- }
- }
-
- /*
- * We done yet?
- */
- if (++i < NCHUCHARS)
- {
- /*
- * We're not done. Not much to do here. Save the count and wait
- * for another character.
- */
- chuc->ncodechars = (u_char)i;
- }
- else
- {
- /*
- * We are done. Mark this buffer full and pass it along.
- */
- chuc->ncodechars = NCHUCHARS;
-
- /*
- * Now we have a choice. Either the front half and back half
- * have to match, or be one's complement of each other.
- *
- * So let's try the first byte and see
- */
-
- if(chuc->codechars[0] == chuc->codechars[NCHUCHARS/2])
- {
- chuc->chutype = CHU_TIME;
- for( i=0; i<(NCHUCHARS/2); i++)
- if (chuc->codechars[i] != chuc->codechars[i+(NCHUCHARS/2)])
- {
- chuc->ncodechars = 0;
-#ifdef SOLARIS2
- mutex_exit(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
- return;
- }
- }
- else
- {
- chuc->chutype = CHU_YEAR;
- for( i=0; i<(NCHUCHARS/2); i++)
- if (((chuc->codechars[i] ^ chuc->codechars[i+(NCHUCHARS/2)]) & 0xff)
- != 0xff )
- {
- chuc->ncodechars = 0;
-#ifdef SOLARIS2
- mutex_exit(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
- return;
- }
- }
-
- passback(chuc,q); /* We're done! */
- chuc->ncodechars = 0; /* Start all over again! */
- }
-#ifdef SOLARIS2
- mutex_exit(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
-}
-
-#endif /* NCHU > 0 */
diff --git a/contrib/ntp/kernel/tty_clk.c b/contrib/ntp/kernel/tty_clk.c
deleted file mode 100644
index 0720610..0000000
--- a/contrib/ntp/kernel/tty_clk.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/* tty_clk.c,v 3.1 1993/07/06 01:07:33 jbj Exp
- * tty_clk.c - Generic line driver for receiving radio clock timecodes
- */
-
-#include "clk.h"
-#if NCLK > 0
-
-#include "../h/param.h"
-#include "../h/types.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/ioctl.h"
-#include "../h/tty.h"
-#include "../h/proc.h"
-#include "../h/file.h"
-#include "../h/conf.h"
-#include "../h/buf.h"
-#include "../h/uio.h"
-#include "../h/clist.h"
-
-/*
- * This line discipline is intended to provide well performing
- * generic support for the reception and time stamping of radio clock
- * timecodes. Most radio clock devices return a string where a
- * particular character in the code (usually a \r) is on-time
- * synchronized with the clock. The idea here is to collect characters
- * until (one of) the synchronization character(s) (we allow two) is seen.
- * When the magic character arrives we take a timestamp by calling
- * microtime() and insert the eight bytes of struct timeval into the
- * buffer after the magic character. We then wake up anyone waiting
- * for the buffer and return the whole mess on the next read.
- *
- * To use this the calling program is expected to first open the
- * port, and then to set the port into raw mode with the speed
- * set appropriately with a TIOCSETP ioctl(), with the erase and kill
- * characters set to those to be considered magic (yes, I know this
- * is gross, but they were so convenient). If only one character is
- * magic you can set then both the same, or perhaps to the alternate
- * parity versions of said character. After getting all this set,
- * change the line discipline to CLKLDISC and you are on your way.
- *
- * The only other bit of magic we do in here is to flush the receive
- * buffers on writes if the CRMOD flag is set (hack, hack).
- */
-
-/*
- * We run this very much like a raw mode terminal, with the exception
- * that we store up characters locally until we hit one of the
- * magic ones and then dump it into the rawq all at once. We keep
- * the buffered data in clists since we can then often move it to
- * the rawq without copying. For sanity we limit the number of
- * characters between specials, and the total number of characters
- * before we flush the rawq, as follows.
- */
-#define CLKLINESIZE (256)
-#define NCLKCHARS (CLKLINESIZE*4)
-
-struct clkdata {
- int inuse;
- struct clist clkbuf;
-};
-#define clk_cc clkbuf.c_cc
-#define clk_cf clkbuf.c_cf
-#define clk_cl clkbuf.c_cl
-
-struct clkdata clk_data[NCLK];
-
-/*
- * Routine for flushing the internal clist
- */
-#define clk_bflush(clk) (ndflush(&((clk)->clkbuf), (clk)->clk_cc))
-
-int clk_debug = 0;
-
-/*ARGSUSED*/
-clkopen(dev, tp)
- dev_t dev;
- register struct tty *tp;
-{
- register struct clkdata *clk;
-
- /*
- * Don't allow multiple opens. This will also protect us
- * from someone opening /dev/tty
- */
- if (tp->t_line == CLKLDISC)
- return (EBUSY);
- ttywflush(tp);
- for (clk = clk_data; clk < &clk_data[NCLK]; clk++)
- if (!clk->inuse)
- break;
- if (clk >= &clk_data[NCLK])
- return (EBUSY);
- clk->inuse++;
- clk->clk_cc = 0;
- clk->clk_cf = clk->clk_cl = NULL;
- tp->T_LINEP = (caddr_t) clk;
- return (0);
-}
-
-
-/*
- * Break down... called when discipline changed or from device
- * close routine.
- */
-clkclose(tp)
- register struct tty *tp;
-{
- register struct clkdata *clk;
- register int s = spltty();
-
- clk = (struct clkdata *)tp->T_LINEP;
- if (clk->clk_cc > 0)
- clk_bflush(clk);
- clk->inuse = 0;
- tp->t_line = 0; /* paranoid: avoid races */
- splx(s);
-}
-
-
-/*
- * Receive a write request. We pass these requests on to the terminal
- * driver, except that if the CRMOD bit is set in the flags we
- * first flush the input queues.
- */
-clkwrite(tp, uio)
- register struct tty *tp;
- struct uio *uio;
-{
- if (tp->t_flags & CRMOD) {
- register struct clkdata *clk;
- int s;
-
- s = spltty();
- if (tp->t_rawq.c_cc > 0)
- ndflush(&tp->t_rawq, tp->t_rawq.c_cc);
- clk = (struct clkdata *) tp->T_LINEP;
- if (clk->clk_cc > 0)
- clk_bflush(clk);
- (void)splx(s);
- }
- ttwrite(tp, uio);
-}
-
-
-/*
- * Low level character input routine.
- * If the character looks okay, grab a time stamp. If the stuff in
- * the buffer is too old, dump it and start fresh. If the character is
- * non-BCDish, everything in the buffer too.
- */
-clkinput(c, tp)
- register int c;
- register struct tty *tp;
-{
- register struct clkdata *clk;
- register int i;
- register long s;
- struct timeval tv;
-
- /*
- * Check to see whether this isn't the magic character. If not,
- * save the character and return.
- */
-#ifdef ultrix
- if (c != tp->t_cc[VERASE] && c != tp->t_cc[VKILL]) {
-#else
- if (c != tp->t_erase && c != tp->t_kill) {
-#endif
- clk = (struct clkdata *) tp->T_LINEP;
- if (clk->clk_cc >= CLKLINESIZE)
- clk_bflush(clk);
- if (putc(c, &clk->clkbuf) == -1) {
- /*
- * Hopeless, no clists. Flush what we have
- * and hope things improve.
- */
- clk_bflush(clk);
- }
- return;
- }
-
- /*
- * Here we have a magic character. Get a timestamp and store
- * everything.
- */
- microtime(&tv);
- clk = (struct clkdata *) tp->T_LINEP;
-
- if (putc(c, &clk->clkbuf) == -1)
- goto flushout;
-
-#ifdef CLKLDISC
- /*
- * STREAMS people started writing timestamps this way.
- * It's not my fault, I am just going along with the flow...
- */
- for (i = 0; i < sizeof(struct timeval); i++)
- if (putc(*( ((char*)&tv) + i ), &clk->clkbuf) == -1)
- goto flushout;
-#else
- /*
- * This is a machine independant way of puting longs into
- * the datastream. It has fallen into disuse...
- */
- s = tv.tv_sec;
- for (i = 0; i < sizeof(long); i++) {
- if (putc((s >> 24) & 0xff, &clk->clkbuf) == -1)
- goto flushout;
- s <<= 8;
- }
-
- s = tv.tv_usec;
- for (i = 0; i < sizeof(long); i++) {
- if (putc((s >> 24) & 0xff, &clk->clkbuf) == -1)
- goto flushout;
- s <<= 8;
- }
-#endif
-
- /*
- * If the length of the rawq exceeds our sanity limit, dump
- * all the old crap in there before copying this in.
- */
- if (tp->t_rawq.c_cc > NCLKCHARS)
- ndflush(&tp->t_rawq, tp->t_rawq.c_cc);
-
- /*
- * Now copy the buffer in. There is a special case optimization
- * here. If there is nothing on the rawq at present we can
- * just copy the clists we own over. Otherwise we must concatenate
- * the present data on the end.
- */
- s = (long)spltty();
- if (tp->t_rawq.c_cc <= 0) {
- tp->t_rawq = clk->clkbuf;
- clk->clk_cc = 0;
- clk->clk_cl = clk->clk_cf = NULL;
- (void) splx((int)s);
- } else {
- (void) splx((int)s);
- catq(&clk->clkbuf, &tp->t_rawq);
- clk_bflush(clk);
- }
-
- /*
- * Tell the world
- */
- ttwakeup(tp);
- return;
-
-flushout:
- /*
- * It would be nice if this never happened. Flush the
- * internal clists and hope someone else frees some of them
- */
- clk_bflush(clk);
- return;
-}
-
-
-/*
- * Handle ioctls. We reject most tty-style except those that
- * change the line discipline and a couple of others..
- */
-clkioctl(tp, cmd, data, flag)
- struct tty *tp;
- int cmd;
- caddr_t data;
- int flag;
-{
- int flags;
- struct sgttyb *sg;
-
- if ((cmd>>8) != 't')
- return (-1);
- switch (cmd) {
- case TIOCSETD:
- case TIOCGETD:
- case TIOCGETP:
- case TIOCGETC:
- case TIOCOUTQ:
- return (-1);
-
- case TIOCSETP:
- /*
- * He likely wants to set new magic characters in.
- * Do this part.
- */
- sg = (struct sgttyb *)data;
-#ifdef ultrix
- tp->t_cc[VERASE] = sg->sg_erase;
- tp->t_cc[VKILL] = sg->sg_kill;
-#else
- tp->t_erase = sg->sg_erase;
- tp->t_kill = sg->sg_kill;
-#endif
- return (0);
-
- case TIOCFLUSH:
- flags = *(int *)data;
- if (flags == 0 || (flags & FREAD)) {
- register struct clkdata *clk;
-
- clk = (struct clkdata *) tp->T_LINEP;
- if (clk->clk_cc > 0)
- clk_bflush(clk);
- }
- return (-1);
-
- default:
- break;
- }
- return (ENOTTY); /* not quite appropriate */
-}
-#endif NCLK
diff --git a/contrib/ntp/kernel/tty_clk_STREAMS.c b/contrib/ntp/kernel/tty_clk_STREAMS.c
deleted file mode 100644
index 13b0a25..0000000
--- a/contrib/ntp/kernel/tty_clk_STREAMS.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/* tty_clk_STREAMS.c,v 3.1 1993/07/06 01:07:34 jbj Exp
- * Timestamp STREAMS module for SunOS 4.1
- *
- * Copyright 1991, Nick Sayer
- *
- * Special thanks to Greg Onufer for his debug assists.
- *
- * Should be PUSHed directly on top of a serial I/O channel.
- * For any character in a user-designated set, adds a kernel
- * timestamp to that character.
- *
- * BUGS:
- *
- * Only so many characters can be timestamped. This number, however,
- * is adjustable.
- *
- * The null character ($00) cannot be timestamped.
- *
- * The M_DATA messages passed upstream will not be the same
- * size as when they arrive from downstream, even if no
- * timestamp character is in the message. This, however,
- * should not affect anything.
- *
- */
-
-#include "clk.h"
-#if NCLK > 0
-/*
- * How big should the messages we pass upstream be?
- */
-#define MESSAGE_SIZE 128
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stream.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/user.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-
-#include <sys/clkdefs.h>
-
-static struct module_info rminfo = { 0, "clk", 0, INFPSZ, 0, 0 };
-static struct module_info wminfo = { 0, "clk", 0, INFPSZ, 0, 0 };
-static int clkopen(), clkrput(), clkwput(), clkclose();
-
-static struct qinit rinit = { clkrput, NULL, clkopen, clkclose, NULL,
- &rminfo, NULL };
-
-static struct qinit winit = { clkwput, NULL, NULL, NULL, NULL,
- &wminfo, NULL };
-
-struct streamtab clkinfo = { &rinit, &winit, NULL, NULL };
-
-struct priv_data_type
-{
- char in_use;
- char string[CLK_MAXSTRSIZE];
-} priv_data[NCLK];
-
-char first_open=1;
-
-/*
- * God only knows why, but linking with strchr() fails
- * on my system, so here's a renamed copy.
- */
-
-u_char *str_chr(s,c)
-u_char *s;
-int c;
-{
- while (*s)
- if(*s++ == c)
- return (s-1);
- return NULL;
-}
-
-/*ARGSUSED*/
-static int clkopen(q, dev, flag, sflag)
-queue_t *q;
-dev_t dev;
-int flag;
-int sflag;
-{
- int i;
-
-/* Damn it! We can't even have the global data struct properly
- initialized! So we have a mark to tell us to init the global
- data on the first open */
-
- if (first_open)
- {
- first_open=0;
-
- for(i=0;i<NCLK;i++)
- priv_data[i].in_use=0;
- }
-
- for(i=0;i<NCLK;i++)
- if(!priv_data[i].in_use)
- {
- priv_data[i].in_use++;
- ((struct priv_data_type *) (q->q_ptr))=priv_data+i;
- priv_data[i].string[0]=0;
- return (0);
- }
- u.u_error = EBUSY;
- return (OPENFAIL);
-}
-
-/*ARGSUSED*/
-static int clkclose(q, flag)
-queue_t *q;
-int flag;
-{
- ((struct priv_data_type *) (q->q_ptr))->in_use=0;
-
- return (0);
-}
-
-/*
- * Now the crux of the biscuit.
- *
- * If it's an M_DATA package, we take each character and pass
- * it to clkchar.
- */
-
-void clkchar();
-
-static int clkrput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- mblk_t *bp;
-
- switch(mp->b_datap->db_type)
- {
- case M_DATA:
- clkchar(0,q,2);
- for(bp=mp; bp!=NULL; bp=bp->b_cont)
- {
- while(bp->b_rptr < bp->b_wptr)
- clkchar( ((u_char)*(bp->b_rptr++)) , q , 0 );
- }
- clkchar(0,q,1);
- freemsg(mp);
- break;
- default:
- putnext(q,mp);
- break;
- }
-
-}
-
-/*
- * If it's a matching M_IOCTL, handle it.
- */
-
-static int clkwput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- struct iocblk *iocp;
-
- switch(mp->b_datap->db_type)
- {
- case M_IOCTL:
- iocp=(struct iocblk*) mp->b_rptr;
- if (iocp->ioc_cmd==CLK_SETSTR)
- {
- strncpy( ((struct priv_data_type *) (RD(q)->q_ptr))->string,
- (char *) mp->b_cont->b_rptr,CLK_MAXSTRSIZE);
- /* make sure it's null terminated */
- ((struct priv_data_type *) (RD(q)->q_ptr))->string[CLK_MAXSTRSIZE-1]=0;
- mp->b_datap->db_type = M_IOCACK;
- qreply(q,mp);
- }
- else
- putnext(q,mp);
- break;
- default:
- putnext(q,mp);
- break;
- }
-}
-
-/*
- * Now clkchar. It takes a character, a queue pointer and an action
- * flag and depending on the flag either:
- *
- * 0 - adds the character to the current message. If there's a
- * timestamp to be done, do that too. If the message is less than
- * 8 chars from being full, link in a new one, and set it up for
- * the next call.
- *
- * 1 - sends the whole mess to Valhala.
- *
- * 2 - set things up.
- *
- * Yeah, it's an ugly hack. Complaints may be filed with /dev/null.
- */
-
-
-void clkchar(c,q,f)
- register u_char c;
- queue_t *q;
- char f;
-{
- static char error;
- static mblk_t *message,*mp;
- struct timeval tv;
-
-/* Get a timestamp ASAP! */
- uniqtime(&tv);
-
- switch(f)
- {
- case 1:
- if (!error)
- putnext(q,message);
- break;
- case 2:
- mp=message= (mblk_t*) allocb(MESSAGE_SIZE,BPRI_LO);
- error=(message==NULL);
- if (error)
- log(LOG_ERR,"clk: cannot allocate message - data lost");
- break;
- case 0:
- if (error) /* If we had an error, forget it. */
- return;
-
- *mp->b_wptr++=c; /* Put the char away first.
-
- /* If it's in the special string, append a struct timeval */
-
- if (str_chr( ((struct priv_data_type *) (q->q_ptr))->string ,
- c )!=NULL)
- {
- int i;
-
- for (i=0;i<sizeof(struct timeval);i++)
- *mp->b_wptr++= *( ((char*)&tv) + i );
- }
-
- /* If we don't have space for a complete struct timeval, and a
- char, it's time for a new mp block */
-
- if (((mp->b_wptr-mp->b_rptr)+sizeof(struct timeval)+2)>MESSAGE_SIZE)
- {
- mp->b_cont= (mblk_t*) allocb(MESSAGE_SIZE,BPRI_LO);
- error=(mp->b_cont==NULL);
- if (error)
- {
- log(LOG_ERR,"clk: cannot allocate message - data lost");
- freemsg(message);
- }
- mp=mp->b_cont;
- }
-
- break;
- }
-}
-
-#endif
diff --git a/contrib/ntp/libisc/assertions.c b/contrib/ntp/libisc/assertions.c
deleted file mode 100644
index 08dd5f3..0000000
--- a/contrib/ntp/libisc/assertions.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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
deleted file mode 100644
index ed0469d..0000000
--- a/contrib/ntp/libisc/error.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
deleted file mode 100644
index bf731e7..0000000
--- a/contrib/ntp/libisc/ifiter_ioctl.c
+++ /dev/null
@@ -1,820 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 74440fa..0000000
--- a/contrib/ntp/libisc/ifiter_sysctl.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 395d0e5..0000000
--- a/contrib/ntp/libisc/inet_ntop.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 37af9f3..0000000
--- a/contrib/ntp/libisc/interfaceiter.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 9ec4a2f..0000000
--- a/contrib/ntp/libisc/isc_strerror.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 95dd479..0000000
--- a/contrib/ntp/libisc/lib.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 39f1e5c..0000000
--- a/contrib/ntp/libisc/mem.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 8253a06..0000000
--- a/contrib/ntp/libisc/msgcat.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 6c51f1c..0000000
--- a/contrib/ntp/libisc/net.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 4a0f8d8..0000000
--- a/contrib/ntp/libisc/strerror.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 75b5505..0000000
--- a/contrib/ntp/libntp/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
-EXTRA_LIBRARIES = libntpsim.a
-libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
- audio.c authkeys.c authreadkeys.c authusekey.c binio.c buftvtots.c \
- caljulian.c calleapwhen.c caltontp.c calyearstart.c clocktime.c \
- 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../include
-ETAGS_ARGS = Makefile.am
-
-noinst_HEADERS = lib_strbuf.h log.h
-
-../include/des.h:
- touch ../include/des.h
-
-EXTRA_DIST = README
-
diff --git a/contrib/ntp/libntp/Makefile.in b/contrib/ntp/libntp/Makefile.in
deleted file mode 100644
index 1565b0b..0000000
--- a/contrib/ntp/libntp/Makefile.in
+++ /dev/null
@@ -1,1212 +0,0 @@
-# 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 = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
-EXTRA_LIBRARIES = libntpsim.a
-libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
- audio.c authkeys.c authreadkeys.c authusekey.c binio.c buftvtots.c \
- caljulian.c calleapwhen.c caltontp.c calyearstart.c clocktime.c \
- 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../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 =
-LIBRARIES = $(noinst_LIBRARIES)
-
-libntp_a_AR = $(AR) cru
-libntp_a_LIBADD =
-am__objects_1 = a_md5encrypt$U.$(OBJEXT) adjtime$U.$(OBJEXT) \
- atoint$U.$(OBJEXT) atolfp$U.$(OBJEXT) atouint$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) \
- clocktime$U.$(OBJEXT) clocktypes$U.$(OBJEXT) \
- decodenetnum$U.$(OBJEXT) dofptoa$U.$(OBJEXT) \
- dolfptoa$U.$(OBJEXT) emalloc$U.$(OBJEXT) findconfig$U.$(OBJEXT) \
- fptoa$U.$(OBJEXT) fptoms$U.$(OBJEXT) getopt$U.$(OBJEXT) \
- gpstolfp$U.$(OBJEXT) hextoint$U.$(OBJEXT) hextolfp$U.$(OBJEXT) \
- humandate$U.$(OBJEXT) icom$U.$(OBJEXT) ieee754io$U.$(OBJEXT) \
- inttoa$U.$(OBJEXT) iosignal$U.$(OBJEXT) lib_strbuf$U.$(OBJEXT) \
- machines$U.$(OBJEXT) md5c$U.$(OBJEXT) memmove$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) \
- 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) 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)
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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) \
- $(libntpsim_a_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
- Makefile.am
-SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES) $(libntpsim_a_SOURCES)
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-AR = ar
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-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
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -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:
-@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`
-
-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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || rm -f $@
-a_md5encrypt_.$(OBJEXT) adjtime_.$(OBJEXT) adjtimex_.$(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) 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) \
-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) $(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 $(LIBRARIES) $(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 mostlyclean-am
-
-distclean: distclean-am
- -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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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
-# 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/README b/contrib/ntp/libntp/README
deleted file mode 100644
index fac7185..0000000
--- a/contrib/ntp/libntp/README
+++ /dev/null
@@ -1,5 +0,0 @@
-README file for directory ./libntp of the NTP Version 4 distribution
-
-This directory contains the sources for the NTP library used by most
-programs in this distribution. See the README and RELNOTES files in the
-parent directory for directions on how to make this library.
diff --git a/contrib/ntp/libntp/a_md5encrypt.c b/contrib/ntp/libntp/a_md5encrypt.c
deleted file mode 100644
index 42513ef..0000000
--- a/contrib/ntp/libntp/a_md5encrypt.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * MD5 interface for rsaref2.0
- *
- * These routines implement an interface for the RSA Laboratories
- * implementation of the Message Digest 5 (MD5) algorithm. This
- * algorithm is included in the rsaref2.0 package available from RSA in
- * the US and foreign countries. Further information is available at
- * www.rsa.com.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "ntp_fp.h"
-#include "ntp_string.h"
-#include "ntp_stdlib.h"
-
-/* 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
- *
- * Returns length of authenticator field.
- */
-int
-MD5authencrypt(
- u_char *key, /* key pointer */
- u_int32 *pkt, /* packet pointer */
- int length /* packet length */
- )
-{
- MD5_CTX md5;
- u_char digest[16];
-
- /*
- * MD5 with key identifier concatenated with packet.
- */
- 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);
-}
-
-
-/*
- * MD5authdecrypt - verify MD5 message authenticator
- *
- * Returns one if authenticator valid, zero if invalid.
- */
-int
-MD5authdecrypt(
- u_char *key, /* key pointer */
- u_int32 *pkt, /* packet pointer */
- int length, /* packet length */
- int size /* MAC size */
- )
-{
- MD5_CTX md5;
- u_char digest[16];
-
- /*
- * MD5 with key identifier concatenated with packet.
- */
- 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);
- 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
deleted file mode 100644
index f041450..0000000
--- a/contrib/ntp/libntp/adjtime.c
+++ /dev/null
@@ -1,323 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef MPE
-/*
- * MPE lacks adjtime(), so we define our own. But note that time slewing has
- * a sub-second accuracy bug documented in SR 5003462838 which prevents ntpd
- * from being able to maintain clock synch. Because of the bug, this adjtime()
- * implementation as used by ntpd has a side-effect of screwing up the hardware
- * PDC clock, which will need to be reset with a reboot.
- *
- * This problem affects all versions of MPE at the time of this writing (when
- * MPE/iX 7.0 is the most current). It only causes bad things to happen when
- * doing continuous clock synchronization with ntpd; note that you CAN run ntpd
- * with "disable ntp" in ntp.conf if you wish to provide a time server.
- *
- * The one-time clock adjustment functionality of ntpdate and ntp_timeset can
- * be used without screwing up the PDC clock.
- *
- */
-#include <time.h>
-
-int adjtime(struct timeval *delta, struct timeval *olddelta);
-
-int adjtime(struct timeval *delta, struct timeval *olddelta)
-
-{
-/* Documented, supported MPE system intrinsics. */
-
-extern void GETPRIVMODE(void);
-extern void GETUSERMODE(void);
-
-/* Undocumented, unsupported MPE internal functions. */
-
-extern long long current_correction_usecs(void);
-extern long long get_time(void);
-extern void get_time_change_info(long long *, char *, char *);
-extern long long pdc_time(int *);
-extern void set_time_correction(long long, int, int);
-extern long long ticks_to_micro(long long);
-
-long long big_sec, big_usec, new_correction = 0LL;
-long long prev_correction;
-
-if (delta != NULL) {
- /* Adjustment required. Convert delta to 64-bit microseconds. */
- big_sec = (long)delta->tv_sec;
- big_usec = delta->tv_usec;
- new_correction = (big_sec * 1000000LL) + big_usec;
-}
-
-GETPRIVMODE();
-
-/* Determine how much of a previous correction (if any) we're interrupting. */
-prev_correction = current_correction_usecs();
-
-if (delta != NULL) {
- /* Adjustment required. */
-
-#if 0
- /* Speculative code disabled until bug SR 5003462838 is fixed. This bug
- prevents accurate time slewing, and indeed renders ntpd inoperable. */
-
- if (prev_correction != 0LL) {
- /* A previous adjustment did not complete. Since the PDC UTC clock was
- immediately jumped at the start of the previous adjustment, we must
- explicitly reset it to the value of the MPE local time clock minus the
- time zone offset. */
-
- char pwf_since_boot, recover_pwf_time;
- long long offset_ticks, offset_usecs, pdc_usecs_current, pdc_usecs_wanted;
- int hpe_status;
-
- get_time_change_info(&offset_ticks, &pwf_since_boot, &recover_pwf_time);
- offset_usecs = ticks_to_micro(offset_ticks);
- pdc_usecs_wanted = get_time() - offset_usecs;
- pdc_usecs_current = pdc_time(&hpe_status);
- if (hpe_status == 0)
- /* Force new PDC time by starting an extra correction. */
- set_time_correction(pdc_usecs_wanted - pdc_usecs_current,0,1);
- }
-#endif /* 0 */
-
- /* Immediately jump the PDC time to the new value, and then initiate a
- gradual MPE time correction slew. */
- set_time_correction(new_correction,0,1);
-}
-
-GETUSERMODE();
-
-if (olddelta != NULL) {
- /* Caller wants to know remaining amount of previous correction. */
- (long)olddelta->tv_sec = prev_correction / 1000000LL;
- olddelta->tv_usec = prev_correction % 1000000LL;
-}
-
-return 0;
-}
-#endif /* MPE */
-
-#ifdef NEED_HPUX_ADJTIME
-/*************************************************************************/
-/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
-/* Hewlett-Packard Laboratories. */
-/* */
-/* Permission is hereby granted for unlimited modification, use, and */
-/* distribution. This software is made available with no warranty of */
-/* any kind, express or implied. This copyright notice must remain */
-/* intact in all versions of this software. */
-/* */
-/* The author would appreciate it if any bug fixes and enhancements were */
-/* to be sent back to him for incorporation into future versions of this */
-/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
-/*************************************************************************/
-
-/*
- * Revision history
- *
- * 9 Jul 94 David L. Mills, Unibergity of Delabunch
- * Implemented variable threshold to limit age of
- * corrections; reformatted code for readability.
- */
-
-#ifndef lint
-static char RCSid[] = "adjtime.c,v 3.1 1993/07/06 01:04:42 jbj Exp";
-#endif
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <time.h>
-#include <signal.h>
-#include "adjtime.h"
-
-#define abs(x) ((x) < 0 ? -(x) : (x))
-
-/*
- * The following paramters are appropriate for an NTP adjustment
- * interval of one second.
- */
-#define ADJ_THRESH 200 /* initial threshold */
-#define ADJ_DELTA 4 /* threshold decrement */
-
-static long adjthresh; /* adjustment threshold */
-static long saveup; /* corrections accumulator */
-
-/*
- * clear_adjtime - reset accumulator and threshold variables
- */
-void
-_clear_adjtime(void)
-{
- saveup = 0;
- adjthresh = ADJ_THRESH;
-}
-
-/*
- * adjtime - hp-ux copout of the standard Unix adjtime() system call
- */
-int
-adjtime(
- register struct timeval *delta,
- register struct timeval *olddelta
- )
-{
- struct timeval newdelta;
-
- /*
- * Corrections greater than one second are done immediately.
- */
- if (delta->tv_sec) {
- adjthresh = ADJ_THRESH;
- saveup = 0;
- return(_adjtime(delta, olddelta));
- }
-
- /*
- * Corrections less than one second are accumulated until
- * tripping a threshold, which is initially set at ADJ_THESH and
- * reduced in ADJ_DELTA steps to zero. The idea here is to
- * introduce large corrections quickly, while making sure that
- * small corrections are introduced without excessive delay. The
- * idea comes from the ARPAnet routing update algorithm.
- */
- saveup += delta->tv_usec;
- if (abs(saveup) >= adjthresh) {
- adjthresh = ADJ_THRESH;
- newdelta.tv_sec = 0;
- newdelta.tv_usec = saveup;
- saveup = 0;
- return(_adjtime(&newdelta, olddelta));
- } else {
- adjthresh -= ADJ_DELTA;
- }
-
- /*
- * While nobody uses it, return the residual before correction,
- * as per Unix convention.
- */
- if (olddelta)
- olddelta->tv_sec = olddelta->tv_usec = 0;
- return(0);
-}
-
-/*
- * _adjtime - does the actual work
- */
-int
-_adjtime(
- register struct timeval *delta,
- register struct timeval *olddelta
- )
-{
- register int mqid;
- MsgBuf msg;
- register MsgBuf *msgp = &msg;
-
- /*
- * Get the key to the adjtime message queue (note that we must
- * get it every time because the queue might have been removed
- * and recreated)
- */
- if ((mqid = msgget(KEY, 0)) == -1)
- return (-1);
- msgp->msgb.mtype = CLIENT;
- msgp->msgb.tv = *delta;
- if (olddelta)
- msgp->msgb.code = DELTA2;
- else
- msgp->msgb.code = DELTA1;
-
- /*
- * Tickle adjtimed and snatch residual, if indicated. Lots of
- * fanatic error checking here.
- */
- if (msgsnd(mqid, &msgp->msgp, MSGSIZE, 0) == -1)
- return (-1);
- if (olddelta) {
- if (msgrcv(mqid, &msgp->msgp, MSGSIZE, SERVER, 0) == -1)
- return (-1);
- *olddelta = msgp->msgb.tv;
- }
- return (0);
-}
-
-#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
-#endif
diff --git a/contrib/ntp/libntp/adjtimex.c b/contrib/ntp/libntp/adjtimex.c
deleted file mode 100644
index 03e9d79..0000000
--- a/contrib/ntp/libntp/adjtimex.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- */
-
-#ifndef lint
-_sccsid:.asciz "11/19/91 ULTRIX @(#)adjtime.c 6.1"
-#endif not lint
-
-#include "SYS.h"
-
-SYSCALL(adjtimex)
- ret
-
diff --git a/contrib/ntp/libntp/atoint.c b/contrib/ntp/libntp/atoint.c
deleted file mode 100644
index 46cd96d..0000000
--- a/contrib/ntp/libntp/atoint.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * atoint - convert an ascii string to a signed long, with error checking
- */
-#include <sys/types.h>
-#include <ctype.h>
-
-#include "ntp_types.h"
-#include "ntp_stdlib.h"
-
-int
-atoint(
- const char *str,
- long *ival
- )
-{
- register long u;
- register const char *cp;
- register int isneg;
- register int oflow_digit;
-
- cp = str;
-
- if (*cp == '-') {
- cp++;
- isneg = 1;
- oflow_digit = '8';
- } else {
- isneg = 0;
- oflow_digit = '7';
- }
-
- if (*cp == '\0')
- return 0;
-
- u = 0;
- while (*cp != '\0') {
- if (!isdigit((int)*cp))
- return 0;
- if (u > 214748364 || (u == 214748364 && *cp > oflow_digit))
- return 0; /* overflow */
- u = (u << 3) + (u << 1);
- u += *cp++ - '0'; /* ascii dependent */
- }
-
- if (isneg)
- *ival = -u;
- else
- *ival = u;
- return 1;
-}
diff --git a/contrib/ntp/libntp/atolfp.c b/contrib/ntp/libntp/atolfp.c
deleted file mode 100644
index ff50947..0000000
--- a/contrib/ntp/libntp/atolfp.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * atolfp - convert an ascii string to an l_fp number
- */
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntp_fp.h"
-#include "ntp_string.h"
-
-/*
- * Powers of 10
- */
-static u_long ten_to_the_n[10] = {
- 0,
- 10,
- 100,
- 1000,
- 10000,
- 100000,
- 1000000,
- 10000000,
- 100000000,
- 1000000000,
-};
-
-
-int
-atolfp(
- const char *str,
- l_fp *lfp
- )
-{
- register const char *cp;
- register u_long dec_i;
- register u_long dec_f;
- char *ind;
- int ndec;
- int isneg;
- static const char *digits = "0123456789";
-
- isneg = 0;
- dec_i = dec_f = 0;
- ndec = 0;
- cp = str;
-
- /*
- * We understand numbers of the form:
- *
- * [spaces][-|+][digits][.][digits][spaces|\n|\0]
- */
- while (isspace((int)*cp))
- cp++;
-
- if (*cp == '-') {
- cp++;
- isneg = 1;
- }
-
- if (*cp == '+')
- cp++;
-
- if (*cp != '.' && !isdigit((int)*cp))
- return 0;
-
- while (*cp != '\0' && (ind = strchr(digits, *cp)) != NULL) {
- dec_i = (dec_i << 3) + (dec_i << 1); /* multiply by 10 */
- dec_i += (ind - digits);
- cp++;
- }
-
- if (*cp != '\0' && !isspace((int)*cp)) {
- if (*cp++ != '.')
- return 0;
-
- while (ndec < 9 && *cp != '\0'
- && (ind = strchr(digits, *cp)) != NULL) {
- ndec++;
- dec_f = (dec_f << 3) + (dec_f << 1); /* *10 */
- dec_f += (ind - digits);
- cp++;
- }
-
- while (isdigit((int)*cp))
- cp++;
-
- if (*cp != '\0' && !isspace((int)*cp))
- return 0;
- }
-
- if (ndec > 0) {
- register u_long tmp;
- register u_long bit;
- register u_long ten_fact;
-
- ten_fact = ten_to_the_n[ndec];
-
- tmp = 0;
- bit = 0x80000000;
- while (bit != 0) {
- dec_f <<= 1;
- if (dec_f >= ten_fact) {
- tmp |= bit;
- dec_f -= ten_fact;
- }
- bit >>= 1;
- }
- if ((dec_f << 1) > ten_fact)
- tmp++;
- dec_f = tmp;
- }
-
- if (isneg)
- M_NEG(dec_i, dec_f);
-
- lfp->l_ui = dec_i;
- lfp->l_uf = dec_f;
- return 1;
-}
diff --git a/contrib/ntp/libntp/atouint.c b/contrib/ntp/libntp/atouint.c
deleted file mode 100644
index c25e3a0..0000000
--- a/contrib/ntp/libntp/atouint.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * atouint - convert an ascii string to an unsigned long, with error checking
- */
-#include <sys/types.h>
-#include <ctype.h>
-
-#include "ntp_types.h"
-#include "ntp_stdlib.h"
-
-int
-atouint(
- const char *str,
- u_long *uval
- )
-{
- register u_long u;
- register const char *cp;
-
- cp = str;
- if (*cp == '\0')
- return 0;
-
- u = 0;
- while (*cp != '\0') {
- if (!isdigit((int)*cp))
- return 0;
- if (u > 429496729 || (u == 429496729 && *cp >= '6'))
- return 0; /* overflow */
- u = (u << 3) + (u << 1);
- u += *cp++ - '0'; /* ascii dependent */
- }
-
- *uval = u;
- return 1;
-}
diff --git a/contrib/ntp/libntp/audio.c b/contrib/ntp/libntp/audio.c
deleted file mode 100644
index 65a6063..0000000
--- a/contrib/ntp/libntp/audio.c
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * audio.c - audio interface for reference clock audio drivers
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#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"
-#include "ntp_syslog.h"
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#include <stdio.h>
-#include "ntp_string.h"
-
-#ifdef HAVE_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>
-#endif /* HAVE_SUN_AUDIOIO_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
-
-#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, 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
- * codec sample rate (8000 Hz), precision (8 bits), number of channels
- * (1) and encoding (ITU-T G.711 mu-law companded) have been set by
- * default.
- */
-int
-audio_init(
- 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.
- */
- 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) {
- msyslog(LOG_ERR, "audio_init: invalid control device <%s>\n", actl);
- close(fd);
- return(ctl_fd);
- }
-
- /*
- * Set audio device parameters.
- */
-#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);
- }
- rval = fd;
-#endif /* not PCM_STYLE_SOUND */
- return (rval);
-}
-
-
-/*
- * audio_gain - adjust codec gains and port
- */
-int
-audio_gain(
- 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;
-
-#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;
- 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);
- }
- rval = info.record.error;
-#endif /* not PCM_STYLE_SOUND */
- return (rval);
-}
-
-
-/*
- * audio_show - display audio parameters
- *
- * This code doesn't really do anything, except satisfy curiousity and
- * verify the ioctl's work.
- */
-void
-audio_show(void)
-{
-#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, (char *)&info);
- printf(
- "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.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,SUN_AUDIOIO,MACHINE_SOUNDCARD,SYS_SOUNDCARD}_H */
diff --git a/contrib/ntp/libntp/authencrypt.c b/contrib/ntp/libntp/authencrypt.c
deleted file mode 100644
index 075afe0..0000000
--- a/contrib/ntp/libntp/authencrypt.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * DES interface for rsaref2.0
- *
- * These routines implement an interface for the RSA Laboratories
- * implementation of the Data Encryption Standard (DES) algorithm
- * operating in Cipher-Block Chaining (CBC) mode. This algorithm is
- * included in the rsaref2.0 package available from RSA in the US and
- * foreign countries. Further information is available at www.rsa.com.
- */
-
-#include "ntp_machine.h"
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef DES
-#include "ntp_types.h"
-#include "ntp_fp.h"
-#include "ntp_string.h"
-#include "global.h"
-#include "des.h"
-#include "ntp_stdlib.h"
-
-#define BLOCK_OCTETS 8 /* message digest size */
-#define MAXTPKT 128 /* max packet size */
-
-
-/*
- * DESauthencrypt - generate DES-CBC message authenticator
- *
- * Returns length of authenticator field.
- */
-int
-DESauthencrypt(
- u_char *key, /* key pointer */
- u_int32 *pkt, /* packet pointer */
- int length /* packet length */
- )
-{
- DES_CBC_CTX ctx;
- u_int32 tpkt[MAXTPKT];
- u_int32 work[2];
- int i, j;
-
- /*
- * DES-CBC with zero IV. Note the encrypted text is discarded.
- */
- work[0] = work[1] = 0;
- DES_CBCInit(&ctx, key, (u_char *)work, 1);
- DES_CBCUpdate(&ctx, (u_char *)tpkt, (u_char *)pkt,
- (u_int)length);
- i = length / 4 + 1;
- j = i - 3;
- pkt[i++] = (u_int32)htonl(tpkt[j++]);
- pkt[i] = (u_int32)htonl(tpkt[j]);
- return (BLOCK_OCTETS + 4);
-}
-
-
-/*
- * DESauthdecrypt - verify DES message authenticator
- *
- * Returns one if authenticator valid, zero if invalid.
- */
-int
-DESauthdecrypt(
- u_char *key, /* key pointer */
- u_int32 *pkt, /* packet pointer */
- int length, /* packet length */
- int size /* size of MAC field */
- )
-{
- DES_CBC_CTX ctx;
- u_int32 tpkt[MAXTPKT];
- u_int32 work[2];
- int i, j;
-
- /*
- * DES-CBC with zero IV. Note the encrypted text is discarded.
- */
- if (size != BLOCK_OCTETS + 4)
- return (0);
- work[0] = work[1] = 0;
- DES_CBCInit (&ctx, key, (u_char *)work, 1);
- DES_CBCUpdate (&ctx, (u_char *)tpkt, (u_char *)pkt,
- (u_int)length);
- i = length / 4 + 1;
- j = i - 3;
- if ((u_int32)ntohl(pkt[i++]) == tpkt[j++] &&
- (u_int32)ntohl(pkt[i]) == tpkt[j])
- return (1);
- return (0);
-}
-#else
-int authencrypt_bs;
-#endif /* DES */
diff --git a/contrib/ntp/libntp/authkeys.c b/contrib/ntp/libntp/authkeys.c
deleted file mode 100644
index 1c95444..0000000
--- a/contrib/ntp/libntp/authkeys.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * authkeys.c - routines to manage the storage of authentication keys
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-
-#include "ntp_types.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntpd.h"
-#include "ntp_string.h"
-#include "ntp_malloc.h"
-#include "ntp_stdlib.h"
-
-/*
- * Structure to store keys in in the hash table.
- */
-struct savekey {
- struct savekey *next;
- union {
- long bogon; /* Make sure nonempty */
- u_char MD5_key[32]; /* MD5 key */
- } k;
- keyid_t keyid; /* key identifier */
- u_short flags; /* flags that wave */
- u_long lifetime; /* remaining lifetime */
- int keylen; /* key length */
-};
-
-#define KEY_TRUSTED 0x001 /* this key is trusted */
-#define KEY_MD5 0x200 /* this is a MD5 type key */
-
-/*
- * The hash table. This is indexed by the low order bits of the
- * keyid. We make this fairly big for potentially busy servers.
- */
-#define HASHSIZE 64
-#define HASHMASK ((HASHSIZE)-1)
-#define KEYHASH(keyid) ((keyid) & HASHMASK)
-
-struct savekey *key_hash[HASHSIZE];
-
-u_long authkeynotfound; /* keys not found */
-u_long authkeylookups; /* calls to lookup keys */
-u_long authnumkeys; /* number of active keys */
-u_long authkeyexpired; /* key lifetime expirations */
-u_long authkeyuncached; /* cache misses */
-u_long authnokey; /* calls to encrypt with no key */
-u_long authencryptions; /* calls to encrypt */
-u_long authdecryptions; /* calls to decrypt */
-
-/*
- * Storage for free key structures. We malloc() such things but
- * never free them.
- */
-struct savekey *authfreekeys;
-int authnumfreekeys;
-
-#define MEMINC 12 /* number of new free ones to get */
-
-/*
- * The key cache. We cache the last key we looked at here.
- */
-keyid_t cache_keyid; /* key identifier */
-u_char *cache_key; /* key pointer */
-u_int cache_keylen; /* key length */
-u_short cache_flags; /* flags that wave */
-
-
-/*
- * init_auth - initialize internal data
- */
-void
-init_auth(void)
-{
- /*
- * Initialize hash table and free list
- */
- memset((char *)key_hash, 0, sizeof key_hash);
-}
-
-
-/*
- * auth_findkey - find a key in the hash table
- */
-struct savekey *
-auth_findkey(
- keyid_t keyno
- )
-{
- struct savekey *sk;
-
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- return (sk);
-
- sk = sk->next;
- }
- return (0);
-}
-
-
-/*
- * auth_havekey - return one if the key is known
- */
-int
-auth_havekey(
- keyid_t keyno
- )
-{
- struct savekey *sk;
-
- if (keyno == 0 || (keyno == cache_keyid))
- return (1);
-
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- return (1);
-
- sk = sk->next;
- }
- return (0);
-}
-
-
-/*
- * authhavekey - return one and cache the key, if known and trusted.
- */
-int
-authhavekey(
- keyid_t keyno
- )
-{
- struct savekey *sk;
-
- authkeylookups++;
- if (keyno == 0 || keyno == cache_keyid)
- return (1);
-
- authkeyuncached++;
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- break;
- sk = sk->next;
- }
- if (sk == 0) {
- authkeynotfound++;
- return (0);
- } else if (!(sk->flags & KEY_TRUSTED)) {
- authnokey++;
- return (0);
- }
- cache_keyid = sk->keyid;
- cache_flags = sk->flags;
- if (sk->flags & KEY_MD5) {
- cache_key = sk->k.MD5_key;
- cache_keylen = sk->keylen;
- return (1);
- }
- return (0);
-}
-
-
-/*
- * auth_moremem - get some more free key structures
- */
-int
-auth_moremem(void)
-{
- struct savekey *sk;
- int i;
-
- sk = (struct savekey *)calloc(MEMINC, sizeof(struct savekey));
- if (sk == 0)
- return (0);
-
- for (i = MEMINC; i > 0; i--) {
- sk->next = authfreekeys;
- authfreekeys = sk++;
- }
- authnumfreekeys += MEMINC;
- return (authnumfreekeys);
-}
-
-
-/*
- * authtrust - declare a key to be trusted/untrusted
- */
-void
-authtrust(
- keyid_t keyno,
- u_long trust
- )
-{
- struct savekey *sk;
-
-#ifdef DEBUG
- if (debug > 2)
- printf("authtrust: keyid %08x life %lu\n", keyno, trust);
-#endif
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- break;
- sk = sk->next;
- }
-
- if (sk == 0 && !trust)
- return;
-
- if (sk != 0) {
- if (cache_keyid == keyno) {
- cache_flags = 0;
- cache_keyid = 0;
- }
-
- if (trust > 0) {
- sk->flags |= KEY_TRUSTED;
- if (trust > 1)
- sk->lifetime = current_time + trust;
- else
- sk->lifetime = 0;
- return;
- }
-
- sk->flags &= ~KEY_TRUSTED; {
- struct savekey *skp;
-
- skp = key_hash[KEYHASH(keyno)];
- if (skp == sk) {
- key_hash[KEYHASH(keyno)] = sk->next;
- } else {
- while (skp->next != sk)
- skp = skp->next;
- skp->next = sk->next;
- }
- authnumkeys--;
-
- sk->next = authfreekeys;
- authfreekeys = sk;
- authnumfreekeys++;
- }
- return;
- }
-
- if (authnumfreekeys == 0)
- if (auth_moremem() == 0)
- return;
-
- sk = authfreekeys;
- authfreekeys = sk->next;
- authnumfreekeys--;
-
- sk->keyid = keyno;
- sk->flags = KEY_TRUSTED;
- sk->next = key_hash[KEYHASH(keyno)];
- key_hash[KEYHASH(keyno)] = sk;
- authnumkeys++;
- return;
-}
-
-
-/*
- * authistrusted - determine whether a key is trusted
- */
-int
-authistrusted(
- keyid_t keyno
- )
-{
- struct savekey *sk;
-
- if (keyno == cache_keyid)
- return ((cache_flags & KEY_TRUSTED) != 0);
-
- authkeyuncached++;
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- break;
- sk = sk->next;
- }
- if (sk == 0) {
- authkeynotfound++;
- return (0);
- } else if (!(sk->flags & KEY_TRUSTED)) {
- authkeynotfound++;
- return (0);
- }
- return (1);
-}
-
-
-void
-MD5auth_setkey(
- keyid_t keyno,
- const u_char *key,
- const int len
- )
-{
- 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) {
- strncpy((char *)sk->k.MD5_key, (const char *)key,
- sizeof(sk->k.MD5_key));
- if ((sk->keylen = len) > sizeof(sk->k.MD5_key))
- sk->keylen = sizeof(sk->k.MD5_key);
-
- sk->flags |= KEY_MD5;
- 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--;
-
- strncpy((char *)sk->k.MD5_key, (const char *)key,
- sizeof(sk->k.MD5_key));
- if ((sk->keylen = len) > sizeof(sk->k.MD5_key))
- sk->keylen = sizeof(sk->k.MD5_key);
-
- sk->keyid = keyno;
- sk->flags = KEY_MD5;
- sk->lifetime = 0;
- sk->next = key_hash[KEYHASH(keyno)];
- key_hash[KEYHASH(keyno)] = sk;
- authnumkeys++;
- return;
-}
-
-/*
- * auth_delkeys - delete all known keys, in preparation for rereading
- * the keys file (presumably)
- */
-void
-auth_delkeys(void)
-{
- struct savekey *sk;
- struct savekey **skp;
- int i;
-
- for (i = 0; i < HASHSIZE; i++) {
- skp = &(key_hash[i]);
- sk = key_hash[i];
- /*
- * Leave autokey keys alone.
- */
- while (sk != 0 && sk->keyid <= NTP_MAXKEY) {
- /*
- * 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;
- sk = sk->next;
- } else {
- *skp = sk->next;
- authnumkeys--;
- sk->next = authfreekeys;
- authfreekeys = sk;
- authnumfreekeys++;
- sk = *skp;
- }
- }
- }
-}
-
-/*
- * auth_agekeys - delete keys whose lifetimes have expired
- */
-void
-auth_agekeys(void)
-{
- struct savekey *sk;
- struct savekey *skp;
- int i;
-
- for (i = 0; i < HASHSIZE; i++) {
- sk = skp = key_hash[i];
- while (sk != 0) {
- skp = sk->next;
- if (sk->lifetime > 0 && current_time >
- sk->lifetime) {
- authtrust(sk->keyid, 0);
- authkeyexpired++;
- }
- sk = skp;
- }
- }
-#ifdef DEBUG
- if (debug)
- printf("auth_agekeys: at %lu keys %lu expired %lu\n",
- current_time, authnumkeys, authkeyexpired);
-#endif
-}
-
-/*
- * authencrypt - generate message authenticator
- *
- * Returns length of authenticator field, zero if key not found.
- */
-int
-authencrypt(
- keyid_t keyno,
- u_int32 *pkt,
- int length
- )
-{
-
- /*
- * A zero key identifier means the sender has not verified
- * the last message was correctly authenticated. The MAC
- * consists of a single word with value zero.
- */
- authencryptions++;
- pkt[length / 4] = htonl(keyno);
- if (keyno == 0) {
- return (4);
- }
- if (!authhavekey(keyno))
- return (0);
-
- if (cache_flags & KEY_MD5)
- return (MD5authencrypt(cache_key, pkt, length));
-
- return (0);
-}
-
-/*
- * authdecrypt - verify message authenticator
- *
- * Returns one if authenticator valid, zero if invalid or key not found.
- */
-int
-authdecrypt(
- keyid_t keyno,
- u_int32 *pkt,
- int length,
- int size
- )
-{
-
- /*
- * A zero key identifier means the sender has not verified
- * the last message was correctly authenticated. Nevertheless,
- * the authenticator itself is considered valid.
- */
- authdecryptions++;
- if (keyno == 0)
- return (0);
-
- if (!authhavekey(keyno) || size < 4)
- return (0);
-
- if (cache_flags & KEY_MD5)
- return (MD5authdecrypt(cache_key, pkt, length, size));
-
- return (0);
-}
diff --git a/contrib/ntp/libntp/authparity.c b/contrib/ntp/libntp/authparity.c
deleted file mode 100644
index ea5eac0..0000000
--- a/contrib/ntp/libntp/authparity.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * auth_parity - set parity on a key/check for odd parity
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef DES
-#include "ntp_stdlib.h"
-
-int
-DESauth_parity(
- u_int32 *key
- )
-{
- u_int32 mask;
- int parity_err;
- int bitcount;
- int half;
- int byte;
- int i;
-
- /*
- * Go through counting bits in each byte. Check to see if
- * each parity bit was set correctly. If not, note the error
- * and set it right.
- */
- parity_err = 0;
- for (half = 0; half < 2; half++) { /* two halves of key */
- mask = 0x80000000;
- for (byte = 0; byte < 4; byte++) { /* 4 bytes per half */
- bitcount = 0;
- for (i = 0; i < 7; i++) { /* 7 data bits / byte */
- if (key[half] & mask)
- bitcount++;
- mask >>= 1;
- }
-
- /*
- * If bitcount is even, parity must be set. If
- * bitcount is odd, parity must be clear.
- */
- if ((bitcount & 0x1) == 0) {
- if (!(key[half] & mask)) {
- parity_err++;
- key[half] |= mask;
- }
- } else {
- if (key[half] & mask) {
- parity_err++;
- key[half] &= ~mask;
- }
- }
- mask >>= 1;
- }
- }
-
- /*
- * Return the result of the parity check.
- */
- return (parity_err == 0);
-}
-#else
-int authparity_bs;
-#endif /* DES */
diff --git a/contrib/ntp/libntp/authreadkeys.c b/contrib/ntp/libntp/authreadkeys.c
deleted file mode 100644
index 22020f3..0000000
--- a/contrib/ntp/libntp/authreadkeys.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * authreadkeys.c - routines to support the reading of the key file
- */
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-
-/*
- * Arbitrary long string of ASCII characters.
- */
-#define KEY_TYPE_MD5 4
-
-/* Forwards */
-static char *nexttok P((char **));
-
-/*
- * nexttok - basic internal tokenizing routine
- */
-static char *
-nexttok(
- char **str
- )
-{
- register char *cp;
- char *starttok;
-
- cp = *str;
-
- /*
- * Space past white space
- */
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- /*
- * Save this and space to end of token
- */
- starttok = cp;
- while (*cp != '\0' && *cp != '\n' && *cp != ' '
- && *cp != '\t' && *cp != '#')
- cp++;
-
- /*
- * If token length is zero return an error, else set end of
- * token to zero and return start.
- */
- if (starttok == cp)
- return 0;
-
- if (*cp == ' ' || *cp == '\t')
- *cp++ = '\0';
- else
- *cp = '\0';
-
- *str = cp;
- return starttok;
-}
-
-
-/*
- * authreadkeys - (re)read keys from a file.
- */
-int
-authreadkeys(
- const char *file
- )
-{
- FILE *fp;
- char *line;
- char *token;
- u_long keyno;
- int keytype;
- char buf[512]; /* lots of room for line */
-
- /*
- * Open file. Complain and return if it can't be opened.
- */
- fp = fopen(file, "r");
- if (fp == NULL) {
- msyslog(LOG_ERR, "can't open key file %s: %m", file);
- return 0;
- }
-
- /*
- * Remove all existing keys
- */
- auth_delkeys();
-
- /*
- * Now read lines from the file, looking for key entries
- */
- while ((line = fgets(buf, sizeof buf, fp)) != NULL) {
- token = nexttok(&line);
- if (token == 0)
- continue;
-
- /*
- * First is key number. See if it is okay.
- */
- keyno = atoi(token);
- if (keyno == 0) {
- msyslog(LOG_ERR,
- "cannot change keyid 0, key entry `%s' ignored",
- token);
- continue;
- }
-
- if (keyno > NTP_MAXKEY) {
- msyslog(LOG_ERR,
- "keyid's > %d reserved for autokey, key entry `%s' ignored",
- NTP_MAXKEY, token);
- continue;
- }
-
- /*
- * Next is keytype. See if that is all right.
- */
- token = nexttok(&line);
- if (token == 0) {
- msyslog(LOG_ERR,
- "no key type for key number %ld, entry ignored",
- keyno);
- continue;
- }
- switch (*token) {
- case 'M':
- case 'm':
- keytype = KEY_TYPE_MD5; break;
- default:
- msyslog(LOG_ERR,
- "invalid key type for key number %ld, entry ignored",
- keyno);
- continue;
- }
-
- /*
- * Finally, get key and insert it
- */
- token = nexttok(&line);
- if (token == 0) {
- msyslog(LOG_ERR,
- "no key for number %ld entry, entry ignored",
- keyno);
- } else {
- switch(keytype) {
- case KEY_TYPE_MD5:
- if (!authusekey(keyno, keytype,
- (u_char *)token))
- msyslog(LOG_ERR,
- "format/parity error for MD5 key %ld, not used",
- keyno);
- break;
- }
- }
- }
- (void) fclose(fp);
- return 1;
-}
diff --git a/contrib/ntp/libntp/authusekey.c b/contrib/ntp/libntp/authusekey.c
deleted file mode 100644
index 40dd373..0000000
--- a/contrib/ntp/libntp/authusekey.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * authusekey - decode a key from ascii and use it
- */
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntp_types.h"
-#include "ntp_string.h"
-#include "ntp_stdlib.h"
-
-/*
- * 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_MD5 4
-
-int
-authusekey(
- keyid_t keyno,
- int keytype,
- const u_char *str
- )
-{
- const u_char *cp;
- int len;
-
- cp = str;
- len = strlen((const char *)cp);
- if (len == 0)
- return 0;
-
- switch(keytype) {
- case KEY_TYPE_MD5:
- MD5auth_setkey(keyno, str, (int)strlen((const char *)str));
- break;
-
- default:
- /* Oh, well */
- return 0;
- }
-
- return 1;
-}
diff --git a/contrib/ntp/libntp/binio.c b/contrib/ntp/libntp/binio.c
deleted file mode 100644
index bbaf06f..0000000
--- a/contrib/ntp/libntp/binio.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * /src/NTP/ntp-4/libntp/binio.c,v 4.2 1999/02/21 12:17:34 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jul 20 12:55:33 1997 $
- *
- * Copyright (C) 1997, 1998 by Frank Kardel
- */
-
-#include "binio.h"
-
-long
-get_lsb_short(
- unsigned char **bufpp
- )
-{
- long retval;
-
- retval = *((*bufpp)++);
- retval |= *((*bufpp)++) << 8;
-
- return (retval & 0x8000) ? (~0xFFFF | retval) : retval;
-}
-
-void
-put_lsb_short(
- unsigned char **bufpp,
- long val
- )
-{
- *((*bufpp)++) = (unsigned char) (val & 0xFF);
- *((*bufpp)++) = (unsigned char) ((val >> 8) & 0xFF);
-}
-
-long
-get_lsb_long(
- unsigned char **bufpp
- )
-{
- long retval;
-
- retval = *((*bufpp)++);
- retval |= *((*bufpp)++) << 8;
- retval |= *((*bufpp)++) << 16;
- retval |= *((*bufpp)++) << 24;
-
- return retval;
-}
-
-void
-put_lsb_long(
- unsigned char **bufpp,
- long val
- )
-{
- *((*bufpp)++) = (unsigned char)(val & 0xFF);
- *((*bufpp)++) = (unsigned char)((val >> 8) & 0xFF);
- *((*bufpp)++) = (unsigned char)((val >> 16) & 0xFF);
- *((*bufpp)++) = (unsigned char)((val >> 24) & 0xFF);
-}
-
-long
-get_msb_short(
- unsigned char **bufpp
- )
-{
- long retval;
-
- retval = *((*bufpp)++) << 8;
- retval |= *((*bufpp)++);
-
- return (retval & 0x8000) ? (~0xFFFF | retval) : retval;
-}
-
-void
-put_msb_short(
- unsigned char **bufpp,
- long val
- )
-{
- *((*bufpp)++) = (unsigned char)((val >> 8) & 0xFF);
- *((*bufpp)++) = (unsigned char)( val & 0xFF);
-}
-
-long
-get_msb_long(
- unsigned char **bufpp
- )
-{
- long retval;
-
- retval = *((*bufpp)++) << 24;
- retval |= *((*bufpp)++) << 16;
- retval |= *((*bufpp)++) << 8;
- retval |= *((*bufpp)++);
-
- return retval;
-}
-
-void
-put_msb_long(
- unsigned char **bufpp,
- long val
- )
-{
- *((*bufpp)++) = (unsigned char)((val >> 24) & 0xFF);
- *((*bufpp)++) = (unsigned char)((val >> 16) & 0xFF);
- *((*bufpp)++) = (unsigned char)((val >> 8 ) & 0xFF);
- *((*bufpp)++) = (unsigned char)( val & 0xFF);
-}
-
-/*
- * binio.c,v
- * Revision 4.2 1999/02/21 12:17:34 kardel
- * 4.91f reconcilation
- *
- * Revision 4.1 1998/06/28 16:47:50 kardel
- * added {get,put}_msb_{short,long} functions
- *
- * Revision 4.0 1998/04/10 19:46:16 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.1 1998/04/10 19:27:46 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- * Revision 1.1 1997/10/06 21:05:46 kardel
- * new parse structure
- *
- */
diff --git a/contrib/ntp/libntp/buftvtots.c b/contrib/ntp/libntp/buftvtots.c
deleted file mode 100644
index 1944233..0000000
--- a/contrib/ntp/libntp/buftvtots.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * buftvtots - pull a Unix-format (struct timeval) time stamp out of
- * an octet stream and convert it to a l_fp time stamp.
- * This is useful when using the clock line discipline.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-
-int
-buftvtots(
- const char *bufp,
- l_fp *ts
- )
-{
- register const u_char *bp;
- register u_long sec;
- register u_long usec;
- struct timeval tv;
-
-#ifdef WORDS_BIGENDIAN
- bp = (const u_char *)bufp;
-
- sec = (u_long)*bp++ & 0xff;
- sec <<= 8;
- sec += (u_long)*bp++ & 0xff;
- sec <<= 8;
- sec += (u_long)*bp++ & 0xff;
- sec <<= 8;
- sec += (u_long)*bp++ & 0xff;
-
- if (sizeof(tv.tv_sec) == 8) {
- sec += (u_long)*bp++ & 0xff;
- sec <<= 8;
- sec += (u_long)*bp++ & 0xff;
- sec <<= 8;
- sec += (u_long)*bp++ & 0xff;
- sec <<= 8;
- sec += (u_long)*bp++ & 0xff;
- }
-
- usec = (u_long)*bp++ & 0xff;
- usec <<= 8;
- usec += (u_long)*bp++ & 0xff;
- usec <<= 8;
- usec += (u_long)*bp++ & 0xff;
- usec <<= 8;
- usec += (u_long)*bp++ & 0xff;
-
- if (sizeof(tv.tv_usec) == 8) {
- usec += (u_long)*bp++ & 0xff;
- usec <<= 8;
- usec += (u_long)*bp++ & 0xff;
- usec <<= 8;
- usec += (u_long)*bp++ & 0xff;
- usec <<= 8;
- usec += (u_long)*bp & 0xff;
- }
-#else
- bp = (const u_char *)bufp + 7;
-
- usec = (u_long)*bp-- & 0xff;
- usec <<= 8;
- usec += (u_long)*bp-- & 0xff;
- usec <<= 8;
- usec += (u_long)*bp-- & 0xff;
- usec <<= 8;
- usec += (u_long)*bp-- & 0xff;
-
- if (sizeof(tv.tv_usec) == 8) {
- usec += (u_long)*bp-- & 0xff;
- usec <<= 8;
- usec += (u_long)*bp-- & 0xff;
- usec <<= 8;
- usec += (u_long)*bp-- & 0xff;
- usec <<= 8;
- usec += (u_long)*bp-- & 0xff;
- }
-
- sec = (u_long)*bp-- & 0xff;
- sec <<= 8;
- sec += (u_long)*bp-- & 0xff;
- sec <<= 8;
- sec += (u_long)*bp-- & 0xff;
- sec <<= 8;
- sec += (u_long)*bp-- & 0xff;
-
- if (sizeof (tv.tv_sec) == 8) {
- sec += (u_long)*bp-- & 0xff;
- sec <<= 8;
- sec += (u_long)*bp-- & 0xff;
- sec <<= 8;
- sec += (u_long)*bp-- & 0xff;
- sec <<= 8;
- sec += (u_long)*bp & 0xff;
- }
-#endif
- ts->l_ui = sec + (u_long)JAN_1970;
- if (usec > 999999)
- return 0;
- TVUTOTSF(usec, ts->l_uf);
- return 1;
-}
diff --git a/contrib/ntp/libntp/caljulian.c b/contrib/ntp/libntp/caljulian.c
deleted file mode 100644
index c3b5e67..0000000
--- a/contrib/ntp/libntp/caljulian.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * caljulian - determine the Julian date from an NTP time.
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/*
- * calmonthtab - days-in-the-month table
- */
-static u_short calmonthtab[11] = {
- JAN,
- FEB,
- MAR,
- APR,
- MAY,
- JUN,
- JUL,
- AUG,
- SEP,
- OCT,
- NOV
-};
-
-void
-caljulian(
- u_long ntptime,
- register struct calendar *jt
- )
-{
- u_long ntp_day;
- u_long minutes;
- /*
- * Absolute, zero-adjusted Christian era day, starting from the
- * mythical day 12/1/1 BC
- */
- u_long acez_day;
-
- u_long d400; /* Days into a Gregorian cycle */
- u_long d100; /* Days into a normal century */
- u_long d4; /* Days into a 4-year cycle */
- u_long n400; /* # of Gregorian cycles */
- u_long n100; /* # of normal centuries */
- u_long n4; /* # of 4-year cycles */
- u_long n1; /* # of years into a leap year */
- /* cycle */
-
- /*
- * Do the easy stuff first: take care of hh:mm:ss, ignoring leap
- * seconds
- */
- jt->second = (u_char)(ntptime % SECSPERMIN);
- minutes = ntptime / SECSPERMIN;
- jt->minute = (u_char)(minutes % MINSPERHR);
- jt->hour = (u_char)((minutes / MINSPERHR) % HRSPERDAY);
-
- /*
- * Find the day past 1900/01/01 00:00 UTC
- */
- ntp_day = ntptime / SECSPERDAY;
- acez_day = DAY_NTP_STARTS + ntp_day - 1;
- n400 = acez_day/GREGORIAN_CYCLE_DAYS;
- d400 = acez_day%GREGORIAN_CYCLE_DAYS;
- n100 = d400 / GREGORIAN_NORMAL_CENTURY_DAYS;
- d100 = d400 % GREGORIAN_NORMAL_CENTURY_DAYS;
- n4 = d100 / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
- d4 = d100 % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
- n1 = d4 / DAYSPERYEAR;
-
- /*
- * Calculate the year and year-of-day
- */
- jt->yearday = (u_short)(1 + d4%DAYSPERYEAR);
- jt->year = (u_short)(400*n400 + 100*n100 + n4*4 + n1);
-
- if (n100 == 4 || n1 == 4)
- {
- /*
- * If the cycle year ever comes out to 4, it must be December 31st
- * of a leap year.
- */
- jt->month = 12;
- jt->monthday = 31;
- jt->yearday = 366;
- }
- else
- {
- /*
- * Else, search forwards through the months to get the right month
- * and date.
- */
- int monthday;
-
- jt->year++;
- monthday = jt->yearday;
-
- for (jt->month=0;jt->month<11; jt->month++)
- {
- int t;
-
- t = monthday - calmonthtab[jt->month];
- if (jt->month == 1 && is_leapyear(jt->year))
- t--;
-
- if (t > 0)
- monthday = t;
- else
- break;
- }
- jt->month++;
- jt->monthday = (u_char) monthday;
- }
-}
diff --git a/contrib/ntp/libntp/calleapwhen.c b/contrib/ntp/libntp/calleapwhen.c
deleted file mode 100644
index c954901..0000000
--- a/contrib/ntp/libntp/calleapwhen.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * calleapwhen - determine the number of seconds to the next possible
- * leap occurance.
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/*
- * calleaptab - leaps occur at the end of December and June
- */
-long calleaptab[10] = {
- -(JAN+FEBLEAP)*SECSPERDAY, /* leap previous to cycle */
- (MAR+APR+MAY+JUN)*SECSPERDAY, /* end of June */
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY, /* end of Dec */
- (MAR+APR+MAY+JUN)*SECSPERDAY + SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY + SECSPERYEAR,
- (MAR+APR+MAY+JUN)*SECSPERDAY + 2*SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY + 2*SECSPERYEAR,
- (MAR+APR+MAY+JUN)*SECSPERDAY + 3*SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC)*SECSPERDAY + 3*SECSPERYEAR,
- (MAR+APR+MAY+JUN+JUL+AUG+SEP+OCT+NOV+DEC+JAN+FEBLEAP+MAR+APR+MAY+JUN)
- *SECSPERDAY + 3*SECSPERYEAR, /* next after current cycle */
-};
-
-u_long
-calleapwhen(
- u_long ntpdate
- )
-{
- register u_long dateincycle;
- register int i;
-
- /*
- * Find the offset from the start of the cycle
- */
- dateincycle = ntpdate;
- if (dateincycle >= MAR1988)
- dateincycle -= MAR1988;
- else
- dateincycle -= MAR1900;
-
- while (dateincycle >= SECSPERCYCLE)
- dateincycle -= SECSPERCYCLE;
-
- /*
- * Find where we are with respect to the leap events.
- */
- for (i = 1; i < 9; i++)
- if (dateincycle < (u_long)calleaptab[i])
- break;
-
- /*
- * i points at the next leap. Compute the last and the next.
- */
- return (u_long)(calleaptab[i] - (long)dateincycle);
-}
diff --git a/contrib/ntp/libntp/caltontp.c b/contrib/ntp/libntp/caltontp.c
deleted file mode 100644
index 9ec1064..0000000
--- a/contrib/ntp/libntp/caltontp.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * caltontp - convert a date to an NTP time
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-u_long
-caltontp(
- register const struct calendar *jt
- )
-{
- u_long ace_days; /* absolute Christian Era days */
- u_long ntp_days;
- int prior_years;
- u_long ntp_time;
-
- /*
- * First convert today's date to absolute days past 12/1/1 BC
- */
- prior_years = jt->year-1;
- ace_days = jt->yearday /* days this year */
- +(DAYSPERYEAR*prior_years) /* plus days in previous years */
- +(prior_years/4) /* plus prior years's leap days */
- -(prior_years/100) /* minus leapless century years */
- +(prior_years/400); /* plus leapful Gregorian yrs */
-
- /*
- * Subtract out 1/1/1900, the beginning of the NTP epoch
- */
- ntp_days = ace_days - DAY_NTP_STARTS;
-
- /*
- * Do the obvious:
- */
- ntp_time =
- ntp_days*SECSPERDAY+SECSPERMIN*(MINSPERHR*jt->hour + jt->minute);
-
- return ntp_time;
-}
diff --git a/contrib/ntp/libntp/calyearstart.c b/contrib/ntp/libntp/calyearstart.c
deleted file mode 100644
index 0f7ca4f..0000000
--- a/contrib/ntp/libntp/calyearstart.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * calyearstart - determine the NTP time at midnight of January 1 in
- * the year of the given date.
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-u_long
-calyearstart(u_long ntp_time)
-{
- struct calendar jt;
-
- caljulian(ntp_time,&jt);
- jt.yearday = 1;
- jt.monthday = 1;
- jt.month = 1;
- jt.hour = jt.minute = jt.second = 0;
- return caltontp(&jt);
-}
diff --git a/contrib/ntp/libntp/clocktime.c b/contrib/ntp/libntp/clocktime.c
deleted file mode 100644
index 371859c..0000000
--- a/contrib/ntp/libntp/clocktime.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * clocktime - compute the NTP date from a day of year, hour, minute
- * and second.
- */
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-/*
- * Hacks to avoid excercising the multiplier. I have no pride.
- */
-#define MULBY10(x) (((x)<<3) + ((x)<<1))
-#define MULBY60(x) (((x)<<6) - ((x)<<2)) /* watch overflow */
-#define MULBY24(x) (((x)<<4) + ((x)<<3))
-
-/*
- * Two days, in seconds.
- */
-#define TWODAYS (2*24*60*60)
-
-/*
- * We demand that the time be within CLOSETIME seconds of the receive
- * time stamp. This is about 4 hours, which hopefully should be
- * wide enough to collect most data, while close enough to keep things
- * from getting confused.
- */
-#define CLOSETIME (4*60*60)
-
-
-int
-clocktime(
- int yday,
- int hour,
- int minute,
- int second,
- int tzoff,
- u_long rec_ui,
- u_long *yearstart,
- u_int32 *ts_ui
- )
-{
- register long tmp;
- register u_long date;
- register u_long yst;
-
- /*
- * Compute the offset into the year in seconds. Note that
- * this could come out to be a negative number.
- */
- tmp = (long)(MULBY24((yday-1)) + hour + tzoff);
- tmp = MULBY60(tmp) + (long)minute;
- tmp = MULBY60(tmp) + (long)second;
-
- /*
- * Initialize yearstart, if necessary.
- */
- yst = *yearstart;
- if (yst == 0) {
- yst = calyearstart(rec_ui);
- *yearstart = yst;
- }
-
- /*
- * Now the fun begins. We demand that the received clock time
- * be within CLOSETIME of the receive timestamp, but
- * there is uncertainty about the year the timestamp is in.
- * Use the current year start for the first check, this should
- * work most of the time.
- */
- date = (u_long)(tmp + (long)yst);
- if (date < (rec_ui + CLOSETIME) &&
- date > (rec_ui - CLOSETIME)) {
- *ts_ui = date;
- return 1;
- }
-
- /*
- * Trouble. Next check is to see if the year rolled over and, if
- * so, try again with the new year's start.
- */
- yst = calyearstart(rec_ui);
- if (yst != *yearstart) {
- date = (u_long)((long)yst + tmp);
- *ts_ui = date;
- if (date < (rec_ui + CLOSETIME) &&
- date > (rec_ui - CLOSETIME)) {
- *yearstart = yst;
- return 1;
- }
- }
-
- /*
- * Here we know the year start matches the current system
- * time. One remaining possibility is that the time code
- * is in the year previous to that of the system time. This
- * is only worth checking if the receive timestamp is less
- * than a couple of days into the new year.
- */
- if ((rec_ui - yst) < TWODAYS) {
- yst = calyearstart(yst - TWODAYS);
- if (yst != *yearstart) {
- date = (u_long)(tmp + (long)yst);
- if (date < (rec_ui + CLOSETIME) &&
- date > (rec_ui - CLOSETIME)) {
- *yearstart = yst;
- *ts_ui = date;
- return 1;
- }
- }
- }
-
- /*
- * One last possibility is that the time stamp is in the year
- * following the year the system is in. Try this one before
- * giving up.
- */
- yst = calyearstart(rec_ui + TWODAYS);
- if (yst != *yearstart) {
- date = (u_long)((long)yst + tmp);
- if (date < (rec_ui + CLOSETIME) &&
- date > (rec_ui - CLOSETIME)) {
- *yearstart = yst;
- *ts_ui = date;
- return 1;
- }
- }
-
- /*
- * Give it up.
- */
- return 0;
-}
diff --git a/contrib/ntp/libntp/clocktypes.c b/contrib/ntp/libntp/clocktypes.c
deleted file mode 100644
index 928851f..0000000
--- a/contrib/ntp/libntp/clocktypes.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Data for pretty printing clock types
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "lib_strbuf.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-struct clktype clktypes[] = {
- { REFCLK_NONE, "unspecified type (0)",
- "UNKNOWN" },
- { REFCLK_LOCALCLOCK, "Undisciplined local clock (1)",
- "LOCAL" },
- { REFCLK_GPS_TRAK, "TRAK 8810 GPS Receiver (2)",
- "GPS_TRAK" },
- { REFCLK_WWV_PST, "PSTI/Traconex WWV/WWVH Receiver (3)",
- "WWV_PST" },
- { REFCLK_SPECTRACOM, "Spectracom (generic) Receivers (4)",
- "SPECTRACOM" },
- { REFCLK_TRUETIME, "TrueTime (generic) Receivers (5)",
- "TRUETIME" },
- { REFCLK_IRIG_AUDIO, "IRIG Audio Decoder (6)",
- "IRIG_AUDIO" },
- { REFCLK_CHU_AUDIO, "CHU Audio Demodulator/Decoder (7)",
- "CHU_AUDIO" },
- { REFCLK_PARSE, "Generic reference clock driver (8)",
- "GENERIC" },
- { REFCLK_GPS_MX4200, "Magnavox MX4200 GPS Receiver (9)",
- "GPS_MX4200" },
- { REFCLK_GPS_AS2201, "Austron 2201A GPS Receiver (10)",
- "GPS_AS2201" },
- { REFCLK_GPS_ARBITER, "Arbiter 1088A/B GPS Receiver (11)",
- "GPS_ARBITER" },
- { REFCLK_IRIG_TPRO, "KSI/Odetics TPRO/S IRIG Interface (12)",
- "IRIG_TPRO" },
- { REFCLK_ATOM_LEITCH, "Leitch CSD 5300 Master Clock Controller (13)",
- "ATOM_LEITCH" },
- { REFCLK_MSF_EES, "EES M201 MSF Receiver (14)",
- "MSF_EES" },
- { REFCLK_GPSTM_TRUE, "TrueTime (old GPSTM driver) Receiver (15)",
- "GPSTM_TRUE" },
- { REFCLK_IRIG_BANCOMM, "Bancomm GPS/IRIG Receiver (16)",
- "GPS_BANC" },
- { REFCLK_GPS_DATUM, "Datum Precision Time System (17)",
- "GPS_DATUM" },
- { REFCLK_NIST_ACTS, "NIST Automated Computer Time Service (18)",
- "ACTS_NIST" },
- { REFCLK_WWV_HEATH, "Heath WWV/WWVH Receiver (19)",
- "WWV_HEATH" },
- { REFCLK_GPS_NMEA, "Generic NMEA GPS Receiver (20)",
- "GPS_NMEA" },
- { REFCLK_GPS_VME, "TrueTime GPS-VME Interface (21)",
- "GPS_VME" },
- { REFCLK_ATOM_PPS, "PPS Clock Discipline (22)",
- "PPS" },
- { REFCLK_PTB_ACTS, "PTB Automated Computer Time Service (23)",
- "ACTS_PTB" },
- { REFCLK_USNO, "Naval Observatory dialup (24)",
- "ACTS_USNO" },
- { REFCLK_TRUETIME, "TrueTime (generic) Receivers (25)",
- "TRUETIME" },
- { REFCLK_GPS_HP, "HP 58503A GPS Time & Frequency Receiver (26)",
- "GPS_HP" },
- { REFCLK_ARCRON_MSF, "ARCRON MSF (and DCF77) Receiver (27)",
- "MSF_ARCRON" },
- { REFCLK_SHM, "Clock attached thru shared Memory (28)",
- "SHM" },
- { REFCLK_PALISADE, "Trimble Navigation Palisade GPS (29)",
- "GPS_PALISADE" },
- { REFCLK_ONCORE, "Motorola UT Oncore GPS (30)",
- "GPS_ONCORE" },
- { REFCLK_GPS_JUPITER, "Rockwell Jupiter GPS (31)",
- "GPS_JUPITER" },
- { REFCLK_CHRONOLOG, "Chrono-log K (32)",
- "CHRONOLOG" },
- { REFCLK_DUMBCLOCK, "Dumb generic hh:mm:ss local clock (33)",
- "DUMBCLOCK" },
- { REFCLK_ULINK, "Ultralink M320 WWVB receiver (34)",
- "ULINK_M320"},
- { REFCLK_PCF, "Conrad parallel port radio clock (35)",
- "PCF"},
- { REFCLK_WWV_AUDIO, "WWV/H Audio Demodulator/Decoder (36)",
- "WWV_AUDIO"},
- { 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_TT560, "TrueTime 560 IRIG-B decoder (41)",
- "TT_IRIG"},
- { REFCLK_ZYFER, "Zyfer GPStarplus receiver (42)",
- "GPS_ZYFER" },
- { REFCLK_RIPENCC, "RIPE NCC Trimble driver (43)",
- "GPS_RIPENCC" },
- { REFCLK_NEOCLOCK4X, "NeoClock4X DCF77 / TDF receiver (44)",
- "NEOCLK4X"},
- { -1, "", "" }
-};
-
-const char *
-clockname(
- int num
- )
-{
- register struct clktype *clk;
-
- for (clk = clktypes; clk->code != -1; clk++) {
- if (num == clk->code)
- return (clk->abbrev);
- }
- return (NULL);
-}
diff --git a/contrib/ntp/libntp/decodenetnum.c b/contrib/ntp/libntp/decodenetnum.c
deleted file mode 100644
index 4accf4a..0000000
--- a/contrib/ntp/libntp/decodenetnum.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * decodenetnum - return a net number (this is crude, but careful)
- */
-#include <sys/types.h>
-#include <ctype.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-#include "ntp_stdlib.h"
-
-int
-decodenetnum(
- const char *num,
- struct sockaddr_storage *netnum
- )
-{
- struct addrinfo hints, *ai = NULL;
- register int err, i;
- register const char *cp;
- char name[80];
-
- cp = num;
-
- if (*cp == '[') {
- cp++;
- for (i = 0; *cp != ']'; cp++, i++)
- name[i] = *cp;
- name[i] = '\0';
- num = name;
- }
- 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
deleted file mode 100644
index 0f96909..0000000
--- a/contrib/ntp/libntp/dofptoa.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * dofptoa - do the grunge work to convert an fp number to ascii
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "lib_strbuf.h"
-#include "ntp_string.h"
-#include "ntp_stdlib.h"
-
-char *
-dofptoa(
- u_fp fpv,
- int neg,
- short ndec,
- int msec
- )
-{
- register u_char *cp, *cpend;
- register u_long val;
- register short dec;
- u_char cbuf[12];
- u_char *cpdec;
- char *buf;
- char *bp;
-
- /*
- * Get a string buffer before starting
- */
- LIB_GETBUF(buf);
-
- /*
- * Zero out the buffer
- */
- memset((char *)cbuf, 0, sizeof cbuf);
-
- /*
- * Set the pointers to point at the first
- * decimal place. Get a local copy of the value.
- */
- cp = cpend = &cbuf[5];
- val = fpv;
-
- /*
- * If we have to, decode the integral part
- */
- if (!(val & 0xffff0000))
- cp--;
- else {
- register u_short sv = (u_short)(val >> 16);
- register u_short tmp;
- register u_short ten = 10;
-
- do {
- tmp = sv;
- sv = (u_short) (sv/ten);
- *(--cp) = (u_char)(tmp - ((sv<<3) + (sv<<1)));
- } while (sv != 0);
- }
-
- /*
- * Figure out how much of the fraction to do
- */
- if (msec) {
- dec = (short)(ndec + 3);
- if (dec < 3)
- dec = 3;
- cpdec = &cbuf[8];
- } else {
- dec = ndec;
- cpdec = cpend;
- }
-
- if (dec > 6)
- dec = 6;
-
- if (dec > 0) {
- do {
- val &= 0xffff;
- val = (val << 3) + (val << 1);
- *cpend++ = (u_char)(val >> 16);
- } while (--dec > 0);
- }
-
- if (val & 0x8000) {
- register u_char *tp;
- /*
- * Round it. Ick.
- */
- tp = cpend;
- *(--tp) += 1;
- while (*tp >= 10) {
- *tp = 0;
- *(--tp) += 1;
- }
- }
-
- /*
- * Remove leading zeroes if necessary
- */
- while (cp < (cpdec -1) && *cp == 0)
- cp++;
-
- /*
- * Copy it into the buffer, asciizing as we go.
- */
- bp = buf;
- if (neg)
- *bp++ = '-';
-
- while (cp < cpend) {
- if (cp == cpdec)
- *bp++ = '.';
- *bp++ = (char)(*cp++ + '0');
- }
- *bp = '\0';
- return buf;
-}
diff --git a/contrib/ntp/libntp/dolfptoa.c b/contrib/ntp/libntp/dolfptoa.c
deleted file mode 100644
index 7c92a30..0000000
--- a/contrib/ntp/libntp/dolfptoa.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * dolfptoa - do the grunge work of converting an l_fp number to decimal
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "lib_strbuf.h"
-#include "ntp_string.h"
-#include "ntp_stdlib.h"
-
-char *
-dolfptoa(
- u_long fpi,
- u_long fpv,
- int neg,
- short ndec,
- int msec
- )
-{
- register u_char *cp, *cpend;
- register u_long lwork;
- register int dec;
- u_char cbuf[24];
- u_char *cpdec;
- char *buf;
- char *bp;
-
- /*
- * Get a string buffer before starting
- */
- LIB_GETBUF(buf);
-
- /*
- * Zero the character buffer
- */
- memset((char *) cbuf, 0, sizeof(cbuf));
-
- /*
- * Work on the integral part. This is biased by what I know
- * compiles fairly well for a 68000.
- */
- cp = cpend = &cbuf[10];
- lwork = fpi;
- if (lwork & 0xffff0000) {
- register u_long lten = 10;
- register u_long ltmp;
-
- do {
- ltmp = lwork;
- lwork /= lten;
- ltmp -= (lwork << 3) + (lwork << 1);
- *--cp = (u_char)ltmp;
- } while (lwork & 0xffff0000);
- }
- if (lwork != 0) {
- register u_short sten = 10;
- register u_short stmp;
- register u_short swork = (u_short)lwork;
-
- do {
- stmp = swork;
- swork = (u_short) (swork/sten);
- stmp = (u_short)(stmp - ((swork<<3) + (swork<<1)));
- *--cp = (u_char)stmp;
- } while (swork != 0);
- }
-
- /*
- * Done that, now deal with the problem of the fraction. First
- * determine the number of decimal places.
- */
- if (msec) {
- dec = ndec + 3;
- if (dec < 3)
- dec = 3;
- cpdec = &cbuf[13];
- } else {
- dec = ndec;
- if (dec < 0)
- dec = 0;
- cpdec = &cbuf[10];
- }
- if (dec > 12)
- dec = 12;
-
- /*
- * If there's a fraction to deal with, do so.
- */
- if (fpv != 0) {
- l_fp work;
-
- work.l_ui = 0;
- work.l_uf = fpv;
- while (dec > 0) {
- l_fp ftmp;
-
- dec--;
- /*
- * The scheme here is to multiply the
- * fraction (0.1234...) by ten. This moves
- * a junk of BCD into the units part.
- * record that and iterate.
- */
- work.l_ui = 0;
- L_LSHIFT(&work);
- ftmp = work;
- L_LSHIFT(&work);
- L_LSHIFT(&work);
- L_ADD(&work, &ftmp);
- *cpend++ = (u_char)work.l_ui;
- if (work.l_uf == 0)
- break;
- }
-
- /*
- * Rounding is rotten
- */
- if (work.l_uf & 0x80000000) {
- register u_char *tp = cpend;
-
- *(--tp) += 1;
- while (*tp >= 10) {
- *tp = 0;
- *(--tp) += 1;
- };
- if (tp < cp)
- cp = tp;
- }
- }
- cpend += dec;
-
-
- /*
- * We've now got the fraction in cbuf[], with cp pointing at
- * the first character, cpend pointing past the last, and
- * cpdec pointing at the first character past the decimal.
- * Remove leading zeros, then format the number into the
- * buffer.
- */
- while (cp < cpdec) {
- if (*cp != 0)
- break;
- cp++;
- }
- if (cp == cpdec)
- --cp;
-
- bp = buf;
- if (neg)
- *bp++ = '-';
- while (cp < cpend) {
- if (cp == cpdec)
- *bp++ = '.';
- *bp++ = (char)(*cp++ + '0'); /* ascii dependent? */
- }
- *bp = '\0';
-
- /*
- * Done!
- */
- return buf;
-}
diff --git a/contrib/ntp/libntp/emalloc.c b/contrib/ntp/libntp/emalloc.c
deleted file mode 100644
index 2fe4c38..0000000
--- a/contrib/ntp/libntp/emalloc.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * emalloc - return new memory obtained from the system. Belch if none.
- */
-#include "ntp_types.h"
-#include "ntp_malloc.h"
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-
-#if defined SYS_WINNT && defined DEBUG
-#include <crtdbg.h>
-#endif
-
-#if defined SYS_WINNT && defined DEBUG
-
-void *
-debug_emalloc(
- u_int size,
- char *filename,
- int line
- )
-{
- char *mem;
-
- if ((mem = (char *)_malloc_dbg(size, _NORMAL_BLOCK, filename, line)) == 0) {
- msyslog(LOG_ERR, "Exiting: No more memory!");
- exit(1);
- }
- return mem;
-}
-
-#else
-
-void *
-emalloc(
- u_int size
- )
-{
- char *mem;
-
- if ((mem = (char *)malloc(size)) == 0) {
- msyslog(LOG_ERR, "Exiting: No more memory!");
- exit(1);
- }
- return mem;
-}
-
-
-#endif
diff --git a/contrib/ntp/libntp/findconfig.c b/contrib/ntp/libntp/findconfig.c
deleted file mode 100644
index ecf6a4b..0000000
--- a/contrib/ntp/libntp/findconfig.c
+++ /dev/null
@@ -1,72 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef NEED_HPUX_FINDCONFIG
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/utsname.h>
-#include <unistd.h>
-
-const char *
-FindConfig(
- const char *base
- )
-{
- static char result[BUFSIZ];
- char hostname[BUFSIZ], *cp;
- struct stat sbuf;
- struct utsname unamebuf;
-
- /* All keyed by initial target being a directory */
- (void) strcpy(result, base);
- if (stat(result, &sbuf) == 0) {
- if (S_ISDIR(sbuf.st_mode)) {
-
- /* First choice is my hostname */
- if (gethostname(hostname, BUFSIZ) >= 0) {
- (void) sprintf(result, "%s/%s", base, hostname);
- if (stat(result, &sbuf) == 0) {
- goto outahere;
- } else {
-
- /* Second choice is of form default.835 */
- (void) uname(&unamebuf);
- if (strncmp(unamebuf.machine, "9000/", 5) == 0)
- cp = unamebuf.machine + 5;
- else
- cp = unamebuf.machine;
- (void) sprintf(result, "%s/default.%s", base, cp);
- if (stat(result, &sbuf) == 0) {
- goto outahere;
- } else {
-
- /* Last choice is just default */
- (void) sprintf(result, "%s/default", base);
- if (stat(result, &sbuf) == 0) {
- goto outahere;
- } else {
- (void) strcpy(result, "/not/found");
- }
- }
- }
- }
- }
- }
- outahere:
- return(result);
-}
-#else
-#include "ntp_stdlib.h"
-
-const char *
-FindConfig(
- const char *base
- )
-{
- return base;
-}
-#endif
diff --git a/contrib/ntp/libntp/fptoa.c b/contrib/ntp/libntp/fptoa.c
deleted file mode 100644
index 025ad21..0000000
--- a/contrib/ntp/libntp/fptoa.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * fptoa - return an asciized representation of an s_fp number
- */
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-
-char *
-fptoa(
- s_fp fpv,
- short ndec
- )
-{
- u_fp plusfp;
- int neg;
-
- if (fpv < 0) {
- plusfp = (u_fp)(-fpv);
- neg = 1;
- } else {
- plusfp = (u_fp)fpv;
- neg = 0;
- }
-
- return dofptoa(plusfp, neg, ndec, 0);
-}
diff --git a/contrib/ntp/libntp/fptoms.c b/contrib/ntp/libntp/fptoms.c
deleted file mode 100644
index 0bfca55..0000000
--- a/contrib/ntp/libntp/fptoms.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * fptoms - return an asciized s_fp number in milliseconds
- */
-#include "ntp_fp.h"
-
-char *
-fptoms(
- s_fp fpv,
- short ndec
- )
-{
- u_fp plusfp;
- int neg;
-
- if (fpv < 0) {
- plusfp = (u_fp)(-fpv);
- neg = 1;
- } else {
- plusfp = (u_fp)fpv;
- neg = 0;
- }
-
- return dofptoa(plusfp, neg, ndec, 1);
-}
diff --git a/contrib/ntp/libntp/getopt.c b/contrib/ntp/libntp/getopt.c
deleted file mode 100644
index 7b344f0..0000000
--- a/contrib/ntp/libntp/getopt.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * getopt - get option letter from argv
- *
- * This is a version of the public domain getopt() implementation by
- * Henry Spencer, changed for 4.3BSD compatibility (in addition to System V).
- * It allows rescanning of an option list by setting optind to 0 before
- * calling, which is why we use it even if the system has its own (in fact,
- * this one has a unique name so as not to conflict with the system's).
- * Thanks to Dennis Ferguson for the appropriate modifications.
- *
- * This file is in the Public Domain.
- */
-
-/*LINTLIBRARY*/
-
-#include <stdio.h>
-
-#include "ntp_stdlib.h"
-
-#ifdef lint
-#undef putc
-#define putc fputc
-#endif /* lint */
-
-char *ntp_optarg; /* Global argument pointer. */
-int ntp_optind = 0; /* Global argv index. */
-int ntp_opterr = 1; /* for compatibility, should error be printed? */
-int ntp_optopt; /* for compatibility, option character checked */
-
-static char *scan = NULL; /* Private scan pointer. */
-static const char *prog = "amnesia";
-
-/*
- * Print message about a bad option.
- */
-static int
-badopt(
- const char *mess,
- int ch
- )
-{
- if (ntp_opterr) {
- fputs(prog, stderr);
- fputs(mess, stderr);
- (void) putc(ch, stderr);
- (void) putc('\n', stderr);
- }
- return ('?');
-}
-
-int
-ntp_getopt(
- int argc,
- char *argv[],
- const char *optstring
- )
-{
- register char c;
- register const char *place;
-
- prog = argv[0];
- ntp_optarg = NULL;
-
- if (ntp_optind == 0) {
- scan = NULL;
- ntp_optind++;
- }
-
- if (scan == NULL || *scan == '\0') {
- if (ntp_optind >= argc
- || argv[ntp_optind][0] != '-'
- || argv[ntp_optind][1] == '\0') {
- return (EOF);
- }
- if (argv[ntp_optind][1] == '-'
- && argv[ntp_optind][2] == '\0') {
- ntp_optind++;
- return (EOF);
- }
-
- scan = argv[ntp_optind++]+1;
- }
-
- c = *scan++;
- ntp_optopt = c & 0377;
- for (place = optstring; place != NULL && *place != '\0'; ++place)
- if (*place == c)
- break;
-
- if (place == NULL || *place == '\0' || c == ':' || c == '?') {
- return (badopt(": unknown option -", c));
- }
-
- place++;
- if (*place == ':') {
- if (*scan != '\0') {
- ntp_optarg = scan;
- scan = NULL;
- } else if (ntp_optind >= argc) {
- return (badopt(": option requires argument -", c));
- } else {
- ntp_optarg = argv[ntp_optind++];
- }
- }
-
- return (c & 0377);
-}
diff --git a/contrib/ntp/libntp/gpstolfp.c b/contrib/ntp/libntp/gpstolfp.c
deleted file mode 100644
index c424784..0000000
--- a/contrib/ntp/libntp/gpstolfp.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * /src/NTP/ntp-4/libntp/gpstolfp.c,v 4.3 1999/02/28 11:42:44 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jun 28 16:30:38 1998 $
- *
- * Copyright (C) 1998 by Frank Kardel
- */
-#include "ntp_fp.h"
-
-#define GPSORIGIN ULONG_CONST(2524953600) /* NTP origin - GPS origin in seconds */
-#define SECSPERWEEK (unsigned)(604800) /* seconds per week - GPS tells us about weeks */
-#define GPSWRAP 990 /* assume week count less than this in the previous epoch */
-
-void
-gpstolfp(
- int weeks,
- int days,
- unsigned long seconds,
- l_fp * lfp
- )
-{
- if (weeks < GPSWRAP)
- {
- weeks += 1024;
- }
-
- lfp->l_ui = weeks * SECSPERWEEK + days * 86400 + seconds + GPSORIGIN; /* convert to NTP time */
- lfp->l_uf = 0;
-}
-
-/*
- * gpstolfp.c,v
- * Revision 4.3 1999/02/28 11:42:44 kardel
- * (GPSWRAP): update GPS rollover to 990 weeks
- *
- * Revision 4.2 1998/07/11 10:05:25 kardel
- * Release 4.0.73d reconcilation
- *
- * Revision 4.1 1998/06/28 16:47:15 kardel
- * added gpstolfp() function
- */
diff --git a/contrib/ntp/libntp/hextoint.c b/contrib/ntp/libntp/hextoint.c
deleted file mode 100644
index 0d774eb..0000000
--- a/contrib/ntp/libntp/hextoint.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * hextoint - convert an ascii string in hex to an unsigned
- * long, with error checking
- */
-#include <ctype.h>
-
-#include "ntp_stdlib.h"
-
-int
-hextoint(
- const char *str,
- u_long *ival
- )
-{
- register u_long u;
- register const char *cp;
-
- cp = str;
-
- if (*cp == '\0')
- return 0;
-
- u = 0;
- while (*cp != '\0') {
- if (!isxdigit((int)*cp))
- return 0;
- if (u >= 0x10000000)
- return 0; /* overflow */
- u <<= 4;
- if (*cp <= '9') /* very ascii dependent */
- u += *cp++ - '0';
- else if (*cp >= 'a')
- u += *cp++ - 'a' + 10;
- else
- u += *cp++ - 'A' + 10;
- }
- *ival = u;
- return 1;
-}
diff --git a/contrib/ntp/libntp/hextolfp.c b/contrib/ntp/libntp/hextolfp.c
deleted file mode 100644
index d0b6243..0000000
--- a/contrib/ntp/libntp/hextolfp.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * hextolfp - convert an ascii hex string to an l_fp number
- */
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntp_fp.h"
-#include "ntp_string.h"
-#include "ntp_stdlib.h"
-
-int
-hextolfp(
- const char *str,
- l_fp *lfp
- )
-{
- register const char *cp;
- register const char *cpstart;
- register u_long dec_i;
- register u_long dec_f;
- char *ind = NULL;
- static const char *digits = "0123456789abcdefABCDEF";
-
- dec_i = dec_f = 0;
- cp = str;
-
- /*
- * We understand numbers of the form:
- *
- * [spaces]8_hex_digits[.]8_hex_digits[spaces|\n|\0]
- */
- while (isspace((int)*cp))
- cp++;
-
- cpstart = cp;
- while (*cp != '\0' && (cp - cpstart) < 8 &&
- (ind = strchr(digits, *cp)) != NULL) {
- dec_i = dec_i << 4; /* multiply by 16 */
- dec_i += ((ind - digits) > 15) ? (ind - digits) - 6
- : (ind - digits);
- cp++;
- }
-
- if ((cp - cpstart) < 8 || ind == NULL)
- return 0;
- if (*cp == '.')
- cp++;
-
- cpstart = cp;
- while (*cp != '\0' && (cp - cpstart) < 8 &&
- (ind = strchr(digits, *cp)) != NULL) {
- dec_f = dec_f << 4; /* multiply by 16 */
- dec_f += ((ind - digits) > 15) ? (ind - digits) - 6
- : (ind - digits);
- cp++;
- }
-
- if ((cp - cpstart) < 8 || ind == NULL)
- return 0;
-
- if (*cp != '\0' && !isspace((int)*cp))
- return 0;
-
- lfp->l_ui = dec_i;
- lfp->l_uf = dec_f;
- return 1;
-}
diff --git a/contrib/ntp/libntp/humandate.c b/contrib/ntp/libntp/humandate.c
deleted file mode 100644
index 52f5af1..0000000
--- a/contrib/ntp/libntp/humandate.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * humandate - convert an NTP (or the current) time to something readable
- */
-#include <stdio.h>
-#include "ntp_fp.h"
-#include "ntp_unixtime.h" /* includes <sys/time.h> and <time.h> */
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-static const char *months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-static const char *days[] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-char *
-humandate(
- u_long ntptime
- )
-{
- char *bp;
- struct tm *tm;
- time_t sec;
-
- 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);
-
- return bp;
-}
-
-
-/* This is used in msyslog.c; we don't want to clutter up the log with
- the year and day of the week, etc.; just the minimal date and time. */
-
-char *
-humanlogtime(void)
-{
- char *bp;
- 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",
- tm->tm_mday, months[tm->tm_mon],
- tm->tm_hour, tm->tm_min, tm->tm_sec);
-
- return bp;
-}
diff --git a/contrib/ntp/libntp/icom.c b/contrib/ntp/libntp/icom.c
deleted file mode 100644
index 5c1a9a3..0000000
--- a/contrib/ntp/libntp/icom.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Program to control ICOM radios
- *
- * This is a ripoff of the utility routines in the ICOM software
- * distribution. The only function provided is to load the radio
- * frequency. All other parameters must be manually set before use.
- */
-#include "icom.h"
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "ntp_tty.h"
-#include "l_stdlib.h"
-
-/*
- * Scraps
- */
-#define BMAX 50 /* max command length */
-#define DICOM /dev/icom/ /* ICOM port link */
-
-/*
- * FSA definitions
- */
-#define S_IDLE 0 /* idle */
-#define S_HDR 1 /* header */
-#define S_TX 2 /* address */
-#define S_DATA 3 /* data */
-#define S_ERROR 4 /* error */
-
-/*
- * Local function prototypes
- */
-static void doublefreq P((double, u_char *, int));
-static int sndpkt P((int, int, u_char *, u_char *));
-static int sndoctet P((int, int));
-static int rcvoctet P((int));
-
-/*
- * Local variables
- */
-static int flags; /* trace flags */
-static int state; /* fsa state */
-
-
-/*
- * icom_freq(fd, ident, freq) - load radio frequency
- */
-int
-icom_freq( /* returns 0 (ok), EIO (error) */
- int fd, /* file descriptor */
- int ident, /* ICOM radio identifier */
- double freq /* frequency (MHz) */
- )
-{
- u_char cmd[BMAX], rsp[BMAX];
- int temp;
- cmd[0] = V_SFREQ;
- if (ident == IC735)
- temp = 4;
- else
- temp = 5;
- doublefreq(freq * 1e6, &cmd[1], temp);
- temp = sndpkt(fd, ident, cmd, rsp);
- if (temp < 1 || rsp[0] != ACK)
- return (EIO);
- return (0);
-}
-
-
-/*
- * doublefreq(freq, y, len) - double to ICOM frequency with padding
- */
-static void
-doublefreq( /* returns void */
- double freq, /* frequency */
- u_char *x, /* radio frequency */
- int len /* length (octets) */
- )
-{
- int i;
- char s1[11];
- char *y;
-
- sprintf(s1, " %10.0f", freq);
- y = s1 + 10;
- i = 0;
- while (*y != ' ') {
- x[i] = *y-- & 0x0f;
- x[i] = x[i] | ((*y-- & 0x0f) << 4);
- i++;
- }
- for (; i < len; i++)
- x[i] = 0;
- x[i] = FI;
-}
-
-
-/*
- * Packet routines
- *
- * These routines send a packet and receive the response. If an error
- * (collision) occurs on transmit, the packet is resent. If an error
- * occurs on receive (timeout), all input to the terminating FI is
- * discarded and the packet is resent. If the maximum number of retries
- * is not exceeded, the program returns the number of octets in the user
- * buffer; otherwise, it returns zero.
- *
- * ICOM frame format
- *
- * Frames begin with a two-octet preamble PR-PR followyd by the
- * transceiver address RE, controller address TX, control code CN, zero
- * or more data octets DA (depending on command), and terminator FI.
- * Since the bus is bidirectional, every octet output is echoed on
- * input. Every valid frame sent is answered with a frame in the same
- * format, but with the RE and TX fields interchanged. The CN field is
- * set to NAK if an error has occurred. Otherwise, the data are returned
- * in this and following DA octets. If no data are returned, the CN
- * octet is set to ACK.
- *
- * +------+------+------+------+------+--//--+------+
- * | PR | PR | RE | TX | CN | DA | FI |
- * +------+------+------+------+------+--//--+------+
- */
-/*
- * icom_open() - open and initialize serial interface
- *
- * This routine opens the serial interface for raw transmission; that
- * is, character-at-a-time, no stripping, checking or monkeying with the
- * bits. For Unix, an input operation ends either with the receipt of a
- * character or a 0.5-s timeout.
- */
-int
-icom_init(
- char *device, /* device name/link */
- int speed, /* line speed */
- int trace /* trace flags */ )
-{
- TTY ttyb;
- int fd;
-
- flags = trace;
- fd = open(device, O_RDWR, 0777);
- if (fd < 0)
- return (fd);
- tcgetattr(fd, &ttyb);
- ttyb.c_iflag = 0; /* input modes */
- ttyb.c_oflag = 0; /* output modes */
- ttyb.c_cflag = IBAUD|CS8|CREAD|CLOCAL; /* control modes */
- ttyb.c_lflag = 0; /* local modes */
- ttyb.c_cc[VMIN] = 0; /* min chars */
- ttyb.c_cc[VTIME] = 5; /* receive timeout */
- cfsetispeed(&ttyb, (u_int)speed);
- cfsetospeed(&ttyb, (u_int)speed);
- tcsetattr(fd, TCSANOW, &ttyb);
- return (fd);
-}
-
-
-/*
- * sndpkt(r, x, y) - send packet and receive response
- *
- * This routine sends a command frame, which consists of all except the
- * preamble octets PR-PR. It then listens for the response frame and
- * returns the payload to the caller. The routine checks for correct
- * response header format; that is, the length of the response vector
- * returned to the caller must be at least 2 and the RE and TX octets
- * must be interchanged; otherwise, the operation is retried up to
- * the number of times specified in a global variable.
- *
- * The trace function, which is enabled by the P_TRACE bit of the global
- * flags variable, prints all characters received or echoed on the bus
- * preceded by a T (transmit) or R (receive). The P_ERMSG bit of the
- * flags variable enables printing of bus error messages.
- *
- * Note that the first octet sent is a PAD in order to allow time for
- * the radio to flush its receive buffer after sending the previous
- * response. Even with this precaution, some of the older radios
- * occasionally fail to receive a command and it has to be sent again.
- */
-static int
-sndpkt( /* returns octet count */
- int fd, /* file descriptor */
- int r, /* radio address */
- u_char *cmd, /* command vector */
- u_char *rsp /* response vector */
- )
-{
- int i, j, temp;
-
- (void)tcflush(fd, TCIOFLUSH);
- for (i = 0; i < RETRY; i++) {
- state = S_IDLE;
-
- /*
- * Transmit packet.
- */
- if (flags & P_TRACE)
- printf("icom T:");
- sndoctet(fd, PAD); /* send header */
- sndoctet(fd, PR);
- sndoctet(fd, PR);
- sndoctet(fd, r);
- sndoctet(fd, TX);
- for (j = 0; j < BMAX; j++) { /* send body */
- if (sndoctet(fd, cmd[j]) == FI)
- break;
- }
- while (rcvoctet(fd) != FI); /* purge echos */
- if (cmd[0] == V_FREQT || cmd[0] == V_MODET)
- return (0); /* shortcut for broadcast */
-
- /*
- * Receive packet. First, delete all characters
- * preceeding a PR, then discard all PRs. Check that the
- * RE and TX fields are correctly interchanged, then
- * copy the remaining data and FI to the user buffer.
- */
- if (flags & P_TRACE)
- printf("\nicom R:");
- j = 0;
- while ((temp = rcvoctet(fd)) != FI) {
- switch (state) {
-
- case S_IDLE:
- if (temp != PR)
- continue;
- state = S_HDR;
- break;
-
- case S_HDR:
- if (temp == PR) {
- continue;
- } else if (temp != TX) {
- if (flags & P_ERMSG)
- printf(
- "icom: TX error\n");
- state = S_ERROR;
- }
- state = S_TX;
- break;
-
- case S_TX:
- if (temp != r) {
- if (flags & P_ERMSG)
- printf(
- "icom: RE error\n");
- state = S_ERROR;
- }
- state = S_DATA;
- break;
-
- case S_DATA:
- if (j >= BMAX ) {
- if (flags & P_ERMSG)
- printf(
- "icom: buffer overrun\n");
- state = S_ERROR;
- j = 0;
- }
- rsp[j++] = (u_char)temp;
- break;
-
- case S_ERROR:
- break;
- }
- }
- if (flags & P_TRACE)
- printf("\n");
- if (j > 0) {
- rsp[j++] = FI;
- return (j);
- }
- }
- if (flags & P_ERMSG)
- printf("icom: retries exceeded\n");
- return (0);
-}
-
-
-/*
- * Interface routines
- *
- * These routines read and write octets on the bus. In case of receive
- * timeout a FI code is returned. In case of output collision (echo
- * does not match octet sent), the remainder of the collision frame
- * (including the trailing FI) is discarded.
- */
-/*
- * sndoctet(fd, x) - send octet
- */
-static int
-sndoctet( /* returns octet */
- int fd, /* file descriptor */
- int x /* octet */
- )
-{
- u_char y;
-
- y = (u_char)x;
- write(fd, &y, 1);
- return (x);
-}
-
-
-/*
- * rcvoctet(fd) - receive octet
- */
-static int
-rcvoctet( /* returns octet */
- int fd /* file descriptor */
- )
-{
- u_char y;
-
- if (read(fd, &y, 1) < 1)
- y = FI; /* come here if timeout */
- if (flags & P_TRACE && y != PAD)
- printf(" %02x", y);
- return (y);
-}
-
-/* end program */
diff --git a/contrib/ntp/libntp/ieee754io.c b/contrib/ntp/libntp/ieee754io.c
deleted file mode 100644
index 979fed9..0000000
--- a/contrib/ntp/libntp/ieee754io.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
- * /src/NTP/ntp-4/libntp/ieee754io.c,v 4.8 1999/02/21 12:17:36 kardel RELEASE_19990228_A
- *
- * $Created: Sun Jul 13 09:12:02 1997 $
- *
- * Copyright (C) 1997, 1998 by Frank Kardel
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include "l_stdlib.h"
-#include "ntp_stdlib.h"
-#include "ntp_fp.h"
-#include "ieee754io.h"
-
-static unsigned char get_byte P((unsigned char *, offsets_t, int *));
-#ifdef __not_yet__
-static void put_byte P((unsigned char *, offsets_t, int *, unsigned char));
-#endif
-
-#ifdef LIBDEBUG
-
-#include "lib_strbuf.h"
-
-static char *
-fmt_blong(
- unsigned long val,
- int cnt
- )
-{
- char *buf, *s;
- int i = cnt;
-
- val <<= 32 - cnt;
- LIB_GETBUF(buf);
- s = buf;
-
- while (i--)
- {
- if (val & 0x80000000)
- {
- *s++ = '1';
- }
- else
- {
- *s++ = '0';
- }
- val <<= 1;
- }
- *s = '\0';
- return buf;
-}
-
-static char *
-fmt_flt(
- unsigned int sign,
- unsigned long mh,
- unsigned long ml,
- unsigned long ch
- )
-{
- char *buf;
-
- LIB_GETBUF(buf);
- sprintf(buf, "%c %s %s %s", sign ? '-' : '+',
- fmt_blong(ch, 11),
- fmt_blong(mh, 20),
- fmt_blong(ml, 32));
- return buf;
-}
-
-static char *
-fmt_hex(
- unsigned char *bufp,
- int length
- )
-{
- char *buf;
- int i;
-
- LIB_GETBUF(buf);
- for (i = 0; i < length; i++)
- {
- sprintf(buf+i*2, "%02x", bufp[i]);
- }
- return buf;
-}
-
-#endif
-
-static unsigned char
-get_byte(
- unsigned char *bufp,
- offsets_t offset,
- int *fieldindex
- )
-{
- unsigned char val;
-
- val = *(bufp + offset[*fieldindex]);
-#ifdef LIBDEBUG
- if (debug > 4)
- printf("fetchieee754: getbyte(0x%08x, %d) = 0x%02x\n", (unsigned int)(bufp)+offset[*fieldindex], *fieldindex, val);
-#endif
- (*fieldindex)++;
- return val;
-}
-
-#ifdef __not_yet__
-static void
-put_byte(
- unsigned char *bufp,
- offsets_t offsets,
- int *fieldindex,
- unsigned char val
- )
-{
- *(bufp + offsets[*fieldindex]) = val;
- (*fieldindex)++;
-}
-#endif
-
-/*
- * make conversions to and from external IEEE754 formats and internal
- * NTP FP format.
- */
-int
-fetch_ieee754(
- unsigned char **buffpp,
- int size,
- l_fp *lfpp,
- offsets_t offsets
- )
-{
- unsigned char *bufp = *buffpp;
- unsigned int sign;
- unsigned int bias;
- unsigned int maxexp;
- int mbits;
- u_long mantissa_low;
- u_long mantissa_high;
- u_long characteristic;
- long exponent;
-#ifdef LIBDEBUG
- int length;
-#endif
- unsigned char val;
- int fieldindex = 0;
-
- switch (size)
- {
- case IEEE_DOUBLE:
-#ifdef LIBDEBUG
- length = 8;
-#endif
- mbits = 52;
- bias = 1023;
- maxexp = 2047;
- break;
-
- case IEEE_SINGLE:
-#ifdef LIBDEBUG
- length = 4;
-#endif
- mbits = 23;
- bias = 127;
- maxexp = 255;
- break;
-
- default:
- return IEEE_BADCALL;
- }
-
- val = get_byte(bufp, offsets, &fieldindex); /* fetch sign byte & first part of characteristic */
-
- sign = (val & 0x80) != 0;
- characteristic = (val & 0x7F);
-
- val = get_byte(bufp, offsets, &fieldindex); /* fetch rest of characteristic and start of mantissa */
-
- switch (size)
- {
- case IEEE_SINGLE:
- characteristic <<= 1;
- characteristic |= (val & 0x80) != 0; /* grab last characteristic bit */
-
- mantissa_high = 0;
-
- mantissa_low = (val &0x7F) << 16;
- mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 8;
- mantissa_low |= get_byte(bufp, offsets, &fieldindex);
- break;
-
- case IEEE_DOUBLE:
- characteristic <<= 4;
- characteristic |= (val & 0xF0) >> 4; /* grab lower characteristic bits */
-
- mantissa_high = (val & 0x0F) << 16;
- mantissa_high |= get_byte(bufp, offsets, &fieldindex) << 8;
- mantissa_high |= get_byte(bufp, offsets, &fieldindex);
-
- mantissa_low = get_byte(bufp, offsets, &fieldindex) << 24;
- mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 16;
- mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 8;
- mantissa_low |= get_byte(bufp, offsets, &fieldindex);
- break;
-
- default:
- return IEEE_BADCALL;
- }
-#ifdef LIBDEBUG
- if (debug > 4)
- {
- double d;
- float f;
-
- if (size == IEEE_SINGLE)
- {
- int i;
-
- for (i = 0; i < length; i++)
- {
- *((unsigned char *)(&f)+i) = *(*buffpp + offsets[i]);
- }
- d = f;
- }
- else
- {
- int i;
-
- for (i = 0; i < length; i++)
- {
- *((unsigned char *)(&d)+i) = *(*buffpp + offsets[i]);
- }
- }
-
- printf("fetchieee754: FP: %s -> %s -> %e(=%s)\n", fmt_hex(*buffpp, length),
- fmt_flt(sign, mantissa_high, mantissa_low, characteristic),
- d, fmt_hex((unsigned char *)&d, length));
- }
-#endif
-
- *buffpp += fieldindex;
-
- /*
- * detect funny numbers
- */
- if (characteristic == maxexp)
- {
- /*
- * NaN or Infinity
- */
- if (mantissa_low || mantissa_high)
- {
- /*
- * NaN
- */
- return IEEE_NAN;
- }
- else
- {
- /*
- * +Inf or -Inf
- */
- return sign ? IEEE_NEGINFINITY : IEEE_POSINFINITY;
- }
- }
- else
- {
- /*
- * collect real numbers
- */
-
- L_CLR(lfpp);
-
- /*
- * check for overflows
- */
- exponent = characteristic - bias;
-
- if (exponent > 31) /* sorry - hardcoded */
- {
- /*
- * overflow only in respect to NTP-FP representation
- */
- return sign ? IEEE_NEGOVERFLOW : IEEE_POSOVERFLOW;
- }
- else
- {
- int frac_offset; /* where the fraction starts */
-
- frac_offset = mbits - exponent;
-
- if (characteristic == 0)
- {
- /*
- * de-normalized or tiny number - fits only as 0
- */
- return IEEE_OK;
- }
- else
- {
- /*
- * adjust for implied 1
- */
- if (mbits > 31)
- mantissa_high |= 1 << (mbits - 32);
- else
- mantissa_low |= 1 << mbits;
-
- /*
- * take mantissa apart - if only all machine would support
- * 64 bit operations 8-(
- */
- if (frac_offset > mbits)
- {
- lfpp->l_ui = 0; /* only fractional number */
- frac_offset -= mbits + 1; /* will now contain right shift count - 1*/
- if (mbits > 31)
- {
- lfpp->l_uf = mantissa_high << (63 - mbits);
- lfpp->l_uf |= mantissa_low >> (mbits - 33);
- lfpp->l_uf >>= frac_offset;
- }
- else
- {
- lfpp->l_uf = mantissa_low >> frac_offset;
- }
- }
- else
- {
- if (frac_offset > 32)
- {
- /*
- * must split in high word
- */
- lfpp->l_ui = mantissa_high >> (frac_offset - 32);
- lfpp->l_uf = (mantissa_high & ((1 << (frac_offset - 32)) - 1)) << (64 - frac_offset);
- lfpp->l_uf |= mantissa_low >> (frac_offset - 32);
- }
- else
- {
- /*
- * must split in low word
- */
- lfpp->l_ui = mantissa_high << (32 - frac_offset);
- lfpp->l_ui |= (mantissa_low >> frac_offset) & ((1 << (32 - frac_offset)) - 1);
- lfpp->l_uf = (mantissa_low & ((1 << frac_offset) - 1)) << (32 - frac_offset);
- }
- }
-
- /*
- * adjust for sign
- */
- if (sign)
- {
- L_NEG(lfpp);
- }
-
- return IEEE_OK;
- }
- }
- }
-}
-
-int
-put_ieee754(
- unsigned char **bufpp,
- int size,
- l_fp *lfpp,
- offsets_t offsets
- )
-{
- l_fp outlfp;
-#ifdef LIBDEBUG
- unsigned int sign;
- unsigned int bias;
-#endif
-/*unsigned int maxexp;*/
- int mbits;
- int msb;
- u_long mantissa_low = 0;
- u_long mantissa_high = 0;
-#ifdef LIBDEBUG
- u_long characteristic = 0;
- long exponent;
-#endif
-/*int length;*/
- unsigned long mask;
-
- outlfp = *lfpp;
-
- switch (size)
- {
- case IEEE_DOUBLE:
- /*length = 8;*/
- mbits = 52;
-#ifdef LIBDEBUG
- bias = 1023;
-#endif
- /*maxexp = 2047;*/
- break;
-
- case IEEE_SINGLE:
- /*length = 4;*/
- mbits = 23;
-#ifdef LIBDEBUG
- bias = 127;
-#endif
- /*maxexp = 255;*/
- break;
-
- default:
- return IEEE_BADCALL;
- }
-
- /*
- * find sign
- */
- if (L_ISNEG(&outlfp))
- {
- L_NEG(&outlfp);
-#ifdef LIBDEBUG
- sign = 1;
-#endif
- }
- else
- {
-#ifdef LIBDEBUG
- sign = 0;
-#endif
- }
-
- if (L_ISZERO(&outlfp))
- {
-#ifdef LIBDEBUG
- exponent = mantissa_high = mantissa_low = 0; /* true zero */
-#endif
- }
- else
- {
- /*
- * find number of significant integer bits
- */
- mask = 0x80000000;
- if (outlfp.l_ui)
- {
- msb = 63;
- while (mask && ((outlfp.l_ui & mask) == 0))
- {
- mask >>= 1;
- msb--;
- }
- }
- else
- {
- msb = 31;
- while (mask && ((outlfp.l_uf & mask) == 0))
- {
- mask >>= 1;
- msb--;
- }
- }
-
- switch (size)
- {
- case IEEE_SINGLE:
- mantissa_high = 0;
- if (msb >= 32)
- {
- mantissa_low = (outlfp.l_ui & ((1 << (msb - 32)) - 1)) << (mbits - (msb - 32));
- mantissa_low |= outlfp.l_uf >> (mbits - (msb - 32));
- }
- else
- {
- mantissa_low = (outlfp.l_uf << (mbits - msb)) & ((1 << mbits) - 1);
- }
- break;
-
- case IEEE_DOUBLE:
- if (msb >= 32)
- {
- mantissa_high = (outlfp.l_ui << (mbits - msb)) & ((1 << (mbits - 32)) - 1);
- mantissa_high |= outlfp.l_uf >> (32 - (mbits - msb));
- mantissa_low = (outlfp.l_ui & ((1 << (msb - mbits)) - 1)) << (32 - (msb - mbits));
- mantissa_low |= outlfp.l_uf >> (msb - mbits);
- }
- else
- {
- mantissa_high = outlfp.l_uf << (mbits - 32 - msb);
- mantissa_low = outlfp.l_uf << (mbits - 32);
- }
- }
-
-#ifdef LIBDEBUG
- exponent = msb - 32;
- characteristic = exponent + bias;
-
- if (debug > 4)
- printf("FP: %s\n", fmt_flt(sign, mantissa_high, mantissa_low, characteristic));
-#endif
- }
- return IEEE_OK;
-}
-
-
-#if defined(DEBUG) && defined(LIBDEBUG)
-int main(
- int argc,
- char **argv
- )
-{
- static offsets_t native_off = { 0, 1, 2, 3, 4, 5, 6, 7 };
- double f = 1.0;
- double *f_p = &f;
- l_fp fp;
-
- if (argc == 2)
- {
- if (sscanf(argv[1], "%lf", &f) != 1)
- {
- printf("cannot convert %s to a float\n", argv[1]);
- return 1;
- }
- }
-
- printf("double: %s %s\n", fmt_blong(*(unsigned long *)&f, 32), fmt_blong(*(unsigned long *)((char *)(&f)+4), 32));
- printf("fetch from %f = %d\n", f, fetch_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off));
- printf("fp [%s %s] = %s\n", fmt_blong(fp.l_ui, 32), fmt_blong(fp.l_uf, 32), mfptoa(fp.l_ui, fp.l_uf, 15));
- f_p = &f;
- put_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off);
-
- return 0;
-}
-
-#endif
-/*
- * ieee754io.c,v
- * Revision 4.8 1999/02/21 12:17:36 kardel
- * 4.91f reconcilation
- *
- * Revision 4.7 1999/02/21 11:26:03 kardel
- * renamed index to fieldindex to avoid index() name clash
- *
- * Revision 4.6 1998/11/15 20:27:52 kardel
- * Release 4.0.73e13 reconcilation
- *
- * Revision 4.5 1998/08/16 19:01:51 kardel
- * debug information only compile for LIBDEBUG case
- *
- * Revision 4.4 1998/08/09 09:39:28 kardel
- * Release 4.0.73e2 reconcilation
- *
- * Revision 4.3 1998/06/13 11:56:19 kardel
- * disabled putbute() for the time being
- *
- * Revision 4.2 1998/06/12 15:16:58 kardel
- * ansi2knr compatibility
- *
- * Revision 4.1 1998/05/24 07:59:56 kardel
- * conditional debug support
- *
- * Revision 4.0 1998/04/10 19:46:29 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.1 1998/04/10 19:27:46 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- * Revision 1.1 1997/10/06 21:05:45 kardel
- * new parse structure
- *
- */
diff --git a/contrib/ntp/libntp/inttoa.c b/contrib/ntp/libntp/inttoa.c
deleted file mode 100644
index f270733..0000000
--- a/contrib/ntp/libntp/inttoa.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * inttoa - return an asciized signed integer
- */
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-inttoa(
- long ival
- )
-{
- register char *buf;
-
- LIB_GETBUF(buf);
-
- (void) sprintf(buf, "%ld", (long)ival);
- return buf;
-}
diff --git a/contrib/ntp/libntp/iosignal.c b/contrib/ntp/libntp/iosignal.c
deleted file mode 100644
index bcad890..0000000
--- a/contrib/ntp/libntp/iosignal.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- * iosignal.c - input/output routines for ntpd. The socket-opening code
- * was shamelessly stolen from ntpd.
- */
-
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-#include "iosignal.h"
-
-#include <stdio.h>
-#include <signal.h>
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-
-#include <arpa/inet.h>
-
-#if _BSDI_VERSION >= 199510
-# include <ifaddrs.h>
-#endif
-
-#if defined(HAVE_SIGNALED_IO)
-static int sigio_block_count = 0;
-# if defined(HAVE_SIGACTION)
-/*
- * If sigaction() is used for signal handling and a signal is
- * pending then the kernel blocks the signal before it calls
- * the signal handler.
- *
- * The variable below is used to take care that the SIGIO signal
- * is not unintentionally unblocked inside the sigio_handler()
- * if the handler executes a piece of code that is normally
- * bracketed by BLOCKIO()/UNBLOCKIO() calls.
- */
-static int sigio_handler_active = 0;
-# endif
-extern void input_handler P((l_fp *));
-
-/*
- * SIGPOLL and SIGIO ROUTINES.
- */
-
- /*
- * 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 define USE_SIGPOLL or USE_SIGIO.
- * these are interal only to iosignal.c!
- */
-# if defined(USE_SIGPOLL)
-# undef USE_SIGPOLL
-# endif
-# if defined(USE_SIGIO)
-# undef USE_SIGIO
-# endif
-
-# if defined(USE_TTY_SIGPOLL) || defined(USE_UDP_SIGPOLL)
-# define USE_SIGPOLL
-# endif
-
-# if !defined(USE_TTY_SIGPOLL) || !defined(USE_UDP_SIGPOLL)
-# 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
-# undef USE_SIGPOLL
-# endif /* SIGIO == SIGPOLL */
-# endif /* USE_SIGIO && USE_SIGIO */
-
-
-/*
- * TTY initialization routines.
- */
-int
-init_clock_sig(
- struct refclockio *rio
- )
-{
-# ifdef USE_TTY_SIGPOLL
- {
- /* DO NOT ATTEMPT TO MAKE CLOCK-FD A CTTY: not portable, unreliable */
- if (ioctl(rio->fd, I_SETSIG, S_INPUT) < 0)
- {
- msyslog(LOG_ERR,
- "init_clock_sig: ioctl(I_SETSIG, S_INPUT) failed: %m");
- return 1;
- }
- return 0;
- }
-# else
- /*
- * Special cases first!
- */
- /* Was: defined(SYS_HPUX) */
-# if defined(FIOSSAIOOWN) && defined(FIOSNBIO) && defined(FIOSSAIOSTAT)
-#define CLOCK_DONE
- {
- int pgrp, on = 1;
-
- /* DO NOT ATTEMPT TO MAKE CLOCK-FD A CTTY: not portable, unreliable */
- pgrp = getpid();
- if (ioctl(rio->fd, FIOSSAIOOWN, (char *)&pgrp) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOSSAIOOWN) fails for clock I/O: %m");
- exit(1);
- /*NOTREACHED*/
- }
-
- /*
- * set non-blocking, async I/O on the descriptor
- */
- if (ioctl(rio->fd, FIOSNBIO, (char *)&on) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOSNBIO) fails for clock I/O: %m");
- exit(1);
- /*NOTREACHED*/
- }
-
- if (ioctl(rio->fd, FIOSSAIOSTAT, (char *)&on) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOSSAIOSTAT) fails for clock I/O: %m");
- exit(1);
- /*NOTREACHED*/
- }
- return 0;
- }
-# endif /* SYS_HPUX: FIOSSAIOOWN && FIOSNBIO && FIOSSAIOSTAT */
- /* Was: defined(SYS_AIX) && !defined(_BSD) */
-# if !defined(_BSD) && defined(_AIX) && defined(FIOASYNC) && defined(FIOSETOWN)
- /*
- * SYSV compatibility mode under AIX.
- */
-#define CLOCK_DONE
- {
- int pgrp, on = 1;
-
- /* DO NOT ATTEMPT TO MAKE CLOCK-FD A CTTY: not portable, unreliable */
- if (ioctl(rio->fd, FIOASYNC, (char *)&on) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOASYNC) fails for clock I/O: %m");
- return 1;
- }
- pgrp = -getpid();
- if (ioctl(rio->fd, FIOSETOWN, (char*)&pgrp) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOSETOWN) fails for clock I/O: %m");
- return 1;
- }
-
- if (fcntl(rio->fd, F_SETFL, FNDELAY|FASYNC) < 0)
- {
- msyslog(LOG_ERR, "fcntl(FNDELAY|FASYNC) fails for clock I/O: %m");
- return 1;
- }
- return 0;
- }
-# endif /* AIX && !BSD: !_BSD && FIOASYNC && FIOSETOWN */
-# ifndef CLOCK_DONE
- {
- /* DO NOT ATTEMPT TO MAKE CLOCK-FD A CTTY: not portable, unreliable */
-# if defined(TIOCSCTTY) && defined(USE_FSETOWNCTTY)
- /*
- * there are, however, always exceptions to the rules
- * one is, that OSF accepts SETOWN on TTY fd's only, iff they are
- * CTTYs. SunOS and HPUX do not semm to have this restriction.
- * another question is: how can you do multiple SIGIO from several
- * ttys (as they all should be CTTYs), wondering...
- *
- * kd 95-07-16
- */
- if (ioctl(rio->fd, TIOCSCTTY, 0) == -1)
- {
- msyslog(LOG_ERR, "ioctl(TIOCSCTTY, 0) fails for clock I/O: %m");
- return 1;
- }
-# endif /* TIOCSCTTY && USE_FSETOWNCTTY */
-
- if (fcntl(rio->fd, F_SETOWN, getpid()) == -1)
- {
- msyslog(LOG_ERR, "fcntl(F_SETOWN) fails for clock I/O: %m");
- return 1;
- }
-
- if (fcntl(rio->fd, F_SETFL, FNDELAY|FASYNC) < 0)
- {
- msyslog(LOG_ERR,
- "fcntl(FNDELAY|FASYNC) fails for clock I/O: %m");
- return 1;
- }
- return 0;
- }
-# endif /* CLOCK_DONE */
-# endif /* !USE_TTY_SIGPOLL */
-}
-
-
-
-void
-init_socket_sig(
- int fd
- )
-{
-# ifdef USE_UDP_SIGPOLL
- {
- if (ioctl(fd, I_SETSIG, S_INPUT) < 0)
- {
- msyslog(LOG_ERR,
- "init_socket_sig: ioctl(I_SETSIG, S_INPUT) failed: %m");
- exit(1);
- }
- }
-# else /* USE_UDP_SIGPOLL */
- {
- int pgrp;
-# ifdef FIOASYNC
- int on = 1;
-# endif
-
-# if defined(FIOASYNC)
- if (ioctl(fd, FIOASYNC, (char *)&on) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOASYNC) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-# elif defined(FASYNC)
- {
- int flags;
-
- if ((flags = fcntl(fd, F_GETFL, 0)) == -1)
- {
- msyslog(LOG_ERR, "fcntl(F_GETFL) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
- if (fcntl(fd, F_SETFL, flags|FASYNC) < 0)
- {
- msyslog(LOG_ERR, "fcntl(...|FASYNC) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
- }
-# else
-# include "Bletch: Need asynchronous I/O!"
-# endif
-
-# ifdef UDP_BACKWARDS_SETOWN
- pgrp = -getpid();
-# else
- pgrp = getpid();
-# endif
-
-# if defined(SIOCSPGRP)
- if (ioctl(fd, SIOCSPGRP, (char *)&pgrp) == -1)
- {
- msyslog(LOG_ERR, "ioctl(SIOCSPGRP) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-# elif defined(FIOSETOWN)
- if (ioctl(fd, FIOSETOWN, (char*)&pgrp) == -1)
- {
- msyslog(LOG_ERR, "ioctl(FIOSETOWN) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-# elif defined(F_SETOWN)
- if (fcntl(fd, F_SETOWN, pgrp) == -1)
- {
- msyslog(LOG_ERR, "fcntl(F_SETOWN) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-# else
-# include "Bletch: Need to set process(group) to receive SIG(IO|POLL)"
-# endif
- }
-# endif /* USE_UDP_SIGPOLL */
-}
-
-RETSIGTYPE
-sigio_handler(
- int sig
- )
-{
- int saved_errno = errno;
- l_fp ts;
-
- get_systime(&ts);
-
-# if defined(HAVE_SIGACTION)
- sigio_handler_active++;
- if (sigio_handler_active != 1) /* This should never happen! */
- msyslog(LOG_ERR, "sigio_handler: sigio_handler_active != 1");
-# endif
-
- (void)input_handler(&ts);
-
-# if defined(HAVE_SIGACTION)
- sigio_handler_active--;
- if (sigio_handler_active != 0) /* This should never happen! */
- msyslog(LOG_ERR, "sigio_handler: sigio_handler_active != 0");
-# endif
-
- errno = saved_errno;
-}
-
-/*
- * Signal support routines.
- */
-# ifdef HAVE_SIGACTION
-void
-set_signal(void)
-{
-# ifdef USE_SIGIO
- (void) signal_no_reset(SIGIO, sigio_handler);
-# endif
-# ifdef USE_SIGPOLL
- (void) signal_no_reset(SIGPOLL, sigio_handler);
-# endif
-}
-
-void
-block_io_and_alarm(void)
-{
- sigset_t set;
-
- if (sigemptyset(&set))
- msyslog(LOG_ERR, "block_io_and_alarm: sigemptyset() failed: %m");
-# if defined(USE_SIGIO)
- if (sigaddset(&set, SIGIO))
- msyslog(LOG_ERR, "block_io_and_alarm: sigaddset(SIGIO) failed: %m");
-# endif
-# if defined(USE_SIGPOLL)
- if (sigaddset(&set, SIGPOLL))
- msyslog(LOG_ERR, "block_io_and_alarm: sigaddset(SIGPOLL) failed: %m");
-# endif
- if (sigaddset(&set, SIGALRM))
- msyslog(LOG_ERR, "block_io_and_alarm: sigaddset(SIGALRM) failed: %m");
-
- if (sigprocmask(SIG_BLOCK, &set, NULL))
- msyslog(LOG_ERR, "block_io_and_alarm: sigprocmask() failed: %m");
-}
-
-void
-block_sigio(void)
-{
- if ( sigio_handler_active == 0 ) /* not called from within signal handler */
- {
- sigset_t set;
-
- ++sigio_block_count;
- if (sigio_block_count > 1)
- msyslog(LOG_INFO, "block_sigio: sigio_block_count > 1");
- if (sigio_block_count < 1)
- msyslog(LOG_INFO, "block_sigio: sigio_block_count < 1");
-
- if (sigemptyset(&set))
- msyslog(LOG_ERR, "block_sigio: sigemptyset() failed: %m");
-# if defined(USE_SIGIO)
- if (sigaddset(&set, SIGIO))
- msyslog(LOG_ERR, "block_sigio: sigaddset(SIGIO) failed: %m");
-# endif
-# if defined(USE_SIGPOLL)
- if (sigaddset(&set, SIGPOLL))
- msyslog(LOG_ERR, "block_sigio: sigaddset(SIGPOLL) failed: %m");
-# endif
-
- if (sigprocmask(SIG_BLOCK, &set, NULL))
- msyslog(LOG_ERR, "block_sigio: sigprocmask() failed: %m");
- }
-}
-
-void
-unblock_io_and_alarm(void)
-{
- sigset_t unset;
-
- if (sigemptyset(&unset))
- msyslog(LOG_ERR, "unblock_io_and_alarm: sigemptyset() failed: %m");
-
-# if defined(USE_SIGIO)
- if (sigaddset(&unset, SIGIO))
- msyslog(LOG_ERR, "unblock_io_and_alarm: sigaddset(SIGIO) failed: %m");
-# endif
-# if defined(USE_SIGPOLL)
- if (sigaddset(&unset, SIGPOLL))
- msyslog(LOG_ERR, "unblock_io_and_alarm: sigaddset(SIGPOLL) failed: %m");
-# endif
- if (sigaddset(&unset, SIGALRM))
- msyslog(LOG_ERR, "unblock_io_and_alarm: sigaddset(SIGALRM) failed: %m");
-
- if (sigprocmask(SIG_UNBLOCK, &unset, NULL))
- msyslog(LOG_ERR, "unblock_io_and_alarm: sigprocmask() failed: %m");
-}
-
-void
-unblock_sigio(void)
-{
- if ( sigio_handler_active == 0 ) /* not called from within signal handler */
- {
- sigset_t unset;
-
- --sigio_block_count;
- if (sigio_block_count > 0)
- msyslog(LOG_INFO, "unblock_sigio: sigio_block_count > 0");
- if (sigio_block_count < 0)
- msyslog(LOG_INFO, "unblock_sigio: sigio_block_count < 0");
-
- if (sigemptyset(&unset))
- msyslog(LOG_ERR, "unblock_sigio: sigemptyset() failed: %m");
-
-# if defined(USE_SIGIO)
- if (sigaddset(&unset, SIGIO))
- msyslog(LOG_ERR, "unblock_sigio: sigaddset(SIGIO) failed: %m");
-# endif
-# if defined(USE_SIGPOLL)
- if (sigaddset(&unset, SIGPOLL))
- msyslog(LOG_ERR, "unblock_sigio: sigaddset(SIGPOLL) failed: %m");
-# endif
-
- if (sigprocmask(SIG_UNBLOCK, &unset, NULL))
- msyslog(LOG_ERR, "unblock_sigio: sigprocmask() failed: %m");
- }
-}
-
-void
-wait_for_signal(void)
-{
- sigset_t old;
-
- if (sigprocmask(SIG_UNBLOCK, NULL, &old))
- msyslog(LOG_ERR, "wait_for_signal: sigprocmask() failed: %m");
-
-# if defined(USE_SIGIO)
- if (sigdelset(&old, SIGIO))
- msyslog(LOG_ERR, "wait_for_signal: sigdelset(SIGIO) failed: %m");
-# endif
-# if defined(USE_SIGPOLL)
- if (sigdelset(&old, SIGPOLL))
- msyslog(LOG_ERR, "wait_for_signal: sigdelset(SIGPOLL) failed: %m");
-# endif
- if (sigdelset(&old, SIGALRM))
- msyslog(LOG_ERR, "wait_for_signal: sigdelset(SIGALRM) failed: %m");
-
- if (sigsuspend(&old) && (errno != EINTR))
- msyslog(LOG_ERR, "wait_for_signal: sigsuspend() failed: %m");
-}
-
-# else /* !HAVE_SIGACTION */
-/*
- * Must be an old bsd system.
- * We assume there is no SIGPOLL.
- */
-
-void
-block_io_and_alarm(void)
-{
- int mask;
-
- mask = sigmask(SIGIO) | sigmask(SIGALRM);
- if (sigblock(mask))
- msyslog(LOG_ERR, "block_io_and_alarm: sigblock() failed: %m");
-}
-
-void
-block_sigio(void)
-{
- int mask;
-
- ++sigio_block_count;
- if (sigio_block_count > 1)
- msyslog(LOG_INFO, "block_sigio: sigio_block_count > 1");
- if (sigio_block_count < 1)
- msyslog(LOG_INFO, "block_sigio: sigio_block_count < 1");
-
- mask = sigmask(SIGIO);
- if (sigblock(mask))
- msyslog(LOG_ERR, "block_sigio: sigblock() failed: %m");
-}
-
-void
-set_signal(void)
-{
- (void) signal_no_reset(SIGIO, sigio_handler);
-}
-
-void
-unblock_io_and_alarm(void)
-{
- int mask, omask;
-
- mask = sigmask(SIGIO) | sigmask(SIGALRM);
- omask = sigblock(0);
- omask &= ~mask;
- (void) sigsetmask(omask);
-}
-
-void
-unblock_sigio(void)
-{
- int mask, omask;
-
- --sigio_block_count;
- if (sigio_block_count > 0)
- msyslog(LOG_INFO, "unblock_sigio: sigio_block_count > 0");
- if (sigio_block_count < 0)
- msyslog(LOG_INFO, "unblock_sigio: sigio_block_count < 0");
- mask = sigmask(SIGIO);
- omask = sigblock(0);
- omask &= ~mask;
- (void) sigsetmask(omask);
-}
-
-void
-wait_for_signal(void)
-{
- int mask, omask;
-
- mask = sigmask(SIGIO) | sigmask(SIGALRM);
- omask = sigblock(0);
- omask &= ~mask;
- if (sigpause(omask) && (errno != EINTR))
- msyslog(LOG_ERR, "wait_for_signal: sigspause() failed: %m");
-}
-
-# endif /* HAVE_SIGACTION */
-#else
-int NotAnEmptyCompilationUnit;
-#endif
diff --git a/contrib/ntp/libntp/lib_strbuf.c b/contrib/ntp/libntp/lib_strbuf.c
deleted file mode 100644
index 315070f..0000000
--- a/contrib/ntp/libntp/lib_strbuf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * lib_strbuf - library string storage
- */
-
-#include "ntp_stdlib.h"
-#include "lib_strbuf.h"
-
-/*
- * Storage declarations
- */
-char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
-int lib_nextbuf;
-int lib_inited = 0;
-
-/*
- * initialization routine. Might be needed if the code is ROMized.
- */
-void
-init_lib(void)
-{
- lib_nextbuf = 0;
- lib_inited = 1;
-}
diff --git a/contrib/ntp/libntp/lib_strbuf.h b/contrib/ntp/libntp/lib_strbuf.h
deleted file mode 100644
index 1a34034..0000000
--- a/contrib/ntp/libntp/lib_strbuf.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * lib_strbuf.h - definitions for routines which use the common string buffers
- */
-
-#include <ntp_types.h>
-
-/*
- * Sizes of things
- */
-#define LIB_NUMBUFS 20
-#define LIB_BUFLENGTH 80
-
-/*
- * Macro to get a pointer to the next buffer
- */
-#define LIB_GETBUF(buf) \
- do { \
- if (!lib_inited) \
- init_lib(); \
- buf = &lib_stringbuf[lib_nextbuf][0]; \
- if (++lib_nextbuf >= LIB_NUMBUFS) \
- lib_nextbuf = 0; \
- } while (0)
-
-extern char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
-extern int lib_nextbuf;
-extern int lib_inited;
diff --git a/contrib/ntp/libntp/log.c b/contrib/ntp/libntp/log.c
deleted file mode 100644
index 991b498..0000000
--- a/contrib/ntp/libntp/log.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* 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 "messages.h"
-#include "log.h"
-
-#define PERR(bSuccess, api) {if(!(bSuccess)) printf("%s: Error %d from %s \
- on line %d\n", __FILE__, GetLastError(), api, __LINE__);}
-
-
-/*********************************************************************
-* FUNCTION: addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL) *
-* *
-* PURPOSE: Add a source name key, message DLL name value, and *
-* message type supported value to the registry *
-* *
-* INPUT: source name, path of message DLL *
-* *
-* RETURNS: none *
-*********************************************************************/
-
-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
- searches for the specified source name in the registry. You can add a
- new source name to the registry by opening a new registry subkey
- 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,lpregarray, &hk);
- PERR(bSuccess == ERROR_SUCCESS, "RegCreateKey");
-
- /* Add the Event-ID message-file name to the subkey. */
- bSuccess = RegSetValueEx(hk, /* subkey handle */
- "EventMessageFile", /* value name */
- 0, /* must be zero */
- REG_EXPAND_SZ, /* value type */
- (LPBYTE) pszMsgDLL, /* address of value data */
- strlen(pszMsgDLL) + 1); /* length of value data */
- PERR(bSuccess == ERROR_SUCCESS, "RegSetValueEx");
-
- /* Set the supported types flags and addit to the subkey. */
- dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
- EVENTLOG_INFORMATION_TYPE;
- bSuccess = RegSetValueEx(hk, /* subkey handle */
- "TypesSupported", /* value name */
- 0, /* must be zero */
- REG_DWORD, /* value type */
- (LPBYTE) &dwData, /* address of value data */
- sizeof(DWORD)); /* length of value data */
- PERR(bSuccess == ERROR_SUCCESS, "RegSetValueEx");
- RegCloseKey(hk);
- return;
-}
-
-/*********************************************************************
-* FUNCTION: reportAnEvent(DWORD dwIdEvent, WORD cStrings, *
-* LPTSTR *ppszStrings); *
-* *
-* PURPOSE: add the event to the event log *
-* *
-* INPUT: the event ID to report in the log, the number of insert *
-* strings, and an array of null-terminated insert strings *
-* *
-* RETURNS: none *
-*********************************************************************/
-
-void reportAnIEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings)
-{
- HANDLE hAppLog;
- BOOL bSuccess;
-
- /* Get a handle to the Application event log */
- hAppLog = RegisterEventSource(NULL, /* use local machine */
- "NTP"); /* source name */
- PERR(hAppLog, "RegisterEventSource");
-
- /* Now report the event, which will add this event to the event log */
- bSuccess = ReportEvent(hAppLog, /* event-log handle */
- EVENTLOG_INFORMATION_TYPE, /* event type */
- 0, /* category zero */
- dwIdEvent, /* event ID */
- NULL, /* no user SID */
- cStrings, /* number of substitution strings */
- 0, /* no binary data */
- pszStrings, /* string array */
- NULL); /* address of data */
- PERR(bSuccess, "ReportEvent");
- DeregisterEventSource(hAppLog);
- return;
-}
-
-void reportAnWEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings)
-{
- HANDLE hAppLog;
- BOOL bSuccess;
-
- /* Get a handle to the Application event log */
- hAppLog = RegisterEventSource(NULL, /* use local machine */
- "NTP"); /* source name */
- PERR(hAppLog, "RegisterEventSource");
-
- /* Now report the event, which will add this event to the event log */
- bSuccess = ReportEvent(hAppLog, /* event-log handle */
- EVENTLOG_WARNING_TYPE, /* event type */
- 0, /* category zero */
- dwIdEvent, /* event ID */
- NULL, /* no user SID */
- cStrings, /* number of substitution strings */
- 0, /* no binary data */
- pszStrings, /* string array */
- NULL); /* address of data */
- PERR(bSuccess, "ReportEvent");
- DeregisterEventSource(hAppLog);
- return;
-}
-
-void reportAnEEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings)
-{
- HANDLE hAppLog;
- BOOL bSuccess;
-
- /* Get a handle to the Application event log */
- hAppLog = RegisterEventSource(NULL, /* use local machine */
- "NTP"); /* source name */
- PERR(hAppLog, "RegisterEventSource");
-
- /* Now report the event, which will add this event to the event log */
- bSuccess = ReportEvent(hAppLog, /* event-log handle */
- EVENTLOG_ERROR_TYPE, /* event type */
- 0, /* category zero */
- dwIdEvent, /* event ID */
- NULL, /* no user SID */
- cStrings, /* number of substitution strings */
- 0, /* no binary data */
- pszStrings, /* string array */
- NULL); /* address of data */
- PERR(bSuccess, "ReportEvent");
- DeregisterEventSource(hAppLog);
- return;
-}
diff --git a/contrib/ntp/libntp/log.h b/contrib/ntp/libntp/log.h
deleted file mode 100644
index 99d0e72..0000000
--- a/contrib/ntp/libntp/log.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * log.h - Used only under Windows NT by msyslog.c
- *
- */
-#ifndef WINNT_LOG_H
-#define WINNT_LOG_H
-
-#include <windows.h>
-
-/* function declarations */
-
-void addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL);
-void reportAnIEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings);
-void reportAnWEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings);
-void reportAnEEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings);
-
-#define MAX_MSG_LENGTH 1024
-#define MSG_ID_MASK 0x0000FFFF
-#define MAX_INSERT_STRS 8
-
-#endif /* WINNT_LOG_H */
diff --git a/contrib/ntp/libntp/machines.c b/contrib/ntp/libntp/machines.c
deleted file mode 100644
index 9e318bf..0000000
--- a/contrib/ntp/libntp/machines.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/* machines.c - provide special support for peculiar architectures
- *
- * Real bummers unite !
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ntp_machine.h"
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef SYS_WINNT
-int _getch(void); /* Declare the one function rather than include conio.h */
-#else
-
-#ifdef SYS_VXWORKS
-#include "taskLib.h"
-#include "sysLib.h"
-#include "time.h"
-#include "ntp_syslog.h"
-
-/* some translations to the world of vxWorkings -casey */
-/* first some netdb type things */
-#include "ioLib.h"
-#include <socket.h>
-int h_errno;
-
-struct hostent *gethostbyname(char *name)
- {
- struct hostent *host1;
- h_errno = 0; /* we are always successful!!! */
- host1 = (struct hostent *) malloc (sizeof(struct hostent));
- host1->h_name = name;
- host1->h_addrtype = AF_INET;
- host1->h_aliases = name;
- host1->h_length = 4;
- host1->h_addr_list[0] = (char *)hostGetByName (name);
- host1->h_addr_list[1] = NULL;
- return host1;
- }
-
-struct hostent *gethostbyaddr(char *name, int size, int addr_type)
- {
- struct hostent *host1;
- h_errno = 0; /* we are always successful!!! */
- host1 = (struct hostent *) malloc (sizeof(struct hostent));
- host1->h_name = name;
- host1->h_addrtype = AF_INET;
- host1->h_aliases = name;
- host1->h_length = 4;
- host1->h_addr_list = NULL;
- return host1;
- }
-
-struct servent *getservbyname (char *name, char *type)
- {
- struct servent *serv1;
- serv1 = (struct servent *) malloc (sizeof(struct servent));
- serv1->s_name = "ntp"; /* official service name */
- serv1->s_aliases = NULL; /* alias list */
- serv1->s_port = 123; /* port # */
- serv1->s_proto = "udp"; /* protocol to use */
- return serv1;
- }
-
-/* second
- * vxworks thinks it has insomnia
- * we have to sleep for number of seconds
- */
-
-#define CLKRATE sysClkRateGet()
-
-/* I am not sure how valid the granularity is - it is from G. Eger's port */
-#define CLK_GRANULARITY 1 /* Granularity of system clock in usec */
- /* Used to round down # usecs/tick */
- /* On a VCOM-100, PIT gets 8 MHz clk, */
- /* & it prescales by 32, thus 4 usec */
- /* on mv167, granularity is 1usec anyway*/
- /* To defeat rounding, set to 1 */
-#define USECS_PER_SEC MILLION /* Microseconds per second */
-#define TICK (((USECS_PER_SEC / CLKRATE) / CLK_GRANULARITY) * CLK_GRANULARITY)
-
-/* emulate unix sleep
- * casey
- */
-void sleep(int seconds)
- {
- taskDelay(seconds*TICK);
- }
-/* emulate unix alarm
- * that pauses and calls SIGALRM after the seconds are up...
- * so ... taskDelay() fudged for seconds should amount to the same thing.
- * casey
- */
-void alarm (int seconds)
- {
- sleep(seconds);
- }
-
-#endif /* SYS_VXWORKS */
-
-#ifdef SYS_PTX /* Does PTX still need this? */
-/*#include <sys/types.h> */
-#include <sys/procstats.h>
-
-int
-gettimeofday(
- struct timeval *tvp
- )
-{
- /*
- * hi, this is Sequents sneak path to get to a clock
- * this is also the most logical syscall for such a function
- */
- return (get_process_stats(tvp, PS_SELF, (struct procstats *) 0,
- (struct procstats *) 0));
-}
-#endif /* SYS_PTX */
-
-#ifdef MPE
-/* This is a substitute for bind() that if called for an AF_INET socket
-port less than 1024, GETPRIVMODE() and GETUSERMODE() calls will be done. */
-
-#undef bind
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <sys/un.h>
-
-extern void GETPRIVMODE(void);
-extern void GETUSERMODE(void);
-
-int __ntp_mpe_bind(int s, void *addr, int addrlen);
-
-int __ntp_mpe_bind(int s, void *addr, int addrlen) {
- int priv = 0;
- int result;
-
-if (addrlen == sizeof(struct sockaddr_in)) { /* AF_INET */
- if (((struct sockaddr_in *)addr)->sin_port > 0 &&
- ((struct sockaddr_in *)addr)->sin_port < 1024) {
- priv = 1;
- GETPRIVMODE();
- }
-/* ((struct sockaddr_in *)addr)->sin_addr.s_addr = 0; */
- result = bind(s,addr,addrlen);
- if (priv == 1) GETUSERMODE();
-} else /* AF_UNIX */
- result = bind(s,addr,addrlen);
-
-return result;
-}
-
-/*
- * MPE stupidly requires sfcntl() to be used on sockets instead of fcntl(),
- * so we define a wrapper to analyze the file descriptor and call the correct
- * function.
- */
-
-#undef fcntl
-#include <errno.h>
-#include <fcntl.h>
-
-int __ntp_mpe_fcntl(int fd, int cmd, int arg);
-
-int __ntp_mpe_fcntl(int fd, int cmd, int arg) {
- int len;
- struct sockaddr sa;
-
- extern int sfcntl(int, int, int);
-
- len = sizeof sa;
- if (getsockname(fd, &sa, &len) == -1) {
- if (errno == EAFNOSUPPORT) /* AF_UNIX socket */
- return sfcntl(fd, cmd, arg);
- if (errno == ENOTSOCK) /* file or pipe */
- return fcntl(fd, cmd, arg);
- return (-1); /* unknown getsockname() failure */
- } else /* AF_INET socket */
- return sfcntl(fd, cmd, arg);
-}
-
-/*
- * Setitimer emulation support. Note that we implement this using alarm(),
- * and since alarm() only delivers one signal, we must re-enable the alarm
- * by enabling our own SIGALRM setitimer_mpe_handler routine to be called
- * before the real handler routine and re-enable the alarm at that time.
- *
- * Note that this solution assumes that sigaction(SIGALRM) is called before
- * calling setitimer(). If it should ever to become necessary to support
- * sigaction(SIGALRM) after calling setitimer(), it will be necessary to trap
- * those sigaction() calls.
- */
-
-#include <limits.h>
-#include <signal.h>
-
-/*
- * Some global data that needs to be shared between setitimer() and
- * setitimer_mpe_handler().
- */
-
-struct {
- unsigned long current_msec; /* current alarm() value in effect */
- unsigned long interval_msec; /* next alarm() value from setitimer */
- unsigned long value_msec; /* first alarm() value from setitimer */
- struct itimerval current_itimerval; /* current itimerval in effect */
- struct sigaction oldact; /* SIGALRM state saved by setitimer */
-} setitimer_mpe_ctx = { 0, 0, 0 };
-
-/*
- * Undocumented, unsupported function to do alarm() in milliseconds.
- */
-
-extern unsigned int px_alarm(unsigned long, int *);
-
-/*
- * The SIGALRM handler routine enabled by setitimer(). Re-enable the alarm or
- * restore the original SIGALRM setting if no more alarms are needed. Then
- * call the original SIGALRM handler (if any).
- */
-
-static RETSIGTYPE setitimer_mpe_handler(int sig)
-{
-int alarm_hpe_status;
-
-/* Update the new current alarm value */
-
-setitimer_mpe_ctx.current_msec = setitimer_mpe_ctx.interval_msec;
-
-if (setitimer_mpe_ctx.interval_msec > 0) {
- /* Additional intervals needed; re-arm the alarm timer */
- px_alarm(setitimer_mpe_ctx.interval_msec,&alarm_hpe_status);
-} else {
- /* No more intervals, so restore previous original SIGALRM handler */
- sigaction(SIGALRM, &setitimer_mpe_ctx.oldact, NULL);
-}
-
-/* Call the original SIGALRM handler if it is a function and not just a flag */
-
-if (setitimer_mpe_ctx.oldact.sa_handler != SIG_DFL &&
- setitimer_mpe_ctx.oldact.sa_handler != SIG_ERR &&
- setitimer_mpe_ctx.oldact.sa_handler != SIG_IGN)
- (*setitimer_mpe_ctx.oldact.sa_handler)(SIGALRM);
-
-}
-
-/*
- * Our implementation of setitimer().
- */
-
-int
-setitimer(int which, struct itimerval *value,
- struct itimerval *ovalue)
-{
-
-int alarm_hpe_status;
-unsigned long remaining_msec, value_msec, interval_msec;
-struct sigaction newact;
-
-/*
- * Convert the initial interval to milliseconds
- */
-
-if (value->it_value.tv_sec > (UINT_MAX / 1000))
- value_msec = UINT_MAX;
-else
- value_msec = value->it_value.tv_sec * 1000;
-
-value_msec += value->it_value.tv_usec / 1000;
-
-/*
- * Convert the reset interval to milliseconds
- */
-
-if (value->it_interval.tv_sec > (UINT_MAX / 1000))
- interval_msec = UINT_MAX;
-else
- interval_msec = value->it_interval.tv_sec * 1000;
-
-interval_msec += value->it_interval.tv_usec / 1000;
-
-if (value_msec > 0 && interval_msec > 0) {
- /*
- * We'll be starting an interval timer that will be repeating, so we need to
- * insert our own SIGALRM signal handler to schedule the repeats.
- */
-
- /* Read the current SIGALRM action */
-
- if (sigaction(SIGALRM, NULL, &setitimer_mpe_ctx.oldact) < 0) {
- fprintf(stderr,"MPE setitimer old handler failed, errno=%d\n",errno);
- return -1;
- }
-
- /* Initialize the new action to call our SIGALRM handler instead */
-
- newact.sa_handler = &setitimer_mpe_handler;
- newact.sa_mask = setitimer_mpe_ctx.oldact.sa_mask;
- newact.sa_flags = setitimer_mpe_ctx.oldact.sa_flags;
-
- if (sigaction(SIGALRM, &newact, NULL) < 0) {
- fprintf(stderr,"MPE setitimer new handler failed, errno=%d\n",errno);
- return -1;
- }
-}
-
-/*
- * Return previous itimerval if desired
- */
-
-if (ovalue != NULL) *ovalue = setitimer_mpe_ctx.current_itimerval;
-
-/*
- * Save current parameters for later usage
- */
-
-setitimer_mpe_ctx.current_itimerval = *value;
-setitimer_mpe_ctx.current_msec = value_msec;
-setitimer_mpe_ctx.value_msec = value_msec;
-setitimer_mpe_ctx.interval_msec = interval_msec;
-
-/*
- * Schedule the first alarm
- */
-
-remaining_msec = px_alarm(value_msec, &alarm_hpe_status);
-if (alarm_hpe_status == 0)
- return (0);
-else
- return (-1);
-}
-
-/*
- * MPE lacks gettimeofday(), so we define our own.
- */
-
-int gettimeofday(struct timeval *tvp)
-
-{
-/* Documented, supported MPE functions. */
-extern void GETPRIVMODE(void);
-extern void GETUSERMODE(void);
-
-/* Undocumented, unsupported MPE functions. */
-extern long long get_time(void);
-extern void get_time_change_info(long long *, char *, char *);
-extern long long ticks_to_micro(long long);
-
-char pwf_since_boot, recover_pwf_time;
-long long mpetime, offset_ticks, offset_usec;
-
-GETPRIVMODE();
-mpetime = get_time(); /* MPE local time usecs since Jan 1 1970 */
-get_time_change_info(&offset_ticks, &pwf_since_boot, &recover_pwf_time);
-offset_usec = ticks_to_micro(offset_ticks); /* UTC offset usecs */
-GETUSERMODE();
-
-mpetime = mpetime - offset_usec; /* Convert from local time to UTC */
-tvp->tv_sec = mpetime / 1000000LL;
-tvp->tv_usec = mpetime % 1000000LL;
-
-return 0;
-}
-
-/*
- * MPE lacks settimeofday(), so we define our own.
- */
-
-#define HAVE_SETTIMEOFDAY
-
-int settimeofday(struct timeval *tvp)
-
-{
-/* Documented, supported MPE functions. */
-extern void GETPRIVMODE(void);
-extern void GETUSERMODE(void);
-
-/* Undocumented, unsupported MPE functions. */
-extern void get_time_change_info(long long *, char *, char *);
-extern void initialize_system_time(long long, int);
-extern void set_time_correction(long long, int, int);
-extern long long ticks_to_micro(long long);
-
-char pwf_since_boot, recover_pwf_time;
-long long big_sec, big_usec, mpetime, offset_ticks, offset_usec;
-
-big_sec = tvp->tv_sec;
-big_usec = tvp->tv_usec;
-mpetime = (big_sec * 1000000LL) + big_usec; /* Desired UTC microseconds */
-
-GETPRIVMODE();
-set_time_correction(0LL,0,0); /* Cancel previous time correction, if any */
-get_time_change_info(&offset_ticks, &pwf_since_boot, &recover_pwf_time);
-offset_usec = ticks_to_micro(offset_ticks); /* UTC offset microseconds */
-mpetime = mpetime + offset_usec; /* Convert from UTC to local time */
-initialize_system_time(mpetime,1);
-GETUSERMODE();
-
-return 0;
-}
-#endif /* MPE */
-
-const char *set_tod_using = "UNKNOWN";
-
-int
-ntp_set_tod(
- struct timeval *tvp,
- void *tzp
- )
-{
- int rc = -1;
-
-#ifdef DEBUG
- if (debug)
- printf("In ntp_set_tod\n");
-#endif
-
-#ifdef HAVE_CLOCK_SETTIME
- if (rc) {
- struct timespec ts;
-
- set_tod_using = "clock_settime";
- /* Convert timeval to timespec */
- ts.tv_sec = tvp->tv_sec;
- ts.tv_nsec = 1000 * tvp->tv_usec;
-
- errno = 0;
- rc = clock_settime(CLOCK_REALTIME, &ts);
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: %s: %d: %s\n",
- set_tod_using, rc, strerror(errno));
- }
-#endif
- }
-#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) {
- printf("ntp_set_tod: %s: %d: %s\n",
- set_tod_using, rc, strerror(errno));
- }
-#endif
- }
-#endif /* HAVE_SETTIMEOFDAY */
-#ifdef HAVE_STIME
- if (rc) {
- long tp = tvp->tv_sec;
-
- set_tod_using = "stime";
- rc = stime(&tp); /* lie as bad as SysVR4 */
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: %s: %d: %s\n",
- set_tod_using, rc, strerror(errno));
- }
-#endif
- }
-#endif /* HAVE_STIME */
- if (rc)
- set_tod_using = "Failed!";
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: Final result: %s: %d: %s\n",
- set_tod_using, rc, strerror(errno));
- }
-#endif
- return rc;
-}
-
-#endif /* not SYS_WINNT */
-
-#if defined (SYS_WINNT) || defined (SYS_VXWORKS) || defined(MPE)
-/* getpass is used in ntpq.c and ntpdc.c */
-
-char *
-getpass(const char * prompt)
-{
- int c, i;
- static char password[32];
-#ifdef DEBUG
- fprintf(stderr, "%s", prompt);
- fflush(stderr);
-#endif
- for (i=0; i<sizeof(password)-1 && ((c=_getch())!='\n' && c!='\r'); i++) {
- password[i] = (char) c;
- }
- password[i] = '\0';
-
- return password;
-}
-#endif /* SYS_WINNT */
-
-#if !defined(HAVE_MEMSET)
-void
-ntp_memset(
- char *a,
- int x,
- int c
- )
-{
- while (c-- > 0)
- *a++ = (char) x;
-}
-#endif /*POSIX*/
diff --git a/contrib/ntp/libntp/md5c.c b/contrib/ntp/libntp/md5c.c
deleted file mode 100644
index 07eec6c..0000000
--- a/contrib/ntp/libntp/md5c.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
- */
-
-/* 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.
- */
-
-#include "global.h"
-#ifndef HAVE_MD5INIT
-#include "ntp_md5.h"
-
-/* Constants for MD5Transform routine.
- */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
-static void Encode PROTO_LIST
- ((unsigned char *, UINT4 *, unsigned int));
-static void Decode PROTO_LIST
- ((UINT4 *, unsigned char *, unsigned int));
-static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
-static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
-
-static unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/* F, G, H and I are basic MD5 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/* ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-
-/* MD5 initialization. Begins an MD5 operation, writing a new context.
- */
-void
-MD5Init(
- MD5_CTX *context /* context */
- )
-{
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants.
- */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
-}
-
-/* MD5 block update operation. Continues an MD5 message-digest
- operation, processing another message block, and updating the
- context.
- */
-void
-MD5Update (
- MD5_CTX *context, /* context */
- unsigned char *input, /* input block */
- unsigned int inputLen /* length of input block */
- )
-{
- unsigned int i, idx, partLen;
-
- /* Compute number of bytes mod 64 */
- idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
-
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
-
- partLen = 64 - idx;
-
- /* Transform as many times as possible.
- */
- if (inputLen >= partLen) {
- MD5_memcpy
- ((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]);
-
- idx = 0;
- }
- else
- i = 0;
-
- /* Buffer remaining input */
- MD5_memcpy
- ((POINTER)&context->buffer[idx], (POINTER)&input[i],
- inputLen-i);
-}
-
-/* MD5 finalization. Ends an MD5 message-digest operation, writing the
- the message digest and zeroizing the context.
- */
-void
-MD5Final (
- unsigned char digest[16], /* message digest */
- MD5_CTX *context /* context */
- )
-{
- unsigned char bits[8];
- unsigned int idx, padLen;
-
- /* Save number of bits */
- Encode (bits, context->count, 8);
-
- /* Pad out to 56 mod 64.
- */
- idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (idx < 56) ? (56 - idx) : (120 - idx);
- MD5Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD5Update (context, bits, 8);
-
- /* Store state in digest */
- Encode (digest, context->state, 16);
-
- /* Zeroize sensitive information.
- */
- MD5_memset ((POINTER)context, 0, sizeof (*context));
-}
-
-/* MD5 basic transformation. Transforms state based on block.
- */
-static void
-MD5Transform (
- UINT4 state[4],
- unsigned char block[64]
- )
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information.
- */
- MD5_memset ((POINTER)x, 0, sizeof (x));
-}
-
-/* Encodes input (UINT4) into output (unsigned char). Assumes len is
- a multiple of 4.
- */
-static void
-Encode (
- unsigned char *output,
- UINT4 *input,
- unsigned int len
- )
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
-
-/* Decodes input (unsigned char) into output (UINT4). Assumes len is
- a multiple of 4.
- */
-static void
-Decode (
- UINT4 *output,
- unsigned char *input,
- unsigned int len
- )
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
-}
-
-/* Note: Replace "for loop" with standard memcpy if possible.
- */
-static void
-MD5_memcpy (
- POINTER output,
- POINTER input,
- unsigned int len
- )
-{
- unsigned int i;
-
- for (i = 0; i < len; i++)
- output[i] = input[i];
-}
-
-/* Note: Replace "for loop" with standard memset if possible.
- */
-static void
-MD5_memset (
- POINTER output,
- int value,
- unsigned int len
- )
-{
- unsigned int i;
-
- 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
deleted file mode 100644
index 8ccc4b1..0000000
--- a/contrib/ntp/libntp/memmove.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifndef HAVE_MEMMOVE
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <string.h>
-
-#include "l_stdlib.h"
-
-/*
- * sizeof(word) MUST BE A POWER OF TWO
- * SO THAT wmask BELOW IS ALL ONES
- */
-typedef int word; /* "word" used for optimal copy speed */
-
-#define wsize sizeof(word)
-#define wmask (wsize - 1)
-
-/*
- * Copy a block of memory, handling overlap.
- * This is the routine that actually implements
- * (the portable versions of) bcopy, memcpy, and memmove.
- */
-void *
-memmove(
- void *dst0,
- const void *src0,
- register size_t length
- )
-{
- register char *dst = dst0;
- register const char *src = src0;
- register size_t t;
-
- if (length == 0 || dst == src) /* nothing to do */
- goto done;
-
- /*
- * Macros: loop-t-times; and loop-t-times, t>0
- */
-#define TLOOP(s) if (t) TLOOP1(s)
-#define TLOOP1(s) do { s; } while (--t)
-
- if ((unsigned long)dst < (unsigned long)src) {
- /*
- * Copy forward.
- */
- t = (int)src; /* only need low bits */
- if ((t | (int)dst) & wmask) {
- /*
- * Try to align operands. This cannot be done
- * unless the low bits match.
- */
- if ((t ^ (int)dst) & wmask || length < wsize)
- t = length;
- else
- t = wsize - (t & wmask);
- length -= t;
- TLOOP1(*dst++ = *src++);
- }
- /*
- * Copy whole words, then mop up any trailing bytes.
- */
- t = length / wsize;
- TLOOP(*(word *)dst = *(const word *)src; src += wsize;
- dst += wsize);
- t = length & wmask;
- TLOOP(*dst++ = *src++);
- } else {
- /*
- * Copy backwards. Otherwise essentially the same.
- * Alignment works as before, except that it takes
- * (t&wmask) bytes to align, not wsize-(t&wmask).
- */
- src += length;
- dst += length;
- t = (int)src;
- if ((t | (int)dst) & wmask) {
- if ((t ^ (int)dst) & wmask || length <= wsize)
- t = length;
- else
- t &= wmask;
- length -= t;
- TLOOP1(*--dst = *--src);
- }
- t = length / wsize;
- TLOOP(src -= wsize; dst -= wsize;
- *(word *)dst = *(const word *)src);
- t = length & wmask;
- TLOOP(*--dst = *--src);
- }
- done:
- return (dst0);
-}
-#else
-int memmove_bs;
-#endif
diff --git a/contrib/ntp/libntp/mfp_mul.c b/contrib/ntp/libntp/mfp_mul.c
deleted file mode 100644
index 0c667f7..0000000
--- a/contrib/ntp/libntp/mfp_mul.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * /src/NTP/ntp-4/libntp/mfp_mul.c,v 4.3 1999/02/21 12:17:37 kardel RELEASE_19990228_A
- *
- * $Created: Sat Aug 16 20:35:08 1997 $
- *
- * Copyright (C) 1997, 1998 by Frank Kardel
- */
-#include <stdio.h>
-#include "ntp_stdlib.h"
-#include "ntp_types.h"
-#include "ntp_fp.h"
-
-#define LOW_MASK (u_int32)((1<<(FRACTION_PREC/2))-1)
-#define HIGH_MASK (u_int32)(LOW_MASK << (FRACTION_PREC/2))
-
-void
-mfp_mul(
- int32 *o_i,
- u_int32 *o_f,
- int32 a_i,
- u_int32 a_f,
- int32 b_i,
- u_int32 b_f
- )
-{
- int32 i, j;
- u_int32 f;
- u_long a[4]; /* operand a */
- u_long b[4]; /* operand b */
- u_long c[4]; /* result c */
-
- int neg = 0;
-
- if (a_i < 0) /* examine sign situation */
- {
- neg = 1;
- M_NEG(a_i, a_f);
- }
-
- if (b_i < 0) /* examine sign situation */
- {
- neg = !neg;
- M_NEG(b_i, b_f);
- }
-
- a[0] = a_f & LOW_MASK; /* prepare a operand */
- a[1] = (a_f & HIGH_MASK) >> (FRACTION_PREC/2);
- a[2] = a_i & LOW_MASK;
- a[3] = (a_i & HIGH_MASK) >> (FRACTION_PREC/2);
-
- b[0] = b_f & LOW_MASK; /* prepare b operand */
- b[1] = (b_f & HIGH_MASK) >> (FRACTION_PREC/2);
- b[2] = b_i & LOW_MASK;
- b[3] = (b_i & HIGH_MASK) >> (FRACTION_PREC/2);
-
- c[0] = c[1] = c[2] = c[3] = 0;
-
- for (i = 0; i < 4; i++) /* we do assume 32 * 32 = 64 bit multiplication */
- for (j = 0; j < 4; j++)
- {
- u_long result_low, result_high;
-
- result_low = (u_long)a[i] * (u_long)b[j]; /* partial product */
-
- if ((i+j) & 1) /* splits across two result registers */
- {
- result_high = result_low >> (FRACTION_PREC/2);
- result_low <<= FRACTION_PREC/2;
- }
- else
- { /* stays in a result register - except for overflows */
- result_high = 0;
- }
-
- if (((c[(i+j)/2] >> 1) + (result_low >> 1)) & (u_int32)((unsigned)1<<(FRACTION_PREC - 1)))
- result_high++; /* propagate overflows */
-
- c[(i+j)/2] += result_low; /* add up partial products */
-
- if (((c[(i+j+1)/2] >> 1) + (result_high >> 1)) & (u_int32)((unsigned)1<<(FRACTION_PREC - 1)))
- c[1+(i+j)/2]++; /* propagate overflows */
-
- c[(i+j+1)/2] += result_high;
- }
-
-#ifdef DEBUG
- if (debug > 6)
- printf("mfp_mul: 0x%04lx%04lx%04lx%04lx * 0x%04lx%04lx%04lx%04lx = 0x%08lx%08lx%08lx%08lx\n",
- a[3], a[2], a[1], a[0], b[3], b[2], b[1], b[0], c[3], c[2], c[1], c[0]);
-#endif
-
- if (c[3]) /* overflow */
- {
- i = ((unsigned)1 << (FRACTION_PREC-1)) - 1;
- f = ~(unsigned)0;
- }
- else
- { /* take produkt - discarding extra precision */
- i = c[2];
- f = c[1];
- }
-
- if (neg) /* recover sign */
- {
- M_NEG(i, f);
- }
-
- *o_i = i;
- *o_f = f;
-
-#ifdef DEBUG
- if (debug > 6)
- printf("mfp_mul: %s * %s => %s\n",
- mfptoa((u_long)a_i, a_f, 6),
- mfptoa((u_long)b_i, b_f, 6),
- mfptoa((u_long)i, f, 6));
-#endif
-}
-
-/*
- * mfp_mul.c,v
- * Revision 4.3 1999/02/21 12:17:37 kardel
- * 4.91f reconcilation
- *
- * Revision 4.2 1998/12/20 23:45:28 kardel
- * fix types and warnings
- *
- * Revision 4.1 1998/05/24 07:59:57 kardel
- * conditional debug support
- *
- * Revision 4.0 1998/04/10 19:46:38 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.1 1998/04/10 19:27:47 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- *
- * Revision 1.1 1997/10/06 21:05:46 kardel
- * new parse structure
- *
- */
diff --git a/contrib/ntp/libntp/mfptoa.c b/contrib/ntp/libntp/mfptoa.c
deleted file mode 100644
index 6450b2c..0000000
--- a/contrib/ntp/libntp/mfptoa.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * mfptoa - Return an asciized representation of a signed long fp number
- */
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-
-char *
-mfptoa(
- u_long fpi,
- u_long fpf,
- short ndec
- )
-{
- int isneg;
-
- if (M_ISNEG(fpi, fpf)) {
- isneg = 1;
- M_NEG(fpi, fpf);
- } else
- isneg = 0;
-
- return dolfptoa(fpi, fpf, isneg, ndec, 0);
-}
diff --git a/contrib/ntp/libntp/mfptoms.c b/contrib/ntp/libntp/mfptoms.c
deleted file mode 100644
index d2bfd71..0000000
--- a/contrib/ntp/libntp/mfptoms.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * mfptoms - Return an asciized signed long fp number in milliseconds
- */
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-
-char *
-mfptoms(
- u_long fpi,
- u_long fpf,
- short ndec
- )
-{
- int isneg;
-
- if (M_ISNEG(fpi, fpf)) {
- isneg = 1;
- M_NEG(fpi, fpf);
- } else
- isneg = 0;
-
- return dolfptoa(fpi, fpf, isneg, ndec, 1);
-}
diff --git a/contrib/ntp/libntp/mktime.c b/contrib/ntp/libntp/mktime.c
deleted file mode 100644
index 7f8290f..0000000
--- a/contrib/ntp/libntp/mktime.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 1987, 1989 Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Arthur David Olson of the National Cancer Institute.
- *
- * 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. */
-
-/*static char *sccsid = "from: @(#)ctime.c 5.26 (Berkeley) 2/23/91";*/
-/*static char *rcsid = "mktime.c,v 1.1.1.3 1998/11/15 19:23:34 kardel RELEASE_19990228_A";*/
-
-/*
- * This implementation of mktime is lifted straight from the NetBSD (BSD 4.4)
- * version. I modified it slightly to divorce it from the internals of the
- * ctime library. Thus this version can't use details of the internal
- * timezone state file to figure out strange unnormalized struct tm values,
- * as might result from someone doing date math on the tm struct then passing
- * it to mktime.
- *
- * It just does as well as it can at normalizing the tm input, then does a
- * binary search of the time space using the system's localtime() function.
- *
- * The original binary search was defective in that it didn't consider the
- * setting of tm_isdst when comparing tm values, causing the search to be
- * flubbed for times near the dst/standard time changeover. The original
- * code seems to make up for this by grubbing through the timezone info
- * whenever the binary search barfed. Since I don't have that luxury in
- * portable code, I have to take care of tm_isdst in the comparison routine.
- * This requires knowing how many minutes offset dst is from standard time.
- *
- * So, if you live somewhere in the world where dst is not 60 minutes offset,
- * and your vendor doesn't supply mktime(), you'll have to edit this variable
- * by hand. Sorry about that.
- */
-
-#include "ntp_machine.h"
-
-#if !HAVE_MKTIME || !HAVE_TIMEGM
-
-#ifndef DSTMINUTES
-#define DSTMINUTES 60
-#endif
-
-#define FALSE 0
-#define TRUE 1
-
-/* some constants from tzfile.h */
-#define SECSPERMIN 60
-#define MINSPERHOUR 60
-#define HOURSPERDAY 24
-#define DAYSPERWEEK 7
-#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
-#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
-#define MONSPERYEAR 12
-#define TM_YEAR_BASE 1900
-#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-
-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 },
- { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-};
-
-static int year_lengths[2] = {
- DAYSPERNYEAR, DAYSPERLYEAR
-};
-
-/*
-** Adapted from code provided by Robert Elz, who writes:
-** The "best" way to do mktime I think is based on an idea of Bob
-** Kridle's (so its said...) from a long time ago. (mtxinu!kridle now).
-** It does a binary search of the time_t space. Since time_t's are
-** just 32 bits, its a max of 32 iterations (even at 64 bits it
-** would still be very reasonable).
-*/
-
-#ifndef WRONG
-#define WRONG (-1)
-#endif /* !defined WRONG */
-
-static void
-normalize(
- int * tensptr,
- int * unitsptr,
- int base
- )
-{
- if (*unitsptr >= base) {
- *tensptr += *unitsptr / base;
- *unitsptr %= base;
- } else if (*unitsptr < 0) {
- --*tensptr;
- *unitsptr += base;
- if (*unitsptr < 0) {
- *tensptr -= 1 + (-*unitsptr) / base;
- *unitsptr = base - (-*unitsptr) % base;
- }
- }
-}
-
-static struct tm *
-mkdst(
- struct tm * tmp
- )
-{
- /* jds */
- static struct tm tmbuf;
-
- tmbuf = *tmp;
- tmbuf.tm_isdst = 1;
- tmbuf.tm_min += DSTMINUTES;
- normalize(&tmbuf.tm_hour, &tmbuf.tm_min, MINSPERHOUR);
- return &tmbuf;
-}
-
-static int
-tmcomp(
- register struct tm * atmp,
- register struct tm * btmp
- )
-{
- register int result;
-
- /* compare down to the same day */
-
- if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&
- (result = (atmp->tm_mon - btmp->tm_mon)) == 0)
- result = (atmp->tm_mday - btmp->tm_mday);
-
- if(result != 0)
- return result;
-
- /* get rid of one-sided dst bias */
-
- if(atmp->tm_isdst == 1 && !btmp->tm_isdst)
- btmp = mkdst(btmp);
- else if(btmp->tm_isdst == 1 && !atmp->tm_isdst)
- atmp = mkdst(atmp);
-
- /* compare the rest of the way */
-
- if ((result = (atmp->tm_hour - btmp->tm_hour)) == 0 &&
- (result = (atmp->tm_min - btmp->tm_min)) == 0)
- result = atmp->tm_sec - btmp->tm_sec;
- return result;
-}
-
-
-static time_t
-time2(
- struct tm * tmp,
- int * okayp,
- int usezn
- )
-{
- register int dir;
- register int bits;
- register int i;
- register int saved_seconds;
- time_t t;
- struct tm yourtm, mytm;
-
- *okayp = FALSE;
- yourtm = *tmp;
- if (yourtm.tm_sec >= SECSPERMIN + 2 || yourtm.tm_sec < 0)
- normalize(&yourtm.tm_min, &yourtm.tm_sec, SECSPERMIN);
- normalize(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR);
- normalize(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY);
- normalize(&yourtm.tm_year, &yourtm.tm_mon, MONSPERYEAR);
- while (yourtm.tm_mday <= 0) {
- --yourtm.tm_year;
- yourtm.tm_mday +=
- year_lengths[isleap(yourtm.tm_year + TM_YEAR_BASE)];
- }
- for ( ; ; ) {
- i = mon_lengths[isleap(yourtm.tm_year +
- TM_YEAR_BASE)][yourtm.tm_mon];
- if (yourtm.tm_mday <= i)
- break;
- yourtm.tm_mday -= i;
- if (++yourtm.tm_mon >= MONSPERYEAR) {
- yourtm.tm_mon = 0;
- ++yourtm.tm_year;
- }
- }
- saved_seconds = yourtm.tm_sec;
- yourtm.tm_sec = 0;
- /*
- ** Calculate the number of magnitude bits in a time_t
- ** (this works regardless of whether time_t is
- ** signed or unsigned, though lint complains if unsigned).
- */
- for (bits = 0, t = 1; t > 0; ++bits, t <<= 1)
- ;
- /*
- ** If time_t is signed, then 0 is the median value,
- ** if time_t is unsigned, then 1 << bits is median.
- */
- t = (t < 0) ? 0 : ((time_t) 1 << bits);
- for ( ; ; ) {
- if (usezn)
- mytm = *localtime(&t);
- else
- mytm = *gmtime(&t);
- dir = tmcomp(&mytm, &yourtm);
- if (dir != 0) {
- if (bits-- < 0)
- return WRONG;
- if (bits < 0)
- --t;
- else if (dir > 0)
- t -= (time_t) 1 << bits;
- else t += (time_t) 1 << bits;
- continue;
- }
- if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst)
- break;
-
- return WRONG;
- }
- t += saved_seconds;
- 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
- )
-{
- register time_t t;
- int okay;
-
- if (tmp->tm_isdst > 1)
- tmp->tm_isdst = 1;
- t = time2(tmp, &okay, 1);
- if (okay || tmp->tm_isdst < 0)
- return t;
-
- return WRONG;
-}
-
-time_t
-mktime(
- struct tm * tmp
- )
-{
- return time1(tmp);
-}
-#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/modetoa.c b/contrib/ntp/libntp/modetoa.c
deleted file mode 100644
index 405aef8..0000000
--- a/contrib/ntp/libntp/modetoa.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * modetoa - return an asciized mode
- */
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-const char *
-modetoa(
- int mode
- )
-{
- char *bp;
- static const char *modestrings[] = {
- "unspec",
- "sym_active",
- "sym_passive",
- "client",
- "server",
- "broadcast",
- "control",
- "private",
- "bclient",
- };
-
- if (mode < 0 || mode >= (sizeof modestrings)/sizeof(char *)) {
- LIB_GETBUF(bp);
- (void)sprintf(bp, "mode#%d", mode);
- return bp;
- }
-
- return modestrings[mode];
-}
diff --git a/contrib/ntp/libntp/mstolfp.c b/contrib/ntp/libntp/mstolfp.c
deleted file mode 100644
index e4e909d..0000000
--- a/contrib/ntp/libntp/mstolfp.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * mstolfp - convert an ascii string in milliseconds to an l_fp number
- */
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-
-int
-mstolfp(
- const char *str,
- l_fp *lfp
- )
-{
- register const char *cp;
- register char *bp;
- register const char *cpdec;
- char buf[100];
-
- /*
- * We understand numbers of the form:
- *
- * [spaces][-][digits][.][digits][spaces|\n|\0]
- *
- * This is one enormous hack. Since I didn't feel like
- * rewriting the decoding routine for milliseconds, what
- * is essentially done here is to make a copy of the string
- * with the decimal moved over three places so the seconds
- * decoding routine can be used.
- */
- bp = buf;
- cp = str;
- while (isspace((int)*cp))
- cp++;
-
- if (*cp == '-') {
- *bp++ = '-';
- cp++;
- }
-
- if (*cp != '.' && !isdigit((int)*cp))
- return 0;
-
-
- /*
- * Search forward for the decimal point or the end of the string.
- */
- cpdec = cp;
- while (isdigit((int)*cpdec))
- cpdec++;
-
- /*
- * Found something. If we have more than three digits copy the
- * excess over, else insert a leading 0.
- */
- if ((cpdec - cp) > 3) {
- do {
- *bp++ = (char)*cp++;
- } while ((cpdec - cp) > 3);
- } else {
- *bp++ = '0';
- }
-
- /*
- * Stick the decimal in. If we've got less than three digits in
- * front of the millisecond decimal we insert the appropriate number
- * of zeros.
- */
- *bp++ = '.';
- if ((cpdec - cp) < 3) {
- register int i = 3 - (cpdec - cp);
-
- do {
- *bp++ = '0';
- } while (--i > 0);
- }
-
- /*
- * Copy the remainder up to the millisecond decimal. If cpdec
- * is pointing at a decimal point, copy in the trailing number too.
- */
- while (cp < cpdec)
- *bp++ = (char)*cp++;
-
- if (*cp == '.') {
- cp++;
- while (isdigit((int)*cp))
- *bp++ = (char)*cp++;
- }
- *bp = '\0';
-
- /*
- * Check to make sure the string is properly terminated. If
- * so, give the buffer to the decoding routine.
- */
- if (*cp != '\0' && !isspace((int)*cp))
- return 0;
- return atolfp(buf, lfp);
-}
diff --git a/contrib/ntp/libntp/msutotsf.c b/contrib/ntp/libntp/msutotsf.c
deleted file mode 100644
index eb3babe..0000000
--- a/contrib/ntp/libntp/msutotsf.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * msutotsf - tables for converting from a subsecond millisecond value
- * to a time stamp fraction.
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-
-/*
- * Index each of these tables with five bits of the (less than) 10
- * bit millisecond value. Note that the tables are rounded (not
- * truncated). The error in the result will thus be +-1 low order
- * bit in the time stamp fraction.
- */
-u_long msutotsflo[32] = {
- 0x00000000, 0x00418937, 0x0083126f, 0x00c49ba6,
- 0x010624dd, 0x0147ae14, 0x0189374c, 0x01cac083,
- 0x020c49ba, 0x024dd2f2, 0x028f5c29, 0x02d0e560,
- 0x03126e98, 0x0353f7cf, 0x03958106, 0x03d70a3d,
- 0x04189375, 0x045a1cac, 0x049ba5e3, 0x04dd2f1b,
- 0x051eb852, 0x05604189, 0x05a1cac1, 0x05e353f8,
- 0x0624dd2f, 0x06666666, 0x06a7ef9e, 0x06e978d5,
- 0x072b020c, 0x076c8b44, 0x07ae147b, 0x07ef9db2
-};
-
-u_long msutotsfhi[32] = {
- 0x00000000, 0x083126e9, 0x10624dd3, 0x189374bc,
- 0x20c49ba6, 0x28f5c28f, 0x3126e979, 0x39581062,
- 0x4189374c, 0x49ba5e35, 0x51eb851f, 0x5a1cac08,
- 0x624dd2f2, 0x6a7ef9db, 0x72b020c5, 0x7ae147ae,
- 0x83126e98, 0x8b439581, 0x9374bc6a, 0x9ba5e354,
- 0xa3d70a3d, 0xac083127, 0xb4395810, 0xbc6a7efa,
- 0xc49ba5e3, 0xcccccccd, 0xd4fdf3b6, 0xdd2f1aa0,
- 0xe5604189, 0xed916873, 0xf5c28f5c, 0xfdf3b646
-};
diff --git a/contrib/ntp/libntp/msyslog.c b/contrib/ntp/libntp/msyslog.c
deleted file mode 100644
index f0e8872..0000000
--- a/contrib/ntp/libntp/msyslog.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * msyslog - either send a message to the terminal or print it on
- * the standard output.
- *
- * Converted to use varargs, much better ... jks
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <stdio.h>
-
-#include "ntp_types.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-
-#ifdef SYS_WINNT
-# include <stdarg.h>
-# include "..\ports\winnt\libntp\log.h"
-# include "..\ports\winnt\libntp\messages.h"
-#endif
-
-int syslogit = 1;
-
-FILE *syslog_file = NULL;
-
-u_long ntp_syslogmask = ~ (u_long) 0;
-
-#ifdef SYS_WINNT
-static char separator = '\\';
-#else
-static char separator = '/';
-#endif /* SYS_WINNT */
-extern char *progname;
-
-/* 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)
-{
- 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
-}
-void
-format_errmsg(char *nfmt, int lennfmt, const char *fmt, int errval)
-{
- register char c;
- register char *n;
- register const char *f;
-
- char *err;
-
- n = nfmt;
- f = fmt;
- while ((c = *f++) != '\0' && n < (nfmt+lennfmt - 2)) {
- if (c != '%') {
- *n++ = c;
- continue;
- }
- if ((c = *f++) != 'm') {
- *n++ = '%';
- *n++ = c;
- continue;
- }
- err = 0;
- 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);
- }
- }
-#if !defined(VMS)
- if (!syslogit)
-#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);
- 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
- 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
deleted file mode 100644
index fd57568..0000000
--- a/contrib/ntp/libntp/netof.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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"
-
-#define NUM_NETOF_BUFS 10
-static struct sockaddr_storage ssbuf[NUM_NETOF_BUFS];
-static int next_ssbuf = 0;
-
-struct sockaddr_storage*
-netof(
- 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));
- }
-
- return netaddr;
-}
diff --git a/contrib/ntp/libntp/ntp_rfc2553.c b/contrib/ntp/libntp/ntp_rfc2553.c
deleted file mode 100644
index 2788630..0000000
--- a/contrib/ntp/libntp/ntp_rfc2553.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * 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/numtoa.c b/contrib/ntp/libntp/numtoa.c
deleted file mode 100644
index de95118..0000000
--- a/contrib/ntp/libntp/numtoa.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * numtoa - return asciized network numbers store in local array space
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-numtoa(
- u_int32 num
- )
-{
- register u_int32 netnum;
- register char *buf;
-
- netnum = ntohl(num);
- LIB_GETBUF(buf);
- (void) sprintf(buf, "%lu.%lu.%lu.%lu", ((u_long)netnum >> 24) & 0xff,
- ((u_long)netnum >> 16) & 0xff, ((u_long)netnum >> 8) & 0xff,
- (u_long)netnum & 0xff);
- return buf;
-}
diff --git a/contrib/ntp/libntp/numtohost.c b/contrib/ntp/libntp/numtohost.c
deleted file mode 100644
index 4e53092..0000000
--- a/contrib/ntp/libntp/numtohost.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * numtohost - convert network number to host name.
- */
-#include <netdb.h>
-
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-#include "lib_strbuf.h"
-
-#define LOOPBACKNET 0x7f000000
-#define LOOPBACKHOST 0x7f000001
-#define LOOPBACKNETMASK 0xff000000
-
-char *
-numtohost(
- u_int32 netnum
- )
-{
- char *bp;
- struct hostent *hp;
-
- /*
- * This is really gross, but saves lots of hanging looking for
- * hostnames for the radio clocks. Don't bother looking up
- * addresses on the loopback network except for the loopback
- * host itself.
- */
- if ((((ntohl(netnum) & LOOPBACKNETMASK) == LOOPBACKNET)
- && (ntohl(netnum) != LOOPBACKHOST))
- || ((hp = gethostbyaddr((char *)&netnum, sizeof netnum, AF_INET))
- == 0))
- return numtoa(netnum);
-
- LIB_GETBUF(bp);
-
- bp[LIB_BUFLENGTH-1] = '\0';
- (void) strncpy(bp, hp->h_name, LIB_BUFLENGTH-1);
- return bp;
-}
diff --git a/contrib/ntp/libntp/octtoint.c b/contrib/ntp/libntp/octtoint.c
deleted file mode 100644
index f792b2b..0000000
--- a/contrib/ntp/libntp/octtoint.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * octtoint - convert an ascii string in octal to an unsigned
- * long, with error checking
- */
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntp_stdlib.h"
-
-int
-octtoint(
- const char *str,
- u_long *ival
- )
-{
- register u_long u;
- register const char *cp;
-
- cp = str;
-
- if (*cp == '\0')
- return 0;
-
- u = 0;
- while (*cp != '\0') {
- if (!isdigit((int)*cp) || *cp == '8' || *cp == '9')
- return 0;
- if (u >= 0x20000000)
- return 0; /* overflow */
- u <<= 3;
- u += *cp++ - '0'; /* ascii dependent */
- }
- *ival = u;
- return 1;
-}
diff --git a/contrib/ntp/libntp/prettydate.c b/contrib/ntp/libntp/prettydate.c
deleted file mode 100644
index 9710c84..0000000
--- a/contrib/ntp/libntp/prettydate.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * prettydate - convert a time stamp to something readable
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h" /* includes <sys/time.h> */
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-static const char *months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-static const char *days[] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-char *
-prettydate(
- l_fp *ts
- )
-{
- char *bp;
- struct tm *tm;
- time_t sec;
- u_long msec;
-
- LIB_GETBUF(bp);
-
- sec = ts->l_ui - JAN_1970;
- msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
-
- tm = localtime(&sec);
-
- (void) sprintf(bp, "%08lx.%08lx %s, %s %2d %4d %2d:%02d:%02d.%03lu",
- (u_long)ts->l_ui, (u_long)ts->l_uf, days[tm->tm_wday],
- months[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year,
- tm->tm_hour,tm->tm_min, tm->tm_sec, msec);
-
- return bp;
-}
-
-char *
-gmprettydate(
- l_fp *ts
- )
-{
- char *bp;
- struct tm *tm;
- time_t sec;
- u_long msec;
-
- LIB_GETBUF(bp);
-
- sec = ts->l_ui - JAN_1970;
- msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
-
- tm = gmtime(&sec);
-
- (void) sprintf(bp, "%08lx.%08lx %s, %s %2d %4d %2d:%02d:%02d.%03lu UTC",
- (u_long)ts->l_ui, (u_long)ts->l_uf, days[tm->tm_wday],
- months[tm->tm_mon], tm->tm_mday, 1900 + tm->tm_year,
- tm->tm_hour,tm->tm_min, tm->tm_sec, msec);
-
- return bp;
-}
diff --git a/contrib/ntp/libntp/random.c b/contrib/ntp/libntp/random.c
deleted file mode 100644
index 7136857..0000000
--- a/contrib/ntp/libntp/random.c
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * Copyright (c) 1983, 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.
- *
- * $FreeBSD$
- *
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include "config.h"
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#include <stdio.h>
-
-#include <ntp_types.h>
-
-/*
- * random.c:
- *
- * An improved random number generation package. In addition to the standard
- * rand()/srand() like interface, this package also has a special state info
- * interface. The initstate() routine is called with a seed, an array of
- * bytes, and a count of how many bytes are being passed in; this array is
- * then initialized to contain information for random number generation with
- * that much state information. Good sizes for the amount of state
- * information are 32, 64, 128, and 256 bytes. The state can be switched by
- * calling the setstate() routine with the same array as was initiallized
- * with initstate(). By default, the package runs with 128 bytes of state
- * information and generates far better random numbers than a linear
- * congruential generator. If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used.
- *
- * Internally, the state information is treated as an array of longs; the
- * zeroeth element of the array is the type of R.N.G. being used (small
- * integer); the remainder of the array is the state information for the
- * R.N.G. Thus, 32 bytes of state information will give 7 longs worth of
- * state information, which will allow a degree seven polynomial. (Note:
- * the zeroeth word of state information also has some other information
- * stored in it -- see setstate() for details).
- *
- * The random number generation technique is a linear feedback shift register
- * approach, employing trinomials (since there are fewer terms to sum up that
- * way). In this approach, the least significant bit of all the numbers in
- * the state table will act as a linear feedback shift register, and will
- * have period 2^deg - 1 (where deg is the degree of the polynomial being
- * used, assuming that the polynomial is irreducible and primitive). The
- * higher order bits will have longer periods, since their values are also
- * influenced by pseudo-random carries out of the lower bits. The total
- * period of the generator is approximately deg*(2**deg - 1); thus doubling
- * the amount of state information has a vast influence on the period of the
- * generator. Note: the deg*(2**deg - 1) is an approximation only good for
- * large deg, when the period of the shift register is the dominant factor.
- * With deg equal to seven, the period is actually much longer than the
- * 7*(2**7 - 1) predicted by this formula.
- *
- * Modified 28 December 1994 by Jacob S. Rosenberg.
- * The following changes have been made:
- * All references to the type u_int have been changed to unsigned long.
- * All references to type int have been changed to type long. Other
- * cleanups have been made as well. A warning for both initstate and
- * setstate has been inserted to the effect that on Sparc platforms
- * the 'arg_state' variable must be forced to begin on word boundaries.
- * This can be easily done by casting a long integer array to char *.
- * The overall logic has been left STRICTLY alone. This software was
- * tested on both a VAX and Sun SpacsStation with exactly the same
- * results. The new version and the original give IDENTICAL results.
- * The new version is somewhat faster than the original. As the
- * documentation says: "By default, the package runs with 128 bytes of
- * state information and generates far better random numbers than a linear
- * congruential generator. If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used." For a buffer of
- * 128 bytes, this new version runs about 19 percent faster and for a 16
- * byte buffer it is about 5 percent faster.
- */
-
-/*
- * For each of the currently supported random number generators, we have a
- * break value on the amount of state information (you need at least this
- * many bytes of state info to support this random number generator), a degree
- * for the polynomial (actually a trinomial) that the R.N.G. is based on, and
- * the separation between the two lower order coefficients of the trinomial.
- */
-#define TYPE_0 0 /* linear congruential */
-#define BREAK_0 8
-#define DEG_0 0
-#define SEP_0 0
-
-#define TYPE_1 1 /* x**7 + x**3 + 1 */
-#define BREAK_1 32
-#define DEG_1 7
-#define SEP_1 3
-
-#define TYPE_2 2 /* x**15 + x + 1 */
-#define BREAK_2 64
-#define DEG_2 15
-#define SEP_2 1
-
-#define TYPE_3 3 /* x**31 + x**3 + 1 */
-#define BREAK_3 128
-#define DEG_3 31
-#define SEP_3 3
-
-#define TYPE_4 4 /* x**63 + x + 1 */
-#define BREAK_4 256
-#define DEG_4 63
-#define SEP_4 1
-
-/*
- * Array versions of the above information to make code run faster --
- * relies on fact that TYPE_i == i.
- */
-#define MAX_TYPES 5 /* max number of types above */
-
-static long degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
-static long seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
-
-/*
- * Initially, everything is set up as if from:
- *
- * initstate(1, randtbl, 128);
- *
- * Note that this initialization takes advantage of the fact that srandom()
- * advances the front and rear pointers 10*rand_deg times, and hence the
- * rear pointer which starts at 0 will also end up at zero; thus the zeroeth
- * element of the state information, which contains info about the current
- * position of the rear pointer is just
- *
- * MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3.
- */
-
-static long randtbl[DEG_3 + 1] = {
- TYPE_3,
-#ifdef USE_WEAK_SEEDING
-/* Historic implementation compatibility */
-/* The random sequences do not vary much with the seed */
- 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5,
- 0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
- 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88,
- 0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
- 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b,
- 0x27fb47b9,
-#else /* !USE_WEAK_SEEDING */
- 0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05,
- 0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454,
- 0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471,
- 0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1,
- 0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41,
- 0xf3bec5da
-#endif /* !USE_WEAK_SEEDING */
-};
-
-/*
- * fptr and rptr are two pointers into the state info, a front and a rear
- * pointer. These two pointers are always rand_sep places aparts, as they
- * cycle cyclically through the state information. (Yes, this does mean we
- * could get away with just one pointer, but the code for random() is more
- * efficient this way). The pointers are left positioned as they would be
- * from the call
- *
- * initstate(1, randtbl, 128);
- *
- * (The position of the rear pointer, rptr, is really 0 (as explained above
- * in the initialization of randtbl) because the state table pointer is set
- * to point to randtbl[1] (as explained below).
- */
-static long *fptr = &randtbl[SEP_3 + 1];
-static long *rptr = &randtbl[1];
-
-/*
- * The following things are the pointer to the state information table, the
- * type of the current generator, the degree of the current polynomial being
- * used, and the separation between the two pointers. Note that for efficiency
- * of random(), we remember the first location of the state information, not
- * the zeroeth. Hence it is valid to access state[-1], which is used to
- * store the type of the R.N.G. Also, we remember the last location, since
- * this is more efficient than indexing every time to find the address of
- * the last element to see if the front and rear pointers have wrapped.
- */
-static long *state = &randtbl[1];
-static long rand_type = TYPE_3;
-static long rand_deg = DEG_3;
-static long rand_sep = SEP_3;
-static long *end_ptr = &randtbl[DEG_3 + 1];
-
-static inline long good_rand P((long));
-long random P((void));
-
-static inline long
-good_rand (
- register long x
- )
-{
-#ifdef USE_WEAK_SEEDING
-/*
- * Historic implementation compatibility.
- * The random sequences do not vary much with the seed,
- * even with overflowing.
- */
- return (1103515245 * x + 12345);
-#else /* !USE_WEAK_SEEDING */
-/*
- * Compute x = (7^5 * x) mod (2^31 - 1)
- * wihout overflowing 31 bits:
- * (2^31 - 1) = 127773 * (7^5) + 2836
- * From "Random number generators: good ones are hard to find",
- * Park and Miller, Communications of the ACM, vol. 31, no. 10,
- * October 1988, p. 1195.
- */
- register long hi, lo;
-
- hi = x / 127773;
- lo = x % 127773;
- x = 16807 * lo - 2836 * hi;
- if (x <= 0)
- x += 0x7fffffff;
- return (x);
-#endif /* !USE_WEAK_SEEDING */
-}
-
-/*
- * srandom:
- *
- * Initialize the random number generator based on the given seed. If the
- * type is the trivial no-state-information type, just remember the seed.
- * Otherwise, initializes state[] based on the given "seed" via a linear
- * congruential generator. Then, the pointers are set to known locations
- * that are exactly rand_sep places apart. Lastly, it cycles the state
- * information a given number of times to get rid of any initial dependencies
- * introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
- * for default usage relies on values produced by this routine.
- */
-void
-srandom(
- unsigned long x
- )
-{
- register long i;
-
- if (rand_type == TYPE_0)
- state[0] = x;
- else {
- state[0] = x;
- for (i = 1; i < rand_deg; i++)
- state[i] = good_rand(state[i - 1]);
- fptr = &state[rand_sep];
- rptr = &state[0];
- for (i = 0; i < 10 * rand_deg; i++)
- (void)random();
- }
-}
-
-/*
- * srandomdev:
- *
- * Many programs choose the seed value in a totally predictable manner.
- * This often causes problems. We seed the generator using the much more
- * secure urandom(4) interface. Note that this particular seeding
- * procedure can generate states which are impossible to reproduce by
- * calling srandom() with any value, since the succeeding terms in the
- * state buffer are no longer derived from the LC algorithm applied to
- * a fixed seed.
- */
-void
-srandomdev( void )
-{
- struct timeval tv;
- unsigned long junk; /* Purposely used uninitialized */
-
- gettimeofday(&tv, NULL);
- srandom(getpid() ^ tv.tv_sec ^ tv.tv_usec ^ junk);
- return;
-}
-
-/*
- * initstate:
- *
- * Initialize the state information in the given array of n bytes for future
- * random number generation. Based on the number of bytes we are given, and
- * the break values for the different R.N.G.'s, we choose the best (largest)
- * one we can and set things up for it. srandom() is then called to
- * initialize the state information.
- *
- * Note that on return from srandom(), we set state[-1] to be the type
- * multiplexed with the current value of the rear pointer; this is so
- * successive calls to initstate() won't lose this information and will be
- * able to restart with setstate().
- *
- * Note: the first thing we do is save the current state, if any, just like
- * setstate() so that it doesn't matter when initstate is called.
- *
- * Returns a pointer to the old state.
- *
- * Note: The Sparc platform requires that arg_state begin on a long
- * word boundary; otherwise a bus error will occur. Even so, lint will
- * complain about mis-alignment, but you should disregard these messages.
- */
-char *
-initstate(
- unsigned long seed, /* seed for R.N.G. */
- char *arg_state, /* pointer to state array */
- long n /* # bytes of state info */
- )
-{
- register char *ostate = (char *)(&state[-1]);
- register long *long_arg_state = (long *) arg_state;
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = MAX_TYPES * (rptr - state) + rand_type;
- if (n < BREAK_0) {
- (void)fprintf(stderr,
- "random: not enough state (%ld bytes); ignored.\n", n);
- return(0);
- }
- if (n < BREAK_1) {
- rand_type = TYPE_0;
- rand_deg = DEG_0;
- rand_sep = SEP_0;
- } else if (n < BREAK_2) {
- rand_type = TYPE_1;
- rand_deg = DEG_1;
- rand_sep = SEP_1;
- } else if (n < BREAK_3) {
- rand_type = TYPE_2;
- rand_deg = DEG_2;
- rand_sep = SEP_2;
- } else if (n < BREAK_4) {
- rand_type = TYPE_3;
- rand_deg = DEG_3;
- rand_sep = SEP_3;
- } else {
- rand_type = TYPE_4;
- rand_deg = DEG_4;
- rand_sep = SEP_4;
- }
- state = (long *) (long_arg_state + 1); /* first location */
- end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */
- srandom(seed);
- if (rand_type == TYPE_0)
- long_arg_state[0] = rand_type;
- else
- long_arg_state[0] = MAX_TYPES * (rptr - state) + rand_type;
- return(ostate);
-}
-
-/*
- * setstate:
- *
- * Restore the state from the given state array.
- *
- * Note: it is important that we also remember the locations of the pointers
- * in the current state information, and restore the locations of the pointers
- * from the old state information. This is done by multiplexing the pointer
- * location into the zeroeth word of the state information.
- *
- * Note that due to the order in which things are done, it is OK to call
- * setstate() with the same state as the current state.
- *
- * Returns a pointer to the old state information.
- *
- * Note: The Sparc platform requires that arg_state begin on a long
- * word boundary; otherwise a bus error will occur. Even so, lint will
- * complain about mis-alignment, but you should disregard these messages.
- */
-char *
-setstate(
- char *arg_state /* pointer to state array */
- )
-{
- register long *new_state = (long *) arg_state;
- register long type = new_state[0] % MAX_TYPES;
- register long rear = new_state[0] / MAX_TYPES;
- char *ostate = (char *)(&state[-1]);
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = MAX_TYPES * (rptr - state) + rand_type;
- switch(type) {
- case TYPE_0:
- case TYPE_1:
- case TYPE_2:
- case TYPE_3:
- case TYPE_4:
- rand_type = type;
- rand_deg = degrees[type];
- rand_sep = seps[type];
- break;
- default:
- (void)fprintf(stderr,
- "random: state info corrupted; not changed.\n");
- }
- state = (long *) (new_state + 1);
- if (rand_type != TYPE_0) {
- rptr = &state[rear];
- fptr = &state[(rear + rand_sep) % rand_deg];
- }
- end_ptr = &state[rand_deg]; /* set end_ptr too */
- return(ostate);
-}
-
-/*
- * random:
- *
- * If we are using the trivial TYPE_0 R.N.G., just do the old linear
- * congruential bit. Otherwise, we do our fancy trinomial stuff, which is
- * the same in all the other cases due to all the global variables that have
- * been set up. The basic operation is to add the number at the rear pointer
- * into the one at the front pointer. Then both pointers are advanced to
- * the next location cyclically in the table. The value returned is the sum
- * generated, reduced to 31 bits by throwing away the "least random" low bit.
- *
- * Note: the code takes advantage of the fact that both the front and
- * rear pointers can't wrap on the same call by not testing the rear
- * pointer if the front one has wrapped.
- *
- * Returns a 31-bit random number.
- */
-long
-random( void )
-{
- register long i;
- register long *f, *r;
-
- if (rand_type == TYPE_0) {
- i = state[0];
- state[0] = i = (good_rand(i)) & 0x7fffffff;
- } else {
- /*
- * Use local variables rather than static variables for speed.
- */
- f = fptr; r = rptr;
- *f += *r;
- i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */
- if (++f >= end_ptr) {
- f = state;
- ++r;
- }
- else if (++r >= end_ptr) {
- r = state;
- }
-
- fptr = f; rptr = r;
- }
- return(i);
-}
diff --git a/contrib/ntp/libntp/ranny.c b/contrib/ntp/libntp/ranny.c
deleted file mode 100644
index fa555f5..0000000
--- a/contrib/ntp/libntp/ranny.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Random number generator is:
- *
- * Copyright 1988 by Rayan S. Zachariassen, all rights reserved.
- * This will be free software, but only when it is finished.
- *
- * Used in ntp by permission of the author. If copyright is
- * annoying to you, read no further. Instead, look up the reference,
- * write me an equivalent to this and send it back to me.
- */
-
-/*
- * Random number generator; see Knuth Vol 2. 2nd ed. p.27 (section 3.2.2)
- */
-#include "ntp_stdlib.h"
-
-extern time_t time P((time_t *loc));
-
-/*
- * 55 random numbers, not all even. Note we don't initialize ran_y
- * directly since I have had thoughts of putting this in an EPROM
- */
-static time_t ran_y[55];
-
-static time_t init_ran_y[55] = {
- 1860909544, 231033423, 437666411, 1349655137, 2014584962,
- 504613712, 656256107, 1246027206, 573713775, 643466871,
- 540235388, 1630565153, 443649364, 729302839, 1933991552,
- 944681982, 949111118, 406212522, 1065063137, 1712954727,
- 73280612, 787623973, 1874130997, 801658492, 73395958,
- 739165367, 596047144, 490055249, 1131094323, 662727104,
- 483614097, 844520219, 893760527, 921280508, 46691708,
- 760861842, 1425894220, 702947816, 2006889048, 1999607995,
- 1346414687, 399640789, 1482689501, 1790064052, 1128943628,
- 1269197405, 587262386, 2078054746, 1675409928, 1652325524,
- 1643525825, 1748690540, 292465849, 1370173174, 402865384
-};
-
-static int ran_j;
-static int ran_k;
-
-
-/*
- * ranp2 - return a random integer in the range 0 .. (1 << m) - 1
- */
-u_long
-ranp2(
- int m
- )
-{
- time_t r;
-
- ran_y[ran_k] += ran_y[ran_j]; /* overflow does a mod */
- r = ran_y[ran_k];
- if (ran_k-- == 0)
- ran_k = 54;
- if (ran_j-- == 0)
- ran_j = 54;
- return (u_long)(r & ((1 << m ) - 1));
-}
-
-/*
- * init_random - do initialization of random number routine
- */
-void
-init_random(void)
-{
- register int i;
- register time_t now;
-
- ran_j = 23;
- ran_k = 54;
-
- /*
- * Randomize the seed array some more. The time of day
- * should be initialized by now.
- */
- now = time((time_t *)0) | 01;
-
- for (i = 0; i < 55; ++i)
- ran_y[i] = now * init_ran_y[i]; /* overflow does a mod */
-}
diff --git a/contrib/ntp/libntp/recvbuff.c b/contrib/ntp/libntp/recvbuff.c
deleted file mode 100644
index 35c7e23..0000000
--- a/contrib/ntp/libntp/recvbuff.c
+++ /dev/null
@@ -1,259 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include "ntp_machine.h"
-#include "ntp_fp.h"
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-#include "ntp_io.h"
-#include "recvbuff.h"
-#include "iosignal.h"
-
-/*
- * Memory allocation
- */
-static u_long volatile full_recvbufs; /* number of recvbufs on fulllist */
-static u_long volatile free_recvbufs; /* number of recvbufs on freelist */
-static u_long volatile total_recvbufs; /* total recvbufs currently in use */
-static u_long volatile lowater_adds; /* number of times we have added memory */
-
-static struct recvbuf *volatile freelist; /* free buffers */
-static struct recvbuf *volatile fulllist; /* lifo buffers with data */
-static struct recvbuf *volatile beginlist; /* fifo buffers with data */
-
-#if defined(HAVE_IO_COMPLETION_PORT)
-static CRITICAL_SECTION RecvCritSection;
-# define RECV_BLOCK_IO() EnterCriticalSection(&RecvCritSection)
-# define RECV_UNBLOCK_IO() LeaveCriticalSection(&RecvCritSection)
-#else
-# define RECV_BLOCK_IO()
-# define RECV_UNBLOCK_IO()
-#endif
-
-u_long
-free_recvbuffs (void)
-{
- return free_recvbufs;
-}
-
-u_long
-full_recvbuffs (void)
-{
- return free_recvbufs;
-}
-
-u_long
-total_recvbuffs (void)
-{
- return free_recvbufs;
-}
-
-u_long
-lowater_additions(void)
-{
- return lowater_adds;
-}
-
-static void
-initialise_buffer(struct recvbuf *buff)
-{
- memset((char *) buff, 0, sizeof(struct recvbuf));
-
-#if defined HAVE_IO_COMPLETION_PORT
- buff->iocompletioninfo.overlapped.hEvent = CreateEvent(NULL, FALSE,FALSE, NULL);
- buff->wsabuff.len = RX_BUFF_SIZE;
- buff->wsabuff.buf = (char *) buff->recv_buffer;
-#endif
-}
-
-static void
-create_buffers(void)
-{
- register struct recvbuf *buf;
- int i;
- buf = (struct recvbuf *)
- emalloc(RECV_INC*sizeof(struct recvbuf));
- for (i = 0; i < RECV_INC; i++)
- {
- initialise_buffer(buf);
- buf->next = (struct recvbuf *) freelist;
- freelist = buf;
- buf++;
- }
-
- free_recvbufs += RECV_INC;
- total_recvbufs += RECV_INC;
- lowater_adds++;
-}
-
-void
-init_recvbuff(int nbufs)
-{
- register struct recvbuf *buf;
- int i;
-
- /*
- * Init buffer free list and stat counters
- */
- freelist = 0;
-
- buf = (struct recvbuf *)
- emalloc(nbufs*sizeof(struct recvbuf));
- for (i = 0; i < nbufs; i++)
- {
- initialise_buffer(buf);
- buf->next = (struct recvbuf *) freelist;
- freelist = buf;
- buf++;
- }
-
- fulllist = 0;
- free_recvbufs = total_recvbufs = nbufs;
- full_recvbufs = lowater_adds = 0;
-
-#if defined(HAVE_IO_COMPLETION_PORT)
- InitializeCriticalSection(&RecvCritSection);
-#endif
-
-}
-
-
-/*
- * getrecvbufs - get receive buffers which have data in them
- *
- *
- */
-
-struct recvbuf *
-getrecvbufs(void)
-{
- struct recvbuf *rb = NULL; /* nothing has arrived */;
-
- RECV_BLOCK_IO();
- if (full_recvbufs == 0)
- {
-#ifdef DEBUG
- if (debug > 4)
- printf("getrecvbufs called, no action here\n");
-#endif
- }
- else {
-
- /*
- * Get the fulllist chain and mark it empty
- */
-#ifdef DEBUG
- if (debug > 4)
- printf("getrecvbufs returning %ld buffers\n", full_recvbufs);
-#endif
- rb = beginlist;
- fulllist = 0;
- full_recvbufs = 0;
-
- /*
- * Check to see if we're below the low water mark.
- */
- if (free_recvbufs <= RECV_LOWAT)
- {
- if (total_recvbufs >= RECV_TOOMANY)
- msyslog(LOG_ERR, "too many recvbufs allocated (%ld)",
- total_recvbufs);
- else
- {
- create_buffers();
- }
- }
- }
- RECV_UNBLOCK_IO();
-
- /*
- * Return the chain
- */
- return rb;
-}
-
-/*
- * freerecvbuf - make a single recvbuf available for reuse
- */
-void
-freerecvbuf(
- struct recvbuf *rb
- )
-{
- RECV_BLOCK_IO();
- BLOCKIO();
- rb->next = (struct recvbuf *) freelist;
- freelist = rb;
- free_recvbufs++;
- UNBLOCKIO();
- RECV_UNBLOCK_IO();
-}
-
-
-void
-add_full_recv_buffer(
- struct recvbuf *rb
- )
-{
- RECV_BLOCK_IO();
- if (full_recvbufs == 0)
- {
- beginlist = rb;
- rb->next = 0;
- }
- else
- {
- rb->next = fulllist->next;
- fulllist->next = rb;
- }
- fulllist = rb;
- full_recvbufs++;
-
- RECV_UNBLOCK_IO();
-}
-
-struct recvbuf *
-get_free_recv_buffer(void)
-{
- struct recvbuf * buffer = NULL;
- RECV_BLOCK_IO();
- if (free_recvbufs <= RECV_LOWAT)
- {
- if (total_recvbufs >= RECV_TOOMANY) {
- msyslog(LOG_ERR, "too many recvbufs allocated (%ld)",
- total_recvbufs);
- }
- else
- {
- create_buffers();
- }
- }
-
- if (free_recvbufs > 0)
- {
- buffer = freelist;
- freelist = buffer->next;
- buffer->next = NULL;
- --free_recvbufs;
- }
-
- RECV_UNBLOCK_IO();
- return buffer;
-}
-
-struct recvbuf *
-get_full_recv_buffer(void)
-{
- struct recvbuf * buffer = NULL;
- RECV_BLOCK_IO();
- if (full_recvbufs > 0) {
- --full_recvbufs;
- buffer = beginlist;
- beginlist = buffer->next;
- buffer->next = NULL;
- }
- RECV_UNBLOCK_IO();
- return buffer;
-}
diff --git a/contrib/ntp/libntp/refnumtoa.c b/contrib/ntp/libntp/refnumtoa.c
deleted file mode 100644
index 7c5d96e..0000000
--- a/contrib/ntp/libntp/refnumtoa.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * refnumtoa - return asciized refclock addresses stored in local array space
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-refnumtoa(
- struct sockaddr_storage* num
- )
-{
- register u_int32 netnum;
- register char *buf;
- register const char *rclock;
-
- LIB_GETBUF(buf);
-
- 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);
-
- }
- 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
deleted file mode 100644
index 7588b84..0000000
--- a/contrib/ntp/libntp/snprintf.c
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <config.h>
-
-#if !HAVE_SNPRINTF
-#include <sys/types.h>
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <stdio.h>
-
-#include "l_stdlib.h"
-
-#ifdef __STDC__
-int snprintf(char *str, size_t n, const char *fmt, ...)
-#else
-int snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int rval;
-#ifdef VSPRINTF_CHARSTAR
- char *rp;
-#endif
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-#ifdef VSPRINTF_CHARSTAR
- rp = vsprintf(str, fmt, ap);
- va_end(ap);
- return (strlen(rp));
-#else
- rval = vsprintf(str, fmt, ap);
- va_end(ap);
- return (rval);
-#endif
-}
-
-int
-vsnprintf(
- char *str,
- size_t n,
- const char *fmt,
- va_list ap
- )
-{
-#ifdef VSPRINTF_CHARSTAR
- return (strlen(vsprintf(str, fmt, ap)));
-#else
- return (vsprintf(str, fmt, ap));
-#endif
-}
-#else
-int snprintf_bs;
-#endif
diff --git a/contrib/ntp/libntp/socktoa.c b/contrib/ntp/libntp/socktoa.c
deleted file mode 100644
index 34de784..0000000
--- a/contrib/ntp/libntp/socktoa.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 7a3b30f..0000000
--- a/contrib/ntp/libntp/socktohost.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
deleted file mode 100644
index 3acc5c9..0000000
--- a/contrib/ntp/libntp/statestr.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * pretty printing of status information
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include "ntp_stdlib.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "lib_strbuf.h"
-#include "ntp_refclock.h"
-#include "ntp_control.h"
-#include "ntp_string.h"
-
-/*
- * Structure for turning various constants into a readable string.
- */
-struct codestring {
- int code;
- const char *string;
-};
-
-/*
- * Leap values
- */
-static
-struct codestring leap_codes[] = {
- { LEAP_NOWARNING, "leap_none" },
- { LEAP_ADDSECOND, "leap_add_sec" },
- { LEAP_DELSECOND, "leap_del_sec" },
- { LEAP_NOTINSYNC, "sync_alarm" },
- { -1, "leap" }
-};
-
-/*
- * Clock source
- */
-static
-struct codestring sync_codes[] = {
- { CTL_SST_TS_UNSPEC, "sync_unspec" },
- { CTL_SST_TS_ATOM, "sync_atomic" },
- { CTL_SST_TS_LF, "sync_lf_clock" },
- { CTL_SST_TS_HF, "sync_hf_clock" },
- { CTL_SST_TS_UHF, "sync_uhf_clock" },
- { CTL_SST_TS_LOCAL, "sync_local_proto" },
- { CTL_SST_TS_NTP, "sync_ntp" },
- { CTL_SST_TS_UDPTIME, "sync_udp/time" },
- { CTL_SST_TS_WRSTWTCH, "sync_wristwatch" },
- { CTL_SST_TS_TELEPHONE, "sync_telephone" },
- { -1, "sync" }
-};
-
-
-/*
- * Peer selection
- */
-static
-struct codestring select_codes[] = {
- { CTL_PST_SEL_REJECT, "selreject" },
- { CTL_PST_SEL_SANE, "sel_falsetick" },
- { CTL_PST_SEL_CORRECT, "sel_excess" },
- { CTL_PST_SEL_SELCAND, "sel_outlyer" },
- { CTL_PST_SEL_SYNCCAND, "sel_candidat" },
- { CTL_PST_SEL_DISTSYSPEER, "sel_selected" },
- { CTL_PST_SEL_SYSPEER, "sel_sys.peer" },
- { CTL_PST_SEL_PPS, "sel_pps.peer" },
- { -1, "sel" }
-};
-
-
-/*
- * Clock status
- */
-static
-struct codestring clock_codes[] = {
- { CTL_CLK_OKAY, "clk_okay" },
- { CTL_CLK_NOREPLY, "clk_noreply" },
- { CTL_CLK_BADFORMAT, "clk_badformat" },
- { CTL_CLK_FAULT, "clk_fault" },
- { CTL_CLK_PROPAGATION, "clk_badsignal" },
- { CTL_CLK_BADDATE, "clk_baddate" },
- { CTL_CLK_BADTIME, "clk_badtime" },
- { -1, "clk" }
-};
-
-
-/*
- * System Events
- */
-static
-struct codestring sys_codes[] = {
- { EVNT_UNSPEC, "event_unspec" },
- { EVNT_SYSRESTART, "event_restart" },
- { EVNT_SYSFAULT, "event_fault" },
- { EVNT_SYNCCHG, "event_sync_chg" },
- { EVNT_PEERSTCHG, "event_peer/strat_chg" },
- { EVNT_CLOCKRESET, "event_clock_reset" },
- { EVNT_BADDATETIM, "event_bad_date" },
- { EVNT_CLOCKEXCPT, "event_clock_excptn" },
- { -1, "event" }
-};
-
-/*
- * Peer events
- */
-static
-struct codestring peer_codes[] = {
- { EVNT_UNSPEC, "event_unspec" },
- { EVNT_PEERIPERR & ~PEER_EVENT, "event_ip_err" },
- { EVNT_PEERAUTH & ~PEER_EVENT, "event_authen" },
- { EVNT_UNREACH & ~PEER_EVENT, "event_unreach" },
- { EVNT_REACH & ~PEER_EVENT, "event_reach" },
- { EVNT_PEERCLOCK & ~PEER_EVENT, "event_peer_clock" },
-#if 0
- { EVNT_PEERSTRAT & ~PEER_EVENT, "event_stratum_chg" },
-#endif
- { -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));
-
-/*
- * getcode - return string corresponding to code
- */
-static const char *
-getcode(
- int code,
- struct codestring *codetab
- )
-{
- static char buf[30];
-
- while (codetab->code != -1) {
- if (codetab->code == code)
- return codetab->string;
- codetab++;
- }
- (void) sprintf(buf, "%s_%d", codetab->string, code);
- return buf;
-}
-
-/*
- * getevents - return a descriptive string for the event count
- */
-static const char *
-getevents(
- int cnt
- )
-{
- static char buf[20];
-
- if (cnt == 0)
- return "no events";
- (void) sprintf(buf, "%d event%s", cnt, (cnt==1) ? "" : "s");
- return buf;
-}
-
-/*
- * statustoa - return a descriptive string for a peer status
- */
-char *
-statustoa(
- int type,
- int st
- )
-{
- char *cb;
- u_char pst;
-
- LIB_GETBUF(cb);
-
- switch (type) {
- case TYPE_SYS:
- (void)strcpy(cb, getcode(CTL_SYS_LI(st), leap_codes));
- (void)strcat(cb, ", ");
- (void)strcat(cb, getcode(CTL_SYS_SOURCE(st) & ~CTL_SST_TS_PPS, sync_codes));
- if (CTL_SYS_SOURCE(st) & CTL_SST_TS_PPS)
- (void)strcat(cb, "/PPS");
- (void)strcat(cb, ", ");
- (void)strcat(cb, getevents(CTL_SYS_NEVNT(st)));
- (void)strcat(cb, ", ");
- (void)strcat(cb, getcode(CTL_SYS_EVENT(st), sys_codes));
- break;
-
- case TYPE_PEER:
- /*
- * Handcraft the bits
- */
- pst = (u_char) CTL_PEER_STATVAL(st);
- if (!(pst & CTL_PST_REACH)) {
- (void)strcpy(cb, "unreach");
- } else {
- (void)strcpy(cb, "reach");
-
- }
- if (pst & CTL_PST_CONFIG)
- (void)strcat(cb, ", conf");
- if (pst & CTL_PST_AUTHENABLE) {
- if (!(pst & CTL_PST_REACH) || (pst & CTL_PST_AUTHENTIC))
- (void)strcat(cb, ", auth");
- else
- (void)strcat(cb, ", unauth");
- }
-
- /*
- * Now the codes
- */
- if ((pst & 0x7) != CTL_PST_SEL_REJECT) {
- (void)strcat(cb, ", ");
- (void)strcat(cb, getcode(pst & 0x7, select_codes));
- }
- (void)strcat(cb, ", ");
- (void)strcat(cb, getevents(CTL_PEER_NEVNT(st)));
- if (CTL_PEER_EVENT(st) != EVNT_UNSPEC) {
- (void)strcat(cb, ", ");
- (void)strcat(cb, getcode(CTL_PEER_EVENT(st),
- peer_codes));
- }
- break;
-
- case TYPE_CLOCK:
- (void)strcpy(cb, getcode(((st)>>8) & 0xff, clock_codes));
- (void)strcat(cb, ", last_");
- (void)strcat(cb, getcode((st) & 0xff, clock_codes));
- break;
- }
- return cb;
-}
-
-const char *
-eventstr(
- int num
- )
-{
- 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 *
-ceventstr(
- int num
- )
-{
- return getcode(num, clock_codes);
-}
-
-const char *
-sysstatstr(
- int status
- )
-{
- return statustoa(TYPE_SYS, status);
-}
-
-const char *
-peerstatstr(
- int status
- )
-{
- return statustoa(TYPE_PEER, status);
-}
-
-const char *
-clockstatstr(
- int status
- )
-{
- return statustoa(TYPE_CLOCK, status);
-}
diff --git a/contrib/ntp/libntp/strdup.c b/contrib/ntp/libntp/strdup.c
deleted file mode 100644
index 2e26ba7..0000000
--- a/contrib/ntp/libntp/strdup.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "ntp_malloc.h"
-
-#if !HAVE_STRDUP
-
-#define NULL 0
-
-char *strdup(const char *s);
-
-char *
-strdup(
- const char *s
- )
-{
- char *cp;
-
- if (s) {
- cp = (char *) malloc((unsigned) (strlen(s)+1));
- if (cp) {
- (void) strcpy(cp, s);
- }
- } else {
- cp = (char *) NULL;
- }
- return(cp);
-}
-#else
-int strdup_bs;
-#endif
diff --git a/contrib/ntp/libntp/strerror.c b/contrib/ntp/libntp/strerror.c
deleted file mode 100644
index 9d8ae8e..0000000
--- a/contrib/ntp/libntp/strerror.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <config.h>
-
-#if !HAVE_STRERROR
-/*
- * Copyright (c) 1988 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char sccsid[] = "@(#)strerror.c 5.1 (Berkeley) 4/9/89";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "l_stdlib.h"
-
-char *
-strerror(
- int errnum
- )
-{
- extern int sys_nerr;
- extern char *sys_errlist[];
- static char ebuf[20];
-
- if ((unsigned int)errnum < sys_nerr)
- return(sys_errlist[errnum]);
- (void)sprintf(ebuf, "Unknown error: %d", errnum);
- return(ebuf);
-}
-#else
-int strerror_bs;
-#endif
diff --git a/contrib/ntp/libntp/strstr.c b/contrib/ntp/libntp/strstr.c
deleted file mode 100644
index a4deb87..0000000
--- a/contrib/ntp/libntp/strstr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#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/syssignal.c b/contrib/ntp/libntp/syssignal.c
deleted file mode 100644
index 6ec4c4c..0000000
--- a/contrib/ntp/libntp/syssignal.c
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-
-#ifdef HAVE_SIGACTION
-
-void
-signal_no_reset(
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
- int sig,
- void (*func) (int)
-#else
- sig, func
-#endif
- )
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
-#else
- int sig;
- void (*func) P((int));
-#endif
-{
- int n;
- struct sigaction vec;
-
- vec.sa_handler = func;
- sigemptyset(&vec.sa_mask);
-#if 0
-#ifdef SA_RESTART
- vec.sa_flags = SA_RESTART;
-#else
- vec.sa_flags = 0;
-#endif
-#else
- vec.sa_flags = 0;
-#endif
-
-#ifdef SA_RESTART
-/* Added for PPS clocks on Solaris 7 which get EINTR errors */
-# ifdef SIGPOLL
- if (sig == SIGPOLL) vec.sa_flags = SA_RESTART;
-# endif
-# ifdef SIGIO
- if (sig == SIGIO) vec.sa_flags = SA_RESTART;
-# endif
-#endif
-
- while (1)
- {
- struct sigaction ovec;
-
- n = sigaction(sig, &vec, &ovec);
- if (n == -1 && errno == EINTR) continue;
- if (ovec.sa_flags
-#ifdef SA_RESTART
- && ovec.sa_flags != SA_RESTART
-#endif
- )
- msyslog(LOG_DEBUG, "signal_no_reset: signal %d had flags %x",
- sig, ovec.sa_flags);
- break;
- }
- if (n == -1) {
- perror("sigaction");
- exit(1);
- }
-}
-
-#elif HAVE_SIGVEC
-
-void
-signal_no_reset(
- int sig,
- RETSIGTYPE (*func) (int)
- )
-{
- struct sigvec sv;
- int n;
-
- bzero((char *) &sv, sizeof(sv));
- sv.sv_handler = func;
- n = sigvec(sig, &sv, (struct sigvec *)NULL);
- if (n == -1) {
- perror("sigvec");
- exit(1);
- }
-}
-
-#elif HAVE_SIGSET
-
-void
-signal_no_reset(
- int sig,
- RETSIGTYPE (*func) (int)
- )
-{
- int n;
-
- n = sigset(sig, func);
- if (n == -1) {
- perror("sigset");
- exit(1);
- }
-}
-
-#else
-
-/* Beware! This implementation resets the signal to SIG_DFL */
-void
-signal_no_reset(
- int sig,
- RETSIGTYPE (*func) (int)
- )
-{
-#ifdef SIG_ERR
- if (SIG_ERR == signal(sig, func)) {
-#else
- int n;
- n = signal(sig, func);
- if (n == -1) {
-#endif
- perror("signal");
- exit(1);
- }
-}
-
-#endif
diff --git a/contrib/ntp/libntp/systime.c b/contrib/ntp/libntp/systime.c
deleted file mode 100644
index ac6aa98..0000000
--- a/contrib/ntp/libntp/systime.c
+++ /dev/null
@@ -1,521 +0,0 @@
-/*
- * systime -- routines to fiddle a UNIX clock.
- *
- * ATTENTION: Get approval from Dave Mills on all changes to this file!
- *
- */
-#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
-#ifdef HAVE_UTMP_H
-# include <utmp.h>
-#endif /* HAVE_UTMP_H */
-#ifdef HAVE_UTMPX_H
-# include <utmpx.h>
-#endif /* HAVE_UTMPX_H */
-
-/*
- * 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_tick = 1e-6; /* tickadj() quantum (s) */
-double sys_residual = 0; /* adjustment residue (s) */
-
-#ifndef SIM
-
-/*
- * get_systime - return system time in NTP timestamp format.
- */
-void
-get_systime(
- l_fp *now /* system time */
- )
-{
- double dtemp;
-
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
- struct timespec ts; /* seconds and nanoseconds */
-
- /*
- * Convert Unix clock from seconds and nanoseconds to seconds.
- */
-# ifdef HAVE_CLOCK_GETTIME
- clock_gettime(CLOCK_REALTIME, &ts);
-# else
- getclock(TIMEOFDAY, &ts);
-# endif
- now->l_i = ts.tv_sec + JAN_1970;
- dtemp = ts.tv_nsec / 1e9;
-
-#else /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
- struct timeval tv; /* seconds and microseconds */
-
- /*
- * 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 */
-
- /*
- * 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;
-}
-
-
-/*
- * adj_systime - adjust system time by the argument.
- */
-#if !defined SYS_WINNT
-int /* 0 okay, 1 error */
-adj_systime(
- double now /* adjustment (s) */
- )
-{
- struct timeval adjtv; /* new adjustment */
- struct timeval oadjtv; /* residual 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;
- }
- if (adjtime(&adjtv, &oadjtv) < 0) {
- msyslog(LOG_ERR, "adj_systime: %m");
- return (0);
- }
- return (1);
-}
-#endif
-
-
-/*
- * step_systime - step the system clock.
- */
-int
-step_systime(
- double now
- )
-{
- struct timeval timetv, adjtv, oldtimetv;
- int isneg = 0;
- double dtemp;
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
- struct timespec ts;
-#endif
-
- dtemp = sys_residual + now;
- if (dtemp < 0) {
- isneg = 1;
- dtemp = - dtemp;
- adjtv.tv_sec = (int32)dtemp;
- 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);
- }
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
-#ifdef HAVE_CLOCK_GETTIME
- (void) clock_gettime(CLOCK_REALTIME, &ts);
-#else
- (void) getclock(TIMEOFDAY, &ts);
-#endif
- timetv.tv_sec = ts.tv_sec;
- timetv.tv_usec = ts.tv_nsec / 1000;
-#else /* not HAVE_GETCLOCK */
- (void) GETTIMEOFDAY(&timetv, (struct timezone *)0);
-#endif /* not HAVE_GETCLOCK */
-
- oldtimetv = timetv;
-
-#ifdef DEBUG
- if (debug)
- printf("step_systime: step %.6f residual %.6f\n", now, sys_residual);
-#endif
- if (isneg) {
- timetv.tv_sec -= adjtv.tv_sec;
- timetv.tv_usec -= adjtv.tv_usec;
- if (timetv.tv_usec < 0) {
- timetv.tv_sec--;
- timetv.tv_usec += 1000000;
- }
- } else {
- timetv.tv_sec += adjtv.tv_sec;
- timetv.tv_usec += adjtv.tv_usec;
- if (timetv.tv_usec >= 1000000) {
- timetv.tv_sec++;
- timetv.tv_usec -= 1000000;
- }
- }
- if (ntp_set_tod(&timetv, NULL) != 0) {
- msyslog(LOG_ERR, "step-systime: %m");
- return (0);
- }
- sys_residual = 0;
-
-#ifdef NEED_HPUX_ADJTIME
- /*
- * CHECKME: is this correct when called by ntpdate?????
- */
- _clear_adjtime();
-#endif
-
- /*
- * FreeBSD, for example, has:
- * struct utmp {
- * char ut_line[UT_LINESIZE];
- * char ut_name[UT_NAMESIZE];
- * char ut_host[UT_HOSTSIZE];
- * long ut_time;
- * };
- * and appends line="|", name="date", host="", time for the OLD
- * and appends line="{", name="date", host="", time for the NEW
- * to _PATH_WTMP .
- *
- * Some OSes have utmp, some have utmpx.
- */
-
- /*
- * Write old and new time entries in utmp and wtmp if step
- * adjustment is greater than one second.
- *
- * This might become even Uglier...
- */
- if (oldtimetv.tv_sec != timetv.tv_sec)
- {
-#ifdef HAVE_UTMP_H
- struct utmp ut;
-#endif
-#ifdef HAVE_UTMPX_H
- struct utmpx utx;
-#endif
-
-#ifdef HAVE_UTMP_H
- memset((char *)&ut, 0, sizeof(ut));
-#endif
-#ifdef HAVE_UTMPX_H
- memset((char *)&utx, 0, sizeof(utx));
-#endif
-
- /* UTMP */
-
-#ifdef UPDATE_UTMP
-# ifdef HAVE_PUTUTLINE
- ut.ut_type = OLD_TIME;
- (void)strcpy(ut.ut_line, OTIME_MSG);
- ut.ut_time = oldtimetv.tv_sec;
- pututline(&ut);
- setutent();
- ut.ut_type = NEW_TIME;
- (void)strcpy(ut.ut_line, NTIME_MSG);
- ut.ut_time = timetv.tv_sec;
- pututline(&ut);
- endutent();
-# else /* not HAVE_PUTUTLINE */
-# endif /* not HAVE_PUTUTLINE */
-#endif /* UPDATE_UTMP */
-
- /* UTMPX */
-
-#ifdef UPDATE_UTMPX
-# ifdef HAVE_PUTUTXLINE
- utx.ut_type = OLD_TIME;
- (void)strcpy(utx.ut_line, OTIME_MSG);
- utx.ut_tv = oldtimetv;
- pututxline(&utx);
- setutxent();
- utx.ut_type = NEW_TIME;
- (void)strcpy(utx.ut_line, NTIME_MSG);
- utx.ut_tv = timetv;
- pututxline(&utx);
- endutxent();
-# else /* not HAVE_PUTUTXLINE */
-# endif /* not HAVE_PUTUTXLINE */
-#endif /* UPDATE_UTMPX */
-
- /* WTMP */
-
-#ifdef UPDATE_WTMP
-# ifdef HAVE_PUTUTLINE
- utmpname(WTMP_FILE);
- ut.ut_type = OLD_TIME;
- (void)strcpy(ut.ut_line, OTIME_MSG);
- ut.ut_time = oldtimetv.tv_sec;
- pututline(&ut);
- ut.ut_type = NEW_TIME;
- (void)strcpy(ut.ut_line, NTIME_MSG);
- ut.ut_time = timetv.tv_sec;
- pututline(&ut);
- endutent();
-# else /* not HAVE_PUTUTLINE */
-# endif /* not HAVE_PUTUTLINE */
-#endif /* UPDATE_WTMP */
-
- /* WTMPX */
-
-#ifdef UPDATE_WTMPX
-# ifdef HAVE_PUTUTXLINE
- utx.ut_type = OLD_TIME;
- utx.ut_tv = oldtimetv;
- (void)strcpy(utx.ut_line, OTIME_MSG);
-# ifdef HAVE_UPDWTMPX
- updwtmpx(WTMPX_FILE, &utx);
-# else /* not HAVE_UPDWTMPX */
-# endif /* not HAVE_UPDWTMPX */
-# else /* not HAVE_PUTUTXLINE */
-# endif /* not HAVE_PUTUTXLINE */
-# ifdef HAVE_PUTUTXLINE
- utx.ut_type = NEW_TIME;
- utx.ut_tv = timetv;
- (void)strcpy(utx.ut_line, NTIME_MSG);
-# ifdef HAVE_UPDWTMPX
- updwtmpx(WTMPX_FILE, &utx);
-# else /* not HAVE_UPDWTMPX */
-# endif /* not HAVE_UPDWTMPX */
-# else /* not HAVE_PUTUTXLINE */
-# endif /* not HAVE_PUTUTXLINE */
-#endif /* UPDATE_WTMPX */
-
- }
- 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
deleted file mode 100644
index 8762122..0000000
--- a/contrib/ntp/libntp/systime_s.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SIM
-#include "systime.c"
diff --git a/contrib/ntp/libntp/tsftomsu.c b/contrib/ntp/libntp/tsftomsu.c
deleted file mode 100644
index 5926aab..0000000
--- a/contrib/ntp/libntp/tsftomsu.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * tsftomsu - convert from a time stamp fraction to milliseconds
- */
-#include "ntp_fp.h"
-#include "ntp_stdlib.h"
-
-int
-tsftomsu(
- u_long tsf,
- int round
- )
-{
- register long val_ui, val_uf;
- register long tmp_ui, tmp_uf;
- register int i;
-
- /*
- * Essentially, multiply by 10 three times in l_fp form.
- * The integral part is the milliseconds.
- */
- val_ui = 0;
- val_uf = tsf;
- for (i = 3; i > 0; i--) {
- M_LSHIFT(val_ui, val_uf);
- tmp_ui = val_ui;
- tmp_uf = val_uf;
- M_LSHIFT(val_ui, val_uf);
- M_LSHIFT(val_ui, val_uf);
- M_ADD(val_ui, val_uf, tmp_ui, tmp_uf);
- }
-
- /*
- * Round the value if need be, then return it.
- */
- if (round && (val_uf & 0x80000000))
- val_ui++;
- return (int)val_ui;
-}
diff --git a/contrib/ntp/libntp/tstotv.c b/contrib/ntp/libntp/tstotv.c
deleted file mode 100644
index be4bdd4..0000000
--- a/contrib/ntp/libntp/tstotv.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * tstotv - tables for converting from NTP time stamps to struct timeval
- */
-
-#include "ntp_types.h"
-
-/*
- * Tables to convert from a time stamp fraction to usecs. Note that
- * the units of these tables are actually (usec<<3). We carry three
- * guard bits so that the result can be properly truncated (or rounded)
- * to be correct to the least significant bit.
- *
- * These tables are rounded.
- */
-
-long tstoushi[256] = {
- 0x000000, 0x007a12, 0x00f424, 0x016e36,
- 0x01e848, 0x02625a, 0x02dc6c, 0x03567e,
- 0x03d090, 0x044aa2, 0x04c4b4, 0x053ec6,
- 0x05b8d8, 0x0632ea, 0x06acfc, 0x07270e,
- 0x07a120, 0x081b32, 0x089544, 0x090f56,
- 0x098968, 0x0a037a, 0x0a7d8c, 0x0af79e,
- 0x0b71b0, 0x0bebc2, 0x0c65d4, 0x0cdfe6,
- 0x0d59f8, 0x0dd40a, 0x0e4e1c, 0x0ec82e,
- 0x0f4240, 0x0fbc52, 0x103664, 0x10b076,
- 0x112a88, 0x11a49a, 0x121eac, 0x1298be,
- 0x1312d0, 0x138ce2, 0x1406f4, 0x148106,
- 0x14fb18, 0x15752a, 0x15ef3c, 0x16694e,
- 0x16e360, 0x175d72, 0x17d784, 0x185196,
- 0x18cba8, 0x1945ba, 0x19bfcc, 0x1a39de,
- 0x1ab3f0, 0x1b2e02, 0x1ba814, 0x1c2226,
- 0x1c9c38, 0x1d164a, 0x1d905c, 0x1e0a6e,
- 0x1e8480, 0x1efe92, 0x1f78a4, 0x1ff2b6,
- 0x206cc8, 0x20e6da, 0x2160ec, 0x21dafe,
- 0x225510, 0x22cf22, 0x234934, 0x23c346,
- 0x243d58, 0x24b76a, 0x25317c, 0x25ab8e,
- 0x2625a0, 0x269fb2, 0x2719c4, 0x2793d6,
- 0x280de8, 0x2887fa, 0x29020c, 0x297c1e,
- 0x29f630, 0x2a7042, 0x2aea54, 0x2b6466,
- 0x2bde78, 0x2c588a, 0x2cd29c, 0x2d4cae,
- 0x2dc6c0, 0x2e40d2, 0x2ebae4, 0x2f34f6,
- 0x2faf08, 0x30291a, 0x30a32c, 0x311d3e,
- 0x319750, 0x321162, 0x328b74, 0x330586,
- 0x337f98, 0x33f9aa, 0x3473bc, 0x34edce,
- 0x3567e0, 0x35e1f2, 0x365c04, 0x36d616,
- 0x375028, 0x37ca3a, 0x38444c, 0x38be5e,
- 0x393870, 0x39b282, 0x3a2c94, 0x3aa6a6,
- 0x3b20b8, 0x3b9aca, 0x3c14dc, 0x3c8eee,
- 0x3d0900, 0x3d8312, 0x3dfd24, 0x3e7736,
- 0x3ef148, 0x3f6b5a, 0x3fe56c, 0x405f7e,
- 0x40d990, 0x4153a2, 0x41cdb4, 0x4247c6,
- 0x42c1d8, 0x433bea, 0x43b5fc, 0x44300e,
- 0x44aa20, 0x452432, 0x459e44, 0x461856,
- 0x469268, 0x470c7a, 0x47868c, 0x48009e,
- 0x487ab0, 0x48f4c2, 0x496ed4, 0x49e8e6,
- 0x4a62f8, 0x4add0a, 0x4b571c, 0x4bd12e,
- 0x4c4b40, 0x4cc552, 0x4d3f64, 0x4db976,
- 0x4e3388, 0x4ead9a, 0x4f27ac, 0x4fa1be,
- 0x501bd0, 0x5095e2, 0x510ff4, 0x518a06,
- 0x520418, 0x527e2a, 0x52f83c, 0x53724e,
- 0x53ec60, 0x546672, 0x54e084, 0x555a96,
- 0x55d4a8, 0x564eba, 0x56c8cc, 0x5742de,
- 0x57bcf0, 0x583702, 0x58b114, 0x592b26,
- 0x59a538, 0x5a1f4a, 0x5a995c, 0x5b136e,
- 0x5b8d80, 0x5c0792, 0x5c81a4, 0x5cfbb6,
- 0x5d75c8, 0x5defda, 0x5e69ec, 0x5ee3fe,
- 0x5f5e10, 0x5fd822, 0x605234, 0x60cc46,
- 0x614658, 0x61c06a, 0x623a7c, 0x62b48e,
- 0x632ea0, 0x63a8b2, 0x6422c4, 0x649cd6,
- 0x6516e8, 0x6590fa, 0x660b0c, 0x66851e,
- 0x66ff30, 0x677942, 0x67f354, 0x686d66,
- 0x68e778, 0x69618a, 0x69db9c, 0x6a55ae,
- 0x6acfc0, 0x6b49d2, 0x6bc3e4, 0x6c3df6,
- 0x6cb808, 0x6d321a, 0x6dac2c, 0x6e263e,
- 0x6ea050, 0x6f1a62, 0x6f9474, 0x700e86,
- 0x708898, 0x7102aa, 0x717cbc, 0x71f6ce,
- 0x7270e0, 0x72eaf2, 0x736504, 0x73df16,
- 0x745928, 0x74d33a, 0x754d4c, 0x75c75e,
- 0x764170, 0x76bb82, 0x773594, 0x77afa6,
- 0x7829b8, 0x78a3ca, 0x791ddc, 0x7997ee
-};
-
-long tstousmid[256] = {
- 0x0000, 0x007a, 0x00f4, 0x016e, 0x01e8, 0x0262, 0x02dc, 0x0356,
- 0x03d1, 0x044b, 0x04c5, 0x053f, 0x05b9, 0x0633, 0x06ad, 0x0727,
- 0x07a1, 0x081b, 0x0895, 0x090f, 0x0989, 0x0a03, 0x0a7e, 0x0af8,
- 0x0b72, 0x0bec, 0x0c66, 0x0ce0, 0x0d5a, 0x0dd4, 0x0e4e, 0x0ec8,
- 0x0f42, 0x0fbc, 0x1036, 0x10b0, 0x112b, 0x11a5, 0x121f, 0x1299,
- 0x1313, 0x138d, 0x1407, 0x1481, 0x14fb, 0x1575, 0x15ef, 0x1669,
- 0x16e3, 0x175d, 0x17d8, 0x1852, 0x18cc, 0x1946, 0x19c0, 0x1a3a,
- 0x1ab4, 0x1b2e, 0x1ba8, 0x1c22, 0x1c9c, 0x1d16, 0x1d90, 0x1e0a,
- 0x1e84, 0x1eff, 0x1f79, 0x1ff3, 0x206d, 0x20e7, 0x2161, 0x21db,
- 0x2255, 0x22cf, 0x2349, 0x23c3, 0x243d, 0x24b7, 0x2531, 0x25ac,
- 0x2626, 0x26a0, 0x271a, 0x2794, 0x280e, 0x2888, 0x2902, 0x297c,
- 0x29f6, 0x2a70, 0x2aea, 0x2b64, 0x2bde, 0x2c59, 0x2cd3, 0x2d4d,
- 0x2dc7, 0x2e41, 0x2ebb, 0x2f35, 0x2faf, 0x3029, 0x30a3, 0x311d,
- 0x3197, 0x3211, 0x328b, 0x3306, 0x3380, 0x33fa, 0x3474, 0x34ee,
- 0x3568, 0x35e2, 0x365c, 0x36d6, 0x3750, 0x37ca, 0x3844, 0x38be,
- 0x3938, 0x39b3, 0x3a2d, 0x3aa7, 0x3b21, 0x3b9b, 0x3c15, 0x3c8f,
- 0x3d09, 0x3d83, 0x3dfd, 0x3e77, 0x3ef1, 0x3f6b, 0x3fe5, 0x405f,
- 0x40da, 0x4154, 0x41ce, 0x4248, 0x42c2, 0x433c, 0x43b6, 0x4430,
- 0x44aa, 0x4524, 0x459e, 0x4618, 0x4692, 0x470c, 0x4787, 0x4801,
- 0x487b, 0x48f5, 0x496f, 0x49e9, 0x4a63, 0x4add, 0x4b57, 0x4bd1,
- 0x4c4b, 0x4cc5, 0x4d3f, 0x4db9, 0x4e34, 0x4eae, 0x4f28, 0x4fa2,
- 0x501c, 0x5096, 0x5110, 0x518a, 0x5204, 0x527e, 0x52f8, 0x5372,
- 0x53ec, 0x5466, 0x54e1, 0x555b, 0x55d5, 0x564f, 0x56c9, 0x5743,
- 0x57bd, 0x5837, 0x58b1, 0x592b, 0x59a5, 0x5a1f, 0x5a99, 0x5b13,
- 0x5b8d, 0x5c08, 0x5c82, 0x5cfc, 0x5d76, 0x5df0, 0x5e6a, 0x5ee4,
- 0x5f5e, 0x5fd8, 0x6052, 0x60cc, 0x6146, 0x61c0, 0x623a, 0x62b5,
- 0x632f, 0x63a9, 0x6423, 0x649d, 0x6517, 0x6591, 0x660b, 0x6685,
- 0x66ff, 0x6779, 0x67f3, 0x686d, 0x68e7, 0x6962, 0x69dc, 0x6a56,
- 0x6ad0, 0x6b4a, 0x6bc4, 0x6c3e, 0x6cb8, 0x6d32, 0x6dac, 0x6e26,
- 0x6ea0, 0x6f1a, 0x6f94, 0x700f, 0x7089, 0x7103, 0x717d, 0x71f7,
- 0x7271, 0x72eb, 0x7365, 0x73df, 0x7459, 0x74d3, 0x754d, 0x75c7,
- 0x7641, 0x76bc, 0x7736, 0x77b0, 0x782a, 0x78a4, 0x791e, 0x7998
-};
-
-long tstouslo[128] = {
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
- 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
- 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e,
- 0x1f, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
- 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
- 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x33, 0x34,
- 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
- 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44,
- 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b,
- 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
- 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b,
- 0x5c, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62,
- 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a,
- 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x71,
- 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79
-};
diff --git a/contrib/ntp/libntp/tvtoa.c b/contrib/ntp/libntp/tvtoa.c
deleted file mode 100644
index 19d4a94..0000000
--- a/contrib/ntp/libntp/tvtoa.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * tvtoa - return an asciized representation of a struct timeval
- */
-
-#include "lib_strbuf.h"
-
-#if defined(VMS)
-# include "ntp_fp.h"
-#endif /* VMS */
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-
-#include <stdio.h>
-
-char *
-tvtoa(
- const struct timeval *tv
- )
-{
- register char *buf;
- register u_long sec;
- register u_long usec;
- register int isneg;
-
- if (tv->tv_sec < 0 || tv->tv_usec < 0) {
- sec = -tv->tv_sec;
- usec = -tv->tv_usec;
- isneg = 1;
- } else {
- sec = tv->tv_sec;
- usec = tv->tv_usec;
- isneg = 0;
- }
-
- LIB_GETBUF(buf);
-
- (void) sprintf(buf, "%s%lu.%06lu", (isneg?"-":""), sec, usec);
- return buf;
-}
diff --git a/contrib/ntp/libntp/tvtots.c b/contrib/ntp/libntp/tvtots.c
deleted file mode 100644
index 0bd2b69..0000000
--- a/contrib/ntp/libntp/tvtots.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * tvtots - tables for converting from Unix struct timeval's to
- * NTP time stamp format.
- */
-#include <sys/types.h>
-
-#include "ntp_types.h"
-
-/*
- * Tables to calculate time stamp fractions from usecs. The entries
- * in these tables are offset into using each of the two low order
- * bytes plus the next 4 bits in a usec value (from a struct timeval).
- * These are summed to produce the time stamp fraction.
- *
- * Note that these tables are rounded (not truncated) to the nearest
- * low order bit in the fraction. The timestamp computed should be
- * +- 1.5 low order bits.
- */
-
-u_long ustotslo[256] = {
- 0x00000000, 0x000010c7, 0x0000218e, 0x00003255,
- 0x0000431c, 0x000053e3, 0x000064aa, 0x00007571,
- 0x00008638, 0x000096ff, 0x0000a7c6, 0x0000b88d,
- 0x0000c954, 0x0000da1b, 0x0000eae2, 0x0000fba9,
- 0x00010c6f, 0x00011d36, 0x00012dfd, 0x00013ec4,
- 0x00014f8b, 0x00016052, 0x00017119, 0x000181e0,
- 0x000192a7, 0x0001a36e, 0x0001b435, 0x0001c4fc,
- 0x0001d5c3, 0x0001e68a, 0x0001f751, 0x00020818,
- 0x000218df, 0x000229a6, 0x00023a6d, 0x00024b34,
- 0x00025bfb, 0x00026cc2, 0x00027d89, 0x00028e50,
- 0x00029f17, 0x0002afde, 0x0002c0a5, 0x0002d16c,
- 0x0002e233, 0x0002f2fa, 0x000303c0, 0x00031487,
- 0x0003254e, 0x00033615, 0x000346dc, 0x000357a3,
- 0x0003686a, 0x00037931, 0x000389f8, 0x00039abf,
- 0x0003ab86, 0x0003bc4d, 0x0003cd14, 0x0003dddb,
- 0x0003eea2, 0x0003ff69, 0x00041030, 0x000420f7,
- 0x000431be, 0x00044285, 0x0004534c, 0x00046413,
- 0x000474da, 0x000485a1, 0x00049668, 0x0004a72f,
- 0x0004b7f6, 0x0004c8bd, 0x0004d984, 0x0004ea4b,
- 0x0004fb12, 0x00050bd8, 0x00051c9f, 0x00052d66,
- 0x00053e2d, 0x00054ef4, 0x00055fbb, 0x00057082,
- 0x00058149, 0x00059210, 0x0005a2d7, 0x0005b39e,
- 0x0005c465, 0x0005d52c, 0x0005e5f3, 0x0005f6ba,
- 0x00060781, 0x00061848, 0x0006290f, 0x000639d6,
- 0x00064a9d, 0x00065b64, 0x00066c2b, 0x00067cf2,
- 0x00068db9, 0x00069e80, 0x0006af47, 0x0006c00e,
- 0x0006d0d5, 0x0006e19c, 0x0006f263, 0x00070329,
- 0x000713f0, 0x000724b7, 0x0007357e, 0x00074645,
- 0x0007570c, 0x000767d3, 0x0007789a, 0x00078961,
- 0x00079a28, 0x0007aaef, 0x0007bbb6, 0x0007cc7d,
- 0x0007dd44, 0x0007ee0b, 0x0007fed2, 0x00080f99,
- 0x00082060, 0x00083127, 0x000841ee, 0x000852b5,
- 0x0008637c, 0x00087443, 0x0008850a, 0x000895d1,
- 0x0008a698, 0x0008b75f, 0x0008c826, 0x0008d8ed,
- 0x0008e9b4, 0x0008fa7b, 0x00090b41, 0x00091c08,
- 0x00092ccf, 0x00093d96, 0x00094e5d, 0x00095f24,
- 0x00096feb, 0x000980b2, 0x00099179, 0x0009a240,
- 0x0009b307, 0x0009c3ce, 0x0009d495, 0x0009e55c,
- 0x0009f623, 0x000a06ea, 0x000a17b1, 0x000a2878,
- 0x000a393f, 0x000a4a06, 0x000a5acd, 0x000a6b94,
- 0x000a7c5b, 0x000a8d22, 0x000a9de9, 0x000aaeb0,
- 0x000abf77, 0x000ad03e, 0x000ae105, 0x000af1cc,
- 0x000b0292, 0x000b1359, 0x000b2420, 0x000b34e7,
- 0x000b45ae, 0x000b5675, 0x000b673c, 0x000b7803,
- 0x000b88ca, 0x000b9991, 0x000baa58, 0x000bbb1f,
- 0x000bcbe6, 0x000bdcad, 0x000bed74, 0x000bfe3b,
- 0x000c0f02, 0x000c1fc9, 0x000c3090, 0x000c4157,
- 0x000c521e, 0x000c62e5, 0x000c73ac, 0x000c8473,
- 0x000c953a, 0x000ca601, 0x000cb6c8, 0x000cc78f,
- 0x000cd856, 0x000ce91d, 0x000cf9e4, 0x000d0aaa,
- 0x000d1b71, 0x000d2c38, 0x000d3cff, 0x000d4dc6,
- 0x000d5e8d, 0x000d6f54, 0x000d801b, 0x000d90e2,
- 0x000da1a9, 0x000db270, 0x000dc337, 0x000dd3fe,
- 0x000de4c5, 0x000df58c, 0x000e0653, 0x000e171a,
- 0x000e27e1, 0x000e38a8, 0x000e496f, 0x000e5a36,
- 0x000e6afd, 0x000e7bc4, 0x000e8c8b, 0x000e9d52,
- 0x000eae19, 0x000ebee0, 0x000ecfa7, 0x000ee06e,
- 0x000ef135, 0x000f01fb, 0x000f12c2, 0x000f2389,
- 0x000f3450, 0x000f4517, 0x000f55de, 0x000f66a5,
- 0x000f776c, 0x000f8833, 0x000f98fa, 0x000fa9c1,
- 0x000fba88, 0x000fcb4f, 0x000fdc16, 0x000fecdd,
- 0x000ffda4, 0x00100e6b, 0x00101f32, 0x00102ff9,
- 0x001040c0, 0x00105187, 0x0010624e, 0x00107315,
- 0x001083dc, 0x001094a3, 0x0010a56a, 0x0010b631,
-};
-
-u_long ustotsmid[256] = {
- 0x00000000, 0x0010c6f8, 0x00218def, 0x003254e7,
- 0x00431bde, 0x0053e2d6, 0x0064a9ce, 0x007570c5,
- 0x008637bd, 0x0096feb4, 0x00a7c5ac, 0x00b88ca4,
- 0x00c9539b, 0x00da1a93, 0x00eae18a, 0x00fba882,
- 0x010c6f7a, 0x011d3671, 0x012dfd69, 0x013ec460,
- 0x014f8b58, 0x01605250, 0x01711947, 0x0181e03f,
- 0x0192a736, 0x01a36e2e, 0x01b43526, 0x01c4fc1d,
- 0x01d5c315, 0x01e68a0c, 0x01f75104, 0x020817fc,
- 0x0218def3, 0x0229a5eb, 0x023a6ce3, 0x024b33da,
- 0x025bfad2, 0x026cc1c9, 0x027d88c1, 0x028e4fb9,
- 0x029f16b0, 0x02afdda8, 0x02c0a49f, 0x02d16b97,
- 0x02e2328f, 0x02f2f986, 0x0303c07e, 0x03148775,
- 0x03254e6d, 0x03361565, 0x0346dc5c, 0x0357a354,
- 0x03686a4b, 0x03793143, 0x0389f83b, 0x039abf32,
- 0x03ab862a, 0x03bc4d21, 0x03cd1419, 0x03dddb11,
- 0x03eea208, 0x03ff6900, 0x04102ff7, 0x0420f6ef,
- 0x0431bde7, 0x044284de, 0x04534bd6, 0x046412cd,
- 0x0474d9c5, 0x0485a0bd, 0x049667b4, 0x04a72eac,
- 0x04b7f5a3, 0x04c8bc9b, 0x04d98393, 0x04ea4a8a,
- 0x04fb1182, 0x050bd879, 0x051c9f71, 0x052d6669,
- 0x053e2d60, 0x054ef458, 0x055fbb4f, 0x05708247,
- 0x0581493f, 0x05921036, 0x05a2d72e, 0x05b39e25,
- 0x05c4651d, 0x05d52c15, 0x05e5f30c, 0x05f6ba04,
- 0x060780fb, 0x061847f3, 0x06290eeb, 0x0639d5e2,
- 0x064a9cda, 0x065b63d2, 0x066c2ac9, 0x067cf1c1,
- 0x068db8b8, 0x069e7fb0, 0x06af46a8, 0x06c00d9f,
- 0x06d0d497, 0x06e19b8e, 0x06f26286, 0x0703297e,
- 0x0713f075, 0x0724b76d, 0x07357e64, 0x0746455c,
- 0x07570c54, 0x0767d34b, 0x07789a43, 0x0789613a,
- 0x079a2832, 0x07aaef2a, 0x07bbb621, 0x07cc7d19,
- 0x07dd4410, 0x07ee0b08, 0x07fed200, 0x080f98f7,
- 0x08205fef, 0x083126e6, 0x0841edde, 0x0852b4d6,
- 0x08637bcd, 0x087442c5, 0x088509bc, 0x0895d0b4,
- 0x08a697ac, 0x08b75ea3, 0x08c8259b, 0x08d8ec92,
- 0x08e9b38a, 0x08fa7a82, 0x090b4179, 0x091c0871,
- 0x092ccf68, 0x093d9660, 0x094e5d58, 0x095f244f,
- 0x096feb47, 0x0980b23e, 0x09917936, 0x09a2402e,
- 0x09b30725, 0x09c3ce1d, 0x09d49514, 0x09e55c0c,
- 0x09f62304, 0x0a06e9fb, 0x0a17b0f3, 0x0a2877ea,
- 0x0a393ee2, 0x0a4a05da, 0x0a5accd1, 0x0a6b93c9,
- 0x0a7c5ac1, 0x0a8d21b8, 0x0a9de8b0, 0x0aaeafa7,
- 0x0abf769f, 0x0ad03d97, 0x0ae1048e, 0x0af1cb86,
- 0x0b02927d, 0x0b135975, 0x0b24206d, 0x0b34e764,
- 0x0b45ae5c, 0x0b567553, 0x0b673c4b, 0x0b780343,
- 0x0b88ca3a, 0x0b999132, 0x0baa5829, 0x0bbb1f21,
- 0x0bcbe619, 0x0bdcad10, 0x0bed7408, 0x0bfe3aff,
- 0x0c0f01f7, 0x0c1fc8ef, 0x0c308fe6, 0x0c4156de,
- 0x0c521dd5, 0x0c62e4cd, 0x0c73abc5, 0x0c8472bc,
- 0x0c9539b4, 0x0ca600ab, 0x0cb6c7a3, 0x0cc78e9b,
- 0x0cd85592, 0x0ce91c8a, 0x0cf9e381, 0x0d0aaa79,
- 0x0d1b7171, 0x0d2c3868, 0x0d3cff60, 0x0d4dc657,
- 0x0d5e8d4f, 0x0d6f5447, 0x0d801b3e, 0x0d90e236,
- 0x0da1a92d, 0x0db27025, 0x0dc3371d, 0x0dd3fe14,
- 0x0de4c50c, 0x0df58c03, 0x0e0652fb, 0x0e1719f3,
- 0x0e27e0ea, 0x0e38a7e2, 0x0e496ed9, 0x0e5a35d1,
- 0x0e6afcc9, 0x0e7bc3c0, 0x0e8c8ab8, 0x0e9d51b0,
- 0x0eae18a7, 0x0ebedf9f, 0x0ecfa696, 0x0ee06d8e,
- 0x0ef13486, 0x0f01fb7d, 0x0f12c275, 0x0f23896c,
- 0x0f345064, 0x0f45175c, 0x0f55de53, 0x0f66a54b,
- 0x0f776c42, 0x0f88333a, 0x0f98fa32, 0x0fa9c129,
- 0x0fba8821, 0x0fcb4f18, 0x0fdc1610, 0x0fecdd08,
- 0x0ffda3ff, 0x100e6af7, 0x101f31ee, 0x102ff8e6,
- 0x1040bfde, 0x105186d5, 0x10624dcd, 0x107314c4,
- 0x1083dbbc, 0x1094a2b4, 0x10a569ab, 0x10b630a3,
-};
-
-u_long ustotshi[16] = {
- 0x00000000, 0x10c6f79a, 0x218def35, 0x3254e6cf,
- 0x431bde6a, 0x53e2d604, 0x64a9cd9f, 0x7570c539,
- 0x8637bcd3, 0x96feb46e, 0xa7c5ac08, 0xb88ca3a3,
- 0xc9539b3d, 0xda1a92d7, 0xeae18a72, 0xfba8820c,
-};
diff --git a/contrib/ntp/libntp/uglydate.c b/contrib/ntp/libntp/uglydate.c
deleted file mode 100644
index 676a5fd..0000000
--- a/contrib/ntp/libntp/uglydate.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * uglydate - convert a time stamp to something barely readable
- * The string returned is 37 characters long.
- */
-#include <stdio.h>
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-
-char *
-uglydate(
- l_fp *ts
- )
-{
- char *bp;
- char *timep;
- struct tm *tm;
- time_t sec;
- long msec;
- int year;
-
- timep = ulfptoa(ts, 6); /* returns max 17 characters */
- LIB_GETBUF(bp);
- sec = ts->l_ui - JAN_1970;
- msec = ts->l_uf / 4294967; /* fract / (2**32/1000) */
- tm = gmtime(&sec);
- if (ts->l_ui == 0) {
- /*
- * Probably not a real good thing to do. Oh, well.
- */
- year = 0;
- tm->tm_yday = 0;
- tm->tm_hour = 0;
- tm->tm_min = 0;
- tm->tm_sec = 0;
- } else {
- year = tm->tm_year;
- while (year >= 100)
- year -= 100;
- }
- (void) sprintf(bp, "%17s %02d:%03d:%02d:%02d:%02d.%03ld",
- timep, year, tm->tm_yday, tm->tm_hour, tm->tm_min,
- tm->tm_sec, msec);
- return bp;
-}
diff --git a/contrib/ntp/libntp/uinttoa.c b/contrib/ntp/libntp/uinttoa.c
deleted file mode 100644
index be48ea5..0000000
--- a/contrib/ntp/libntp/uinttoa.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * uinttoa - return an asciized unsigned integer
- */
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-uinttoa(
- u_long uval
- )
-{
- register char *buf;
-
- LIB_GETBUF(buf);
-
- (void) sprintf(buf, "%lu", (u_long)uval);
- return buf;
-}
diff --git a/contrib/ntp/libntp/utvtoa.c b/contrib/ntp/libntp/utvtoa.c
deleted file mode 100644
index a441c49..0000000
--- a/contrib/ntp/libntp/utvtoa.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * utvtoa - return an asciized representation of an unsigned struct timeval
- */
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-
-#if defined(VMS)
-# include "ntp_fp.h"
-#endif
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-
-char *
-utvtoa(
- const struct timeval *tv
- )
-{
- register char *buf;
-
- LIB_GETBUF(buf);
-
- (void) sprintf(buf, "%lu.%06lu", (u_long)tv->tv_sec,
- (u_long)tv->tv_usec);
- return buf;
-}
diff --git a/contrib/ntp/libntp/ymd2yd.c b/contrib/ntp/libntp/ymd2yd.c
deleted file mode 100644
index 796ce40..0000000
--- a/contrib/ntp/libntp/ymd2yd.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ymd2yd - compute the date in the year from y/m/d
- */
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-/*
- * Tables to compute the day of year from yyyymmdd timecode.
- * Viva la leap.
- */
-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};
-
-int
-ymd2yd(
- int y,
- int m,
- int d
- )
-{
- int i, *t;
-
- if (m < 1 || m > 12 || d < 1)
- return (-1);
-
- if (((y%4 == 0) && (y%100 != 0)) || (y%400 == 0))
- t = day2tab; /* leap year */
- else
- t = day1tab; /* not a leap year */
- if (d > t[m - 1])
- return (-1);
- for (i = 0; i < m - 1; i++)
- d += t[i];
- return d;
-}
diff --git a/contrib/ntp/libparse/Makefile.am b/contrib/ntp/libparse/Makefile.am
deleted file mode 100644
index c972004..0000000
--- a/contrib/ntp/libparse/Makefile.am
+++ /dev/null
@@ -1,147 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
-EXTRA_LIBRARIES = libparse.a libparse_kernel.a
-EXTRA_PROGRAMS = parsestreams parsesolaris
-noinst_PROGRAMS = @MAKE_PARSEKMODULE@
-CLEANFILES = libparse.a libparse_kernel.a
-
-K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
-
-libparse_a_SOURCES = parse.c \
- parse_conf.c \
- clk_meinberg.c \
- clk_schmid.c \
- clk_rawdcf.c \
- clk_trimtsip.c \
- clk_dcf7000.c \
- clk_trimtaip.c \
- clk_rcc8000.c \
- clk_hopf6021.c \
- clk_computime.c \
- clk_wharton.c \
- clk_varitext.c \
- data_mbg.c \
- info_trimble.c \
- trim_info.c
-
-libparse_kernel_a_SOURCES =
-libparse_kernel_a_LIBADD = kparse$U.o \
- kparse_conf$U.o \
- kclk_computime$U.o \
- kclk_dcf7000$U.o \
- kclk_hopf6021$U.o \
- kclk_meinberg$U.o \
- kclk_rawdcf$U.o \
- kclk_rcc8000$U.o \
- kclk_schmid$U.o \
- kclk_trimtaip$U.o \
- kclk_trimtsip$U.o \
- kclk_varitext$U.o \
- kclk_wharton$U.o
-
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/kernel
-ETAGS_ARGS = Makefile.am
-
-EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
-
-#
-# create info_trimble.c
-#
-info_trimble.c: $(top_srcdir)/include/trimble.h mkinfo_rcmd.sed mkinfo_scmd.sed
- @rm -f info_trimble.c
- sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.c || rm -f info_trimble.c
- sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.c || rm -f info_trimble.c
-
-kclk_computime.o: clk_computime.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_computime.c -o $@
-
-kclk_computime_.o: clk_computime_.c
- $(COMPILE) $(K_CFLAGS) -c clk_computime_.c -o $@
-
-kclk_dcf7000.o: clk_dcf7000.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_dcf7000.c -o $@
-
-kclk_dcf7000_.o: clk_dcf7000_.c
- $(COMPILE) $(K_CFLAGS) -c clk_dcf7000_.c -o $@
-
-kclk_hopf6021.o: clk_hopf6021.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_hopf6021.c -o $@
-
-kclk_hopf6021_.o: clk_hopf6021_.c
- $(COMPILE) $(K_CFLAGS) -c clk_hopf6021_.c -o $@
-
-kclk_meinberg.o: clk_meinberg.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_meinberg.c -o $@
-
-kclk_meinberg_.o: clk_meinberg_.c
- $(COMPILE) $(K_CFLAGS) -c clk_meinberg_.c -o $@
-
-kclk_rawdcf.o: clk_rawdcf.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_rawdcf.c -o $@
-
-kclk_rawdcf_.o: clk_rawdcf_.c
- $(COMPILE) $(K_CFLAGS) -c clk_rawdcf_.c -o $@
-
-kclk_rcc8000.o: clk_rcc8000.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_rcc8000.c -o $@
-
-kclk_rcc8000_.o: clk_rcc8000_.c
- $(COMPILE) $(K_CFLAGS) -c clk_rcc8000_.c -o $@
-
-kclk_schmid.o: clk_schmid.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_schmid.c -o $@
-
-kclk_schmid_.o: clk_schmid_.c
- $(COMPILE) $(K_CFLAGS) -c clk_schmid_.c -o $@
-
-kclk_trimtaip.o: clk_trimtaip.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_trimtaip.c -o $@
-
-kclk_trimtaip_.o: clk_trimtaip_.c
- $(COMPILE) $(K_CFLAGS) -c clk_trimtaip_.c -o $@
-
-kclk_trimtsip.o: clk_trimtsip.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_trimtsip.c -o $@
-
-kclk_trimtsip_.o: clk_trimtsip_.c
- $(COMPILE) $(K_CFLAGS) -c clk_trimtsip_.c -o $@
-
-kclk_varitext.o: clk_varitext.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_varitext.c -o $@
-
-kclk_varitext_.o: clk_varitext_.c
- $(COMPILE) $(K_CFLAGS) -c clk_varitext_.c -o $@
-
-kclk_wharton.o: clk_wharton.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_wharton.c -o $@
-
-kclk_wharton_.o: clk_wharton_.c
- $(COMPILE) $(K_CFLAGS) -c clk_wharton_.c -o $@
-
-kparse.o: parse.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/parse.c -o $@
-
-kparse_.o: parse_.c
- $(COMPILE) $(K_CFLAGS) -c parse_.c -o $@
-
-kparse_conf.o: parse_conf.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/parse_conf.c -o $@
-
-kparse_conf_.o: parse_conf_.c
- $(COMPILE) $(K_CFLAGS) -c parse_conf_.c -o $@
-
-parsestreams.loadable_module.o: $(parsestreams_OBJECTS) libparse_kernel.a ../libntp/libntp.a
- $(LD) -r -o $@ $(parsestreams_OBJECTS) libparse_kernel.a ../libntp/libntp.a
-
-parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
- $(LD) -r -o $@ $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-parsesolaris.o: sys/systm.h
-
-sys/systm.h:
- mkdir sys && \
- sed -e 's/ffs(long)/ffs(int)/' < /usr/include/sys/systm.h > sys/systm.h
diff --git a/contrib/ntp/libparse/Makefile.in b/contrib/ntp/libparse/Makefile.in
deleted file mode 100644
index e1e2a60..0000000
--- a/contrib/ntp/libparse/Makefile.in
+++ /dev/null
@@ -1,682 +0,0 @@
-# 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
-noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
-EXTRA_LIBRARIES = libparse.a libparse_kernel.a
-EXTRA_PROGRAMS = parsestreams parsesolaris
-noinst_PROGRAMS = @MAKE_PARSEKMODULE@
-CLEANFILES = libparse.a libparse_kernel.a
-
-K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
-
-libparse_a_SOURCES = parse.c \
- parse_conf.c \
- clk_meinberg.c \
- clk_schmid.c \
- clk_rawdcf.c \
- clk_trimtsip.c \
- clk_dcf7000.c \
- clk_trimtaip.c \
- clk_rcc8000.c \
- clk_hopf6021.c \
- clk_computime.c \
- clk_wharton.c \
- clk_varitext.c \
- data_mbg.c \
- info_trimble.c \
- trim_info.c
-
-
-libparse_kernel_a_SOURCES =
-libparse_kernel_a_LIBADD = kparse$U.o \
- kparse_conf$U.o \
- kclk_computime$U.o \
- kclk_dcf7000$U.o \
- kclk_hopf6021$U.o \
- kclk_meinberg$U.o \
- kclk_rawdcf$U.o \
- kclk_rcc8000$U.o \
- kclk_schmid$U.o \
- kclk_trimtaip$U.o \
- kclk_trimtsip$U.o \
- kclk_varitext$U.o \
- kclk_wharton$U.o
-
-
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/kernel
-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 =
-LIBRARIES = $(noinst_LIBRARIES)
-
-libparse_a_AR = $(AR) cru
-libparse_a_LIBADD =
-am_libparse_a_OBJECTS = parse$U.$(OBJEXT) parse_conf$U.$(OBJEXT) \
- clk_meinberg$U.$(OBJEXT) clk_schmid$U.$(OBJEXT) \
- clk_rawdcf$U.$(OBJEXT) clk_trimtsip$U.$(OBJEXT) \
- clk_dcf7000$U.$(OBJEXT) clk_trimtaip$U.$(OBJEXT) \
- clk_rcc8000$U.$(OBJEXT) clk_hopf6021$U.$(OBJEXT) \
- clk_computime$U.$(OBJEXT) clk_wharton$U.$(OBJEXT) \
- clk_varitext$U.$(OBJEXT) data_mbg$U.$(OBJEXT) \
- info_trimble$U.$(OBJEXT) trim_info$U.$(OBJEXT)
-libparse_a_OBJECTS = $(am_libparse_a_OBJECTS)
-libparse_kernel_a_AR = $(AR) cru
-libparse_kernel_a_DEPENDENCIES = kparse$U.o kparse_conf$U.o \
- kclk_computime$U.o kclk_dcf7000$U.o kclk_hopf6021$U.o \
- kclk_meinberg$U.o kclk_rawdcf$U.o kclk_rcc8000$U.o \
- kclk_schmid$U.o kclk_trimtaip$U.o kclk_trimtsip$U.o \
- kclk_varitext$U.o kclk_wharton$U.o
-am_libparse_kernel_a_OBJECTS =
-libparse_kernel_a_OBJECTS = $(am_libparse_kernel_a_OBJECTS)
-EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT)
-noinst_PROGRAMS = @MAKE_PARSEKMODULE@
-PROGRAMS = $(noinst_PROGRAMS)
-
-parsesolaris_SOURCES = parsesolaris.c
-parsesolaris_OBJECTS = parsesolaris$U.$(OBJEXT)
-parsesolaris_LDADD = $(LDADD)
-parsesolaris_DEPENDENCIES =
-parsesolaris_LDFLAGS =
-parsestreams_SOURCES = parsestreams.c
-parsestreams_OBJECTS = parsestreams$U.$(OBJEXT)
-parsestreams_LDADD = $(LDADD)
-parsestreams_DEPENDENCIES =
-parsestreams_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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 $(srcdir)/Makefile.in Makefile.am
-SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) parsesolaris.c parsestreams.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-AR = ar
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libparse.a: $(libparse_a_OBJECTS) $(libparse_a_DEPENDENCIES)
- -rm -f libparse.a
- $(libparse_a_AR) libparse.a $(libparse_a_OBJECTS) $(libparse_a_LIBADD)
- $(RANLIB) libparse.a
-libparse_kernel.a: $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_DEPENDENCIES)
- -rm -f libparse_kernel.a
- $(libparse_kernel_a_AR) libparse_kernel.a $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_LIBADD)
- $(RANLIB) libparse_kernel.a
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-parsesolaris$(EXEEXT): $(parsesolaris_OBJECTS) $(parsesolaris_DEPENDENCIES)
- @rm -f parsesolaris$(EXEEXT)
- $(LINK) $(parsesolaris_LDFLAGS) $(parsesolaris_OBJECTS) $(parsesolaris_LDADD) $(LIBS)
-parsestreams$(EXEEXT): $(parsestreams_OBJECTS) $(parsestreams_DEPENDENCIES)
- @rm -f parsestreams$(EXEEXT)
- $(LINK) $(parsestreams_LDFLAGS) $(parsestreams_OBJECTS) $(parsestreams_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -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:
-@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`
-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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) \
-clk_varitext_.$(OBJEXT) clk_wharton_.$(OBJEXT) data_mbg_.$(OBJEXT) \
-info_trimble_.$(OBJEXT) parse_.$(OBJEXT) parse_conf_.$(OBJEXT) \
-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) $(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 $(LIBRARIES) $(PROGRAMS)
-
-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:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-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 -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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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
-
-
-#
-# create info_trimble.c
-#
-info_trimble.c: $(top_srcdir)/include/trimble.h mkinfo_rcmd.sed mkinfo_scmd.sed
- @rm -f info_trimble.c
- sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.c || rm -f info_trimble.c
- sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.c || rm -f info_trimble.c
-
-kclk_computime.o: clk_computime.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_computime.c -o $@
-
-kclk_computime_.o: clk_computime_.c
- $(COMPILE) $(K_CFLAGS) -c clk_computime_.c -o $@
-
-kclk_dcf7000.o: clk_dcf7000.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_dcf7000.c -o $@
-
-kclk_dcf7000_.o: clk_dcf7000_.c
- $(COMPILE) $(K_CFLAGS) -c clk_dcf7000_.c -o $@
-
-kclk_hopf6021.o: clk_hopf6021.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_hopf6021.c -o $@
-
-kclk_hopf6021_.o: clk_hopf6021_.c
- $(COMPILE) $(K_CFLAGS) -c clk_hopf6021_.c -o $@
-
-kclk_meinberg.o: clk_meinberg.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_meinberg.c -o $@
-
-kclk_meinberg_.o: clk_meinberg_.c
- $(COMPILE) $(K_CFLAGS) -c clk_meinberg_.c -o $@
-
-kclk_rawdcf.o: clk_rawdcf.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_rawdcf.c -o $@
-
-kclk_rawdcf_.o: clk_rawdcf_.c
- $(COMPILE) $(K_CFLAGS) -c clk_rawdcf_.c -o $@
-
-kclk_rcc8000.o: clk_rcc8000.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_rcc8000.c -o $@
-
-kclk_rcc8000_.o: clk_rcc8000_.c
- $(COMPILE) $(K_CFLAGS) -c clk_rcc8000_.c -o $@
-
-kclk_schmid.o: clk_schmid.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_schmid.c -o $@
-
-kclk_schmid_.o: clk_schmid_.c
- $(COMPILE) $(K_CFLAGS) -c clk_schmid_.c -o $@
-
-kclk_trimtaip.o: clk_trimtaip.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_trimtaip.c -o $@
-
-kclk_trimtaip_.o: clk_trimtaip_.c
- $(COMPILE) $(K_CFLAGS) -c clk_trimtaip_.c -o $@
-
-kclk_trimtsip.o: clk_trimtsip.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_trimtsip.c -o $@
-
-kclk_trimtsip_.o: clk_trimtsip_.c
- $(COMPILE) $(K_CFLAGS) -c clk_trimtsip_.c -o $@
-
-kclk_varitext.o: clk_varitext.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_varitext.c -o $@
-
-kclk_varitext_.o: clk_varitext_.c
- $(COMPILE) $(K_CFLAGS) -c clk_varitext_.c -o $@
-
-kclk_wharton.o: clk_wharton.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_wharton.c -o $@
-
-kclk_wharton_.o: clk_wharton_.c
- $(COMPILE) $(K_CFLAGS) -c clk_wharton_.c -o $@
-
-kparse.o: parse.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/parse.c -o $@
-
-kparse_.o: parse_.c
- $(COMPILE) $(K_CFLAGS) -c parse_.c -o $@
-
-kparse_conf.o: parse_conf.c
- $(COMPILE) $(K_CFLAGS) -c $(srcdir)/parse_conf.c -o $@
-
-kparse_conf_.o: parse_conf_.c
- $(COMPILE) $(K_CFLAGS) -c parse_conf_.c -o $@
-
-parsestreams.loadable_module.o: $(parsestreams_OBJECTS) libparse_kernel.a ../libntp/libntp.a
- $(LD) -r -o $@ $(parsestreams_OBJECTS) libparse_kernel.a ../libntp/libntp.a
-
-parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
- $(LD) -r -o $@ $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-parsesolaris.o: sys/systm.h
-
-sys/systm.h:
- mkdir sys && \
- sed -e 's/ffs(long)/ffs(int)/' < /usr/include/sys/systm.h > sys/systm.h
-# 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/libparse/README b/contrib/ntp/libparse/README
deleted file mode 100644
index 3484f9a..0000000
--- a/contrib/ntp/libparse/README
+++ /dev/null
@@ -1,96 +0,0 @@
-PARSE reference clock driver:
-
-This directory contains the files making up the parser for
-the parse refclock driver. For reasonably sane clocks this refclock
-drivers allows a refclock implementation by just providing a
-conversion routine and the appropriate NTP parameters. Refclock
-support can run as low a 3k code with the parse refclock driver.
-
-The modules in here are designed to live in two worlds. In userlevel
-as part of the xntp daemon and in kernel land as part of a STREAMS module
-or, if someone gets to it, as part of a line discipline. Currently only
-SunOS4.x/SunOS5.x STREAMS are supported (volunteers for other vendors like HP?).
-This structure means, that refclock_parse can work with or without kernel
-support. Kernelsupport increases accuracy tremendingly. The current restriction
-of the parse driver is that it only supports SYSV type ttys and that kernel
-support is only available for Suns right now.
-
-Three kernel modules are part of this directory. These work only on
-SunOS (SunOS4 and SunOS5).
-
- SunOS4 (aka Solaris 1.x):
- parsestreams.loadable_module.o - standard parse module for SunOS 4
-
- Both modules can be loaded via modload <modulename>.
-
- SunOS5 (aka Solaris 2.x):
- parse - auto loadable streams module
-
- To install just drop "parse" into /kernel/strmod and
- start the daemon (SunOS5 will do the rest).
-
-The structure of the parse reference clock driver is as follows:
-
- xntpd - contains NTP implementation and calls a reference clock
- 127.127.8.x which is implemented by
- refclock_parse.c
- - which contains several refclock decriptions. These are
- selected by the x part of the refclock address.
- The lower two bits specify the device to use. Thus the
- value (x % 4) determines the device to open
- (/dev/refclock-0 - /dev/refclock-3).
-
- The kind of clock is selected by the mode parameter. This parameter
- selects the clock type which deterimines how I/O is done,
- the tty parameters and the NTP parameters.
-
- refclock_parse operates on an abstract reference clock
- that delivers time stamps and stati. Offsets and sychron-
- isation information is derived from this data and passed
- on to refclock_receive of xntp which uses that data for
- syncronisation.
-
- The abstract reference clock is generated by the parse*
- routines. They parse the incoming data stream from the
- clock and convert it to the appropriate time stamps.
- The data is also mapped int the abstract clock states
- POWERUP - clock has no valid phase and time code
- information
-
- NOSYNC - Time code is not confirmed, phase is probably
- ok.
- SYNC - Time code and phase are correct.
-
- A clock is trusted for a certain time (type parameter) when
- it leaves the SYNC state. This is derived from the
- observation that quite a few clocks can still generate good
- time code information when losing contact to their
- synchronisation source. When the clock does not reagain
- synchronisation in that trust period it will be deemed
- unsynchronised until it regains synchronisation. The same
- will happen if xntp sees the clock unsynchronised at
- startup.
-
- The upper bit of x specifies that all samples delivered
- from the clock should be used to discipline the NTP
- loopfilter. For clock with accurate once a second time
- information this means big improvements for time keeping.
- A prerequisite for passing on the time stamps to
- the loopfilter is, that the clock is in synchronised state.
-
- parse.c These are the general routines to parse the incoming data
- stream. Usually these routines should not require
- modification.
-
- clk_*.c These files hole the conversion code for the time stamps
- and the description how the time code can be parsed and
- where the time stamps are to be taken.
- If you want to add a new clock type this is the file
- you need to write in addition to mention it in
- parse_conf.c and setting up the NTP and TTY parameters
- in refclock_parse.c.
-
-Further information can be found in parse/README.parse and the various source
-files.
-
-Frank Kardel
diff --git a/contrib/ntp/libparse/clk_computime.c b/contrib/ntp/libparse/clk_computime.c
deleted file mode 100644
index 3312b3f..0000000
--- a/contrib/ntp/libparse/clk_computime.c
+++ /dev/null
@@ -1,193 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_COMPUTIME)
-/*
- * /src/NTP/ntp-4/libparse/clk_computime.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
- *
- * clk_computime.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
- *
- * Supports Diem's Computime Radio Clock
- *
- * Used the Meinberg clock as a template for Diem's Computime Radio Clock
- *
- * adapted by Alois Camenzind <alois.camenzind@ubs.ch>
- *
- * Copyright (C) 1992-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-/*
- * The Computime receiver sends a datagram in the following format every minute
- *
- * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
- * Pos 0123456789012345678901 2 3
- * 0000000000111111111122 2 2
- * Parse T: : : : : : : rn
- *
- * T Startcharacter "T" 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
- *
- */
-
-static struct format computime_fmt =
-{
- {
- {8, 2}, {5, 2}, {2, 2}, /* day, month, year */
- {14, 2}, {17, 2}, {20, 2}, /* hour, minute, second */
- {11, 2}, /* dayofweek, */
- },
- (const unsigned char *)"T: : : : : : : \r\n",
- 0
-};
-
-static u_long cvt_computime P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static unsigned long inp_computime P((parse_t *, unsigned int, timestamp_t *));
-
-clockformat_t clock_computime =
-{
- inp_computime, /* Computime input handling */
- cvt_computime, /* Computime conversion */
- 0, /* no PPS monitoring */
- (void *)&computime_fmt, /* conversion configuration */
- "Diem's Computime Radio Clock", /* Computime Radio Clock */
- 24, /* string buffer */
- 0 /* no private data (complete pakets) */
-};
-
-/*
- * cvt_computime
- *
- * convert simple type format
- */
-static u_long
-cvt_computime(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
-
- if (!Strok(buffer, format->fixed_string)) {
- return CVT_NONE;
- } else {
- if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
- format->field_offsets[O_DAY].length) ||
- Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month,
- format->field_offsets[O_MONTH].length) ||
- Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year,
- format->field_offsets[O_YEAR].length) ||
- Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour,
- format->field_offsets[O_HOUR].length) ||
- Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
- format->field_offsets[O_MIN].length) ||
- Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length)) {
- return CVT_FAIL | CVT_BADFMT;
- } else {
-
- clock_time->flags = 0;
- clock_time->utcoffset = 0; /* We have UTC time */
-
- return CVT_OK;
- }
- }
-}
-
-/*
- * inp_computime
- *
- * grep data from input stream
- */
-static u_long
-inp_computime(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_computime(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case 'T':
- parseprintf(DD_PARSE, ("inp_computime: START seen\n"));
-
- parseio->parse_index = 1;
- parseio->parse_data[0] = ch;
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- return PARSE_INP_SKIP;
-
- case '\n':
- parseprintf(DD_PARSE, ("inp_computime: END seen\n"));
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */
-int clk_computime_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */
-
-/*
- * clk_computime.c,v
- * Revision 4.6 1999/11/28 09:13:49 kardel
- * RECON_4_0_98F
- *
- * Revision 4.5 1998/06/14 21:09:34 kardel
- * Sun acc cleanup
- *
- * Revision 4.4 1998/06/13 12:00:38 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:26 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:24 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:51 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:27 kardel
- * Start 4.0 release version numbering
- *
- * from V3 1.8 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/clk_dcf7000.c b/contrib/ntp/libparse/clk_dcf7000.c
deleted file mode 100644
index 30506c5..0000000
--- a/contrib/ntp/libparse/clk_dcf7000.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_dcf7000.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
- *
- * clk_dcf7000.c,v 4.6 1999/11/28 09:13:49 kardel RELEASE_19991128_A
- *
- * ELV DCF7000 module
- *
- * Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_DCF7000)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-static struct format dcf7000_fmt =
-{ /* ELV DCF7000 */
- {
- { 6, 2}, { 3, 2}, { 0, 2},
- { 12, 2}, { 15, 2}, { 18, 2},
- { 9, 2}, { 21, 2},
- },
- (const unsigned char *)" - - - - - - - \r",
- 0
-};
-static u_long cvt_dcf7000 P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static unsigned long inp_dcf7000 P((parse_t *, unsigned int, timestamp_t *));
-
-clockformat_t clock_dcf7000 =
-{
- inp_dcf7000, /* DCF7000 input handling */
- cvt_dcf7000, /* ELV DCF77 conversion */
- 0, /* no direct PPS monitoring */
- (void *)&dcf7000_fmt, /* conversion configuration */
- "ELV DCF7000", /* ELV clock */
- 24, /* string buffer */
- 0 /* no private data (complete pakets) */
-};
-
-/*
- * cvt_dcf7000
- *
- * convert dcf7000 type format
- */
-static u_long
-cvt_dcf7000(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- if (!Strok(buffer, format->fixed_string))
- {
- return CVT_NONE;
- }
- else
- {
- if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
- format->field_offsets[O_DAY].length) ||
- Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month,
- format->field_offsets[O_MONTH].length) ||
- Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year,
- format->field_offsets[O_YEAR].length) ||
- Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour,
- format->field_offsets[O_HOUR].length) ||
- Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
- format->field_offsets[O_MIN].length) ||
- Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
- else
- {
- unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
- long flags;
-
- clock_time->flags = 0;
- clock_time->usecond = 0;
-
- if (Stoi(f, &flags, format->field_offsets[O_FLAGS].length))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
- else
- {
- if (flags & 0x1)
- clock_time->utcoffset = -2*60*60;
- else
- clock_time->utcoffset = -1*60*60;
-
- if (flags & 0x2)
- clock_time->flags |= PARSEB_ANNOUNCE;
-
- if (flags & 0x4)
- clock_time->flags |= PARSEB_NOSYNC;
- }
- return CVT_OK;
- }
- }
-}
-
-/*
- * inp_dcf700
- *
- * grep data from input stream
- */
-static u_long
-inp_dcf7000(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case '\r':
- parseprintf(DD_PARSE, ("inp_dcf7000: EOL seen\n"));
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */
-int clk_dcf7000_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */
-
-/*
- * History:
- *
- * clk_dcf7000.c,v
- * Revision 4.6 1999/11/28 09:13:49 kardel
- * RECON_4_0_98F
- *
- * Revision 4.5 1998/06/14 21:09:34 kardel
- * Sun acc cleanup
- *
- * Revision 4.4 1998/06/13 12:01:59 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:27 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:24 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:51 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:28 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.18 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/clk_hopf6021.c b/contrib/ntp/libparse/clk_hopf6021.c
deleted file mode 100644
index b2d53cd..0000000
--- a/contrib/ntp/libparse/clk_hopf6021.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_hopf6021.c,v 4.7 1999/11/28 09:13:49 kardel RELEASE_19991128_A
- *
- * clk_hopf6021.c,v 4.7 1999/11/28 09:13:49 kardel RELEASE_19991128_A
- *
- * Radiocode Clocks HOPF Funkuhr 6021 mit serieller Schnittstelle
- * base code version from 24th Nov 1995 - history at end
- *
- * Created by F.Schnekenbuehl <frank@comsys.dofn.de> from clk_rcc8000.c
- * Nortel DASA Network Systems GmbH, Department: ND250
- * A Joint venture of Daimler-Benz Aerospace and Nortel
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_HOPF6021)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#include "ascii.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-/*
- * hopf Funkuhr 6021
- * used with 9600,8N1,
- * UTC ueber serielle Schnittstelle
- * Sekundenvorlauf ON
- * ETX zum Sekundenvorlauf ON
- * Datenstring 6021
- * Ausgabe Uhrzeit und Datum
- * Senden mit Steuerzeichen
- * Senden sekuendlich
- */
-
-/*
- * Type 6021 Serial Output format
- *
- * 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
- */
-
-#define HOPF_DSTWARN 0x01 /* DST switch warning */
-#define HOPF_DST 0x02 /* DST in effect */
-
-#define HOPF_MODE 0x0C /* operation mode mask */
-#define HOPF_INVALID 0x00 /* no time code available */
-#define HOPF_INTERNAL 0x04 /* internal clock */
-#define HOPF_RADIO 0x08 /* radio clock */
-#define HOPF_RADIOHP 0x0C /* high precision radio clock */
-
-#define HOPF_UTC 0x08 /* time code in UTC */
-#define HOPF_WMASK 0x07 /* mask for weekday code */
-
-static struct format hopf6021_fmt =
-{
- {
- { 9, 2 }, {11, 2}, { 13, 2}, /* Day, Month, Year */
- { 3, 2 }, { 5, 2}, { 7, 2}, /* Hour, Minute, Second */
- { 2, 1 }, { 1, 1}, { 0, 0}, /* Weekday, Flags, Zone */
- /* ... */
- },
- (const unsigned char *)"\002 \n\r\003",
- 0
-};
-
-#define OFFS(x) format->field_offsets[(x)].offset
-#define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length)
-#define hexval(x) (('0' <= (x) && (x) <= '9') ? (x) - '0' : \
- ('a' <= (x) && (x) <= 'f') ? (x) - 'a' + 10 : \
- ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
- -1)
-
-static unsigned long cvt_hopf6021 P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static unsigned long inp_hopf6021 P((parse_t *, unsigned int, timestamp_t *));
-
-clockformat_t clock_hopf6021 =
-{
- inp_hopf6021, /* HOPF 6021 input handling */
- cvt_hopf6021, /* Radiocode clock conversion */
- 0, /* no direct PPS monitoring */
- (void *)&hopf6021_fmt, /* conversion configuration */
- "hopf Funkuhr 6021", /* clock format name */
- 19, /* string buffer */
- 0 /* private data length, no private data */
-};
-
-static unsigned long
-cvt_hopf6021(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- unsigned char status,weekday;
-
- if (!Strok(buffer, format->fixed_string))
- {
- return CVT_NONE;
- }
-
- if ( STOI(O_DAY, &clock_time->day) ||
- STOI(O_MONTH, &clock_time->month) ||
- STOI(O_YEAR, &clock_time->year) ||
- STOI(O_HOUR, &clock_time->hour) ||
- STOI(O_MIN, &clock_time->minute) ||
- STOI(O_SEC, &clock_time->second)
- )
- {
- return CVT_FAIL|CVT_BADFMT;
- }
-
- clock_time->usecond = 0;
- clock_time->utcoffset = 0;
-
- status = hexval(buffer[OFFS(O_FLAGS)]);
- weekday= hexval(buffer[OFFS(O_WDAY)]);
-
- if ((status == 0xFF) || (weekday == 0xFF))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
-
- clock_time->flags = 0;
-
- if (weekday & HOPF_UTC)
- {
- clock_time->flags |= PARSEB_UTC;
- }
- else
- {
- if (status & HOPF_DST)
- {
- clock_time->flags |= PARSEB_DST;
- clock_time->utcoffset = -2*60*60; /* MET DST */
- }
- else
- {
- clock_time->utcoffset = -1*60*60; /* MET */
- }
- }
-
- clock_time->flags |= (status & HOPF_DSTWARN) ? PARSEB_ANNOUNCE : 0;
-
- switch (status & HOPF_MODE)
- {
- case HOPF_INVALID: /* Time/Date invalid */
- clock_time->flags |= PARSEB_POWERUP;
- break;
-
- case HOPF_INTERNAL: /* internal clock */
- clock_time->flags |= PARSEB_NOSYNC;
- break;
-
- case HOPF_RADIO: /* Radio clock */
- case HOPF_RADIOHP: /* Radio clock high precision */
- break;
-
- default:
- return CVT_FAIL|CVT_BADFMT;
- }
-
- return CVT_OK;
-}
-
-/*
- * inp_hopf6021
- *
- * grep data from input stream
- */
-static u_long
-inp_hopf6021(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case ETX:
- parseprintf(DD_PARSE, ("inp_hopf6021: EOL seen\n"));
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_HOPF6021) */
-int clk_hopf6021_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_HOPF6021) */
-
-/*
- * History:
- *
- * clk_hopf6021.c,v
- * Revision 4.7 1999/11/28 09:13:49 kardel
- * RECON_4_0_98F
- *
- * Revision 4.6 1998/11/15 20:27:57 kardel
- * Release 4.0.73e13 reconcilation
- *
- * Revision 4.5 1998/06/14 21:09:35 kardel
- * Sun acc cleanup
- *
- * Revision 4.4 1998/06/13 12:02:38 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:27 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:25 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:52 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:29 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.6 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/clk_meinberg.c b/contrib/ntp/libparse/clk_meinberg.c
deleted file mode 100644
index 87c7fde..0000000
--- a/contrib/ntp/libparse/clk_meinberg.c
+++ /dev/null
@@ -1,747 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_meinberg.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A
- *
- * clk_meinberg.c,v 4.8 1999/11/28 09:13:50 kardel RELEASE_19991128_A
- *
- * Meinberg clock support
- *
- * Copyright (C) 1995-1999 by Frank Kardel <kardel@acm.org>
- * Copyright (C) 1992-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_MEINBERG)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "ntp_machine.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-#endif
-
-#include "ntp_stdlib.h"
-
-#include "ntp_stdlib.h"
-
-#include "mbg_gps166.h"
-#include "binio.h"
-#include "ascii.h"
-
-/*
- * The Meinberg receiver every second sends a datagram of the following form
- * (Standard Format)
- *
- * <STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
- * 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
- * <STX> = '\002' ASCII start of text
- * <ETX> = '\003' ASCII end of text
- * <dd>,<mm>,<yy> = day, month, year(2 digits!!)
- * <w> = day of week (sunday= 0)
- * <hh>,<mm>,<ss> = hour, minute, second
- * <S> = '#' if never synced since powerup for DCF C51
- * = '#' if not PZF sychronisation available for PZF 535/509
- * = ' ' if ok
- * <F> = '*' if time comes from internal quartz
- * = ' ' if completely synched
- * <D> = 'S' if daylight saving time is active
- * = 'U' if time is represented in UTC
- * = ' ' if no special condition exists
- * <A> = '!' during the hour preceeding an daylight saving time
- * start/end change
- * = 'A' leap second insert warning
- * = ' ' if no special condition exists
- *
- * Extended data format (PZFUERL for PZF type clocks)
- *
- * <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <U><S><F><D><A><L><R><ETX>
- * 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
- * <STX> = '\002' ASCII start of text
- * <ETX> = '\003' ASCII end of text
- * <dd>,<mm>,<yy> = day, month, year(2 digits!!)
- * <w> = day of week (sunday= 0)
- * <hh>,<mm>,<ss> = hour, minute, second
- * <U> = 'U' UTC time display
- * <S> = '#' if never synced since powerup else ' ' for DCF C51
- * '#' if not PZF sychronisation available else ' ' for PZF 535/509
- * <F> = '*' if time comes from internal quartz else ' '
- * <D> = 'S' if daylight saving time is active else ' '
- * <A> = '!' during the hour preceeding an daylight saving time
- * start/end change
- * <L> = 'A' LEAP second announcement
- * <R> = 'R' alternate antenna
- *
- * Meinberg GPS166 receiver
- *
- * You must get the Uni-Erlangen firmware for the GPS receiver support
- * to work to full satisfaction !
- *
- * <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <+/-><00:00>; <U><S><F><D><A><L><R><L>; <position...><ETX>
- *
- * 000000000111111111122222222223333333333444444444455555555556666666
- * 123456789012345678901234567890123456789012345678901234567890123456
- * \x0209.07.93; 5; 08:48:26; +00:00; #*S!A L; 49.5736N 11.0280E 373m\x03
- *
- *
- * <STX> = '\002' ASCII start of text
- * <ETX> = '\003' ASCII end of text
- * <dd>,<mm>,<yy> = day, month, year(2 digits!!)
- * <w> = day of week (sunday= 0)
- * <hh>,<mm>,<ss> = hour, minute, second
- * <+/->,<00:00> = offset to UTC
- * <S> = '#' if never synced since powerup else ' '
- * <F> = '*' if position is not confirmed else ' '
- * <D> = 'S' if daylight saving time is active else ' '
- * <A> = '!' during the hour preceeding an daylight saving time
- * start/end change
- * <L> = 'A' LEAP second announcement
- * <R> = 'R' alternate antenna (reminiscent of PZF535) usually ' '
- * <L> = 'L' on 23:59:60
- *
- * Binary messages have a lead in for a fixed header of SOH
- */
-
-/*--------------------------------------------------------------*/
-/* Name: csum() */
-/* */
-/* Purpose: Compute a checksum about a number of bytes */
-/* */
-/* Input: uchar *p address of the first byte */
-/* short n the number of bytes */
-/* */
-/* Output: -- */
-/* */
-/* Ret val: the checksum */
-/*+-------------------------------------------------------------*/
-
-unsigned long
-mbg_csum(
- unsigned char *p,
- unsigned int n
- )
-{
- unsigned long sum = 0;
- short i;
-
- for ( i = 0; i < n; i++ )
- sum += *p++;
-
- return( sum );
-} /* csum */
-
-void
-get_mbg_header(
- unsigned char **bufpp,
- GPS_MSG_HDR *headerp
- )
-{
- headerp->gps_cmd = get_lsb_short(bufpp);
- headerp->gps_len = get_lsb_short(bufpp);
- headerp->gps_data_csum = get_lsb_short(bufpp);
- headerp->gps_hdr_csum = get_lsb_short(bufpp);
-}
-
-static struct format meinberg_fmt[] =
-{
- {
- {
- { 3, 2}, { 6, 2}, { 9, 2},
- { 18, 2}, { 21, 2}, { 24, 2},
- { 14, 1}, { 27, 4}, { 29, 1},
- },
- (const unsigned char *)"\2D: . . ;T: ;U: . . ; \3",
- 0
- },
- { /* special extended FAU Erlangen extended format */
- {
- { 1, 2}, { 4, 2}, { 7, 2},
- { 14, 2}, { 17, 2}, { 20, 2},
- { 11, 1}, { 25, 4}, { 27, 1},
- },
- (const unsigned char *)"\2 . . ; ; : : ; \3",
- MBG_EXTENDED
- },
- { /* special extended FAU Erlangen GPS format */
- {
- { 1, 2}, { 4, 2}, { 7, 2},
- { 14, 2}, { 17, 2}, { 20, 2},
- { 11, 1}, { 32, 7}, { 35, 1},
- { 25, 2}, { 28, 2}, { 24, 1}
- },
- (const unsigned char *)"\2 . . ; ; : : ; : ; ; . . ",
- 0
- }
-};
-
-static u_long cvt_meinberg P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static u_long cvt_mgps P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static u_long mbg_input P((parse_t *, unsigned int, timestamp_t *));
-static u_long gps_input P((parse_t *, unsigned int, timestamp_t *));
-
-struct msg_buf
-{
- unsigned short len; /* len to fill */
- unsigned short phase; /* current input phase */
-};
-
-#define MBG_NONE 0 /* no data input */
-#define MBG_HEADER 1 /* receiving header */
-#define MBG_DATA 2 /* receiving data */
-#define MBG_STRING 3 /* receiving standard data message */
-
-clockformat_t clock_meinberg[] =
-{
- {
- mbg_input, /* normal input handling */
- cvt_meinberg, /* Meinberg conversion */
- pps_one, /* easy PPS monitoring */
- 0, /* conversion configuration */
- "Meinberg Standard", /* Meinberg simple format - beware */
- 32, /* string buffer */
- 0 /* no private data (complete pakets) */
- },
- {
- mbg_input, /* normal input handling */
- cvt_meinberg, /* Meinberg conversion */
- pps_one, /* easy PPS monitoring */
- 0, /* conversion configuration */
- "Meinberg Extended", /* Meinberg enhanced format */
- 32, /* string buffer */
- 0 /* no private data (complete pakets) */
- },
- {
- gps_input, /* no input handling */
- cvt_mgps, /* Meinberg GPS166 conversion */
- pps_one, /* easy PPS monitoring */
- (void *)&meinberg_fmt[2], /* conversion configuration */
- "Meinberg GPS Extended", /* Meinberg FAU GPS format */
- 512, /* string buffer */
- sizeof(struct msg_buf) /* no private data (complete pakets) */
- }
-};
-
-/*
- * cvt_meinberg
- *
- * convert simple type format
- */
-static u_long
-cvt_meinberg(
- unsigned char *buffer,
- int size,
- struct format *unused,
- clocktime_t *clock_time,
- void *local
- )
-{
- struct format *format;
-
- /*
- * select automagically correct data format
- */
- if (Strok(buffer, meinberg_fmt[0].fixed_string))
- {
- format = &meinberg_fmt[0];
- }
- else
- {
- if (Strok(buffer, meinberg_fmt[1].fixed_string))
- {
- format = &meinberg_fmt[1];
- }
- else
- {
- return CVT_FAIL|CVT_BADFMT;
- }
- }
-
- /*
- * collect data
- */
- if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
- format->field_offsets[O_DAY].length) ||
- Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month,
- format->field_offsets[O_MONTH].length) ||
- Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year,
- format->field_offsets[O_YEAR].length) ||
- Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour,
- format->field_offsets[O_HOUR].length) ||
- Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
- format->field_offsets[O_MIN].length) ||
- Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
- else
- {
- unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
- clock_time->usecond = 0;
- clock_time->flags = PARSEB_S_LEAP;
-
- if (clock_time->second == 60)
- clock_time->flags |= PARSEB_LEAPSECOND;
-
- /*
- * in the extended timecode format we have also the
- * indication that the timecode is in UTC
- * for compatibilty reasons we start at the USUAL
- * offset (POWERUP flag) and know that the UTC indication
- * is the character before the powerup flag
- */
- if ((format->flags & MBG_EXTENDED) && (f[-1] == 'U'))
- {
- /*
- * timecode is in UTC
- */
- clock_time->utcoffset = 0; /* UTC */
- clock_time->flags |= PARSEB_UTC;
- }
- else
- {
- /*
- * only calculate UTC offset if MET/MED is in time code
- * or we have the old time code format, where we do not
- * know whether it is UTC time or MET/MED
- * pray that nobody switches to UTC in the *old* standard time code
- * ROMS !!!! The new ROMS have 'U' at the ZONE field - good.
- */
- switch (buffer[format->field_offsets[O_ZONE].offset])
- {
- case ' ':
- clock_time->utcoffset = -1*60*60; /* MET */
- break;
-
- case 'S':
- clock_time->utcoffset = -2*60*60; /* MED */
- break;
-
- case 'U':
- /*
- * timecode is in UTC
- */
- clock_time->utcoffset = 0; /* UTC */
- clock_time->flags |= PARSEB_UTC;
- break;
-
- default:
- return CVT_FAIL|CVT_BADFMT;
- }
- }
-
- /*
- * gather status flags
- */
- if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
- clock_time->flags |= PARSEB_DST;
-
- if (f[0] == '#')
- clock_time->flags |= PARSEB_POWERUP;
-
- if (f[1] == '*')
- clock_time->flags |= PARSEB_NOSYNC;
-
- if (f[3] == '!')
- clock_time->flags |= PARSEB_ANNOUNCE;
-
- /*
- * oncoming leap second
- * 'a' code not confirmed - earth is not
- * expected to speed up
- */
- if (f[3] == 'A')
- clock_time->flags |= PARSEB_LEAPADD;
-
- if (f[3] == 'a')
- clock_time->flags |= PARSEB_LEAPDEL;
-
-
- if (format->flags & MBG_EXTENDED)
- {
- clock_time->flags |= PARSEB_S_ANTENNA;
-
- /*
- * DCF77 does not encode the direction -
- * so we take the current default -
- * earth slowing down
- */
- clock_time->flags &= ~PARSEB_LEAPDEL;
-
- if (f[4] == 'A')
- clock_time->flags |= PARSEB_LEAPADD;
-
- if (f[5] == 'R')
- clock_time->flags |= PARSEB_ALTERNATE;
- }
- return CVT_OK;
- }
-}
-
-
-/*
- * mbg_input
- *
- * grep data from input stream
- */
-static u_long
-mbg_input(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case STX:
- parseprintf(DD_PARSE, ("mbg_input: STX seen\n"));
-
- parseio->parse_index = 1;
- parseio->parse_data[0] = ch;
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- return PARSE_INP_SKIP;
-
- case ETX:
- parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-
-/*
- * cvt_mgps
- *
- * convert Meinberg GPS format
- */
-static u_long
-cvt_mgps(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- if (!Strok(buffer, format->fixed_string))
- {
- return cvt_meinberg(buffer, size, format, clock_time, local);
- }
- else
- {
- if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
- format->field_offsets[O_DAY].length) ||
- Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month,
- format->field_offsets[O_MONTH].length) ||
- Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year,
- format->field_offsets[O_YEAR].length) ||
- Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour,
- format->field_offsets[O_HOUR].length) ||
- Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
- format->field_offsets[O_MIN].length) ||
- Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
- else
- {
- long h;
- unsigned char *f = &buffer[format->field_offsets[O_FLAGS].offset];
-
- clock_time->flags = PARSEB_S_LEAP|PARSEB_S_POSITION;
-
- clock_time->usecond = 0;
-
- /*
- * calculate UTC offset
- */
- if (Stoi(&buffer[format->field_offsets[O_UTCHOFFSET].offset], &h,
- format->field_offsets[O_UTCHOFFSET].length))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
- else
- {
- if (Stoi(&buffer[format->field_offsets[O_UTCMOFFSET].offset], &clock_time->utcoffset,
- format->field_offsets[O_UTCMOFFSET].length))
- {
- return CVT_FAIL|CVT_BADFMT;
- }
-
- clock_time->utcoffset += TIMES60(h);
- clock_time->utcoffset = TIMES60(clock_time->utcoffset);
-
- if (buffer[format->field_offsets[O_UTCSOFFSET].offset] != '-')
- {
- clock_time->utcoffset = -clock_time->utcoffset;
- }
- }
-
- /*
- * gather status flags
- */
- if (buffer[format->field_offsets[O_ZONE].offset] == 'S')
- clock_time->flags |= PARSEB_DST;
-
- if (clock_time->utcoffset == 0)
- clock_time->flags |= PARSEB_UTC;
-
- /*
- * no sv's seen - no time & position
- */
- if (f[0] == '#')
- clock_time->flags |= PARSEB_POWERUP;
-
- /*
- * at least one sv seen - time (for last position)
- */
- if (f[1] == '*')
- clock_time->flags |= PARSEB_NOSYNC;
- else
- if (!(clock_time->flags & PARSEB_POWERUP))
- clock_time->flags |= PARSEB_POSITION;
-
- /*
- * oncoming zone switch
- */
- if (f[3] == '!')
- clock_time->flags |= PARSEB_ANNOUNCE;
-
- /*
- * oncoming leap second
- * 'a' code not confirmed - earth is not
- * expected to speed up
- */
- if (f[4] == 'A')
- clock_time->flags |= PARSEB_LEAPADD;
-
- if (f[4] == 'a')
- clock_time->flags |= PARSEB_LEAPDEL;
-
- /*
- * f[5] == ' '
- */
-
- /*
- * this is the leap second
- */
- if ((f[6] == 'L') || (clock_time->second == 60))
- clock_time->flags |= PARSEB_LEAPSECOND;
-
- return CVT_OK;
- }
- }
-}
-
-/*
- * gps_input
- *
- * grep binary data from input stream
- */
-static u_long
-gps_input(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- CSUM calc_csum; /* used to compare the incoming csums */
- GPS_MSG_HDR header;
- struct msg_buf *msg_buf;
-
- msg_buf = (struct msg_buf *)parseio->parse_pdata;
-
- parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- if (!msg_buf)
- return PARSE_INP_SKIP;
-
- if ( msg_buf->phase == MBG_NONE )
- { /* not receiving yet */
- switch (ch)
- {
- case SOH:
- parseprintf(DD_PARSE, ("gps_input: SOH seen\n"));
-
- msg_buf->len = sizeof( header ); /* prepare to receive msg header */
- msg_buf->phase = MBG_HEADER; /* receiving header */
- break;
-
- case STX:
- parseprintf(DD_PARSE, ("gps_input: STX seen\n"));
-
- msg_buf->len = 0;
- msg_buf->phase = MBG_STRING; /* prepare to receive ASCII ETX delimited message */
- parseio->parse_index = 1;
- parseio->parse_data[0] = ch;
- break;
-
- default:
- return PARSE_INP_SKIP; /* keep searching */
- }
-
- parseio->parse_dtime.parse_msglen = 1; /* reset buffer pointer */
- parseio->parse_dtime.parse_msg[0] = ch; /* fill in first character */
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- return PARSE_INP_SKIP;
- }
-
- /* SOH/STX has already been received */
-
- /* save incoming character in both buffers if needbe */
- if ((msg_buf->phase == MBG_STRING) &&
- (parseio->parse_index < parseio->parse_dsize))
- parseio->parse_data[parseio->parse_index++] = ch;
-
- parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
-
- if (parseio->parse_dtime.parse_msglen > sizeof(parseio->parse_dtime.parse_msg))
- {
- msg_buf->phase = MBG_NONE; /* buffer overflow - discard */
- parseio->parse_data[parseio->parse_index] = '\0';
- memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1));
- parseio->parse_ldsize = parseio->parse_index+1;
- return PARSE_INP_DATA;
- }
-
- switch (msg_buf->phase)
- {
- case MBG_HEADER:
- case MBG_DATA:
- msg_buf->len--;
-
- if ( msg_buf->len ) /* transfer not complete */
- return PARSE_INP_SKIP;
-
- parseprintf(DD_PARSE, ("gps_input: %s complete\n", (msg_buf->phase == MBG_DATA) ? "data" : "header"));
-
- break;
-
- case MBG_STRING:
- if ((ch == ETX) || (parseio->parse_index >= parseio->parse_dsize))
- {
- msg_buf->phase = MBG_NONE;
- parseprintf(DD_PARSE, ("gps_input: string complete\n"));
- parseio->parse_data[parseio->parse_index] = '\0';
- memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1));
- parseio->parse_ldsize = parseio->parse_index+1;
- parseio->parse_index = 0;
- return PARSE_INP_TIME;
- }
- else
- {
- return PARSE_INP_SKIP;
- }
- }
-
- /* cnt == 0, so the header or the whole message is complete */
-
- if ( msg_buf->phase == MBG_HEADER )
- { /* header complete now */
- unsigned char *datap = parseio->parse_dtime.parse_msg + 1;
-
- get_mbg_header(&datap, &header);
-
- parseprintf(DD_PARSE, ("gps_input: header: cmd 0x%x, len %d, dcsum 0x%x, hcsum 0x%x\n",
- (int)header.gps_cmd, (int)header.gps_len, (int)header.gps_data_csum,
- (int)header.gps_hdr_csum));
-
-
- calc_csum = mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg + 1, (unsigned short)6 );
-
- if ( calc_csum != header.gps_hdr_csum )
- {
- parseprintf(DD_PARSE, ("gps_input: header checksum mismatch expected 0x%x, got 0x%x\n",
- (int)calc_csum, (int)mbg_csum( (unsigned char *) parseio->parse_dtime.parse_msg, (unsigned short)6 )));
-
- msg_buf->phase = MBG_NONE; /* back to hunting mode */
- return PARSE_INP_DATA; /* invalid header checksum received - pass up for detection */
- }
-
- if ((header.gps_len == 0) || /* no data to wait for */
- (header.gps_len >= (sizeof (parseio->parse_dtime.parse_msg) - sizeof(header) - 1))) /* blows anything we have space for */
- {
- msg_buf->phase = MBG_NONE; /* back to hunting mode */
- return (header.gps_len == 0) ? PARSE_INP_DATA : PARSE_INP_SKIP; /* message complete/throwaway */
- }
-
- parseprintf(DD_PARSE, ("gps_input: expecting %d bytes of data message\n", (int)header.gps_len));
-
- msg_buf->len = header.gps_len;/* save number of bytes to wait for */
- msg_buf->phase = MBG_DATA; /* flag header already complete */
- return PARSE_INP_SKIP;
- }
-
- parseprintf(DD_PARSE, ("gps_input: message data complete\n"));
-
- /* Header and data have been received. The header checksum has been */
- /* checked */
-
- msg_buf->phase = MBG_NONE; /* back to hunting mode */
- return PARSE_INP_DATA; /* message complete, must be evaluated */
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */
-int clk_meinberg_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */
-
-/*
- * History:
- *
- * clk_meinberg.c,v
- * Revision 4.8 1999/11/28 09:13:50 kardel
- * RECON_4_0_98F
- *
- * Revision 4.7 1999/02/21 11:09:14 kardel
- * cleanup
- *
- * Revision 4.6 1998/06/14 21:09:36 kardel
- * Sun acc cleanup
- *
- * Revision 4.5 1998/06/13 15:18:54 kardel
- * fix mem*() to b*() function macro emulation
- *
- * Revision 4.4 1998/06/13 12:03:23 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:28 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/05/24 16:14:42 kardel
- * support current Meinberg standard data formats
- *
- * Revision 4.1 1998/05/24 09:39:52 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:29 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.23 - log info deleted 1998/04/11 kardel
- *
- */
diff --git a/contrib/ntp/libparse/clk_rawdcf.c b/contrib/ntp/libparse/clk_rawdcf.c
deleted file mode 100644
index 40ec8ad..0000000
--- a/contrib/ntp/libparse/clk_rawdcf.c
+++ /dev/null
@@ -1,615 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_rawdcf.c,v 4.9 1999/12/06 13:42:23 kardel Exp
- *
- * clk_rawdcf.c,v 4.9 1999/12/06 13:42:23 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
- * Copyright (C) 1992-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_RAWDCF)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-#ifdef PARSESTREAM
-# include <sys/parsestreams.h>
-#endif
-
-#ifndef PARSEKERNEL
-# include "ntp_stdlib.h"
-#endif
-
-/*
- * DCF77 raw time code
- *
- * From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig
- * und Berlin, Maerz 1989
- *
- * Timecode transmission:
- * 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
- * FM:
- * see the spec. (basically a (non-)inverted psuedo random phase shift)
- *
- * Encoding:
- * 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 -> 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
- */
-
-static u_long pps_rawdcf P((parse_t *, int, timestamp_t *));
-static u_long cvt_rawdcf P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static u_long inp_rawdcf P((parse_t *, unsigned int, timestamp_t *));
-
-typedef struct last_tcode {
- time_t tcode; /* last converted time code */
-} last_tcode_t;
-
-clockformat_t clock_rawdcf =
-{
- inp_rawdcf, /* DCF77 input handling */
- cvt_rawdcf, /* raw dcf input conversion */
- pps_rawdcf, /* examining PPS information */
- 0, /* no private configuration data */
- "RAW DCF77 Timecode", /* direct decoding / time synthesis */
-
- 61, /* bit buffer */
- sizeof(last_tcode_t)
-};
-
-static struct dcfparam
-{
- unsigned char onebits[60];
- unsigned char zerobits[60];
-} dcfparameter =
-{
- "###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */
- "--------------------s-------p------p----------------------p" /* 'ZERO' representation */
-};
-
-static struct rawdcfcode
-{
- char offset; /* start bit */
-} rawdcfcode[] =
-{
- { 0 }, { 15 }, { 16 }, { 17 }, { 19 }, { 20 }, { 21 }, { 25 }, { 28 }, { 29 },
- { 33 }, { 35 }, { 36 }, { 40 }, { 42 }, { 45 }, { 49 }, { 50 }, { 54 }, { 58 }, { 59 }
-};
-
-#define DCF_M 0
-#define DCF_R 1
-#define DCF_A1 2
-#define DCF_Z 3
-#define DCF_A2 4
-#define DCF_S 5
-#define DCF_M1 6
-#define DCF_M10 7
-#define DCF_P1 8
-#define DCF_H1 9
-#define DCF_H10 10
-#define DCF_P2 11
-#define DCF_D1 12
-#define DCF_D10 13
-#define DCF_DW 14
-#define DCF_MO 15
-#define DCF_MO0 16
-#define DCF_Y1 17
-#define DCF_Y10 18
-#define DCF_P3 19
-
-static struct partab
-{
- char offset; /* start bit of parity field */
-} partab[] =
-{
- { 21 }, { 29 }, { 36 }, { 59 }
-};
-
-#define DCF_P_P1 0
-#define DCF_P_P2 1
-#define DCF_P_P3 2
-
-#define DCF_Z_MET 0x2
-#define DCF_Z_MED 0x1
-
-static u_long
-ext_bf(
- register unsigned char *buf,
- register int idx,
- register unsigned char *zero
- )
-{
- register u_long sum = 0;
- register int i, first;
-
- first = rawdcfcode[idx].offset;
-
- for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
- {
- sum <<= 1;
- sum |= (buf[i] != zero[i]);
- }
- return sum;
-}
-
-static unsigned
-pcheck(
- unsigned char *buf,
- int idx,
- unsigned char *zero
- )
-{
- int i,last;
- unsigned psum = 1;
-
- last = partab[idx+1].offset;
-
- for (i = partab[idx].offset; i < last; i++)
- psum ^= (buf[i] != zero[i]);
-
- return psum;
-}
-
-static u_long
-convert_rawdcf(
- unsigned char *buffer,
- int size,
- struct dcfparam *dcfprm,
- clocktime_t *clock_time
- )
-{
- register unsigned char *s = buffer;
- register unsigned char *b = dcfprm->onebits;
- register unsigned char *c = dcfprm->zerobits;
- register int i;
-
- parseprintf(DD_RAWDCF,("parse: convert_rawdcf: \"%s\"\n", buffer));
-
- if (size < 57)
- {
-#ifndef PARSEKERNEL
- msyslog(LOG_ERR, "parse: convert_rawdcf: INCOMPLETE DATA - time code only has %d bits\n", size);
-#endif
- return CVT_NONE;
- }
-
- for (i = 0; i < 58; i++)
- {
- if ((*s != *b) && (*s != *c))
- {
- /*
- * we only have two types of bytes (ones and zeros)
- */
-#ifndef PARSEKERNEL
- msyslog(LOG_ERR, "parse: convert_rawdcf: BAD DATA - no conversion for \"%s\"\n", buffer);
-#endif
- return CVT_NONE;
- }
- b++;
- c++;
- s++;
- }
-
- /*
- * check Start and Parity bits
- */
- if ((ext_bf(buffer, DCF_S, dcfprm->zerobits) == 1) &&
- pcheck(buffer, DCF_P_P1, dcfprm->zerobits) &&
- pcheck(buffer, DCF_P_P2, dcfprm->zerobits) &&
- pcheck(buffer, DCF_P_P3, dcfprm->zerobits))
- {
- /*
- * buffer OK
- */
- parseprintf(DD_RAWDCF,("parse: convert_rawdcf: parity check passed\n"));
-
- clock_time->flags = PARSEB_S_ANTENNA|PARSEB_S_LEAP;
- clock_time->utctime= 0;
- clock_time->usecond= 0;
- clock_time->second = 0;
- clock_time->minute = ext_bf(buffer, DCF_M10, dcfprm->zerobits);
- clock_time->minute = TIMES10(clock_time->minute) + ext_bf(buffer, DCF_M1, dcfprm->zerobits);
- clock_time->hour = ext_bf(buffer, DCF_H10, dcfprm->zerobits);
- clock_time->hour = TIMES10(clock_time->hour) + ext_bf(buffer, DCF_H1, dcfprm->zerobits);
- clock_time->day = ext_bf(buffer, DCF_D10, dcfprm->zerobits);
- clock_time->day = TIMES10(clock_time->day) + ext_bf(buffer, DCF_D1, dcfprm->zerobits);
- clock_time->month = ext_bf(buffer, DCF_MO0, dcfprm->zerobits);
- clock_time->month = TIMES10(clock_time->month) + ext_bf(buffer, DCF_MO, dcfprm->zerobits);
- clock_time->year = ext_bf(buffer, DCF_Y10, dcfprm->zerobits);
- clock_time->year = TIMES10(clock_time->year) + ext_bf(buffer, DCF_Y1, dcfprm->zerobits);
-
- switch (ext_bf(buffer, DCF_Z, dcfprm->zerobits))
- {
- case DCF_Z_MET:
- clock_time->utcoffset = -1*60*60;
- break;
-
- case DCF_Z_MED:
- clock_time->flags |= PARSEB_DST;
- clock_time->utcoffset = -2*60*60;
- break;
-
- default:
- parseprintf(DD_RAWDCF,("parse: convert_rawdcf: BAD TIME ZONE\n"));
- return CVT_FAIL|CVT_BADFMT;
- }
-
- if (ext_bf(buffer, DCF_A1, dcfprm->zerobits))
- clock_time->flags |= PARSEB_ANNOUNCE;
-
- if (ext_bf(buffer, DCF_A2, dcfprm->zerobits))
- clock_time->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
-
- if (ext_bf(buffer, DCF_R, dcfprm->zerobits))
- clock_time->flags |= PARSEB_ALTERNATE;
-
- parseprintf(DD_RAWDCF,("parse: convert_rawdcf: TIME CODE OK: %d:%d, %d.%d.%d, flags 0x%lx\n",
- (int)clock_time->hour, (int)clock_time->minute, (int)clock_time->day, (int)clock_time->month,(int) clock_time->year,
- (u_long)clock_time->flags));
- return CVT_OK;
- }
- else
- {
- /*
- * bad format - not for us
- */
-#ifndef PARSEKERNEL
- msyslog(LOG_ERR, "parse: convert_rawdcf: parity check FAILED for \"%s\"\n", buffer);
-#endif
- return CVT_FAIL|CVT_BADFMT;
- }
-}
-
-/*
- * raw dcf input routine - needs to fix up 50 baud
- * characters for 1/0 decision
- */
-static u_long
-cvt_rawdcf(
- unsigned char *buffer,
- int size,
- struct format *param,
- clocktime_t *clock_time,
- void *local
- )
-{
- last_tcode_t *t = (last_tcode_t *)local;
- register unsigned char *s = (unsigned char *)buffer;
- register unsigned char *e = s + size;
- register unsigned char *b = dcfparameter.onebits;
- register unsigned char *c = dcfparameter.zerobits;
- u_long rtc = CVT_NONE;
- register unsigned int i, lowmax, highmax, cutoff, span;
-#define BITS 9
- unsigned char histbuf[BITS];
- /*
- * the input buffer contains characters with runs of consecutive
- * bits set. These set bits are an indication of the DCF77 pulse
- * length. We assume that we receive the pulse at 50 Baud. Thus
- * a 100ms pulse would generate a 4 bit train (20ms per bit and
- * start bit)
- * a 200ms pulse would create all zeroes (and probably a frame error)
- */
-
- for (i = 0; i < BITS; i++)
- {
- histbuf[i] = 0;
- }
-
- cutoff = 0;
- lowmax = 0;
-
- while (s < e)
- {
- register unsigned int ch = *s ^ 0xFF;
- /*
- * these lines are left as an excercise to the reader 8-)
- */
- if (!((ch+1) & ch) || !*s)
- {
-
- for (i = 0; ch; i++)
- {
- ch >>= 1;
- }
-
- *s = i;
- histbuf[i]++;
- cutoff += i;
- lowmax++;
- }
- else
- {
- parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: character check for 0x%x@%d FAILED\n", *s, (int)(s - (unsigned char *)buffer)));
- *s = (unsigned char)~0;
- rtc = CVT_FAIL|CVT_BADFMT;
- }
- s++;
- }
-
- if (lowmax)
- {
- cutoff /= lowmax;
- }
- else
- {
- cutoff = 4; /* doesn't really matter - it'll fail anyway, but gives error output */
- }
-
- parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: average bit count: %d\n", cutoff));
-
- lowmax = 0;
- highmax = 0;
-
- parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: histogram:"));
- for (i = 0; i <= cutoff; i++)
- {
- lowmax+=histbuf[i] * i;
- highmax += histbuf[i];
- parseprintf(DD_RAWDCF,(" %d", histbuf[i]));
- }
- parseprintf(DD_RAWDCF, (" <M>"));
-
- lowmax += highmax / 2;
-
- if (highmax)
- {
- lowmax /= highmax;
- }
- else
- {
- lowmax = 0;
- }
-
- highmax = 0;
- cutoff = 0;
-
- for (; i < BITS; i++)
- {
- highmax+=histbuf[i] * i;
- cutoff +=histbuf[i];
- parseprintf(DD_RAWDCF,(" %d", histbuf[i]));
- }
- parseprintf(DD_RAWDCF,("\n"));
-
- if (cutoff)
- {
- highmax /= cutoff;
- }
- else
- {
- highmax = BITS-1;
- }
-
- span = cutoff = lowmax;
- for (i = lowmax; i <= highmax; i++)
- {
- if (histbuf[cutoff] > histbuf[i])
- {
- cutoff = i;
- span = i;
- }
- else
- if (histbuf[cutoff] == histbuf[i])
- {
- span = i;
- }
- }
-
- cutoff = (cutoff + span) / 2;
-
- parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: lower maximum %d, higher maximum %d, cutoff %d\n", lowmax, highmax, cutoff));
-
- s = (unsigned char *)buffer;
- while ((s < e) && *c && *b)
- {
- if (*s == (unsigned char)~0)
- {
- *s = '?';
- }
- else
- {
- *s = (*s >= cutoff) ? *b : *c;
- }
- s++;
- b++;
- c++;
- }
-
- if (rtc == CVT_NONE)
- {
- rtc = convert_rawdcf(buffer, size, &dcfparameter, clock_time);
- if (rtc == CVT_OK)
- {
- time_t newtime;
-
- newtime = parse_to_unixtime(clock_time, &rtc);
- if ((rtc == CVT_OK) && t)
- {
- if ((newtime - t->tcode) == 60) /* guard against multi bit errors */
- {
- clock_time->utctime = newtime;
- }
- else
- {
- rtc = CVT_FAIL|CVT_BADTIME;
- }
- t->tcode = newtime;
- }
- }
- }
-
- return rtc;
-}
-
-/*
- * pps_rawdcf
- *
- * currently a very stupid version - should be extended to decode
- * also ones and zeros (which is easy)
- */
-/*ARGSUSED*/
-static u_long
-pps_rawdcf(
- register parse_t *parseio,
- register int status,
- register timestamp_t *ptime
- )
-{
- if (!status) /* negative edge for simpler wiring (Rx->DCD) */
- {
- parseio->parse_dtime.parse_ptime = *ptime;
- parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
- }
-
- return CVT_NONE;
-}
-
-static u_long
-snt_rawdcf(
- register parse_t *parseio,
- register timestamp_t *ptime
- )
-{
- if ((parseio->parse_dtime.parse_status & CVT_MASK) == CVT_OK)
- {
- parseio->parse_dtime.parse_stime = *ptime;
-
-#ifdef PARSEKERNEL
- parseio->parse_dtime.parse_time.tv.tv_sec++;
-#else
- parseio->parse_dtime.parse_time.fp.l_ui++;
-#endif
-
- parseprintf(DD_RAWDCF,("parse: snt_rawdcf: time stamp synthesized offset %d seconds\n", parseio->parse_index - 1));
-
- return updatetimeinfo(parseio, parseio->parse_lstate);
- }
- return CVT_NONE;
-}
-
-/*
- * inp_rawdcf
- *
- * grep DCF77 data from input stream
- */
-static u_long
-inp_rawdcf(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- static struct timeval timeout = { 1, 500000 }; /* 1.5 secongs denote second #60 */
-
- parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
-
- if (parse_timedout(parseio, tstamp, &timeout))
- {
- parseprintf(DD_PARSE, ("inp_rawdcf: time out seen\n"));
-
- (void) parse_end(parseio);
- (void) parse_addchar(parseio, ch);
- return PARSE_INP_TIME;
- }
- else
- {
- unsigned int rtc;
-
- rtc = parse_addchar(parseio, ch);
- if (rtc == PARSE_INP_SKIP)
- {
- if (snt_rawdcf(parseio, tstamp) == CVT_OK)
- return PARSE_INP_SYNTH;
- }
- return rtc;
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */
-int clk_rawdcf_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */
-
-/*
- * History:
- *
- * clk_rawdcf.c,v
- * Revision 4.9 1999/12/06 13:42:23 kardel
- * transfer correctly converted time codes always into tcode
- *
- * Revision 4.8 1999/11/28 09:13:50 kardel
- * RECON_4_0_98F
- *
- * Revision 4.7 1999/04/01 20:07:20 kardel
- * added checking for minutie increment of timestamps in clk_rawdcf.c
- *
- * Revision 4.6 1998/06/14 21:09:37 kardel
- * Sun acc cleanup
- *
- * Revision 4.5 1998/06/13 12:04:16 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.4 1998/06/12 15:22:28 kardel
- * fix prototypes
- *
- * Revision 4.3 1998/06/06 18:33:36 kardel
- * simplified condidional compile expression
- *
- * Revision 4.2 1998/05/24 11:04:18 kardel
- * triggering PPS on negative edge for simpler wiring (Rx->DCD)
- *
- * Revision 4.1 1998/05/24 09:39:53 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:30 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.24 log info deleted 1998/04/11 kardel
- *
- */
diff --git a/contrib/ntp/libparse/clk_rcc8000.c b/contrib/ntp/libparse/clk_rcc8000.c
deleted file mode 100644
index 23e6763..0000000
--- a/contrib/ntp/libparse/clk_rcc8000.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_rcc8000.c,v 4.6 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * clk_rcc8000.c,v 4.6 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support
- *
- * Created by R.E.Broughton from clk_trimtaip.c
- *
- * 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.
- *
- */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_RCC8000)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-/* Type II Serial Output format
- *
- * 0000000000111111111122222222223 / char
- * 0123456789012345678901234567890 \ posn
- * HH:MM:SS.XYZ DD/MM/YY DDD W Prn Actual
- * 33 44 55 666 00 11 22 7 Parse
- * : : . / / rn Check
- * "15:50:36.534 30/09/94 273 5 A\x0d\x0a"
- *
- * DDD - Day of year number
- * W - Day of week number (Sunday is 0)
- * P is the Status. See comment below for details.
- */
-
-#define O_USEC O_WDAY
-static struct format rcc8000_fmt =
-{ { { 13, 2 }, {16, 2}, { 19, 2}, /* Day, Month, Year */
- { 0, 2 }, { 3, 2}, { 6, 2}, /* Hour, Minute, Second */
- { 9, 3 }, {28, 1}, { 0, 0}, /* uSec, Status (Valid,Reject,BST,Leapyear) */ },
- (const unsigned char *)" : : . / / \r\n",
- /*"15:50:36.534 30/09/94 273 5 A\x0d\x0a" */
- 0
-};
-
-static unsigned long cvt_rcc8000 P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static unsigned long inp_rcc8000 P((parse_t *, unsigned int, timestamp_t *));
-
-clockformat_t clock_rcc8000 =
-{
- inp_rcc8000, /* no input handling */
- cvt_rcc8000, /* Radiocode clock conversion */
- 0, /* no direct PPS monitoring */
- (void *)&rcc8000_fmt, /* conversion configuration */
- "Radiocode RCC8000",
- 31, /* string buffer */
- 0 /* no private data */
-};
-
-static unsigned long
-cvt_rcc8000(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
-#define OFFS(x) format->field_offsets[(x)].offset
-#define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length)
- if ( STOI(O_DAY, &clock_time->day) ||
- STOI(O_MONTH, &clock_time->month) ||
- STOI(O_YEAR, &clock_time->year) ||
- STOI(O_HOUR, &clock_time->hour) ||
- STOI(O_MIN, &clock_time->minute) ||
- STOI(O_SEC, &clock_time->second) ||
- STOI(O_USEC, &clock_time->usecond)
- ) return CVT_FAIL|CVT_BADFMT;
- clock_time->usecond *= 1000;
-
- clock_time->utcoffset = 0;
-
-#define RCCP buffer[28]
- /*
- * buffer[28] is the ASCII representation of a hex character ( 0 through F )
- * The four bits correspond to:
- * 8 - Valid Time
- * 4 - Reject Code
- * 2 - British Summer Time (receiver set to emit GMT all year.)
- * 1 - Leap year
- */
-#define RCC8000_VALID 0x8
-#define RCC8000_REJECT 0x4
-#define RCC8000_BST 0x2
-#define RCC8000_LEAPY 0x1
-
- clock_time->flags = 0;
-
- if ( (RCCP >= '0' && RCCP <= '9') || (RCCP >= 'A' && RCCP <= 'F') )
- {
- register int flag;
-
- flag = (RCCP >= '0' && RCCP <= '9' ) ? RCCP - '0' : RCCP - 'A' + 10;
-
- if (!(flag & RCC8000_VALID))
- clock_time->flags |= PARSEB_POWERUP;
-
- clock_time->flags |= PARSEB_UTC; /* British special - guess why 8-) */
-
- /* other flags not used */
- }
- return CVT_OK;
-}
-/*
- * inp_rcc8000
- *
- * grep data from input stream
- */
-static u_long
-inp_rcc8000(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case '\n':
- parseprintf(DD_PARSE, ("inp_rcc8000: EOL seen\n"));
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
-
- default:
- if (parseio->parse_index == 0) /* take sample at start of message */
- {
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- }
- return parse_addchar(parseio, ch);
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */
-int clk_rcc8000_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */
-
-/*
- * History:
- *
- * clk_rcc8000.c,v
- * Revision 4.6 1999/11/28 09:13:51 kardel
- * RECON_4_0_98F
- *
- * Revision 4.5 1998/06/14 21:09:38 kardel
- * Sun acc cleanup
- *
- * Revision 4.4 1998/06/13 12:05:02 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:29 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:25 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:53 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:30 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.5 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/clk_schmid.c b/contrib/ntp/libparse/clk_schmid.c
deleted file mode 100644
index 52c0ef4..0000000
--- a/contrib/ntp/libparse/clk_schmid.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_schmid.c,v 4.5 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * clk_schmid.c,v 4.5 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * Schmid clock support
- *
- * Copyright (C) 1992-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_SCHMID)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-/*
- * Description courtesy of Adam W. Feigin et. al (Swisstime iis.ethz.ch)
- *
- * 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).
- *
- * 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)
- *
- */
-#define WS_TIME 0x01
-#define WS_SIGNAL 0x02
-
-#define WS_ALTERNATE 0x01
-#define WS_ANNOUNCE 0x02
-#define WS_TZ 0x0c
-#define WS_MET 0x08
-#define WS_MEST 0x04
-#define WS_LEAP 0x10
-
-static u_long cvt_schmid P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static unsigned long inp_schmid P((parse_t *, unsigned int, timestamp_t *));
-
-clockformat_t clock_schmid =
-{
- inp_schmid, /* no input handling */
- cvt_schmid, /* Schmid conversion */
- 0, /* not direct PPS monitoring */
- 0, /* conversion configuration */
- "Schmid", /* Schmid receiver */
- 12, /* binary data buffer */
- 0, /* no private data (complete messages) */
-};
-
-
-static u_long
-cvt_schmid(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- if ((size != 11) || (buffer[10] != (unsigned char)'\375'))
- {
- return CVT_NONE;
- }
- else
- {
- if (buffer[0] > 23 || buffer[1] > 59 || buffer[2] > 59 || buffer[3] > 9) /* Time */
- {
- return CVT_FAIL|CVT_BADTIME;
- }
- else
- if (buffer[4] < 1 || buffer[4] > 31 || buffer[5] < 1 || buffer[5] > 12
- || buffer[6] > 99)
- {
- return CVT_FAIL|CVT_BADDATE;
- }
- else
- {
- clock_time->hour = buffer[0];
- clock_time->minute = buffer[1];
- clock_time->second = buffer[2];
- clock_time->usecond = buffer[3] * 100000;
- clock_time->day = buffer[4];
- clock_time->month = buffer[5];
- clock_time->year = buffer[6];
-
- clock_time->flags = 0;
-
- switch (buffer[8] & WS_TZ)
- {
- case WS_MET:
- clock_time->utcoffset = -1*60*60;
- break;
-
- case WS_MEST:
- clock_time->utcoffset = -2*60*60;
- clock_time->flags |= PARSEB_DST;
- break;
-
- default:
- return CVT_FAIL|CVT_BADFMT;
- }
-
- if (!(buffer[7] & WS_TIME))
- {
- clock_time->flags |= PARSEB_POWERUP;
- }
-
- if (!(buffer[7] & WS_SIGNAL))
- {
- clock_time->flags |= PARSEB_NOSYNC;
- }
-
- if (buffer[7] & WS_SIGNAL)
- {
- if (buffer[8] & WS_ALTERNATE)
- {
- clock_time->flags |= PARSEB_ALTERNATE;
- }
-
- if (buffer[8] & WS_ANNOUNCE)
- {
- clock_time->flags |= PARSEB_ANNOUNCE;
- }
-
- if (buffer[8] & WS_LEAP)
- {
- clock_time->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
- }
- }
-
- clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_ANTENNA;
-
- return CVT_OK;
- }
- }
-}
-
-/*
- * inp_schmid
- *
- * grep data from input stream
- */
-static u_long
-inp_schmid(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case 0xFD: /* */
- parseprintf(DD_PARSE, ("mbg_input: ETX seen\n"));
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */
-int clk_schmid_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */
-
-/*
- * History:
- *
- * clk_schmid.c,v
- * Revision 4.5 1999/11/28 09:13:51 kardel
- * RECON_4_0_98F
- *
- * Revision 4.4 1998/06/13 12:06:03 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:29 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:26 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:53 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:31 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.22 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/clk_trimtaip.c b/contrib/ntp/libparse/clk_trimtaip.c
deleted file mode 100644
index 4453e2b..0000000
--- a/contrib/ntp/libparse/clk_trimtaip.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_trimtaip.c,v 4.7 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * clk_trimtaip.c,v 4.7 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * Trimble SV6 clock support - several collected codepieces
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_TRIMTAIP)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-/* 0000000000111111111122222222223333333 / char
- * 0123456789012345678901234567890123456 \ posn
- * >RTMhhmmssdddDDMMYYYYoodnnvrrrrr;*xx< Actual
- * ----33445566600112222BB7__-_____--99- Parse
- * >RTM 1 ;* <", Check
- */
-
-#define hexval(x) (('0' <= (x) && (x) <= '9') ? (x) - '0' : \
- ('a' <= (x) && (x) <= 'f') ? (x) - 'a' + 10 : \
- ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
- -1)
-#define O_USEC O_WDAY
-#define O_GPSFIX O_FLAGS
-#define O_CHKSUM O_UTCHOFFSET
- static struct format trimsv6_fmt =
-{ { { 13, 2 }, {15, 2}, { 17, 4}, /* Day, Month, Year */
- { 4, 2 }, { 6, 2}, { 8, 2}, /* Hour, Minute, Second */
- { 10, 3 }, {23, 1}, { 0, 0}, /* uSec, FIXes (WeekDAY, FLAGS, ZONE) */
- { 34, 2 }, { 0, 0}, { 21, 2}, /* cksum, -, utcS (UTC[HMS]OFFSET) */
-},
- (const unsigned char *)">RTM 1 ;* <",
- 0
-};
-
-static unsigned long cvt_trimtaip P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static unsigned long inp_trimtaip P((parse_t *, unsigned int, timestamp_t *));
-
-clockformat_t clock_trimtaip =
-{
- inp_trimtaip, /* no input handling */
- cvt_trimtaip, /* Trimble conversion */
- pps_one, /* easy PPS monitoring */
- (void *)&trimsv6_fmt, /* conversion configuration */
- "Trimble TAIP",
- 37, /* string buffer */
- 0 /* no private data */
-};
-
-static unsigned long
-cvt_trimtaip(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- long gpsfix;
- u_char calc_csum = 0;
- long recv_csum;
- int i;
-
- if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
-#define OFFS(x) format->field_offsets[(x)].offset
-#define STOI(x, y) \
- Stoi(&buffer[OFFS(x)], y, \
- format->field_offsets[(x)].length)
- if ( STOI(O_DAY, &clock_time->day) ||
- STOI(O_MONTH, &clock_time->month) ||
- STOI(O_YEAR, &clock_time->year) ||
- STOI(O_HOUR, &clock_time->hour) ||
- STOI(O_MIN, &clock_time->minute) ||
- STOI(O_SEC, &clock_time->second) ||
- STOI(O_USEC, &clock_time->usecond)||
- STOI(O_GPSFIX, &gpsfix)
- ) return CVT_FAIL|CVT_BADFMT;
-
- clock_time->usecond *= 1000;
- /* Check that the checksum is right */
- for (i=OFFS(O_CHKSUM)-1; i >= 0; i--) calc_csum ^= buffer[i];
- recv_csum = (hexval(buffer[OFFS(O_CHKSUM)]) << 4) |
- hexval(buffer[OFFS(O_CHKSUM)+1]);
- if (recv_csum < 0) return CVT_FAIL|CVT_BADTIME;
- if (((u_char) recv_csum) != calc_csum) return CVT_FAIL|CVT_BADTIME;
-
- clock_time->utcoffset = 0;
-
- /* What should flags be set to ? */
- clock_time->flags = PARSEB_UTC;
-
- /* if the current GPS fix is 9 (unknown), reject */
- if (0 > gpsfix || gpsfix > 9) clock_time->flags |= PARSEB_POWERUP;
-
- return CVT_OK;
-}
-
-/*
- * inp_trimtaip
- *
- * grep data from input stream
- */
-static u_long
-inp_trimtaip(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case '>':
- parseprintf(DD_PARSE, ("inp_trimptaip: START seen\n"));
-
- parseio->parse_index = 1;
- parseio->parse_data[0] = ch;
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- return PARSE_INP_SKIP;
-
- case '<':
- parseprintf(DD_PARSE, ("inp_trimtaip: END seen\n"));
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */
-int clk_trimtaip_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */
-
-/*
- * History:
- *
- * clk_trimtaip.c,v
- * Revision 4.7 1999/11/28 09:13:51 kardel
- * RECON_4_0_98F
- *
- * Revision 4.6 1998/08/16 18:46:27 kardel
- * (clock_trimtaip =): changed format name
- *
- * Revision 4.5 1998/06/14 21:09:38 kardel
- * Sun acc cleanup
- *
- * Revision 4.4 1998/06/13 12:06:57 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.3 1998/06/12 15:22:29 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:26 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:54 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:31 kardel
- * Start 4.0 release version numbering
- *
- * from V3 1.4 log info deleted 1998/04/11 kardel
- */
-
diff --git a/contrib/ntp/libparse/clk_trimtsip.c b/contrib/ntp/libparse/clk_trimtsip.c
deleted file mode 100644
index 4e1d983..0000000
--- a/contrib/ntp/libparse/clk_trimtsip.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_trimtsip.c,v 4.13 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * clk_trimtsip.c,v 4.13 1999/11/28 09:13:51 kardel RELEASE_19991128_A
- *
- * Trimble TSIP support - CURRENTLY VERY MUCH UNDER CONSTRUCTION
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_TRIMTSIP)
-
-#include "ntp_syslog.h"
-#include "ntp_types.h"
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#include "ntp_machine.h"
-#include "ntp_stdlib.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-# include <stdio.h>
-#else
-# include "sys/parsestreams.h"
-#endif
-
-#include "ascii.h"
-#include "binio.h"
-#include "ieee754io.h"
-#include "trimble.h"
-
-/*
- * Trimble low level TSIP parser / time converter
- *
- * The receiver uses a serial message protocol called Trimble Standard
- * Interface Protocol (it can support others but this driver only supports
- * TSIP). Messages in this protocol have the following form:
- *
- * <DLE><id> ... <data> ... <DLE><ETX>
- *
- * Any bytes within the <data> portion of value 10 hex (<DLE>) are doubled
- * on transmission and compressed back to one on reception. Otherwise
- * the values of data bytes can be anything. The serial interface is RS-422
- * asynchronous using 9600 baud, 8 data bits with odd party (**note** 9 bits
- * in total!), and 1 stop bit. The protocol supports byte, integer, single,
- * and double datatypes. Integers are two bytes, sent most significant first.
- * Singles are IEEE754 single precision floating point numbers (4 byte) sent
- * sign & exponent first. Doubles are IEEE754 double precision floating point
- * numbers (8 byte) sent sign & exponent first.
- * The receiver supports a large set of messages, only a very small subset of
- * which is used here.
- *
- * From this module the following are recognised:
- *
- * ID Description
- *
- * 41 GPS Time
- * 46 Receiver health
- * 4F UTC correction data (used to get leap second warnings)
- *
- * All others are accepted but ignored for time conversion - they are passed up to higher layers.
- *
- */
-
-static offsets_t trim_offsets = { 0, 1, 2, 3, 4, 5, 6, 7 };
-
-struct trimble
-{
- u_char t_in_pkt; /* first DLE received */
- u_char t_dle; /* subsequent DLE received */
- u_short t_week; /* GPS week */
- u_short t_weekleap; /* GPS week of next/last week */
- u_short t_dayleap; /* day in week */
- u_short t_gpsutc; /* GPS - UTC offset */
- u_short t_gpsutcleap; /* offset at next/last leap */
- u_char t_operable; /* receiver feels OK */
- u_char t_mode; /* actual operating mode */
- u_char t_leap; /* possible leap warning */
- u_char t_utcknown; /* utc offset known */
-};
-
-#define STATUS_BAD 0 /* BAD or UNINITIALIZED receiver status */
-#define STATUS_UNSAFE 1 /* not enough receivers for full precision */
-#define STATUS_SYNC 2 /* enough information for good operation */
-
-static unsigned long inp_tsip P((parse_t *, unsigned int, timestamp_t *));
-static unsigned long cvt_trimtsip P((unsigned char *, int, struct format *, clocktime_t *, void *));
-
-struct clockformat clock_trimtsip =
-{
- inp_tsip, /* Trimble TSIP input handler */
- cvt_trimtsip, /* Trimble TSIP conversion */
- pps_one, /* easy PPS monitoring */
- 0, /* no configuration data */
- "Trimble TSIP",
- 400, /* input buffer */
- sizeof(struct trimble) /* private data */
-};
-
-#define ADDSECOND 0x01
-#define DELSECOND 0x02
-
-static unsigned long
-inp_tsip(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- struct trimble *t = (struct trimble *)parseio->parse_pdata;
-
- if (!t)
- return PARSE_INP_SKIP; /* local data not allocated - sigh! */
-
- if (!t->t_in_pkt && ch != DLE) {
- /* wait for start of packet */
- return PARSE_INP_SKIP;
- }
-
- if ((parseio->parse_index >= (parseio->parse_dsize - 2)) ||
- (parseio->parse_dtime.parse_msglen >= (sizeof(parseio->parse_dtime.parse_msg) - 2)))
- { /* OVERFLOW - DROP! */
- t->t_in_pkt = t->t_dle = 0;
- parseio->parse_index = 0;
- parseio->parse_dtime.parse_msglen = 0;
- return PARSE_INP_SKIP;
- }
-
- switch (ch) {
- case DLE:
- if (!t->t_in_pkt) {
- t->t_dle = 0;
- t->t_in_pkt = 1;
- parseio->parse_index = 0;
- parseio->parse_data[parseio->parse_index++] = ch;
- parseio->parse_dtime.parse_msglen = 0;
- parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
- parseio->parse_dtime.parse_stime = *tstamp; /* pick up time stamp at packet start */
- } else if (t->t_dle) {
- /* Double DLE -> insert a DLE */
- t->t_dle = 0;
- parseio->parse_data[parseio->parse_index++] = DLE;
- parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = DLE;
- } else
- t->t_dle = 1;
- break;
-
- case ETX:
- if (t->t_dle) {
- /* DLE,ETX -> end of packet */
- parseio->parse_data[parseio->parse_index++] = DLE;
- parseio->parse_data[parseio->parse_index] = ch;
- parseio->parse_ldsize = parseio->parse_index+1;
- memcpy(parseio->parse_ldata, parseio->parse_data, parseio->parse_ldsize);
- parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = DLE;
- parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
- t->t_in_pkt = t->t_dle = 0;
- return PARSE_INP_TIME|PARSE_INP_DATA;
- }
-
- default: /* collect data */
- t->t_dle = 0;
- parseio->parse_data[parseio->parse_index++] = ch;
- parseio->parse_dtime.parse_msg[parseio->parse_dtime.parse_msglen++] = ch;
- }
-
- return PARSE_INP_SKIP;
-}
-
-static int
-getshort(
- unsigned char *p
- )
-{
- return get_msb_short(&p);
-}
-
-/*
- * cvt_trimtsip
- *
- * convert TSIP type format
- */
-static unsigned long
-cvt_trimtsip(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- register struct trimble *t = (struct trimble *)local; /* get local data space */
-#define mb(_X_) (buffer[2+(_X_)]) /* shortcut for buffer access */
- register u_char cmd;
-
- clock_time->flags = 0;
-
- if (!t) {
- return CVT_NONE; /* local data not allocated - sigh! */
- }
-
- if ((size < 4) ||
- (buffer[0] != DLE) ||
- (buffer[size-1] != ETX) ||
- (buffer[size-2] != DLE))
- {
- printf("TRIMBLE BAD packet, size %d:\n", size);
- return CVT_NONE;
- }
- else
- {
- unsigned char *bp;
- cmd = buffer[1];
-
- switch(cmd)
- {
- case CMD_RCURTIME:
- { /* GPS time */
- l_fp secs;
- int week = getshort((unsigned char *)&mb(4));
- l_fp utcoffset;
- l_fp gpstime;
-
- bp = &mb(0);
- if (fetch_ieee754(&bp, IEEE_SINGLE, &secs, trim_offsets) != IEEE_OK)
- return CVT_FAIL|CVT_BADFMT;
-
- if ((secs.l_i <= 0) ||
- (t->t_utcknown == 0))
- {
- clock_time->flags = PARSEB_POWERUP;
- return CVT_OK;
- }
- if (week < 990) {
- week += 1024;
- }
-
- /* time OK */
-
- /* fetch UTC offset */
- bp = &mb(6);
- if (fetch_ieee754(&bp, IEEE_SINGLE, &utcoffset, trim_offsets) != IEEE_OK)
- return CVT_FAIL|CVT_BADFMT;
-
- L_SUB(&secs, &utcoffset); /* adjust GPS time to UTC time */
-
- gpstolfp((unsigned short)week, (unsigned short)0,
- secs.l_ui, &gpstime);
-
- gpstime.l_uf = secs.l_uf;
-
- clock_time->utctime = gpstime.l_ui - JAN_1970;
-
- TSFTOTVU(gpstime.l_uf, clock_time->usecond);
-
- if (t->t_leap == ADDSECOND)
- clock_time->flags |= PARSEB_LEAPADD;
-
- if (t->t_leap == DELSECOND)
- clock_time->flags |= PARSEB_LEAPDEL;
-
- switch (t->t_operable)
- {
- case STATUS_SYNC:
- clock_time->flags &= ~(PARSEB_POWERUP|PARSEB_NOSYNC);
- break;
-
- case STATUS_UNSAFE:
- clock_time->flags |= PARSEB_NOSYNC;
- break;
-
- case STATUS_BAD:
- clock_time->flags |= PARSEB_NOSYNC|PARSEB_POWERUP;
- break;
- }
-
- if (t->t_mode == 0)
- clock_time->flags |= PARSEB_POSITION;
-
- clock_time->flags |= PARSEB_S_LEAP|PARSEB_S_POSITION;
-
- return CVT_OK;
-
- } /* case 0x41 */
-
- case CMD_RRECVHEALTH:
- {
- /* TRIMBLE health */
- u_char status = mb(0);
-
- switch (status)
- {
- case 0x00: /* position fixes */
- t->t_operable = STATUS_SYNC;
- break;
-
- case 0x09: /* 1 satellite */
- case 0x0A: /* 2 satellites */
- case 0x0B: /* 3 satellites */
- t->t_operable = STATUS_UNSAFE;
- break;
-
- default:
- t->t_operable = STATUS_BAD;
- break;
- }
- t->t_mode = status;
- }
- break;
-
- case CMD_RUTCPARAM:
- {
- l_fp t0t;
- unsigned char *lbp;
-
- /* UTC correction data - derive a leap warning */
- int tls = t->t_gpsutc = getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
- int tlsf = t->t_gpsutcleap = getshort((unsigned char *)&mb(24)); /* new leap correction */
-
- t->t_weekleap = getshort((unsigned char *)&mb(20)); /* week no of leap correction */
- if (t->t_weekleap < 990)
- t->t_weekleap += 1024;
-
- t->t_dayleap = getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
- t->t_week = getshort((unsigned char *)&mb(18)); /* current week no */
- if (t->t_week < 990)
- t->t_week += 1024;
-
- lbp = (unsigned char *)&mb(14); /* last update time */
- if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK)
- return CVT_FAIL|CVT_BADFMT;
-
- t->t_utcknown = t0t.l_ui != 0;
-
- if ((t->t_utcknown) && /* got UTC information */
- (tlsf != tls) && /* something will change */
- ((t->t_weekleap - t->t_week) < 5)) /* and close in the future */
- {
- /* generate a leap warning */
- if (tlsf > tls)
- t->t_leap = ADDSECOND;
- else
- t->t_leap = DELSECOND;
- }
- else
- {
- t->t_leap = 0;
- }
- }
- break;
-
- default:
- /* it's validly formed, but we don't care about it! */
- break;
- }
- }
- return CVT_SKIP;
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */
-int clk_trimtsip_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */
-
-/*
- * History:
- *
- * clk_trimtsip.c,v
- * Revision 4.13 1999/11/28 09:13:51 kardel
- * RECON_4_0_98F
- *
- * Revision 4.12 1999/02/28 13:00:08 kardel
- * *** empty log message ***
- *
- * Revision 4.11 1999/02/28 11:47:54 kardel
- * (struct trimble): new member t_utcknown
- * (cvt_trimtsip): fixed status monitoring, bad receiver states are
- * now recognized
- *
- * Revision 4.10 1999/02/27 15:57:15 kardel
- * use mmemcpy instead of bcopy
- *
- * Revision 4.9 1999/02/21 12:17:42 kardel
- * 4.91f reconcilation
- *
- * Revision 4.8 1998/11/15 20:27:58 kardel
- * Release 4.0.73e13 reconcilation
- *
- * Revision 4.7 1998/08/16 18:49:20 kardel
- * (cvt_trimtsip): initial kernel capable version (no more floats)
- * (clock_trimtsip =): new format name
- *
- * Revision 4.6 1998/08/09 22:26:05 kardel
- * Trimble TSIP support
- *
- * Revision 4.5 1998/08/02 10:37:05 kardel
- * working TSIP parser
- *
- * Revision 4.4 1998/06/28 16:50:40 kardel
- * (getflt): fixed ENDIAN issue
- * (getdbl): fixed ENDIAN issue
- * (getint): use get_msb_short()
- * (cvt_trimtsip): use gpstolfp() for conversion
- *
- * Revision 4.3 1998/06/13 12:07:31 kardel
- * fix SYSV clock name clash
- *
- * Revision 4.2 1998/06/12 15:22:30 kardel
- * fix prototypes
- *
- * Revision 4.1 1998/05/24 09:39:54 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:32 kardel
- * Start 4.0 release version numbering
- *
- * from V3 1.8 loginfo deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/clk_varitext.c b/contrib/ntp/libparse/clk_varitext.c
deleted file mode 100644
index 8019e0e..0000000
--- a/contrib/ntp/libparse/clk_varitext.c
+++ /dev/null
@@ -1,236 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_VARITEXT)
-/*
- * clk_varitext.c,v 1.0 1997/01/19 A.McConnell
- *
- * Supports Varitext's Radio Clock
- *
- * Used the Meinberg/Computime clock as a template for Varitext Radio Clock
- *
- * Copyright (C) 1992-1996 by Frank Kardel
- * Friedrich-Alexander Universitt Erlangen-Nrnberg, Germany
- *
- * 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.
- *
- */
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-# include "ntp_stdlib.h"
-# include <stdio.h>
-#else
-# include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-static const u_char VT_INITIALISED = 0x01;
-static const u_char VT_SYNCHRONISED = 0x02;
-static const u_char VT_ALARM_STATE = 0x04;
-static const u_char VT_BST = 0x08;
-static const u_char VT_SEASON_CHANGE = 0x10;
-static const u_char VT_LAST_TELEGRAM_OK = 0x20;
-
-/*
- * The Varitext receiver sends a datagram in the following format every minute
- *
- * Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLFSTXXX
- * Pos 0123456789012345678901 2 3 4567
- * 0000000000111111111122 2 2 2222
- * Parse T: : : : : : : \r\n
- *
- * T Startcharacter "T" 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
- * ST Status character
- * Bit 0 - Set= Initialised; Reset=Time Invalid (DO NOT USE)
- * Bit 1 - Set= Synchronised; Reset= Unsynchronised
- * Bit 2 - Set= Alarm state; Reset= No alarm
- * Bit 3 - Set= BST; Reset= GMT
- * Bit 4 - Set= Seasonal change in approx hour; Reset= No seasonal change expected
- * Bit 5 - Set= Last MSF telegram was OK; Reset= Last telegram was in error;
- * Bit 6 - Always set
- * Bit 7 - Unused
- * XXX Checksum calculated using Fletcher's method (ignored for now).
- */
-
-static struct format varitext_fmt =
-{
- {
- {8, 2}, {5, 2}, {2, 2}, /* day, month, year */
- {14, 2}, {17, 2}, {20, 2}, /* hour, minute, second */
- {11, 2}, {24, 1} /* dayofweek, status */
- },
- (const unsigned char*)"T: : : : : : : \r\n ",
- 0
-};
-
-static u_long cvt_varitext P((unsigned char *, int, struct format *, clocktime_t *, void *));
-static u_long inp_varitext P((parse_t *, unsigned int, timestamp_t *));
-
-struct varitext {
- unsigned char start_found;
- unsigned char end_found;
- unsigned char end_count;
- unsigned char previous_ch;
- timestamp_t tstamp;
-};
-
-clockformat_t clock_varitext =
-{
- inp_varitext, /* Because of the strange format we need to parse it ourselves */
- cvt_varitext, /* Varitext conversion */
- 0, /* no PPS monitoring */
- (void *)&varitext_fmt, /* conversion configuration */
- "Varitext Radio Clock", /* Varitext Radio Clock */
- 30, /* string buffer */
- sizeof(struct varitext), /* Private data size required to hold current parse state */
-};
-
-/*
- * cvt_varitext
- *
- * convert simple type format
- */
-static u_long
-cvt_varitext(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
-
- if (!Strok(buffer, format->fixed_string)) {
- return CVT_NONE;
- } else {
- if (Stoi(&buffer[format->field_offsets[O_DAY].offset], &clock_time->day,
- format->field_offsets[O_DAY].length) ||
- Stoi(&buffer[format->field_offsets[O_MONTH].offset], &clock_time->month,
- format->field_offsets[O_MONTH].length) ||
- Stoi(&buffer[format->field_offsets[O_YEAR].offset], &clock_time->year,
- format->field_offsets[O_YEAR].length) ||
- Stoi(&buffer[format->field_offsets[O_HOUR].offset], &clock_time->hour,
- format->field_offsets[O_HOUR].length) ||
- Stoi(&buffer[format->field_offsets[O_MIN].offset], &clock_time->minute,
- format->field_offsets[O_MIN].length) ||
- Stoi(&buffer[format->field_offsets[O_SEC].offset], &clock_time->second,
- format->field_offsets[O_SEC].length)) {
- return CVT_FAIL | CVT_BADFMT;
- } else {
- u_char *f = (u_char*) &buffer[format->field_offsets[O_FLAGS].offset];
-
- clock_time->flags = 0;
- clock_time->utcoffset = 0;
-
- if (((*f) & VT_BST)) /* BST flag is set so set to indicate daylight saving time is active and utc offset */
- {
- clock_time->utcoffset = -1*60*60;
- clock_time->flags |= PARSEB_DST;
- }
- /*
- if (!((*f) & VT_INITIALISED)) Clock not initialised
- clock_time->flags |= PARSEB_POWERUP;
-
- if (!((*f) & VT_SYNCHRONISED)) Clock not synchronised
- clock_time->flags |= PARSEB_NOSYNC;
-
- if (((*f) & VT_SEASON_CHANGE)) Seasonal change expected in the next hour
- clock_time->flags |= PARSEB_ANNOUNCE;
- */
- return CVT_OK;
- }
- }
-}
-
-static u_long
-inp_varitext(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- struct varitext *t = (struct varitext *)parseio->parse_pdata;
- int rtc;
-
- parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- if (!t)
- return PARSE_INP_SKIP; /* local data not allocated - sigh! */
-
- if (ch == 'T')
- t->tstamp = *tstamp;
-
- if ((t->previous_ch == 'T') && (ch == ':'))
- {
- parseprintf(DD_PARSE, ("inp_varitext: START seen\n"));
-
- parseio->parse_data[0] = 'T';
- parseio->parse_index=1;
- parseio->parse_dtime.parse_stime = t->tstamp; /* Time stamp at packet start */
- t->start_found = 1;
- t->end_found = 0;
- t->end_count = 0;
- }
-
- if (t->start_found)
- {
- if ((rtc = parse_addchar(parseio, ch)) != PARSE_INP_SKIP)
- {
- parseprintf(DD_PARSE, ("inp_varitext: ABORTED due to too many characters\n"));
-
- memset(t, 0, sizeof(struct varitext));
- return rtc;
- }
-
- if (t->end_found)
- {
- if (++(t->end_count) == 4) /* Finally found the end of the message */
- {
- parseprintf(DD_PARSE, ("inp_varitext: END seen\n"));
-
- memset(t, 0, sizeof(struct varitext));
- if ((rtc = parse_addchar(parseio, 0)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
- }
- }
-
- if ((t->previous_ch == '\r') && (ch == '\n'))
- {
- t->end_found = 1;
- }
-
- }
-
- t->previous_ch = ch;
-
- return PARSE_INP_SKIP;
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */
-int clk_varitext_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */
-
-/*
- * Revision 1.0 1997/06/02 13:16:30 McConnell
- * File created
- *
- */
diff --git a/contrib/ntp/libparse/clk_wharton.c b/contrib/ntp/libparse/clk_wharton.c
deleted file mode 100644
index 6dfc971..0000000
--- a/contrib/ntp/libparse/clk_wharton.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/clk_wharton.c,v 4.1 1999/02/28 15:27:24 kardel RELEASE_19990228_A
- *
- * clk_wharton.c,v 4.1 1999/02/28 15:27:24 kardel RELEASE_19990228_A
- *
- * From Philippe De Muyter <phdm@macqel.be>, 1999
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_WHARTON_400A)
-/*
- * Support for WHARTON 400A Series clock + 404.2 serial interface.
- *
- * Copyright (C) 1999, 2000 by Philippe De Muyter <phdm@macqel.be>
- *
- * 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.
- *
- */
-
-#include "ntp_fp.h"
-#include "ascii.h"
-#include "parse.h"
-
-#ifndef PARSESTREAM
-#include "ntp_stdlib.h"
-#include <stdio.h>
-#else
-#include "sys/parsestreams.h"
-extern void printf P((const char *, ...));
-#endif
-
-/*
- * In private e-mail alastair@wharton.co.uk said :
- * "If you are going to use the 400A and 404.2 system [for ntp] I recommend
- * that you set the 400A to output the message every second. The start of
- * transmission of the first byte of the message is synchronised to the
- * second edge."
- * The WHARTON 400A Series is able to send date/time serial messages
- * in 7 output formats. We use format 1 here because it is the shortest.
- * For use with this driver, the WHARTON 400A Series clock must be set-up
- * as follows :
- * 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
- *
- * WHARTON 400A Series output format 1 is as follows :
- *
- * 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
- *
- */
-
-/*
- * cvt_wharton_400a
- *
- * convert simple type format
- */
-static u_long
-cvt_wharton_400a(
- unsigned char *buffer,
- int size,
- struct format *format,
- clocktime_t *clock_time,
- void *local
- )
-{
- int i;
-
- /* The given `size' includes a terminating null-character. */
- if (size != 16 || buffer[0] != STX || buffer[14] != ETX
- || buffer[13] < '0' || buffer[13] > ('0' + 0xf))
- return CVT_NONE;
- for (i = 1; i < 13; i += 1)
- if (buffer[i] < '0' || buffer[i] > '9')
- return CVT_NONE;
- clock_time->second = (buffer[2] - '0') * 10 + buffer[1] - '0';
- clock_time->minute = (buffer[4] - '0') * 10 + buffer[3] - '0';
- clock_time->hour = (buffer[6] - '0') * 10 + buffer[5] - '0';
- clock_time->day = (buffer[8] - '0') * 10 + buffer[7] - '0';
- clock_time->month = (buffer[10] - '0') * 10 + buffer[9] - '0';
- clock_time->year = (buffer[12] - '0') * 10 + buffer[11] - '0';
- clock_time->usecond = 0;
- if (buffer[13] & 0x1) /* We have CET time */
- clock_time->utcoffset = -1*60*60;
- else /* We have BST time */
- clock_time->utcoffset = 0;
- if (buffer[13] & 0x2) {
- clock_time->flags |= PARSEB_DST;
- clock_time->utcoffset += -1*60*60;
- }
- if (!(buffer[13] & 0x4))
- clock_time->flags |= PARSEB_NOSYNC;
- if (buffer[13] & 0x8)
- clock_time->flags |= PARSEB_ANNOUNCE;
-
- return CVT_OK;
-}
-
-/*
- * inp_wharton_400a
- *
- * grep data from input stream
- */
-static u_long
-inp_wharton_400a(
- parse_t *parseio,
- unsigned int ch,
- timestamp_t *tstamp
- )
-{
- unsigned int rtc;
-
- parseprintf(DD_PARSE, ("inp_wharton_400a(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
-
- switch (ch)
- {
- case STX:
- parseprintf(DD_PARSE, ("inp_wharton_400a: STX seen\n"));
-
- parseio->parse_index = 1;
- parseio->parse_data[0] = ch;
- parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
- return PARSE_INP_SKIP;
-
- case ETX:
- parseprintf(DD_PARSE, ("inp_wharton_400a: ETX seen\n"));
- if ((rtc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP)
- return parse_end(parseio);
- else
- return rtc;
-
- default:
- return parse_addchar(parseio, ch);
- }
-}
-
-clockformat_t clock_wharton_400a =
-{
- inp_wharton_400a, /* input handling function */
- cvt_wharton_400a, /* conversion function */
- 0, /* no PPS monitoring */
- 0, /* conversion configuration */
- "WHARTON 400A Series clock Output Format 1", /* String format name */
- 15, /* string buffer */
- 0 /* no private data (complete pakets) */
-};
-
-#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_WHARTON_400A) */
-int clk_wharton_400a_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_WHARTON_400A) */
-
-/*
- * clk_wharton.c,v
- * Revision 4.1 1999/02/28 15:27:24 kardel
- * wharton clock integration
- *
- */
diff --git a/contrib/ntp/libparse/data_mbg.c b/contrib/ntp/libparse/data_mbg.c
deleted file mode 100644
index 2545b98..0000000
--- a/contrib/ntp/libparse/data_mbg.c
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/data_mbg.c,v 4.3 1999/02/21 12:17:42 kardel RELEASE_19991128_A
- *
- * $Created: Sun Jul 20 12:08:14 1997 $
- *
- * Copyright (C) 1997, 1998 by Frank Kardel
- */
-
-#ifdef PARSESTREAM
-#define NEED_BOPS
-#include "ntp_string.h"
-#else
-#include <stdio.h>
-#endif
-#include "ntp_types.h"
-#include "ntp_stdlib.h"
-#include "ntp_fp.h"
-#include "mbg_gps166.h"
-#include "binio.h"
-#include "ieee754io.h"
-
-static void get_mbg_tzname P((unsigned char **, char *));
-static void mbg_time_status_str P((unsigned char **, unsigned int));
-
-#if 0 /* no actual floats on Meinberg binary interface */
-static offsets_t mbg_float = { 1, 0, 3, 2, 0, 0, 0, 0 }; /* byte order for meinberg floats */
-#endif
-static offsets_t mbg_double = { 1, 0, 3, 2, 5, 4, 7, 6 }; /* byte order for meinberg doubles */
-static int32 rad2deg_i = 57;
-static u_int32 rad2deg_f = 0x4BB834C7; /* 57.2957795131 == 180/PI */
-
-void
-put_mbg_header(
- unsigned char **bufpp,
- GPS_MSG_HDR *headerp
- )
-{
- put_lsb_short(bufpp, headerp->gps_cmd);
- put_lsb_short(bufpp, headerp->gps_len);
- put_lsb_short(bufpp, headerp->gps_data_csum);
- put_lsb_short(bufpp, headerp->gps_hdr_csum);
-}
-
-void
-get_mbg_sw_rev(
- unsigned char **bufpp,
- SW_REV *sw_revp
- )
-{
- sw_revp->code = get_lsb_short(bufpp);
- memcpy(sw_revp->name, *bufpp, sizeof(sw_revp->name));
- *bufpp += sizeof(sw_revp->name);
-}
-
-void
-get_mbg_ascii_msg(
- unsigned char **bufpp,
- ASCII_MSG *ascii_msgp
- )
-{
- ascii_msgp->csum = get_lsb_short(bufpp);
- ascii_msgp->valid = get_lsb_short(bufpp);
- memcpy(ascii_msgp->s, *bufpp, sizeof(ascii_msgp->s));
- *bufpp += sizeof(ascii_msgp->s);
-}
-
-void
-get_mbg_svno(
- unsigned char **bufpp,
- SVNO *svnop
- )
-{
- *svnop = get_lsb_short(bufpp);
-}
-
-void
-get_mbg_health(
- unsigned char **bufpp,
- HEALTH *healthp
- )
-{
- *healthp = get_lsb_short(bufpp);
-}
-
-void
-get_mbg_cfg(
- unsigned char **bufpp,
- CFG *cfgp
- )
-{
- *cfgp = get_lsb_short(bufpp);
-}
-
-void
-get_mbg_tgps(
- unsigned char **bufpp,
- T_GPS *tgpsp
- )
-{
- tgpsp->wn = get_lsb_short(bufpp);
- tgpsp->sec = get_lsb_long(bufpp);
- tgpsp->tick = get_lsb_long(bufpp);
-}
-
-void
-get_mbg_tm(
- unsigned char **buffpp,
- TM *tmp
- )
-{
- tmp->year = get_lsb_short(buffpp);
- tmp->month = *(*buffpp)++;
- tmp->mday = *(*buffpp)++;
- tmp->yday = get_lsb_short(buffpp);
- tmp->wday = *(*buffpp)++;
- tmp->hour = *(*buffpp)++;
- tmp->minute = *(*buffpp)++;
- tmp->second = *(*buffpp)++;
- tmp->frac = get_lsb_long(buffpp);
- tmp->offs_from_utc = get_lsb_long(buffpp);
- tmp->status= get_lsb_short(buffpp);
-}
-
-void
-get_mbg_ttm(
- unsigned char **buffpp,
- TTM *ttmp
- )
-{
- ttmp->channel = get_lsb_short(buffpp);
- get_mbg_tgps(buffpp, &ttmp->t);
- get_mbg_tm(buffpp, &ttmp->tm);
-}
-
-void
-get_mbg_synth(
- unsigned char **buffpp,
- SYNTH *synthp
- )
-{
- synthp->freq = get_lsb_short(buffpp);
- synthp->range = get_lsb_short(buffpp);
- synthp->phase = get_lsb_short(buffpp);
-}
-
-static void
-get_mbg_tzname(
- unsigned char **buffpp,
- char *tznamep
- )
-{
- strncpy(tznamep, (char *)*buffpp, sizeof(TZ_NAME));
- *buffpp += sizeof(TZ_NAME);
-}
-
-void
-get_mbg_tzdl(
- unsigned char **buffpp,
- TZDL *tzdlp
- )
-{
- tzdlp->offs = get_lsb_long(buffpp);
- tzdlp->offs_dl = get_lsb_long(buffpp);
- get_mbg_tm(buffpp, &tzdlp->tm_on);
- get_mbg_tm(buffpp, &tzdlp->tm_off);
- get_mbg_tzname(buffpp, (char *)tzdlp->name[0]);
- get_mbg_tzname(buffpp, (char *)tzdlp->name[1]);
-}
-
-void
-get_mbg_antinfo(
- unsigned char **buffpp,
- ANT_INFO *antinfop
- )
-{
- antinfop->status = get_lsb_short(buffpp);
- get_mbg_tm(buffpp, &antinfop->tm_disconn);
- get_mbg_tm(buffpp, &antinfop->tm_reconn);
- antinfop->delta_t = get_lsb_long(buffpp);
-}
-
-static void
-mbg_time_status_str(
- unsigned char **buffpp,
- unsigned int status
- )
-{
- static struct state
- {
- int flag; /* bit flag */
- const char *string; /* bit name */
- } states[] =
- {
- { TM_UTC, "UTC CORR" },
- { TM_LOCAL, "LOCAL TIME" },
- { TM_DL_ANN, "DST WARN" },
- { TM_DL_ENB, "DST" },
- { TM_LS_ANN, "LEAP WARN" },
- { TM_LS_ENB, "LEAP SEC" },
- { 0, "" }
- };
-
- if (status)
- {
- unsigned char *p;
- struct state *s;
-
- p = *buffpp;
-
- for (s = states; s->flag; s++)
- {
- if (s->flag & status)
- {
- if (p != *buffpp)
- {
- *p++ = ',';
- *p++ = ' ';
- }
- strcpy((char *)p, s->string);
- p += strlen((char *)p);
- }
- }
- *buffpp = p;
- }
-}
-
-void
-mbg_tm_str(
- unsigned char **buffpp,
- TM *tmp
- )
-{
- sprintf((char *)*buffpp, "%04d-%02d-%02d %02d:%02d:%02d.%07ld (%c%02d%02d) ",
- tmp->year, tmp->month, tmp->mday,
- tmp->hour, tmp->minute, tmp->second, tmp->frac,
- (tmp->offs_from_utc < 0) ? '-' : '+',
- abs(tmp->offs_from_utc) / 3600,
- (abs(tmp->offs_from_utc) / 60) % 60);
- *buffpp += strlen((char *)*buffpp);
- mbg_time_status_str(buffpp, tmp->status);
-}
-
-void
-mbg_tgps_str(
- unsigned char **buffpp,
- T_GPS *tgpsp
- )
-{
- sprintf((char *)*buffpp, "week %d + %ld days + %ld.%07ld sec",
- tgpsp->wn, tgpsp->sec / 86400,
- tgpsp->sec % 86400, tgpsp->tick);
- *buffpp += strlen((char *)*buffpp);
-}
-
-void
-get_mbg_cfgh(
- unsigned char **buffpp,
- CFGH *cfghp
- )
-{
- int i;
-
- cfghp->csum = get_lsb_short(buffpp);
- cfghp->valid = get_lsb_short(buffpp);
- get_mbg_tgps(buffpp, &cfghp->tot_51);
- get_mbg_tgps(buffpp, &cfghp->tot_63);
- get_mbg_tgps(buffpp, &cfghp->t0a);
-
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
- {
- get_mbg_cfg(buffpp, &cfghp->cfg[i]);
- }
-
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
- {
- get_mbg_health(buffpp, &cfghp->health[i]);
- }
-}
-
-void
-get_mbg_utc(
- unsigned char **buffpp,
- UTC *utcp
- )
-{
- utcp->csum = get_lsb_short(buffpp);
- utcp->valid = get_lsb_short(buffpp);
-
- get_mbg_tgps(buffpp, &utcp->t0t);
-
- if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A0, mbg_double) != IEEE_OK)
- {
- L_CLR(&utcp->A0);
- }
-
- if (fetch_ieee754(buffpp, IEEE_DOUBLE, &utcp->A1, mbg_double) != IEEE_OK)
- {
- L_CLR(&utcp->A1);
- }
-
- utcp->WNlsf = get_lsb_short(buffpp);
- utcp->DNt = get_lsb_short(buffpp);
- utcp->delta_tls = *(*buffpp)++;
- utcp->delta_tlsf = *(*buffpp)++;
-}
-
-void
-get_mbg_lla(
- unsigned char **buffpp,
- LLA lla
- )
-{
- int i;
-
- for (i = LAT; i <= ALT; i++)
- {
- if (fetch_ieee754(buffpp, IEEE_DOUBLE, &lla[i], mbg_double) != IEEE_OK)
- {
- L_CLR(&lla[i]);
- }
- else
- if (i != ALT)
- { /* convert to degrees (* 180/PI) */
- mfp_mul(&lla[i].l_i, &lla[i].l_uf, lla[i].l_i, lla[i].l_uf, rad2deg_i, rad2deg_f);
- }
- }
-}
-
-void
-get_mbg_xyz(
- unsigned char **buffpp,
- XYZ xyz
- )
-{
- int i;
-
- for (i = XP; i <= ZP; i++)
- {
- if (fetch_ieee754(buffpp, IEEE_DOUBLE, &xyz[i], mbg_double) != IEEE_OK)
- {
- L_CLR(&xyz[i]);
- }
- }
-}
-
-static void
-get_mbg_comparam(
- unsigned char **buffpp,
- COM_PARM *comparamp
- )
-{
- int i;
-
- comparamp->baud_rate = get_lsb_long(buffpp);
- for (i = 0; i < sizeof(comparamp->framing); i++)
- {
- comparamp->framing[i] = *(*buffpp)++;
- }
- comparamp->handshake = get_lsb_short(buffpp);
-}
-
-void
-get_mbg_portparam(
- unsigned char **buffpp,
- PORT_PARM *portparamp
- )
-{
- int i;
-
- for (i = 0; i < N_COM; i++)
- {
- get_mbg_comparam(buffpp, &portparamp->com[i]);
- }
- for (i = 0; i < N_COM; i++)
- {
- portparamp->mode[i] = *(*buffpp)++;
- }
-}
-
-#define FETCH_DOUBLE(src, addr) \
- if (fetch_ieee754(src, IEEE_DOUBLE, addr, mbg_double) != IEEE_OK) \
- { \
- L_CLR(addr); \
- }
-
-void
-get_mbg_eph(
- unsigned char ** buffpp,
- EPH *ephp
- )
-{
- ephp->csum = get_lsb_short(buffpp);
- ephp->valid = get_lsb_short(buffpp);
-
- ephp->health = get_lsb_short(buffpp);
- ephp->IODC = get_lsb_short(buffpp);
- ephp->IODE2 = get_lsb_short(buffpp);
- ephp->IODE3 = get_lsb_short(buffpp);
-
- get_mbg_tgps(buffpp, &ephp->tt);
- get_mbg_tgps(buffpp, &ephp->t0c);
- get_mbg_tgps(buffpp, &ephp->t0e);
-
- FETCH_DOUBLE(buffpp, &ephp->sqrt_A);
- FETCH_DOUBLE(buffpp, &ephp->e);
- FETCH_DOUBLE(buffpp, &ephp->M0);
- FETCH_DOUBLE(buffpp, &ephp->omega);
- FETCH_DOUBLE(buffpp, &ephp->OMEGA0);
- FETCH_DOUBLE(buffpp, &ephp->OMEGADOT);
- FETCH_DOUBLE(buffpp, &ephp->deltan);
- FETCH_DOUBLE(buffpp, &ephp->i0);
- FETCH_DOUBLE(buffpp, &ephp->idot);
- FETCH_DOUBLE(buffpp, &ephp->crc);
- FETCH_DOUBLE(buffpp, &ephp->crs);
- FETCH_DOUBLE(buffpp, &ephp->cuc);
- FETCH_DOUBLE(buffpp, &ephp->cus);
- FETCH_DOUBLE(buffpp, &ephp->cic);
- FETCH_DOUBLE(buffpp, &ephp->cis);
-
- FETCH_DOUBLE(buffpp, &ephp->af0);
- FETCH_DOUBLE(buffpp, &ephp->af1);
- FETCH_DOUBLE(buffpp, &ephp->af2);
- FETCH_DOUBLE(buffpp, &ephp->tgd);
-
- ephp->URA = get_lsb_short(buffpp);
-
- ephp->L2code = *(*buffpp)++;
- ephp->L2flag = *(*buffpp)++;
-}
-
-void
-get_mbg_alm(
- unsigned char **buffpp,
- ALM *almp
- )
-{
- almp->csum = get_lsb_short(buffpp);
- almp->valid = get_lsb_short(buffpp);
-
- almp->health = get_lsb_short(buffpp);
- get_mbg_tgps(buffpp, &almp->t0a);
-
-
- FETCH_DOUBLE(buffpp, &almp->sqrt_A);
- FETCH_DOUBLE(buffpp, &almp->e);
-
- FETCH_DOUBLE(buffpp, &almp->M0);
- FETCH_DOUBLE(buffpp, &almp->omega);
- FETCH_DOUBLE(buffpp, &almp->OMEGA0);
- FETCH_DOUBLE(buffpp, &almp->OMEGADOT);
- FETCH_DOUBLE(buffpp, &almp->deltai);
- FETCH_DOUBLE(buffpp, &almp->af0);
- FETCH_DOUBLE(buffpp, &almp->af1);
-}
-
-void
-get_mbg_iono(
- unsigned char **buffpp,
- IONO *ionop
- )
-{
- ionop->csum = get_lsb_short(buffpp);
- ionop->valid = get_lsb_short(buffpp);
-
- FETCH_DOUBLE(buffpp, &ionop->alpha_0);
- FETCH_DOUBLE(buffpp, &ionop->alpha_1);
- FETCH_DOUBLE(buffpp, &ionop->alpha_2);
- FETCH_DOUBLE(buffpp, &ionop->alpha_3);
-
- FETCH_DOUBLE(buffpp, &ionop->beta_0);
- FETCH_DOUBLE(buffpp, &ionop->beta_1);
- FETCH_DOUBLE(buffpp, &ionop->beta_2);
- FETCH_DOUBLE(buffpp, &ionop->beta_3);
-}
-
-/*
- * data_mbg.c,v
- * Revision 4.3 1999/02/21 12:17:42 kardel
- * 4.91f reconcilation
- *
- * Revision 4.2 1998/06/14 21:09:39 kardel
- * Sun acc cleanup
- *
- * Revision 4.1 1998/05/24 08:02:06 kardel
- * trimmed version log
- *
- * Revision 4.0 1998/04/10 19:45:33 kardel
- * Start 4.0 release version numbering
- */
-
diff --git a/contrib/ntp/libparse/info_trimble.c b/contrib/ntp/libparse/info_trimble.c
deleted file mode 100644
index af50858..0000000
--- a/contrib/ntp/libparse/info_trimble.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-* Automatically generated - do not modify
-*/
-
-#include "ntp_types.h"
-#include "ntpd.h"
-#include "trimble.h"
-
-cmd_info_t trimble_scmds[] = {
- { CMD_CCLROSC, "CMD_CCLROSC", "clear oscillator offset (0x1D)", "", 0 },
- { CMD_CCLRRST, "CMD_CCLRRST", "clear battery backup and RESET (0x1E)", "", 0 },
- { CMD_CVERSION, "CMD_CVERSION", "return software version (0x1F)", "", 0 },
- { CMD_CALMANAC, "CMD_CALMANAC", "almanac (0x20)", "", 0 },
- { CMD_CCURTIME, "CMD_CCURTIME", "current time (0x21)", "", 0 },
- { CMD_CMODESEL, "CMD_CMODESEL", "mode select (2-d, 3-D, auto) (0x22)", "", 0 },
- { CMD_CINITPOS, "CMD_CINITPOS", "initial position (0x23)", "", 0 },
- { CMD_CRECVPOS, "CMD_CRECVPOS", "receiver position fix mode (0x24)", "", 0 },
- { CMD_CRESET, "CMD_CRESET", "soft reset & selftest (0x25)", "", 0 },
- { CMD_CRECVHEALTH, "CMD_CRECVHEALTH", "receiver health (0x26)", "", 0 },
- { CMD_CSIGNALLV, "CMD_CSIGNALLV", "signal levels (0x27)", "", 0 },
- { CMD_CMESSAGE, "CMD_CMESSAGE", "GPS system message (0x28)", "", 0 },
- { CMD_CALMAHEALTH, "CMD_CALMAHEALTH", "almanac healt page (0x29)", "", 0 },
- { CMD_C2DALTITUDE, "CMD_C2DALTITUDE", "altitude for 2-D mode (0x2A)", "", 0 },
- { CMD_CINITPOSLLA, "CMD_CINITPOSLLA", "initial position LLA (0x2B)", "", 0 },
- { CMD_COPERPARAM, "CMD_COPERPARAM", "operating parameters (0x2C)", "", 0 },
- { CMD_COSCOFFSET, "CMD_COSCOFFSET", "oscillator offset (0x2D)", "", 0 },
- { CMD_CSETGPSTIME, "CMD_CSETGPSTIME", "set GPS time (0x2E)", "", 0 },
- { CMD_CUTCPARAM, "CMD_CUTCPARAM", "UTC parameters (0x2F)", "", 0 },
- { CMD_CACCPOSXYZ, "CMD_CACCPOSXYZ", "accurate initial position (XYZ/ECEF) (0x31)", "", 0 },
- { CMD_CACCPOS, "CMD_CACCPOS", "accurate initial position (0x32)", "", 0 },
- { CMD_CANALOGDIG, "CMD_CANALOGDIG", "analog to digital (0x33)", "", 0 },
- { CMD_CSAT1SAT, "CMD_CSAT1SAT", "satellite for 1-Sat mode (0x34)", "", 0 },
- { CMD_CIOOPTIONS, "CMD_CIOOPTIONS", "I/O options (0x35)", "", 0 },
- { CMD_CVELOCAID, "CMD_CVELOCAID", "velocity aiding of acquisition (0x36)", "", 0 },
- { CMD_CSTATLSTPOS, "CMD_CSTATLSTPOS", "status and values of last pos. and vel. (0x37)", "", 0 },
- { CMD_CLOADSSATDT, "CMD_CLOADSSATDT", "load satellite system data (0x38)", "", 0 },
- { CMD_CSATDISABLE, "CMD_CSATDISABLE", "satellite disable (0x39)", "", 0 },
- { CMD_CLASTRAW, "CMD_CLASTRAW", "last raw measurement (0x3A)", "", 0 },
- { CMD_CSTATSATEPH, "CMD_CSTATSATEPH", "satellite ephemeris status (0x3B)", "", 0 },
- { CMD_CSTATTRACK, "CMD_CSTATTRACK", "tracking status (0x3C)", "", 0 },
- { CMD_CCHANADGPS, "CMD_CCHANADGPS", "configure channel A for differential GPS (0x3D)", "", 0 },
- { CMD_CADDITFIX, "CMD_CADDITFIX", "additional fix data (0x3E)", "", 0 },
- { CMD_CDGPSFIXMD, "CMD_CDGPSFIXMD", "set/request differential GPS position fix mode (0x62)", "", 0 },
- { CMD_CDGPSCORR, "CMD_CDGPSCORR", "differential correction status (0x65)", "", 0 },
- { CMD_CPOSFILT, "CMD_CPOSFILT", "position filter parameters (0x71)", "", 0 },
- { CMD_CHEIGHTFILT, "CMD_CHEIGHTFILT", "height filter control (0x73)", "", 0 },
- { CMD_CHIGH8CNT, "CMD_CHIGH8CNT", "high-8 (best 4) / high-6 (overdetermined) control (0x75)", "", 0 },
- { CMD_CMAXDGPSCOR, "CMD_CMAXDGPSCOR", "maximum rate of DGPS corrections (0x77)", "", 0 },
- { CMD_CSUPER, "CMD_CSUPER", "super paket (0x8E)", "", 0 },
-{ 0xFF, "", "" }
-};
-
-
-cmd_info_t trimble_rcmds[] = {
- { CMD_RDATAA, "CMD_RDATAA", "data channel A configuration (0x3D)", "trimble_channelA", RO },
- { CMD_RALMANAC, "CMD_RALMANAC", "almanac data for sat (0x40)", "gps_almanac", RO },
- { CMD_RCURTIME, "CMD_RCURTIME", "GPS time (0x41)", "gps_time", RO },
- { CMD_RSPOSXYZ, "CMD_RSPOSXYZ", "single precision XYZ position (0x42)", "gps_position(XYZ)", RO|DEF },
- { CMD_RVELOXYZ, "CMD_RVELOXYZ", "velocity fix (XYZ ECEF) (0x43)", "gps_velocity(XYZ)", RO|DEF },
- { CMD_RBEST4, "CMD_RBEST4", "best 4 satellite selection (0x44)", "trimble_best4", RO|DEF },
- { CMD_RVERSION, "CMD_RVERSION", "software version (0x45)", "trimble_version", RO|DEF },
- { CMD_RRECVHEALTH, "CMD_RRECVHEALTH", "receiver health (0x46)", "trimble_receiver_health", RO|DEF },
- { CMD_RSIGNALLV, "CMD_RSIGNALLV", "signal levels of all satellites (0x47)", "trimble_signal_levels", RO },
- { CMD_RMESSAGE, "CMD_RMESSAGE", "GPS system message (0x48)", "gps-message", RO|DEF },
- { CMD_RALMAHEALTH, "CMD_RALMAHEALTH", "almanac health page for all satellites (0x49)", "gps_almanac_health", RO },
- { CMD_RSLLAPOS, "CMD_RSLLAPOS", "single LLA position (0x4A)", "gps_position(LLA)", RO|DEF },
- { CMD_RMACHSTAT, "CMD_RMACHSTAT", "machine code / status (0x4B)", "trimble_status", RO|DEF },
- { CMD_ROPERPARAM, "CMD_ROPERPARAM", "operating parameters (0x4C)", "trimble_opparam", RO },
- { CMD_ROSCOFFSET, "CMD_ROSCOFFSET", "oscillator offset (0x4D)", "trimble_oscoffset", RO },
- { CMD_RSETGPSTIME, "CMD_RSETGPSTIME", "response to set GPS time (0x4E)", "trimble_setgpstime", RO },
- { CMD_RUTCPARAM, "CMD_RUTCPARAM", "UTC parameters (0x4F)", "gps_utc_correction", RO|DEF },
- { CMD_RANALOGDIG, "CMD_RANALOGDIG", "analog to digital (0x53)", "trimble_analogdigital", RO },
- { CMD_RSAT1BIAS, "CMD_RSAT1BIAS", "one-satellite bias & bias rate (0x54)", "trimble_sat1bias", RO },
- { CMD_RIOOPTIONS, "CMD_RIOOPTIONS", "I/O options (0x55)", "trimble_iooptions", RO },
- { CMD_RSTATLSTFIX, "CMD_RSTATLSTFIX", "status and values of last pos. and vel. (0x57)", "trimble_status_lastpos", RO },
- { CMD_RLOADSSATDT, "CMD_RLOADSSATDT", "response to load satellite system data (0x58)", "trimble_loaddata", RO },
- { CMD_RSATDISABLE, "CMD_RSATDISABLE", "satellite disable (0x59)", "trimble_satdisble", RO },
- { CMD_RLASTRAW, "CMD_RLASTRAW", "last raw measurement (0x5A)", "trimble_lastraw", RO },
- { CMD_RSTATSATEPH, "CMD_RSTATSATEPH", "satellite ephemeris status (0x5B)", "trimble_ephstatus", RO },
- { CMD_RSTATTRACK, "CMD_RSTATTRACK", "tracking status (0x5C)", "trimble_tracking_status", RO|DEF },
- { CMD_RADDITFIX, "CMD_RADDITFIX", "additional fix data (0x5E)", "trimble_addfix", RO },
- { CMD_RALLINVIEW, "CMD_RALLINVIEW", "all in view satellite selection (0x6D)", "trimble_satview", RO|DEF },
- { CMD_RPOSFILT, "CMD_RPOSFILT", "position filter parameters (0x72)", "trimble_posfilt", RO },
- { CMD_RHEIGHTFILT, "CMD_RHEIGHTFILT", "height filter control (0x74)", "trimble_heightfilt", RO },
- { CMD_RHIGH8CNT, "CMD_RHIGH8CNT", "high-8 (best 4) / high-6 (overdetermined) control (0x76)", "trimble_high8control", RO },
- { CMD_RMAXAGE, "CMD_RMAXAGE", "DC MaxAge (0x78)", "trimble_dgpsmaxage", RO },
- { CMD_RDGPSFIX, "CMD_RDGPSFIX", "differential position fix mode (0x82)", "trimble_dgpsfixmode", RO },
- { CMD_RDOUBLEXYZ, "CMD_RDOUBLEXYZ", "double precision XYZ (0x83)", "gps_position_ext(XYZ)", RO|DEF },
- { CMD_RDOUBLELLA, "CMD_RDOUBLELLA", "double precision LLA (0x84)", "gps_position_ext(LLA)", RO|DEF },
- { CMD_RDGPSSTAT, "CMD_RDGPSSTAT", "differential correction status (0x85)", "trimble_dgpsstatus", RO },
- { CMD_RSUPER, "CMD_RSUPER", "super paket (0x8F)", "", 0 },
-{ 0xFF, "", "" }
-};
-
diff --git a/contrib/ntp/libparse/mkinfo_rcmd.sed b/contrib/ntp/libparse/mkinfo_rcmd.sed
deleted file mode 100644
index 570c7a0..0000000
--- a/contrib/ntp/libparse/mkinfo_rcmd.sed
+++ /dev/null
@@ -1,8 +0,0 @@
-1i\
-\
-cmd_info_t trimble_rcmds[] = {
-s!^#define[ ][ ]*\(CMD_R[^ ]*\)[ ][ ]*\([^ ]*\)[ ][ ]*/\*[ ][ ]*\(.*\)[ ]*:\([^:]*\):\([^:]*\)[ ][ ]*\*/! { \1, "\1", "\3 (\2)", "\4", \5 },!p
-$a\
- { 0xFF, "", "" }\
-};\
-
diff --git a/contrib/ntp/libparse/mkinfo_scmd.sed b/contrib/ntp/libparse/mkinfo_scmd.sed
deleted file mode 100644
index cabe065..0000000
--- a/contrib/ntp/libparse/mkinfo_scmd.sed
+++ /dev/null
@@ -1,16 +0,0 @@
-1i\
-/*\
- * Automatically generated - do not modify\
- */\
-\
-#include "ntp_types.h"\
-#include "ntpd.h"\
-#include "trimble.h"\
-\
-cmd_info_t trimble_scmds[] = {
-s!^#define[ ][ ]*\(CMD_C[^ ]*\)[ ][ ]*\([^ ]*\)[ ][ ]*/\*[ ][ ]*\(.*\)[ ][ ]*\*/! { \1, "\1", "\3 (\2)", "", 0 },!p
-$a\
- { 0xFF, "", "" }\
-};\
-
-
diff --git a/contrib/ntp/libparse/parse.c b/contrib/ntp/libparse/parse.c
deleted file mode 100644
index d3712b6..0000000
--- a/contrib/ntp/libparse/parse.c
+++ /dev/null
@@ -1,917 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A
- *
- * parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A
- *
- * Parser module for reference clock
- *
- * PARSEKERNEL define switches between two personalities of the module
- * if PARSEKERNEL is defined this module can be used
- * as kernel module. In this case the time stamps will be
- * a struct timeval.
- * when PARSEKERNEL is not defined NTP time stamps will be used.
- *
- * Copyright (c) 1992-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE)
-
-#if !(defined(lint) || defined(__GNUC__))
-static char rcsid[] = "parse.c,v 4.14 1999/11/28 09:13:52 kardel RELEASE_19991128_A";
-#endif
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-#include "ntp_machine.h"
-#include "ntp.h" /* (get Y2KFixes definitions) Y2KFixes */
-
-#include "parse.h"
-
-#ifndef PARSESTREAM
-# include <stdio.h>
-#else
-# include "sys/parsestreams.h"
-#endif
-
-extern clockformat_t *clockformats[];
-extern unsigned short nformats;
-
-static u_long timepacket P((parse_t *));
-
-/*
- * strings support usually not in kernel - duplicated, but what the heck
- */
-static int
-Strlen(
- register const char *s
- )
-{
- register int c;
-
- c = 0;
- if (s)
- {
- while (*s++)
- {
- c++;
- }
- }
- return c;
-}
-
-static int
-Strcmp(
- register const char *s,
- register const char *t
- )
-{
- register int c = 0;
-
- if (!s || !t || (s == t))
- {
- return 0;
- }
-
- while (!(c = *s++ - *t++) && *s && *t)
- /* empty loop */;
-
- return c;
-}
-
-int
-parse_timedout(
- parse_t *parseio,
- timestamp_t *tstamp,
- struct timeval *del
- )
-{
- struct timeval delta;
-
-#ifdef PARSEKERNEL
- delta.tv_sec = tstamp->tv.tv_sec - parseio->parse_lastchar.tv.tv_sec;
- delta.tv_usec = tstamp->tv.tv_usec - parseio->parse_lastchar.tv.tv_usec;
- if (delta.tv_usec < 0)
- {
- delta.tv_sec -= 1;
- delta.tv_usec += 1000000;
- }
-#else
- extern long tstouslo[];
- extern long tstousmid[];
- extern long tstoushi[];
-
- l_fp delt;
-
- delt = tstamp->fp;
- L_SUB(&delt, &parseio->parse_lastchar.fp);
- TSTOTV(&delt, &delta);
-#endif
-
- if (timercmp(&delta, del, >))
- {
- parseprintf(DD_PARSE, ("parse: timedout: TRUE\n"));
- return 1;
- }
- else
- {
- parseprintf(DD_PARSE, ("parse: timedout: FALSE\n"));
- return 0;
- }
-}
-
-/*ARGSUSED*/
-int
-parse_ioinit(
- register parse_t *parseio
- )
-{
- parseprintf(DD_PARSE, ("parse_iostart\n"));
-
- parseio->parse_plen = 0;
- parseio->parse_pdata = (void *)0;
-
- parseio->parse_data = 0;
- parseio->parse_ldata = 0;
- parseio->parse_dsize = 0;
-
- parseio->parse_badformat = 0;
- parseio->parse_ioflags = PARSE_IO_CS7; /* usual unix default */
- parseio->parse_index = 0;
- parseio->parse_ldsize = 0;
-
- return 1;
-}
-
-/*ARGSUSED*/
-void
-parse_ioend(
- register parse_t *parseio
- )
-{
- parseprintf(DD_PARSE, ("parse_ioend\n"));
-
- if (parseio->parse_pdata)
- FREE(parseio->parse_pdata, parseio->parse_plen);
-
- if (parseio->parse_data)
- FREE(parseio->parse_data, (unsigned)(parseio->parse_dsize * 2 + 2));
-}
-
-unsigned int
-parse_restart(
- parse_t *parseio,
- unsigned int ch
- )
-{
- unsigned int updated = PARSE_INP_SKIP;
-
- /*
- * re-start packet - timeout - overflow - start symbol
- */
-
- if (parseio->parse_index)
- {
- /*
- * filled buffer - thus not end character found
- * do processing now
- */
- parseio->parse_data[parseio->parse_index] = '\0';
- memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1));
- parseio->parse_ldsize = parseio->parse_index+1;
- updated = PARSE_INP_TIME;
- }
-
- parseio->parse_index = 1;
- parseio->parse_data[0] = ch;
- parseprintf(DD_PARSE, ("parse: parse_restart: buffer start (updated = %x)\n", updated));
- return updated;
-}
-
-unsigned int
-parse_addchar(
- parse_t *parseio,
- unsigned int ch
- )
-{
- /*
- * add to buffer
- */
- if (parseio->parse_index < parseio->parse_dsize)
- {
- /*
- * collect into buffer
- */
- parseprintf(DD_PARSE, ("parse: parse_addchar: buffer[%d] = 0x%x\n", parseio->parse_index, ch));
- parseio->parse_data[parseio->parse_index++] = ch;
- return PARSE_INP_SKIP;
- }
- else
- /*
- * buffer overflow - attempt to make the best of it
- */
- return parse_restart(parseio, ch);
-}
-
-unsigned int
-parse_end(
- parse_t *parseio
- )
-{
- /*
- * message complete processing
- */
- parseio->parse_data[parseio->parse_index] = '\0';
- memcpy(parseio->parse_ldata, parseio->parse_data, (unsigned)(parseio->parse_index+1));
- parseio->parse_ldsize = parseio->parse_index+1;
- parseio->parse_index = 0;
- parseprintf(DD_PARSE, ("parse: parse_end: buffer end\n"));
- return PARSE_INP_TIME;
-}
-
-/*ARGSUSED*/
-int
-parse_ioread(
- register parse_t *parseio,
- register unsigned int ch,
- register timestamp_t *tstamp
- )
-{
- register unsigned updated = CVT_NONE;
- /*
- * within STREAMS CSx (x < 8) chars still have the upper bits set
- * so we normalize the characters by masking unecessary bits off.
- */
- switch (parseio->parse_ioflags & PARSE_IO_CSIZE)
- {
- case PARSE_IO_CS5:
- ch &= 0x1F;
- break;
-
- case PARSE_IO_CS6:
- ch &= 0x3F;
- break;
-
- case PARSE_IO_CS7:
- ch &= 0x7F;
- break;
-
- case PARSE_IO_CS8:
- ch &= 0xFF;
- break;
- }
-
- parseprintf(DD_PARSE, ("parse_ioread(0x%lx, char=0x%x, ..., ...)\n", (unsigned long)parseio, ch & 0xFF));
-
- if (!clockformats[parseio->parse_lformat]->convert)
- {
- parseprintf(DD_PARSE, ("parse_ioread: input dropped.\n"));
- return CVT_NONE;
- }
-
- if (clockformats[parseio->parse_lformat]->input)
- {
- unsigned long input_status;
-
- input_status = clockformats[parseio->parse_lformat]->input(parseio, ch, tstamp);
-
- if (input_status & PARSE_INP_SYNTH)
- {
- updated = CVT_OK;
- }
-
- if (input_status & PARSE_INP_TIME) /* time sample is available */
- {
- updated = timepacket(parseio);
- }
-
- if (input_status & PARSE_INP_DATA) /* got additional data */
- {
- updated |= CVT_ADDITIONAL;
- }
- }
-
-
- /*
- * remember last character time
- */
- parseio->parse_lastchar = *tstamp;
-
-#ifdef DEBUG
- if ((updated & CVT_MASK) != CVT_NONE)
- {
- parseprintf(DD_PARSE, ("parse_ioread: time sample accumulated (status=0x%x)\n", updated));
- }
-#endif
-
- parseio->parse_dtime.parse_status = updated;
-
- return (((updated & CVT_MASK) != CVT_NONE) ||
- ((updated & CVT_ADDITIONAL) != 0));
-}
-
-/*
- * parse_iopps
- *
- * take status line indication and derive synchronisation information
- * from it.
- * It can also be used to decode a serial serial data format (such as the
- * ONE, ZERO, MINUTE sync data stream from DCF77)
- */
-/*ARGSUSED*/
-int
-parse_iopps(
- register parse_t *parseio,
- register int status,
- register timestamp_t *ptime
- )
-{
- register unsigned updated = CVT_NONE;
-
- /*
- * PPS pulse information will only be delivered to ONE clock format
- * this is either the last successful conversion module with a ppssync
- * routine, or a fixed format with a ppssync routine
- */
- parseprintf(DD_PARSE, ("parse_iopps: STATUS %s\n", (status == SYNC_ONE) ? "ONE" : "ZERO"));
-
- if (clockformats[parseio->parse_lformat]->syncpps)
- {
- updated = clockformats[parseio->parse_lformat]->syncpps(parseio, status == SYNC_ONE, ptime);
- parseprintf(DD_PARSE, ("parse_iopps: updated = 0x%x\n", updated));
- }
-
- return (updated & CVT_MASK) != CVT_NONE;
-}
-
-/*
- * parse_iodone
- *
- * clean up internal status for new round
- */
-/*ARGSUSED*/
-void
-parse_iodone(
- register parse_t *parseio
- )
-{
- /*
- * we need to clean up certain flags for the next round
- */
- parseprintf(DD_PARSE, ("parse_iodone: DONE\n"));
- parseio->parse_dtime.parse_state = 0; /* no problems with ISRs */
-}
-
-/*---------- conversion implementation --------------------*/
-
-/*
- * convert a struct clock to UTC since Jan, 1st 1970 0:00 (the UNIX EPOCH)
- */
-#define days_per_year(x) ((x) % 4 ? 365 : ((x % 400) ? ((x % 100) ? 366 : 365) : 366))
-
-time_t
-parse_to_unixtime(
- register clocktime_t *clock_time,
- register u_long *cvtrtc
- )
-{
-#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
- {
- 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
- };
- register int i;
- time_t t;
-
- if (clock_time->utctime)
- return clock_time->utctime; /* if the conversion routine gets it right away - why not */
-
- if ( clock_time->year < YEAR_PIVOT ) /* Y2KFixes [ */
- clock_time->year += 100; /* convert 20xx%100 to 20xx-1900 */
- if ( clock_time->year < YEAR_BREAK ) /* expand to full four-digits */
- clock_time->year += 1900;
-
- if (clock_time->year < 1970 ) /* Y2KFixes ] */
- {
- SETRTC(CVT_FAIL|CVT_BADDATE);
- return -1;
- }
-
- /*
- * sorry, slow section here - but it's not time critical anyway
- */
- t = julian0(clock_time->year) - julian0(1970); /* Y2kFixes */
- /* month */
- if (clock_time->month <= 0 || clock_time->month > 12)
- {
- SETRTC(CVT_FAIL|CVT_BADDATE);
- return -1; /* bad month */
- }
-
-#if 0 /* Y2KFixes */
- /* adjust leap year */
- if (clock_time->month < 3 && days_per_year(clock_time->year) == 366)
- t--;
-#else /* Y2KFixes [ */
- if ( clock_time->month >= 3 && isleap_4(clock_time->year) )
- t++; /* add one more if within leap year */
-#endif /* Y2KFixes ] */
-
- for (i = 1; i < clock_time->month; i++)
- {
- t += days_of_month[i];
- }
- /* day */
- if (clock_time->day < 1 || ((clock_time->month == 2 && days_per_year(clock_time->year) == 366) ?
- clock_time->day > 29 : clock_time->day > days_of_month[clock_time->month]))
- {
- SETRTC(CVT_FAIL|CVT_BADDATE);
- return -1; /* bad day */
- }
-
- t += clock_time->day - 1;
- /* hour */
- if (clock_time->hour < 0 || clock_time->hour >= 24)
- {
- SETRTC(CVT_FAIL|CVT_BADTIME);
- return -1; /* bad hour */
- }
-
- t = TIMES24(t) + clock_time->hour;
-
- /* min */
- if (clock_time->minute < 0 || clock_time->minute > 59)
- {
- SETRTC(CVT_FAIL|CVT_BADTIME);
- return -1; /* bad min */
- }
-
- t = TIMES60(t) + clock_time->minute;
- /* sec */
-
- if (clock_time->second < 0 || clock_time->second > 60) /* allow for LEAPs */
- {
- SETRTC(CVT_FAIL|CVT_BADTIME);
- return -1; /* bad sec */
- }
-
- t = TIMES60(t) + clock_time->second;
-
- t += clock_time->utcoffset; /* warp to UTC */
-
- /* done */
-
- clock_time->utctime = t; /* documentray only */
-
- return t;
-}
-
-/*--------------- format conversion -----------------------------------*/
-
-int
-Stoi(
- const unsigned char *s,
- long *zp,
- int cnt
- )
-{
- char unsigned const *b = s;
- int f,z,v;
- char unsigned c;
-
- f=z=v=0;
-
- while(*s == ' ')
- s++;
-
- if (*s == '-')
- {
- s++;
- v = 1;
- }
- else
- if (*s == '+')
- s++;
-
- for(;;)
- {
- c = *s++;
- if (c == '\0' || c < '0' || c > '9' || (cnt && ((s-b) > cnt)))
- {
- if (f == 0)
- {
- return(-1);
- }
- if (v)
- z = -z;
- *zp = z;
- return(0);
- }
- z = (z << 3) + (z << 1) + ( c - '0' );
- f=1;
- }
-}
-
-int
-Strok(
- const unsigned char *s,
- const unsigned char *m
- )
-{
- if (!s || !m)
- return 0;
-
- while(*s && *m)
- {
- if ((*m == ' ') ? 1 : (*s == *m))
- {
- s++;
- m++;
- }
- else
- {
- return 0;
- }
- }
- return !*m;
-}
-
-u_long
-updatetimeinfo(
- register parse_t *parseio,
- register u_long flags
- )
-{
-#ifdef PARSEKERNEL
- {
- int s = splhigh();
-#endif
-
- parseio->parse_lstate = parseio->parse_dtime.parse_state | flags | PARSEB_TIMECODE;
-
- parseio->parse_dtime.parse_state = parseio->parse_lstate;
-
-#ifdef PARSEKERNEL
- (void)splx((unsigned int)s);
- }
-#endif
-
-
-#ifdef PARSEKERNEL
- parseprintf(DD_PARSE, ("updatetimeinfo status=0x%x, time=%x\n", parseio->parse_dtime.parse_state,
- parseio->parse_dtime.parse_time.tv.tv_sec));
-#else
- parseprintf(DD_PARSE, ("updatetimeinfo status=0x%lx, time=%x\n", (long)parseio->parse_dtime.parse_state,
- parseio->parse_dtime.parse_time.fp.l_ui));
-#endif
-
- return CVT_OK; /* everything fine and dandy... */
-}
-
-
-/*
- * syn_simple
- *
- * handle a sync time stamp
- */
-/*ARGSUSED*/
-void
-syn_simple(
- register parse_t *parseio,
- register timestamp_t *ts,
- register struct format *format,
- register u_long why
- )
-{
- parseio->parse_dtime.parse_stime = *ts;
-}
-
-/*
- * pps_simple
- *
- * handle a pps time stamp
- */
-/*ARGSUSED*/
-u_long
-pps_simple(
- register parse_t *parseio,
- register int status,
- register timestamp_t *ptime
- )
-{
- parseio->parse_dtime.parse_ptime = *ptime;
- parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
-
- return CVT_NONE;
-}
-
-/*
- * pps_one
- *
- * handle a pps time stamp in ONE edge
- */
-/*ARGSUSED*/
-u_long
-pps_one(
- register parse_t *parseio,
- register int status,
- register timestamp_t *ptime
- )
-{
- if (status)
- return pps_simple(parseio, status, ptime);
-
- return CVT_NONE;
-}
-
-/*
- * pps_zero
- *
- * handle a pps time stamp in ZERO edge
- */
-/*ARGSUSED*/
-u_long
-pps_zero(
- register parse_t *parseio,
- register int status,
- register timestamp_t *ptime
- )
-{
- if (!status)
- return pps_simple(parseio, status, ptime);
-
- return CVT_NONE;
-}
-
-/*
- * timepacket
- *
- * process a data packet
- */
-static u_long
-timepacket(
- register parse_t *parseio
- )
-{
- register unsigned short format;
- register time_t t;
- u_long cvtrtc; /* current conversion result */
- clocktime_t clock_time;
-
- memset((char *)&clock_time, 0, sizeof clock_time);
- format = parseio->parse_lformat;
-
- if (format == (unsigned short)~0)
- return CVT_NONE;
-
- switch ((cvtrtc = clockformats[format]->convert ?
- clockformats[format]->convert((unsigned char *)parseio->parse_ldata, parseio->parse_ldsize, (struct format *)(clockformats[format]->data), &clock_time, parseio->parse_pdata) :
- CVT_NONE) & CVT_MASK)
- {
- case CVT_FAIL:
- parseio->parse_badformat++;
- break;
-
- case CVT_NONE:
- /*
- * too bad - pretend bad format
- */
- parseio->parse_badformat++;
- break;
-
- case CVT_OK:
- break;
-
- case CVT_SKIP:
- return CVT_NONE;
-
- default:
- /* shouldn't happen */
-#ifndef PARSEKERNEL
- msyslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"\n", clockformats[format]->name);
-#endif
- return CVT_FAIL|cvtrtc;
- }
-
- if ((t = parse_to_unixtime(&clock_time, &cvtrtc)) == -1)
- {
- return CVT_FAIL|cvtrtc;
- }
-
- /*
- * time stamp
- */
-#ifdef PARSEKERNEL
- parseio->parse_dtime.parse_time.tv.tv_sec = t;
- parseio->parse_dtime.parse_time.tv.tv_usec = clock_time.usecond;
-#else
- parseio->parse_dtime.parse_time.fp.l_ui = t + JAN_1970;
- TVUTOTSF(clock_time.usecond, parseio->parse_dtime.parse_time.fp.l_uf);
-#endif
-
- parseio->parse_dtime.parse_format = format;
-
- return updatetimeinfo(parseio, clock_time.flags);
-}
-
-/*ARGSUSED*/
-int
-parse_timecode(
- parsectl_t *dct,
- parse_t *parse
- )
-{
- dct->parsegettc.parse_state = parse->parse_lstate;
- dct->parsegettc.parse_format = parse->parse_lformat;
- /*
- * move out current bad packet count
- * user program is expected to sum these up
- * this is not a problem, as "parse" module are
- * exclusive open only
- */
- dct->parsegettc.parse_badformat = parse->parse_badformat;
- parse->parse_badformat = 0;
-
- if (parse->parse_ldsize <= PARSE_TCMAX)
- {
- dct->parsegettc.parse_count = parse->parse_ldsize;
- memcpy(dct->parsegettc.parse_buffer, parse->parse_ldata, dct->parsegettc.parse_count);
- return 1;
- }
- else
- {
- return 0;
- }
-}
-
-
-/*ARGSUSED*/
-int
-parse_setfmt(
- parsectl_t *dct,
- parse_t *parse
- )
-{
- if (dct->parseformat.parse_count <= PARSE_TCMAX)
- {
- if (dct->parseformat.parse_count)
- {
- register unsigned short i;
-
- for (i = 0; i < nformats; i++)
- {
- if (!Strcmp(dct->parseformat.parse_buffer, clockformats[i]->name))
- {
- if (parse->parse_pdata)
- FREE(parse->parse_pdata, parse->parse_plen);
- parse->parse_pdata = 0;
-
- parse->parse_plen = clockformats[i]->plen;
-
- if (parse->parse_plen)
- {
- parse->parse_pdata = MALLOC(parse->parse_plen);
- if (!parse->parse_pdata)
- {
- parseprintf(DD_PARSE, ("set format failed: malloc for private data area failed\n"));
- return 0;
- }
- memset((char *)parse->parse_pdata, 0, parse->parse_plen);
- }
-
- if (parse->parse_data)
- FREE(parse->parse_data, (unsigned)(parse->parse_dsize * 2 + 2));
- parse->parse_ldata = parse->parse_data = 0;
-
- parse->parse_dsize = clockformats[i]->length;
-
- if (parse->parse_dsize)
- {
- parse->parse_data = (char*)MALLOC((unsigned)(parse->parse_dsize * 2 + 2));
- if (!parse->parse_data)
- {
- if (parse->parse_pdata)
- FREE(parse->parse_pdata, parse->parse_plen);
- parse->parse_pdata = 0;
-
- parseprintf(DD_PARSE, ("init failed: malloc for data area failed\n"));
- return 0;
- }
- }
-
-
- /*
- * leave room for '\0'
- */
- parse->parse_ldata = parse->parse_data + parse->parse_dsize + 1;
-
- parse->parse_lformat = i;
-
- return 1;
- }
- }
- }
- }
- return 0;
-}
-
-/*ARGSUSED*/
-int
-parse_getfmt(
- parsectl_t *dct,
- parse_t *parse
- )
-{
- if (dct->parseformat.parse_format < nformats &&
- Strlen(clockformats[dct->parseformat.parse_format]->name) <= PARSE_TCMAX)
- {
- dct->parseformat.parse_count = Strlen(clockformats[dct->parseformat.parse_format]->name)+1;
- memcpy(dct->parseformat.parse_buffer, clockformats[dct->parseformat.parse_format]->name, dct->parseformat.parse_count);
- return 1;
- }
- else
- {
- return 0;
- }
-}
-
-/*ARGSUSED*/
-int
-parse_setcs(
- parsectl_t *dct,
- parse_t *parse
- )
-{
- parse->parse_ioflags &= ~PARSE_IO_CSIZE;
- parse->parse_ioflags |= dct->parsesetcs.parse_cs & PARSE_IO_CSIZE;
- return 1;
-}
-
-#else /* not (REFCLOCK && CLOCK_PARSE) */
-int parse_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE) */
-
-/*
- * History:
- *
- * parse.c,v
- * Revision 4.14 1999/11/28 09:13:52 kardel
- * RECON_4_0_98F
- *
- * Revision 4.13 1999/02/28 11:50:20 kardel
- * (timepacket): removed unecessary code
- *
- * Revision 4.12 1999/02/21 12:17:44 kardel
- * 4.91f reconcilation
- *
- * Revision 4.11 1999/02/21 11:09:47 kardel
- * unified debug output
- *
- * Revision 4.10 1998/12/20 23:45:30 kardel
- * fix types and warnings
- *
- * Revision 4.9 1998/08/09 22:26:06 kardel
- * Trimble TSIP support
- *
- * Revision 4.8 1998/06/14 21:09:39 kardel
- * Sun acc cleanup
- *
- * Revision 4.7 1998/06/13 15:19:13 kardel
- * fix mem*() to b*() function macro emulation
- *
- * Revision 4.6 1998/06/13 13:24:13 kardel
- * printf fmt
- *
- * Revision 4.5 1998/06/13 13:01:10 kardel
- * printf fmt
- *
- * Revision 4.4 1998/06/13 12:12:10 kardel
- * bcopy/memcpy cleanup
- * fix SVSV name clash
- *
- * Revision 4.3 1998/06/12 15:22:30 kardel
- * fix prototypes
- *
- * Revision 4.2 1998/06/12 09:13:27 kardel
- * conditional compile macros fixed
- * printf prototype
- *
- * Revision 4.1 1998/05/24 09:39:55 kardel
- * implementation of the new IO handling model
- *
- * Revision 4.0 1998/04/10 19:45:36 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.46 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/parse_conf.c b/contrib/ntp/libparse/parse_conf.c
deleted file mode 100644
index 5dc267b..0000000
--- a/contrib/ntp/libparse/parse_conf.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/parse_conf.c,v 4.5 1999/11/28 09:13:53 kardel RELEASE_19991128_A
- *
- * parse_conf.c,v 4.5 1999/11/28 09:13:53 kardel RELEASE_19991128_A
- *
- * Parser configuration module for reference clocks
- *
- * STREAM define switches between two personalities of the module
- * if STREAM is defined this module can be used with dcf77sync.c as
- * a STREAMS kernel module. In this case the time stamps will be
- * a struct timeval.
- * when STREAM is not defined NTP time stamps will be used.
- *
- * Copyright (C) 1995-1998 by Frank Kardel
- * Copyright (C) 1992-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE)
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include "parse.h"
-
-#ifdef CLOCK_SCHMID
-extern clockformat_t clock_schmid;
-#endif
-
-#ifdef CLOCK_DCF7000
-extern clockformat_t clock_dcf7000;
-#endif
-
-#ifdef CLOCK_MEINBERG
-extern clockformat_t clock_meinberg[];
-#endif
-
-#ifdef CLOCK_RAWDCF
-extern clockformat_t clock_rawdcf;
-#endif
-
-#ifdef CLOCK_TRIMTAIP
-extern clockformat_t clock_trimtaip;
-#endif
-
-#ifdef CLOCK_TRIMTSIP
-extern clockformat_t clock_trimtsip;
-#endif
-
-#ifdef CLOCK_RCC8000
-extern clockformat_t clock_rcc8000;
-#endif
-
-#ifdef CLOCK_HOPF6021
-extern clockformat_t clock_hopf6021;
-#endif
-
-#ifdef CLOCK_COMPUTIME
-extern clockformat_t clock_computime;
-#endif
-
-#ifdef CLOCK_WHARTON_400A
-extern clockformat_t clock_wharton_400a;
-#endif
-
-#ifdef CLOCK_VARITEXT
-extern clockformat_t clock_varitext;
-#endif
-
-/*
- * format definitions
- */
-clockformat_t *clockformats[] =
-{
-#ifdef CLOCK_MEINBERG
- &clock_meinberg[0],
- &clock_meinberg[1],
- &clock_meinberg[2],
-#endif
-#ifdef CLOCK_DCF7000
- &clock_dcf7000,
-#endif
-#ifdef CLOCK_SCHMID
- &clock_schmid,
-#endif
-#ifdef CLOCK_RAWDCF
- &clock_rawdcf,
-#endif
-#ifdef CLOCK_TRIMTAIP
- &clock_trimtaip,
-#endif
-#ifdef CLOCK_TRIMTSIP
- &clock_trimtsip,
-#endif
-#ifdef CLOCK_RCC8000
- &clock_rcc8000,
-#endif
-#ifdef CLOCK_HOPF6021
- &clock_hopf6021,
-#endif
-#ifdef CLOCK_COMPUTIME
- &clock_computime,
-#endif
-#ifdef CLOCK_WHARTON_400A
- &clock_wharton_400a,
-#endif
-#ifdef CLOCK_VARITEXT
- &clock_varitext,
-#endif
- 0};
-
-unsigned short nformats = sizeof(clockformats) / sizeof(clockformats[0]) - 1;
-
-#else /* not (REFCLOCK && CLOCK_PARSE) */
-int parse_conf_bs;
-#endif /* not (REFCLOCK && CLOCK_PARSE) */
-
-/*
- * History:
- *
- * parse_conf.c,v
- * Revision 4.5 1999/11/28 09:13:53 kardel
- * RECON_4_0_98F
- *
- * Revision 4.4 1999/02/28 15:27:25 kardel
- * wharton clock integration
- *
- * Revision 4.3 1998/08/16 18:52:15 kardel
- * (clockformats): Trimble TSIP driver now also
- * available for kernel operation
- *
- * Revision 4.2 1998/06/12 09:13:48 kardel
- * conditional compile macros fixed
- *
- * Revision 4.1 1998/05/24 09:40:49 kardel
- * adjustments of log messages
- *
- *
- * from V3 3.24 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/parsesolaris.c b/contrib/ntp/libparse/parsesolaris.c
deleted file mode 100644
index 896f9f0..0000000
--- a/contrib/ntp/libparse/parsesolaris.c
+++ /dev/null
@@ -1,1173 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A
- *
- * parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A
- *
- * STREAMS module for reference clocks
- *
- * Copyright (C) 1993-1998 by Frank Kardel
- * derived work from parsestreams.c ((c) 1991-1993, Frank Kardel) and
- * dcf77sync.c((c) Frank Kardel)
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#define _KERNEL /* it is a _KERNEL module */
-
-#ifndef lint
-static char rcsid[] = "parsesolaris.c,v 4.6 1998/11/15 21:56:08 kardel RELEASE_19991128_A";
-#endif
-
-#include <sys/types.h>
-#include <sys/conf.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/termios.h>
-#include <sys/stream.h>
-#include <sys/strtty.h>
-#include <sys/stropts.h>
-#include <sys/modctl.h>
-#include <sys/ddi.h>
-#include <sys/sunddi.h>
-#ifdef __GNUC__ /* makes it compile on Solaris 2.6 - acc doesn't like it -- GREAT! */
-#include <stdarg.h>
-#endif
-
-#include "ntp_fp.h"
-#include "parse.h"
-#include <sys/parsestreams.h>
-
-/*--------------- loadable driver section -----------------------------*/
-
-static struct streamtab parseinfo;
-
-static struct fmodsw fmod_templ =
-{
- "parse", /* module name */
- &parseinfo, /* module information */
- D_NEW|D_MP|D_MTQPAIR, /* exclusive for q pair */
- /* lock ptr */
-};
-
-extern struct mod_ops mod_strmodops;
-
-static struct modlstrmod modlstrmod =
-{
- &mod_strmodops, /* a STREAMS module */
- "PARSE - NTP reference", /* name this baby - keep room for revision number */
- &fmod_templ
-};
-
-static struct modlinkage modlinkage =
-{
- MODREV_1,
- {
- &modlstrmod,
- NULL
- }
-};
-
-/*
- * module management routines
- */
-/*ARGSUSED*/
-int
-_init(
- void
- )
-{
- static char revision[] = "4.6";
- char *s, *S;
- char *t;
-
-#ifndef lint
- t = rcsid;
-#endif
-
- /*
- * copy RCS revision into Drv_name
- *
- * are we forcing RCS here to do things it was not built for ?
- */
- s = revision;
- if (*s == '$')
- {
- /*
- * skip "$Revision: "
- * if present. - not necessary on a -kv co (cvs export)
- */
- while (*s && (*s != ' '))
- {
- s++;
- }
- if (*s == ' ') s++;
- }
-
- t = modlstrmod.strmod_linkinfo;
- while (*t && (*t != ' '))
- {
- t++;
- }
- if (*t == ' ') t++;
-
- S = s;
- while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
- {
- S++;
- }
-
- if (*s && *t && (S > s))
- {
- if (strlen(t) >= (S - s))
- {
- (void) strncpy(t, s, (unsigned)(S - s));
- }
- }
- return (mod_install(&modlinkage));
-}
-
-/*ARGSUSED*/
-int
-_info(
- struct modinfo *modinfop
- )
-{
- return (mod_info(&modlinkage, modinfop));
-}
-
-/*ARGSUSED*/
-int
-_fini(
- void
- )
-{
- if (mod_remove(&modlinkage) != DDI_SUCCESS)
- {
- return EBUSY;
- }
- else
- return DDI_SUCCESS;
-}
-
-/*--------------- stream module definition ----------------------------*/
-
-static int parseopen P((queue_t *, dev_t *, int, int, cred_t *));
-static int parseclose P((queue_t *, int));
-static int parsewput P((queue_t *, mblk_t *));
-static int parserput P((queue_t *, mblk_t *));
-static int parsersvc P((queue_t *));
-
-static struct module_info driverinfo =
-{
- 0, /* module ID number */
- fmod_templ.f_name, /* module name - why repeated here ? compat ?*/
- 0, /* minimum accepted packet size */
- INFPSZ, /* maximum accepted packet size */
- 1, /* high water mark - flow control */
- 0 /* low water mark - flow control */
-};
-
-static struct qinit rinit = /* read queue definition */
-{
- parserput, /* put procedure */
- parsersvc, /* service procedure */
- parseopen, /* open procedure */
- parseclose, /* close procedure */
- NULL, /* admin procedure - NOT USED FOR NOW */
- &driverinfo, /* information structure */
- NULL /* statistics */
-};
-
-static struct qinit winit = /* write queue definition */
-{
- parsewput, /* put procedure */
- NULL, /* service procedure */
- NULL, /* open procedure */
- NULL, /* close procedure */
- NULL, /* admin procedure - NOT USED FOR NOW */
- &driverinfo, /* information structure */
- NULL /* statistics */
-};
-
-static struct streamtab parseinfo = /* stream info element for parse driver */
-{
- &rinit, /* read queue */
- &winit, /* write queue */
- NULL, /* read mux */
- NULL /* write mux */
-};
-
-/*--------------- driver data structures ----------------------------*/
-
-/*
- * we usually have an inverted signal - but you
- * can change this to suit your needs
- */
-int cd_invert = 1; /* invert status of CD line - PPS support via CD input */
-
-#ifdef PARSEDEBUG
-int parsedebug = ~0;
-#else
-int parsedebug = 0;
-#endif
-
-/*--------------- module implementation -----------------------------*/
-
-#define TIMEVAL_USADD(_X_, _US_) do {\
- (_X_)->tv_usec += (_US_);\
- if ((_X_)->tv_usec >= 1000000)\
- {\
- (_X_)->tv_sec++;\
- (_X_)->tv_usec -= 1000000;\
- }\
- } while (0)
-
-static int init_linemon P((queue_t *));
-static void close_linemon P((queue_t *, queue_t *));
-
-#define M_PARSE 0x0001
-#define M_NOPARSE 0x0002
-
-void
-ntp_memset(
- char *a,
- int x,
- int c
- )
-{
- while (c-- > 0)
- *a++ = x;
-}
-
-static void
-pprintf(
- int lev,
- const char *form,
- ...
- )
-{
- va_list ap;
-
- va_start(ap, form);
-
- if (lev & parsedebug)
- vcmn_err(CE_CONT, (char *)form, ap);
-
- va_end(ap);
-}
-
-static int
-setup_stream(
- queue_t *q,
- int mode
- )
-{
- register mblk_t *mp;
-
- pprintf(DD_OPEN,"parse: SETUP_STREAM - setting up stream for q=%x\n", q);
-
- mp = allocb(sizeof(struct stroptions), BPRI_MED);
- if (mp)
- {
- struct stroptions *str = (struct stroptions *)mp->b_wptr;
-
- str->so_flags = SO_READOPT|SO_HIWAT|SO_LOWAT|SO_ISNTTY;
- str->so_readopt = (mode == M_PARSE) ? RMSGD : RNORM;
- str->so_hiwat = (mode == M_PARSE) ? sizeof(parsetime_t) : 256;
- str->so_lowat = 0;
- mp->b_datap->db_type = M_SETOPTS;
- mp->b_wptr += sizeof(struct stroptions);
- if (!q)
- panic("NULL q - strange");
- putnext(q, mp);
- return putctl1(WR(q)->q_next, M_CTL, (mode == M_PARSE) ? MC_SERVICEIMM :
- MC_SERVICEDEF);
- }
- else
- {
- pprintf(DD_OPEN, "parse: setup_stream - FAILED - no MEMORY for allocb\n");
- return 0;
- }
-}
-
-/*ARGSUSED*/
-static int
-parseopen(
- queue_t *q,
- dev_t *dev,
- int flag,
- int sflag,
- cred_t *credp
- )
-{
- register parsestream_t *parse;
- static int notice = 0;
-
- pprintf(DD_OPEN, "parse: OPEN - q=%x\n", q);
-
- if (sflag != MODOPEN)
- { /* open only for modules */
- pprintf(DD_OPEN, "parse: OPEN - FAILED - not MODOPEN\n");
- return EIO;
- }
-
- if (q->q_ptr != (caddr_t)NULL)
- {
- pprintf(DD_OPEN, "parse: OPEN - FAILED - EXCLUSIVE ONLY\n");
- return EBUSY;
- }
-
- q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t), KM_SLEEP);
- if (q->q_ptr == (caddr_t)0)
- {
- return ENOMEM;
- }
-
- pprintf(DD_OPEN, "parse: OPEN - parse area q=%x, q->q_ptr=%x\n", q, q->q_ptr);
- WR(q)->q_ptr = q->q_ptr;
- pprintf(DD_OPEN, "parse: OPEN - WQ parse area q=%x, q->q_ptr=%x\n", WR(q), WR(q)->q_ptr);
-
- parse = (parsestream_t *) q->q_ptr;
- bzero((caddr_t)parse, sizeof(*parse));
- parse->parse_queue = q;
- parse->parse_status = PARSE_ENABLE;
- parse->parse_ppsclockev.tv.tv_sec = 0;
- parse->parse_ppsclockev.tv.tv_usec = 0;
- parse->parse_ppsclockev.serial = 0;
-
- qprocson(q);
-
- pprintf(DD_OPEN, "parse: OPEN - initializing io subsystem q=%x\n", q);
-
- if (!parse_ioinit(&parse->parse_io))
- {
- /*
- * ok guys - beat it
- */
- qprocsoff(q);
-
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-
- return EIO;
- }
-
- pprintf(DD_OPEN, "parse: OPEN - initializing stream q=%x\n", q);
-
- if (setup_stream(q, M_PARSE))
- {
- (void) init_linemon(q); /* hook up PPS ISR routines if possible */
- pprintf(DD_OPEN, "parse: OPEN - SUCCEEDED\n");
-
- /*
- * I know that you know the delete key, but you didn't write this
- * code, did you ? - So, keep the message in here.
- */
- if (!notice)
- {
- cmn_err(CE_CONT, "?%s: Copyright (c) 1993-1998, Frank Kardel\n", modlstrmod.strmod_linkinfo);
- notice = 1;
- }
-
- return 0;
- }
- else
- {
- qprocsoff(q);
-
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-
- return EIO;
- }
-}
-
-/*ARGSUSED*/
-static int
-parseclose(
- queue_t *q,
- int flags
- )
-{
- register parsestream_t *parse = (parsestream_t *)q->q_ptr;
- register unsigned long s;
-
- pprintf(DD_CLOSE, "parse: CLOSE\n");
-
- qprocsoff(q);
-
- s = splhigh();
-
- if (parse->parse_dqueue)
- close_linemon(parse->parse_dqueue, q);
- parse->parse_dqueue = (queue_t *)0;
-
- (void) splx(s);
-
- parse_ioend(&parse->parse_io);
-
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-
- q->q_ptr = (caddr_t)NULL;
- WR(q)->q_ptr = (caddr_t)NULL;
-
- return 0;
-}
-
-/*
- * move unrecognized stuff upward
- */
-static int
-parsersvc(
- queue_t *q
- )
-{
- mblk_t *mp;
-
- while ((mp = getq(q)))
- {
- if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- pprintf(DD_RSVC, "parse: RSVC - putnext\n");
- }
- else
- {
- putbq(q, mp);
- pprintf(DD_RSVC, "parse: RSVC - flow control wait\n");
- break;
- }
- }
- return 0;
-}
-
-/*
- * do ioctls and
- * send stuff down - dont care about
- * flow control
- */
-static int
-parsewput(
- queue_t *q,
- mblk_t *mp
- )
-{
- register int ok = 1;
- register mblk_t *datap;
- register struct iocblk *iocp;
- parsestream_t *parse = (parsestream_t *)q->q_ptr;
-
- pprintf(DD_WPUT, "parse: parsewput\n");
-
- switch (mp->b_datap->db_type)
- {
- default:
- putnext(q, mp);
- break;
-
- case M_IOCTL:
- iocp = (struct iocblk *)mp->b_rptr;
- switch (iocp->ioc_cmd)
- {
- default:
- pprintf(DD_WPUT, "parse: parsewput - forward M_IOCTL\n");
- putnext(q, mp);
- break;
-
- case CIOGETEV:
- /*
- * taken from Craig Leres ppsclock module (and modified)
- */
- datap = allocb(sizeof(struct ppsclockev), BPRI_MED);
- if (datap == NULL || mp->b_cont)
- {
- mp->b_datap->db_type = M_IOCNAK;
- iocp->ioc_error = (datap == NULL) ? ENOMEM : EINVAL;
- if (datap != NULL)
- freeb(datap);
- qreply(q, mp);
- break;
- }
-
- mp->b_cont = datap;
- *(struct ppsclockev *)datap->b_wptr = parse->parse_ppsclockev;
- datap->b_wptr +=
- sizeof(struct ppsclockev) / sizeof(*datap->b_wptr);
- mp->b_datap->db_type = M_IOCACK;
- iocp->ioc_count = sizeof(struct ppsclockev);
- qreply(q, mp);
- break;
-
- case PARSEIOC_ENABLE:
- case PARSEIOC_DISABLE:
- {
- parse->parse_status = (parse->parse_status & (unsigned)~PARSE_ENABLE) |
- (iocp->ioc_cmd == PARSEIOC_ENABLE) ?
- PARSE_ENABLE : 0;
- if (!setup_stream(RD(q), (parse->parse_status & PARSE_ENABLE) ?
- M_PARSE : M_NOPARSE))
- {
- mp->b_datap->db_type = M_IOCNAK;
- }
- else
- {
- mp->b_datap->db_type = M_IOCACK;
- }
- qreply(q, mp);
- break;
- }
-
- case PARSEIOC_TIMECODE:
- case PARSEIOC_SETFMT:
- case PARSEIOC_GETFMT:
- case PARSEIOC_SETCS:
- if (iocp->ioc_count == sizeof(parsectl_t))
- {
- parsectl_t *dct = (parsectl_t *)mp->b_cont->b_rptr;
-
- switch (iocp->ioc_cmd)
- {
- case PARSEIOC_TIMECODE:
- pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_TIMECODE\n");
- ok = parse_timecode(dct, &parse->parse_io);
- break;
-
- case PARSEIOC_SETFMT:
- pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETFMT\n");
- ok = parse_setfmt(dct, &parse->parse_io);
- break;
-
- case PARSEIOC_GETFMT:
- pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_GETFMT\n");
- ok = parse_getfmt(dct, &parse->parse_io);
- break;
-
- case PARSEIOC_SETCS:
- pprintf(DD_WPUT, "parse: parsewput - PARSEIOC_SETCS\n");
- ok = parse_setcs(dct, &parse->parse_io);
- break;
- }
- mp->b_datap->db_type = ok ? M_IOCACK : M_IOCNAK;
- }
- else
- {
- mp->b_datap->db_type = M_IOCNAK;
- }
- pprintf(DD_WPUT, "parse: parsewput qreply - %s\n", (mp->b_datap->db_type == M_IOCNAK) ? "M_IOCNAK" : "M_IOCACK");
- qreply(q, mp);
- break;
- }
- }
- return 0;
-}
-
-/*
- * read characters from streams buffers
- */
-static unsigned long
-rdchar(
- mblk_t **mp
- )
-{
- while (*mp != (mblk_t *)NULL)
- {
- if ((*mp)->b_wptr - (*mp)->b_rptr)
- {
- return (unsigned long)(*(unsigned char *)((*mp)->b_rptr++));
- }
- else
- {
- register mblk_t *mmp = *mp;
-
- *mp = (*mp)->b_cont;
- freeb(mmp);
- }
- }
- return (unsigned long)~0;
-}
-
-/*
- * convert incoming data
- */
-static int
-parserput(
- queue_t *q,
- mblk_t *imp
- )
-{
- register unsigned char type;
- mblk_t *mp = imp;
-
- switch (type = mp->b_datap->db_type)
- {
- default:
- /*
- * anything we don't know will be put on queue
- * the service routine will move it to the next one
- */
- pprintf(DD_RPUT, "parse: parserput - forward type 0x%x\n", type);
-
- if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- }
- else
- putq(q, mp);
- break;
-
- case M_BREAK:
- case M_DATA:
- {
- register parsestream_t * parse = (parsestream_t *)q->q_ptr;
- register mblk_t *nmp;
- register unsigned long ch;
- timestamp_t ctime;
- timespec_t hres_time;
-
- /*
- * get time on packet delivery
- */
- gethrestime(&hres_time);
- ctime.tv.tv_sec = hres_time.tv_sec;
- ctime.tv.tv_usec = hres_time.tv_nsec / 1000;
-
- if (!(parse->parse_status & PARSE_ENABLE))
- {
- pprintf(DD_RPUT, "parse: parserput - parser disabled - forward type 0x%x\n", type);
- if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- }
- else
- putq(q, mp);
- }
- else
- {
- pprintf(DD_RPUT, "parse: parserput - M_%s\n", (type == M_DATA) ? "DATA" : "BREAK");
- if (type == M_DATA)
- {
- /*
- * parse packet looking for start an end characters
- */
- while (mp != (mblk_t *)NULL)
- {
- ch = rdchar(&mp);
- if (ch != ~0 && parse_ioread(&parse->parse_io, (unsigned int)ch, &ctime))
- {
- /*
- * up up and away (hopefully ...)
- * don't press it if resources are tight or nobody wants it
- */
- nmp = (mblk_t *)NULL;
- if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
- {
- bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
- nmp->b_wptr += sizeof(parsetime_t);
- putnext(parse->parse_queue, nmp);
- }
- else
- if (nmp) freemsg(nmp);
- parse_iodone(&parse->parse_io);
- }
- }
- }
- else
- {
- if (parse_ioread(&parse->parse_io, (unsigned int)0, &ctime))
- {
- /*
- * up up and away (hopefully ...)
- * don't press it if resources are tight or nobody wants it
- */
- nmp = (mblk_t *)NULL;
- if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
- {
- bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
- nmp->b_wptr += sizeof(parsetime_t);
- putnext(parse->parse_queue, nmp);
- }
- else
- if (nmp) freemsg(nmp);
- parse_iodone(&parse->parse_io);
- }
- freemsg(mp);
- }
- break;
- }
- }
-
- /*
- * CD PPS support for non direct ISR hack
- */
- case M_HANGUP:
- case M_UNHANGUP:
- {
- register parsestream_t * parse = (parsestream_t *)q->q_ptr;
- timestamp_t ctime;
- timespec_t hres_time;
- register mblk_t *nmp;
- register int status = cd_invert ^ (type == M_UNHANGUP);
-
- gethrestime(&hres_time);
- ctime.tv.tv_sec = hres_time.tv_sec;
- ctime.tv.tv_usec = hres_time.tv_nsec / 1000;
-
- pprintf(DD_RPUT, "parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN");
-
- if ((parse->parse_status & PARSE_ENABLE) &&
- parse_iopps(&parse->parse_io, status ? SYNC_ONE : SYNC_ZERO, &ctime))
- {
- nmp = (mblk_t *)NULL;
- if (canputnext(parse->parse_queue) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
- {
- bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
- nmp->b_wptr += sizeof(parsetime_t);
- putnext(parse->parse_queue, nmp);
- }
- else
- if (nmp) freemsg(nmp);
- parse_iodone(&parse->parse_io);
- freemsg(mp);
- }
- else
- if (canputnext(q) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- }
- else
- putq(q, mp);
-
- if (status)
- {
- parse->parse_ppsclockev.tv = ctime.tv;
- ++(parse->parse_ppsclockev.serial);
- }
- }
- }
- return 0;
-}
-
-static int init_zs_linemon P((queue_t *, queue_t *)); /* handle line monitor for "zs" driver */
-static void close_zs_linemon P((queue_t *, queue_t *));
-
-/*-------------------- CD isr status monitor ---------------*/
-
-static int
-init_linemon(
- queue_t *q
- )
-{
- register queue_t *dq;
-
- dq = WR(q);
- /*
- * we ARE doing very bad things down here (basically stealing ISR
- * hooks)
- *
- * so we chase down the STREAMS stack searching for the driver
- * and if this is a known driver we insert our ISR routine for
- * status changes in to the ExternalStatus handling hook
- */
- while (dq->q_next)
- {
- dq = dq->q_next; /* skip down to driver */
- }
-
- /*
- * find appropriate driver dependent routine
- */
- if (dq->q_qinfo && dq->q_qinfo->qi_minfo)
- {
- register char *dname = dq->q_qinfo->qi_minfo->mi_idname;
-
- pprintf(DD_INSTALL, "init_linemon: driver is \"%s\"\n", dname);
-
-#ifdef sun
- if (dname && !strcmp(dname, "zs"))
- {
- return init_zs_linemon(dq, q);
- }
- else
-#endif
- {
- pprintf(DD_INSTALL, "init_linemon: driver \"%s\" not suitable for CD monitoring\n", dname);
- return 0;
- }
- }
- pprintf(DD_INSTALL, "init_linemon: cannot find driver\n");
- return 0;
-}
-
-static void
-close_linemon(
- queue_t *q,
- queue_t *my_q
- )
-{
- /*
- * find appropriate driver dependent routine
- */
- if (q->q_qinfo && q->q_qinfo->qi_minfo)
- {
- register char *dname = q->q_qinfo->qi_minfo->mi_idname;
-
-#ifdef sun
- if (dname && !strcmp(dname, "zs"))
- {
- close_zs_linemon(q, my_q);
- return;
- }
- pprintf(DD_INSTALL, "close_linemon: cannot find driver close routine for \"%s\"\n", dname);
-#endif
- }
- pprintf(DD_INSTALL, "close_linemon: cannot find driver name\n");
-}
-
-#ifdef sun
-#include <sys/tty.h>
-#include <sys/zsdev.h>
-#include <sys/ser_async.h>
-#include <sys/ser_zscc.h>
-
-static void zs_xsisr P((struct zscom *)); /* zs external status interupt handler */
-
-/*
- * there should be some docs telling how to get to
- * sz:zs_usec_delay and zs:initzsops()
- */
-#define zs_usec_delay 5
-
-struct savedzsops
-{
- struct zsops zsops;
- struct zsops *oldzsops;
-};
-
-static struct zsops *emergencyzs;
-
-static int
-init_zs_linemon(
- queue_t *q,
- queue_t *my_q
- )
-{
- register struct zscom *zs;
- register struct savedzsops *szs;
- register parsestream_t *parsestream = (parsestream_t *)my_q->q_ptr;
- /*
- * we expect the zsaline pointer in the q_data pointer
- * from there on we insert our on EXTERNAL/STATUS ISR routine
- * into the interrupt path, before the standard handler
- */
- zs = ((struct asyncline *)q->q_ptr)->za_common;
- if (!zs)
- {
- /*
- * well - not found on startup - just say no (shouldn't happen though)
- */
- return 0;
- }
- else
- {
- /*
- * we do a direct replacement, in case others fiddle also
- * if somebody else grabs our hook and we disconnect
- * we are in DEEP trouble - panic is likely to be next, sorry
- */
- szs = (struct savedzsops *) kmem_alloc(sizeof(struct savedzsops), KM_SLEEP);
-
- if (szs == (struct savedzsops *)0)
- {
- pprintf(DD_INSTALL, "init_zs_linemon: CD monitor NOT installed - no memory\n");
-
- return 0;
- }
- else
- {
- parsestream->parse_data = (void *)szs;
-
- mutex_enter(zs->zs_excl);
-
- parsestream->parse_dqueue = q; /* remember driver */
-
- szs->zsops = *zs->zs_ops;
- szs->zsops.zsop_xsint = (void (*) P((struct zscom *)))zs_xsisr; /* place our bastard */
- szs->oldzsops = zs->zs_ops;
- emergencyzs = zs->zs_ops;
-
- zs->zs_ops = &szs->zsops; /* hook it up */
- /*
- * XXX: this is usually done via zsopinit()
- * - have yet to find a way to call that routine
- */
- zs->zs_xsint = (void (*) P((struct zscom *)))zs_xsisr;
-
- mutex_exit(zs->zs_excl);
-
- pprintf(DD_INSTALL, "init_zs_linemon: CD monitor installed\n");
-
- return 1;
- }
- }
-}
-
-/*
- * unregister our ISR routine - must call under splhigh() (or
- * whatever block ZS status interrupts)
- */
-static void
-close_zs_linemon(
- queue_t *q,
- queue_t *my_q
- )
-{
- register struct zscom *zs;
- register parsestream_t *parsestream = (parsestream_t *)my_q->q_ptr;
-
- zs = ((struct asyncline *)q->q_ptr)->za_common;
- if (!zs)
- {
- /*
- * well - not found on startup - just say no (shouldn't happen though)
- */
- return;
- }
- else
- {
- register struct savedzsops *szs = (struct savedzsops *)parsestream->parse_data;
-
- mutex_enter(zs->zs_excl);
-
- zs->zs_ops = szs->oldzsops; /* reset to previous handler functions */
- /*
- * XXX: revert xsint (usually done via zsopinit() - have still to find
- * a way to call that bugger
- */
- zs->zs_xsint = zs->zs_ops->zsop_xsint;
-
- mutex_exit(zs->zs_excl);
-
- kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
- pprintf(DD_INSTALL, "close_zs_linemon: CD monitor deleted\n");
- return;
- }
-}
-
-#define ZSRR0_IGNORE (ZSRR0_CD|ZSRR0_SYNC|ZSRR0_CTS)
-
-#define MAXDEPTH 50 /* maximum allowed stream crawl */
-
-/*
- * take external status interrupt (only CD interests us)
- */
-static void
-zs_xsisr(
- struct zscom *zs
- )
-{
- register struct asyncline *za = (struct asyncline *)zs->zs_priv;
- register queue_t *q;
- register unsigned char zsstatus;
- register int loopcheck;
- register unsigned char cdstate;
- register const char *dname = "-UNKNOWN-";
- timespec_t hres_time;
-
- /*
- * pick up current state
- */
- zsstatus = SCC_READ0();
-
- if (za->za_rr0 ^ (cdstate = zsstatus & ZSRR0_CD))
- {
- timestamp_t cdevent;
- register int status;
-
- /*
- * time stamp
- */
- gethrestime(&hres_time);
- cdevent.tv.tv_sec = hres_time.tv_sec;
- cdevent.tv.tv_usec = hres_time.tv_nsec / 1000;
-
- q = za->za_ttycommon.t_readq;
-
- /*
- * logical state
- */
- status = cd_invert ? cdstate == 0 : cdstate != 0;
-
- /*
- * ok - now the hard part - find ourself
- */
- loopcheck = MAXDEPTH;
-
- while (q)
- {
- if (q->q_qinfo && q->q_qinfo->qi_minfo)
- {
- dname = q->q_qinfo->qi_minfo->mi_idname;
-
- if (!strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
- {
- /*
- * back home - phew (hopping along stream queues might
- * prove dangerous to your health)
- */
-
- if ((((parsestream_t *)q->q_ptr)->parse_status & PARSE_ENABLE) &&
- parse_iopps(&((parsestream_t *)q->q_ptr)->parse_io, status ? SYNC_ONE : SYNC_ZERO, &cdevent))
- {
- /*
- * XXX - currently we do not pass up the message, as
- * we should.
- * for a correct behaviour wee need to block out
- * processing until parse_iodone has been posted via
- * a softcall-ed routine which does the message pass-up
- * right now PPS information relies on input being
- * received
- */
- parse_iodone(&((parsestream_t *)q->q_ptr)->parse_io);
- }
-
- if (status)
- {
- ((parsestream_t *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
- ++(((parsestream_t *)q->q_ptr)->parse_ppsclockev.serial);
- }
-
- pprintf(DD_ISR, "zs_xsisr: CD event %s has been posted for \"%s\"\n", status ? "ONE" : "ZERO", dname);
- break;
- }
- }
-
- q = q->q_next;
-
- if (!loopcheck--)
- {
- panic("zs_xsisr: STREAMS Queue corrupted - CD event");
- }
- }
-
- if (cdstate) /* fake CARRIER status - XXX currently not coordinated */
- za->za_flags |= ZAS_CARR_ON;
- else
- za->za_flags &= ~ZAS_CARR_ON;
-
- /*
- * only pretend that CD and ignored transistion (SYNC,CTS)
- * have been handled
- */
- za->za_rr0 = (za->za_rr0 & ~ZSRR0_IGNORE) | (zsstatus & ZSRR0_IGNORE);
-
- if (((za->za_rr0 ^ zsstatus) & ~ZSRR0_IGNORE) == 0)
- {
- /*
- * all done - kill status indication and return
- */
- SCC_WRITE0(ZSWR0_RESET_STATUS); /* might kill other conditions here */
- return;
- }
- }
-
- pprintf(DD_ISR, "zs_xsisr: non CD event 0x%x for \"%s\"\n",
- (za->za_rr0 ^ zsstatus) & ~ZSRR0_CD,dname);
- /*
- * we are now gathered here to process some unusual external status
- * interrupts.
- * any CD events have also been handled and shouldn't be processed
- * by the original routine (unless we have a VERY busy port pin)
- * some initializations are done here, which could have been done before for
- * both code paths but have been avioded for minimum path length to
- * the uniq_time routine
- */
- dname = (char *) 0;
- q = za->za_ttycommon.t_readq;
-
- loopcheck = MAXDEPTH;
-
- /*
- * the real thing for everything else ...
- */
- while (q)
- {
- if (q->q_qinfo && q->q_qinfo->qi_minfo)
- {
- dname = q->q_qinfo->qi_minfo->mi_idname;
- if (!strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
- {
- register void (*zsisr) P((struct zscom *));
-
- /*
- * back home - phew (hopping along stream queues might
- * prove dangerous to your health)
- */
- if ((zsisr = ((struct savedzsops *)((parsestream_t *)q->q_ptr)->parse_data)->oldzsops->zsop_xsint))
- zsisr(zs);
- else
- panic("zs_xsisr: unable to locate original ISR");
-
- pprintf(DD_ISR, "zs_xsisr: non CD event was processed for \"%s\"\n", dname);
- /*
- * now back to our program ...
- */
- return;
- }
- }
-
- q = q->q_next;
-
- if (!loopcheck--)
- {
- panic("zs_xsisr: STREAMS Queue corrupted - non CD event");
- }
- }
-
- /*
- * last resort - shouldn't even come here as it indicates
- * corrupted TTY structures
- */
- printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
- if (emergencyzs && emergencyzs->zsop_xsint)
- emergencyzs->zsop_xsint(zs);
- else
- panic("zs_xsisr: no emergency ISR handler");
-}
-#endif /* sun */
-
-/*
- * History:
- *
- * parsesolaris.c,v
- * Revision 4.6 1998/11/15 21:56:08 kardel
- * ntp_memset not necessary
- *
- * Revision 4.5 1998/11/15 21:23:37 kardel
- * ntp_memset() replicated in Sun kernel files
- *
- * Revision 4.4 1998/06/14 21:09:40 kardel
- * Sun acc cleanup
- *
- * Revision 4.3 1998/06/13 12:14:59 kardel
- * more prototypes
- * fix name clashes
- * allow for ansi2knr
- *
- * Revision 4.2 1998/06/12 15:23:08 kardel
- * fix prototypes
- * adjust for ansi2knr
- *
- * Revision 4.1 1998/05/24 09:38:46 kardel
- * streams initiated iopps calls (M_xHANGUP) are now consistent with the
- * respective calls from zs_xsisr()
- * simulation of CARRIER status to avoid unecessary M_xHANGUP messages
- *
- * Revision 4.0 1998/04/10 19:45:38 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.28 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/parsestreams.c b/contrib/ntp/libparse/parsestreams.c
deleted file mode 100644
index 8510ea1..0000000
--- a/contrib/ntp/libparse/parsestreams.c
+++ /dev/null
@@ -1,1338 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A
- *
- * parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
- *
- * Copyright (c) 1989-1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- */
-
-#define KERNEL /* MUST */
-#define VDDRV /* SHOULD */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#ifndef lint
-static char rcsid[] = "parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A";
-#endif
-
-#ifndef KERNEL
-#include "Bletch: MUST COMPILE WITH KERNEL DEFINE"
-#endif
-
-#include <sys/types.h>
-#include <sys/conf.h>
-#include <sys/buf.h>
-#include <sys/param.h>
-#include <sys/sysmacros.h>
-#include <sys/time.h>
-#include <sundev/mbvar.h>
-#include <sun/autoconf.h>
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#include <sys/dir.h>
-#include <sys/signal.h>
-#include <sys/termios.h>
-#include <sys/termio.h>
-#include <sys/ttold.h>
-#include <sys/user.h>
-#include <sys/tty.h>
-
-#ifdef VDDRV
-#include <sun/vddrv.h>
-#endif
-
-#include "ntp_stdlib.h"
-#include "ntp_fp.h"
-/*
- * just make checking compilers more silent
- */
-extern int printf P((const char *, ...));
-extern int putctl1 P((queue_t *, int, int));
-extern int canput P((queue_t *));
-extern void putbq P((queue_t *, mblk_t *));
-extern void freeb P((mblk_t *));
-extern void qreply P((queue_t *, mblk_t *));
-extern void freemsg P((mblk_t *));
-extern void panic P((const char *, ...));
-extern void usec_delay P((int));
-
-#include "parse.h"
-#include "sys/parsestreams.h"
-
-/*
- * use microtime instead of uniqtime if advised to
- */
-#ifdef MICROTIME
-#define uniqtime microtime
-#endif
-
-#ifdef VDDRV
-static unsigned int parsebusy = 0;
-
-/*--------------- loadable driver section -----------------------------*/
-
-extern struct streamtab parseinfo;
-
-
-#ifdef PPS_SYNC
-static char mnam[] = "PARSEPPS "; /* name this baby - keep room for revision number */
-#else
-static char mnam[] = "PARSE "; /* name this baby - keep room for revision number */
-#endif
-struct vdldrv parsesync_vd =
-{
- VDMAGIC_PSEUDO, /* nothing like a real driver - a STREAMS module */
- mnam,
-};
-
-/*
- * strings support usually not in kernel
- */
-static int
-Strlen(
- register const char *s
- )
-{
- register int c;
-
- c = 0;
- if (s)
- {
- while (*s++)
- {
- c++;
- }
- }
- return c;
-}
-
-static void
-Strncpy(
- register char *t,
- register char *s,
- register int c
- )
-{
- if (s && t)
- {
- while ((c-- > 0) && (*t++ = *s++))
- ;
- }
-}
-
-static int
-Strcmp(
- register const char *s,
- register const char *t
- )
-{
- register int c = 0;
-
- if (!s || !t || (s == t))
- {
- return 0;
- }
-
- while (!(c = *s++ - *t++) && *s && *t)
- /* empty loop */;
-
- return c;
-}
-
-static int
-Strncmp(
- register char *s,
- register char *t,
- register int n
- )
-{
- register int c = 0;
-
- if (!s || !t || (s == t))
- {
- return 0;
- }
-
- while (n-- && !(c = *s++ - *t++) && *s && *t)
- /* empty loop */;
-
- return c;
-}
-
-void
-ntp_memset(
- char *a,
- int x,
- int c
- )
-{
- while (c-- > 0)
- *a++ = x;
-}
-
-/*
- * driver init routine
- * since no mechanism gets us into and out of the fmodsw, we have to
- * do it ourselves
- */
-/*ARGSUSED*/
-int
-xxxinit(
- unsigned int fc,
- struct vddrv *vdp,
- addr_t vdin,
- struct vdstat *vds
- )
-{
- extern struct fmodsw fmodsw[];
- extern int fmodcnt;
-
- struct fmodsw *fm = fmodsw;
- struct fmodsw *fmend = &fmodsw[fmodcnt];
- struct fmodsw *ifm = (struct fmodsw *)0;
- char *mname = parseinfo.st_rdinit->qi_minfo->mi_idname;
-
- switch (fc)
- {
- case VDLOAD:
- vdp->vdd_vdtab = (struct vdlinkage *)&parsesync_vd;
- /*
- * now, jog along fmodsw scanning for an empty slot
- * and deposit our name there
- */
- while (fm <= fmend)
- {
- if (!Strncmp(fm->f_name, mname, FMNAMESZ))
- {
- printf("vddrinit[%s]: STREAMS module already loaded.\n", mname);
- return(EBUSY);
- }
- else
- if ((ifm == (struct fmodsw *)0) &&
- (fm->f_name[0] == '\0') &&
- (fm->f_str == (struct streamtab *)0))
- {
- /*
- * got one - so move in
- */
- ifm = fm;
- break;
- }
- fm++;
- }
-
- if (ifm == (struct fmodsw *)0)
- {
- printf("vddrinit[%s]: no slot free for STREAMS module\n", mname);
- return (ENOSPC);
- }
- else
- {
- static char revision[] = "4.7";
- char *s, *S, *t;
-
- s = rcsid; /* NOOP - keep compilers happy */
-
- Strncpy(ifm->f_name, mname, FMNAMESZ);
- ifm->f_name[FMNAMESZ] = '\0';
- ifm->f_str = &parseinfo;
- /*
- * copy RCS revision into Drv_name
- *
- * are we forcing RCS here to do things it was not built for ?
- */
- s = revision;
- if (*s == '$')
- {
- /*
- * skip "$Revision: "
- * if present. - not necessary on a -kv co (cvs export)
- */
- while (*s && (*s != ' '))
- {
- s++;
- }
- if (*s == ' ') s++;
- }
-
- t = parsesync_vd.Drv_name;
- while (*t && (*t != ' '))
- {
- t++;
- }
- if (*t == ' ') t++;
-
- S = s;
- while (*S && (((*S >= '0') && (*S <= '9')) || (*S == '.')))
- {
- S++;
- }
-
- if (*s && *t && (S > s))
- {
- if (Strlen(t) >= (S - s))
- {
- (void) Strncpy(t, s, S - s);
- }
- }
- return (0);
- }
- break;
-
- case VDUNLOAD:
- if (parsebusy > 0)
- {
- printf("vddrinit[%s]: STREAMS module has still %d instances active.\n", mname, parsebusy);
- return (EBUSY);
- }
- else
- {
- while (fm <= fmend)
- {
- if (!Strncmp(fm->f_name, mname, FMNAMESZ))
- {
- /*
- * got it - kill entry
- */
- fm->f_name[0] = '\0';
- fm->f_str = (struct streamtab *)0;
- fm++;
-
- break;
- }
- fm++;
- }
- if (fm > fmend)
- {
- printf("vddrinit[%s]: cannot find entry for STREAMS module\n", mname);
- return (ENXIO);
- }
- else
- return (0);
- }
-
-
- case VDSTAT:
- return (0);
-
- default:
- return (EIO);
-
- }
- return EIO;
-}
-
-#endif
-
-/*--------------- stream module definition ----------------------------*/
-
-static int parseopen P((queue_t *, dev_t, int, int));
-static int parseclose P((queue_t *, int));
-static int parsewput P((queue_t *, mblk_t *));
-static int parserput P((queue_t *, mblk_t *));
-static int parsersvc P((queue_t *));
-
-static char mn[] = "parse";
-
-static struct module_info driverinfo =
-{
- 0, /* module ID number */
- mn, /* module name */
- 0, /* minimum accepted packet size */
- INFPSZ, /* maximum accepted packet size */
- 1, /* high water mark - flow control */
- 0 /* low water mark - flow control */
-};
-
-static struct qinit rinit = /* read queue definition */
-{
- parserput, /* put procedure */
- parsersvc, /* service procedure */
- parseopen, /* open procedure */
- parseclose, /* close procedure */
- NULL, /* admin procedure - NOT USED FOR NOW */
- &driverinfo, /* information structure */
- NULL /* statistics */
-};
-
-static struct qinit winit = /* write queue definition */
-{
- parsewput, /* put procedure */
- NULL, /* service procedure */
- NULL, /* open procedure */
- NULL, /* close procedure */
- NULL, /* admin procedure - NOT USED FOR NOW */
- &driverinfo, /* information structure */
- NULL /* statistics */
-};
-
-struct streamtab parseinfo = /* stream info element for dpr driver */
-{
- &rinit, /* read queue */
- &winit, /* write queue */
- NULL, /* read mux */
- NULL, /* write mux */
- NULL /* module auto push */
-};
-
-/*--------------- driver data structures ----------------------------*/
-
-/*
- * we usually have an inverted signal - but you
- * can change this to suit your needs
- */
-int cd_invert = 1; /* invert status of CD line - PPS support via CD input */
-
-int parsedebug = ~0;
-
-extern void uniqtime P((struct timeval *));
-
-/*--------------- module implementation -----------------------------*/
-
-#define TIMEVAL_USADD(_X_, _US_) {\
- (_X_)->tv_usec += (_US_);\
- if ((_X_)->tv_usec >= 1000000)\
- {\
- (_X_)->tv_sec++;\
- (_X_)->tv_usec -= 1000000;\
- }\
- } while (0)
-
-static int init_linemon P((queue_t *));
-static void close_linemon P((queue_t *, queue_t *));
-
-#define M_PARSE 0x0001
-#define M_NOPARSE 0x0002
-
-static int
-setup_stream(
- queue_t *q,
- int mode
- )
-{
- mblk_t *mp;
-
- mp = allocb(sizeof(struct stroptions), BPRI_MED);
- if (mp)
- {
- struct stroptions *str = (struct stroptions *)(void *)mp->b_rptr;
-
- str->so_flags = SO_READOPT|SO_HIWAT|SO_LOWAT;
- str->so_readopt = (mode == M_PARSE) ? RMSGD : RNORM;
- str->so_hiwat = (mode == M_PARSE) ? sizeof(parsetime_t) : 256;
- str->so_lowat = 0;
- mp->b_datap->db_type = M_SETOPTS;
- mp->b_wptr += sizeof(struct stroptions);
- putnext(q, mp);
- return putctl1(WR(q)->q_next, M_CTL, (mode == M_PARSE) ? MC_SERVICEIMM :
- MC_SERVICEDEF);
- }
- else
- {
- parseprintf(DD_OPEN,("parse: setup_stream - FAILED - no MEMORY for allocb\n"));
- return 0;
- }
-}
-
-/*ARGSUSED*/
-static int
-parseopen(
- queue_t *q,
- dev_t dev,
- int flag,
- int sflag
- )
-{
- register parsestream_t *parse;
- static int notice = 0;
-
- parseprintf(DD_OPEN,("parse: OPEN\n"));
-
- if (sflag != MODOPEN)
- { /* open only for modules */
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - not MODOPEN\n"));
- return OPENFAIL;
- }
-
- if (q->q_ptr != (caddr_t)NULL)
- {
- u.u_error = EBUSY;
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - EXCLUSIVE ONLY\n"));
- return OPENFAIL;
- }
-
-#ifdef VDDRV
- parsebusy++;
-#endif
-
- q->q_ptr = (caddr_t)kmem_alloc(sizeof(parsestream_t));
- if (q->q_ptr == (caddr_t)0)
- {
- parseprintf(DD_OPEN,("parse: OPEN - FAILED - no memory\n"));
-#ifdef VDDRV
- parsebusy--;
-#endif
- return OPENFAIL;
- }
- WR(q)->q_ptr = q->q_ptr;
-
- parse = (parsestream_t *)(void *)q->q_ptr;
- bzero((caddr_t)parse, sizeof(*parse));
- parse->parse_queue = q;
- parse->parse_status = PARSE_ENABLE;
- parse->parse_ppsclockev.tv.tv_sec = 0;
- parse->parse_ppsclockev.tv.tv_usec = 0;
- parse->parse_ppsclockev.serial = 0;
-
- if (!parse_ioinit(&parse->parse_io))
- {
- /*
- * ok guys - beat it
- */
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-#ifdef VDDRV
- parsebusy--;
-#endif
- return OPENFAIL;
- }
-
- if (setup_stream(q, M_PARSE))
- {
- (void) init_linemon(q); /* hook up PPS ISR routines if possible */
-
- parseprintf(DD_OPEN,("parse: OPEN - SUCCEEDED\n"));
-
- /*
- * I know that you know the delete key, but you didn't write this
- * code, did you ? - So, keep the message in here.
- */
- if (!notice)
- {
-#ifdef VDDRV
- printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", parsesync_vd.Drv_name);
-#else
- printf("%s: Copyright (C) 1991-1998, Frank Kardel\n", "parsestreams.c,v 4.7 1999/11/28 09:13:53 kardel RELEASE_19991128_A");
-#endif
- notice = 1;
- }
-
- return MODOPEN;
- }
- else
- {
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-
-#ifdef VDDRV
- parsebusy--;
-#endif
- return OPENFAIL;
- }
-}
-
-/*ARGSUSED*/
-static int
-parseclose(
- queue_t *q,
- int flags
- )
-{
- register parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
- register unsigned long s;
-
- parseprintf(DD_CLOSE,("parse: CLOSE\n"));
-
- s = splhigh();
-
- if (parse->parse_dqueue)
- close_linemon(parse->parse_dqueue, q);
- parse->parse_dqueue = (queue_t *)0;
-
- (void) splx(s);
-
- parse_ioend(&parse->parse_io);
-
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-
- q->q_ptr = (caddr_t)NULL;
- WR(q)->q_ptr = (caddr_t)NULL;
-
-#ifdef VDDRV
- parsebusy--;
-#endif
- return 0;
-}
-
-/*
- * move unrecognized stuff upward
- */
-static int
-parsersvc(
- queue_t *q
- )
-{
- mblk_t *mp;
-
- while ((mp = getq(q)))
- {
- if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- parseprintf(DD_RSVC,("parse: RSVC - putnext\n"));
- }
- else
- {
- putbq(q, mp);
- parseprintf(DD_RSVC,("parse: RSVC - flow control wait\n"));
- break;
- }
- }
- return 0;
-}
-
-/*
- * do ioctls and
- * send stuff down - dont care about
- * flow control
- */
-static int
-parsewput(
- queue_t *q,
- register mblk_t *mp
- )
-{
- register int ok = 1;
- register mblk_t *datap;
- register struct iocblk *iocp;
- parsestream_t *parse = (parsestream_t *)(void *)q->q_ptr;
-
- parseprintf(DD_WPUT,("parse: parsewput\n"));
-
- switch (mp->b_datap->db_type)
- {
- default:
- putnext(q, mp);
- break;
-
- case M_IOCTL:
- iocp = (struct iocblk *)(void *)mp->b_rptr;
- switch (iocp->ioc_cmd)
- {
- default:
- parseprintf(DD_WPUT,("parse: parsewput - forward M_IOCTL\n"));
- putnext(q, mp);
- break;
-
- case CIOGETEV:
- /*
- * taken from Craig Leres ppsclock module (and modified)
- */
- datap = allocb(sizeof(struct ppsclockev), BPRI_MED);
- if (datap == NULL || mp->b_cont)
- {
- mp->b_datap->db_type = M_IOCNAK;
- iocp->ioc_error = (datap == NULL) ? ENOMEM : EINVAL;
- if (datap != NULL)
- freeb(datap);
- qreply(q, mp);
- break;
- }
-
- mp->b_cont = datap;
- *(struct ppsclockev *)(void *)datap->b_wptr = parse->parse_ppsclockev;
- datap->b_wptr +=
- sizeof(struct ppsclockev) / sizeof(*datap->b_wptr);
- mp->b_datap->db_type = M_IOCACK;
- iocp->ioc_count = sizeof(struct ppsclockev);
- qreply(q, mp);
- break;
-
- case PARSEIOC_ENABLE:
- case PARSEIOC_DISABLE:
- {
- parse->parse_status = (parse->parse_status & (unsigned)~PARSE_ENABLE) |
- (iocp->ioc_cmd == PARSEIOC_ENABLE) ?
- PARSE_ENABLE : 0;
- if (!setup_stream(RD(q), (parse->parse_status & PARSE_ENABLE) ?
- M_PARSE : M_NOPARSE))
- {
- mp->b_datap->db_type = M_IOCNAK;
- }
- else
- {
- mp->b_datap->db_type = M_IOCACK;
- }
- qreply(q, mp);
- break;
- }
-
- case PARSEIOC_TIMECODE:
- case PARSEIOC_SETFMT:
- case PARSEIOC_GETFMT:
- case PARSEIOC_SETCS:
- if (iocp->ioc_count == sizeof(parsectl_t))
- {
- parsectl_t *dct = (parsectl_t *)(void *)mp->b_cont->b_rptr;
-
- switch (iocp->ioc_cmd)
- {
- case PARSEIOC_TIMECODE:
- parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_TIMECODE\n"));
- ok = parse_timecode(dct, &parse->parse_io);
- break;
-
- case PARSEIOC_SETFMT:
- parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETFMT\n"));
- ok = parse_setfmt(dct, &parse->parse_io);
- break;
-
- case PARSEIOC_GETFMT:
- parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_GETFMT\n"));
- ok = parse_getfmt(dct, &parse->parse_io);
- break;
-
- case PARSEIOC_SETCS:
- parseprintf(DD_WPUT,("parse: parsewput - PARSEIOC_SETCS\n"));
- ok = parse_setcs(dct, &parse->parse_io);
- break;
- }
- mp->b_datap->db_type = ok ? M_IOCACK : M_IOCNAK;
- }
- else
- {
- mp->b_datap->db_type = M_IOCNAK;
- }
- parseprintf(DD_WPUT,("parse: parsewput qreply - %s\n", (mp->b_datap->db_type == M_IOCNAK) ? "M_IOCNAK" : "M_IOCACK"));
- qreply(q, mp);
- break;
- }
- }
- return 0;
-}
-
-/*
- * read characters from streams buffers
- */
-static unsigned long
-rdchar(
- register mblk_t **mp
- )
-{
- while (*mp != (mblk_t *)NULL)
- {
- if ((*mp)->b_wptr - (*mp)->b_rptr)
- {
- return (unsigned long)(*(unsigned char *)((*mp)->b_rptr++));
- }
- else
- {
- register mblk_t *mmp = *mp;
-
- *mp = (*mp)->b_cont;
- freeb(mmp);
- }
- }
- return (unsigned)~0;
-}
-
-/*
- * convert incoming data
- */
-static int
-parserput(
- queue_t *q,
- mblk_t *mp
- )
-{
- unsigned char type;
-
- switch (type = mp->b_datap->db_type)
- {
- default:
- /*
- * anything we don't know will be put on queue
- * the service routine will move it to the next one
- */
- parseprintf(DD_RPUT,("parse: parserput - forward type 0x%x\n", type));
- if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- }
- else
- putq(q, mp);
- break;
-
- case M_BREAK:
- case M_DATA:
- {
- register parsestream_t * parse = (parsestream_t *)(void *)q->q_ptr;
- register mblk_t *nmp;
- register unsigned long ch;
- timestamp_t ctime;
-
- /*
- * get time on packet delivery
- */
- uniqtime(&ctime.tv);
-
- if (!(parse->parse_status & PARSE_ENABLE))
- {
- parseprintf(DD_RPUT,("parse: parserput - parser disabled - forward type 0x%x\n", type));
- if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- }
- else
- putq(q, mp);
- }
- else
- {
- parseprintf(DD_RPUT,("parse: parserput - M_%s\n", (type == M_DATA) ? "DATA" : "BREAK"));
-
- if (type == M_DATA)
- {
- /*
- * parse packet looking for start an end characters
- */
- while (mp != (mblk_t *)NULL)
- {
- ch = rdchar(&mp);
- if (ch != ~0 && parse_ioread(&parse->parse_io, (unsigned int)ch, &ctime))
- {
- /*
- * up up and away (hopefully ...)
- * don't press it if resources are tight or nobody wants it
- */
- nmp = (mblk_t *)NULL;
- if (canput(parse->parse_queue->q_next) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
- {
- bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
- nmp->b_wptr += sizeof(parsetime_t);
- putnext(parse->parse_queue, nmp);
- }
- else
- if (nmp) freemsg(nmp);
- parse_iodone(&parse->parse_io);
- }
- }
- }
- else
- {
- if (parse_ioread(&parse->parse_io, (unsigned int)0, &ctime))
- {
- /*
- * up up and away (hopefully ...)
- * don't press it if resources are tight or nobody wants it
- */
- nmp = (mblk_t *)NULL;
- if (canput(parse->parse_queue->q_next) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
- {
- bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
- nmp->b_wptr += sizeof(parsetime_t);
- putnext(parse->parse_queue, nmp);
- }
- else
- if (nmp) freemsg(nmp);
- parse_iodone(&parse->parse_io);
- }
- freemsg(mp);
- }
- break;
- }
- }
-
- /*
- * CD PPS support for non direct ISR hack
- */
- case M_HANGUP:
- case M_UNHANGUP:
- {
- register parsestream_t * parse = (parsestream_t *)(void *)q->q_ptr;
- timestamp_t ctime;
- register mblk_t *nmp;
- register int status = cd_invert ^ (type == M_UNHANGUP);
-
- uniqtime(&ctime.tv);
-
- parseprintf(DD_RPUT,("parse: parserput - M_%sHANGUP\n", (type == M_HANGUP) ? "" : "UN"));
-
- if ((parse->parse_status & PARSE_ENABLE) &&
- parse_iopps(&parse->parse_io, (int)(status ? SYNC_ONE : SYNC_ZERO), &ctime))
- {
- nmp = (mblk_t *)NULL;
- if (canput(parse->parse_queue->q_next) && (nmp = allocb(sizeof(parsetime_t), BPRI_MED)))
- {
- bcopy((caddr_t)&parse->parse_io.parse_dtime, (caddr_t)nmp->b_rptr, sizeof(parsetime_t));
- nmp->b_wptr += sizeof(parsetime_t);
- putnext(parse->parse_queue, nmp);
- }
- else
- if (nmp) freemsg(nmp);
- parse_iodone(&parse->parse_io);
- freemsg(mp);
- }
- else
- if (canput(q->q_next) || (mp->b_datap->db_type > QPCTL))
- {
- putnext(q, mp);
- }
- else
- putq(q, mp);
-
- if (status)
- {
- parse->parse_ppsclockev.tv = ctime.tv;
- ++(parse->parse_ppsclockev.serial);
- }
- }
- }
- return 0;
-}
-
-static int init_zs_linemon P((queue_t *, queue_t *)); /* handle line monitor for "zs" driver */
-static void close_zs_linemon P((queue_t *, queue_t *));
-
-/*-------------------- CD isr status monitor ---------------*/
-
-static int
-init_linemon(
- register queue_t *q
- )
-{
- register queue_t *dq;
-
- dq = WR(q);
- /*
- * we ARE doing very bad things down here (basically stealing ISR
- * hooks)
- *
- * so we chase down the STREAMS stack searching for the driver
- * and if this is a known driver we insert our ISR routine for
- * status changes in to the ExternalStatus handling hook
- */
- while (dq->q_next)
- {
- dq = dq->q_next; /* skip down to driver */
- }
-
- /*
- * find appropriate driver dependent routine
- */
- if (dq->q_qinfo && dq->q_qinfo->qi_minfo)
- {
- register char *dname = dq->q_qinfo->qi_minfo->mi_idname;
-
- parseprintf(DD_INSTALL, ("init_linemon: driver is \"%s\"\n", dname));
-
-#ifdef sun
- if (dname && !Strcmp(dname, "zs"))
- {
- return init_zs_linemon(dq, q);
- }
- else
-#endif
- {
- parseprintf(DD_INSTALL, ("init_linemon: driver \"%s\" not suitable for CD monitoring\n", dname));
- return 0;
- }
- }
- parseprintf(DD_INSTALL, ("init_linemon: cannot find driver\n"));
- return 0;
-}
-
-static void
-close_linemon(
- register queue_t *q,
- register queue_t *my_q
- )
-{
- /*
- * find appropriate driver dependent routine
- */
- if (q->q_qinfo && q->q_qinfo->qi_minfo)
- {
- register char *dname = q->q_qinfo->qi_minfo->mi_idname;
-
-#ifdef sun
- if (dname && !Strcmp(dname, "zs"))
- {
- close_zs_linemon(q, my_q);
- return;
- }
- parseprintf(DD_INSTALL, ("close_linemon: cannot find driver close routine for \"%s\"\n", dname));
-#endif
- }
- parseprintf(DD_INSTALL, ("close_linemon: cannot find driver name\n"));
-}
-
-#ifdef sun
-
-#include <sundev/zsreg.h>
-#include <sundev/zscom.h>
-#include <sundev/zsvar.h>
-
-static unsigned long cdmask = ZSRR0_CD;
-
-struct savedzsops
-{
- struct zsops zsops;
- struct zsops *oldzsops;
-};
-
-struct zsops *emergencyzs;
-extern void zsopinit P((struct zscom *, struct zsops *));
-static int zs_xsisr P((struct zscom *)); /* zs external status interupt handler */
-
-static int
-init_zs_linemon(
- register queue_t *q,
- register queue_t *my_q
- )
-{
- register struct zscom *zs;
- register struct savedzsops *szs;
- register parsestream_t *parsestream = (parsestream_t *)(void *)my_q->q_ptr;
- /*
- * we expect the zsaline pointer in the q_data pointer
- * from there on we insert our on EXTERNAL/STATUS ISR routine
- * into the interrupt path, before the standard handler
- */
- zs = ((struct zsaline *)(void *)q->q_ptr)->za_common;
- if (!zs)
- {
- /*
- * well - not found on startup - just say no (shouldn't happen though)
- */
- return 0;
- }
- else
- {
- unsigned long s;
-
- /*
- * we do a direct replacement, in case others fiddle also
- * if somebody else grabs our hook and we disconnect
- * we are in DEEP trouble - panic is likely to be next, sorry
- */
- szs = (struct savedzsops *)(void *)kmem_alloc(sizeof(struct savedzsops));
-
- if (szs == (struct savedzsops *)0)
- {
- parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor NOT installed - no memory\n"));
-
- return 0;
- }
- else
- {
- parsestream->parse_data = (void *)szs;
-
- s = splhigh();
-
- parsestream->parse_dqueue = q; /* remember driver */
-
- szs->zsops = *zs->zs_ops;
- szs->zsops.zsop_xsint = zs_xsisr; /* place our bastard */
- szs->oldzsops = zs->zs_ops;
- emergencyzs = zs->zs_ops;
-
- zsopinit(zs, &szs->zsops); /* hook it up */
-
- (void) splx(s);
-
- parseprintf(DD_INSTALL, ("init_zs_linemon: CD monitor installed\n"));
-
- return 1;
- }
- }
-}
-
-/*
- * unregister our ISR routine - must call under splhigh()
- */
-static void
-close_zs_linemon(
- register queue_t *q,
- register queue_t *my_q
- )
-{
- register struct zscom *zs;
- register parsestream_t *parsestream = (parsestream_t *)(void *)my_q->q_ptr;
-
- zs = ((struct zsaline *)(void *)q->q_ptr)->za_common;
- if (!zs)
- {
- /*
- * well - not found on startup - just say no (shouldn't happen though)
- */
- return;
- }
- else
- {
- register struct savedzsops *szs = (struct savedzsops *)parsestream->parse_data;
-
- zsopinit(zs, szs->oldzsops); /* reset to previous handler functions */
-
- kmem_free((caddr_t)szs, sizeof (struct savedzsops));
-
- parseprintf(DD_INSTALL, ("close_zs_linemon: CD monitor deleted\n"));
- return;
- }
-}
-
-#define MAXDEPTH 50 /* maximum allowed stream crawl */
-
-#ifdef PPS_SYNC
-extern void hardpps P((struct timeval *, long));
-#ifdef PPS_NEW
-extern struct timeval timestamp;
-#else
-extern struct timeval pps_time;
-#endif
-#endif
-
-/*
- * take external status interrupt (only CD interests us)
- */
-static int
-zs_xsisr(
- struct zscom *zs
- )
-{
- register struct zsaline *za = (struct zsaline *)(void *)zs->zs_priv;
- register struct zscc_device *zsaddr = zs->zs_addr;
- register queue_t *q;
- register unsigned char zsstatus;
- register int loopcheck;
- register char *dname;
-#ifdef PPS_SYNC
- register unsigned int s;
- register long usec;
-#endif
-
- /*
- * pick up current state
- */
- zsstatus = zsaddr->zscc_control;
-
- if ((za->za_rr0 ^ zsstatus) & (cdmask))
- {
- timestamp_t cdevent;
- register int status;
-
- za->za_rr0 = (za->za_rr0 & ~(cdmask)) | (zsstatus & (cdmask));
-
-#ifdef PPS_SYNC
- s = splclock();
-#ifdef PPS_NEW
- usec = timestamp.tv_usec;
-#else
- usec = pps_time.tv_usec;
-#endif
-#endif
- /*
- * time stamp
- */
- uniqtime(&cdevent.tv);
-
-#ifdef PPS_SYNC
- (void)splx(s);
-#endif
-
- /*
- * logical state
- */
- status = cd_invert ? (zsstatus & cdmask) == 0 : (zsstatus & cdmask) != 0;
-
-#ifdef PPS_SYNC
- if (status)
- {
- usec = cdevent.tv.tv_usec - usec;
- if (usec < 0)
- usec += 1000000;
-
- hardpps(&cdevent.tv, usec);
- }
-#endif
-
- q = za->za_ttycommon.t_readq;
-
- /*
- * ok - now the hard part - find ourself
- */
- loopcheck = MAXDEPTH;
-
- while (q)
- {
- if (q->q_qinfo && q->q_qinfo->qi_minfo)
- {
- dname = q->q_qinfo->qi_minfo->mi_idname;
-
- if (!Strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
- {
- /*
- * back home - phew (hopping along stream queues might
- * prove dangerous to your health)
- */
-
- if ((((parsestream_t *)(void *)q->q_ptr)->parse_status & PARSE_ENABLE) &&
- parse_iopps(&((parsestream_t *)(void *)q->q_ptr)->parse_io, (int)(status ? SYNC_ONE : SYNC_ZERO), &cdevent))
- {
- /*
- * XXX - currently we do not pass up the message, as
- * we should.
- * for a correct behaviour wee need to block out
- * processing until parse_iodone has been posted via
- * a softcall-ed routine which does the message pass-up
- * right now PPS information relies on input being
- * received
- */
- parse_iodone(&((parsestream_t *)(void *)q->q_ptr)->parse_io);
- }
-
- if (status)
- {
- ((parsestream_t *)(void *)q->q_ptr)->parse_ppsclockev.tv = cdevent.tv;
- ++(((parsestream_t *)(void *)q->q_ptr)->parse_ppsclockev.serial);
- }
-
- parseprintf(DD_ISR, ("zs_xsisr: CD event %s has been posted for \"%s\"\n", status ? "ONE" : "ZERO", dname));
- break;
- }
- }
-
- q = q->q_next;
-
- if (!loopcheck--)
- {
- panic("zs_xsisr: STREAMS Queue corrupted - CD event");
- }
- }
-
- /*
- * only pretend that CD has been handled
- */
- ZSDELAY(2);
-
- if (!((za->za_rr0 ^ zsstatus) & ~(cdmask)))
- {
- /*
- * all done - kill status indication and return
- */
- zsaddr->zscc_control = ZSWR0_RESET_STATUS; /* might kill other conditions here */
- return 0;
- }
- }
-
- if (zsstatus & cdmask) /* fake CARRIER status */
- za->za_flags |= ZAS_CARR_ON;
- else
- za->za_flags &= ~ZAS_CARR_ON;
-
- /*
- * we are now gathered here to process some unusual external status
- * interrupts.
- * any CD events have also been handled and shouldn't be processed
- * by the original routine (unless we have a VERY busy port pin)
- * some initializations are done here, which could have been done before for
- * both code paths but have been avoided for minimum path length to
- * the uniq_time routine
- */
- dname = (char *) 0;
- q = za->za_ttycommon.t_readq;
-
- loopcheck = MAXDEPTH;
-
- /*
- * the real thing for everything else ...
- */
- while (q)
- {
- if (q->q_qinfo && q->q_qinfo->qi_minfo)
- {
- dname = q->q_qinfo->qi_minfo->mi_idname;
- if (!Strcmp(dname, parseinfo.st_rdinit->qi_minfo->mi_idname))
- {
- register int (*zsisr) P((struct zscom *));
-
- /*
- * back home - phew (hopping along stream queues might
- * prove dangerous to your health)
- */
- if ((zsisr = ((struct savedzsops *)((parsestream_t *)(void *)q->q_ptr)->parse_data)->oldzsops->zsop_xsint))
- return zsisr(zs);
- else
- panic("zs_xsisr: unable to locate original ISR");
-
- parseprintf(DD_ISR, ("zs_xsisr: non CD event was processed for \"%s\"\n", dname));
- /*
- * now back to our program ...
- */
- return 0;
- }
- }
-
- q = q->q_next;
-
- if (!loopcheck--)
- {
- panic("zs_xsisr: STREAMS Queue corrupted - non CD event");
- }
- }
-
- /*
- * last resort - shouldn't even come here as it indicates
- * corrupted TTY structures
- */
- printf("zs_zsisr: looking for \"%s\" - found \"%s\" - taking EMERGENCY path\n", parseinfo.st_rdinit->qi_minfo->mi_idname, dname ? dname : "-NIL-");
-
- if (emergencyzs && emergencyzs->zsop_xsint)
- emergencyzs->zsop_xsint(zs);
- else
- panic("zs_xsisr: no emergency ISR handler");
- return 0;
-}
-#endif /* sun */
-
-/*
- * History:
- *
- * parsestreams.c,v
- * Revision 4.7 1999/11/28 09:13:53 kardel
- * RECON_4_0_98F
- *
- * Revision 4.6 1998/12/20 23:45:31 kardel
- * fix types and warnings
- *
- * Revision 4.5 1998/11/15 21:23:38 kardel
- * ntp_memset() replicated in Sun kernel files
- *
- * Revision 4.4 1998/06/13 12:15:59 kardel
- * superfluous variable removed
- *
- * Revision 4.3 1998/06/12 15:23:08 kardel
- * fix prototypes
- * adjust for ansi2knr
- *
- * Revision 4.2 1998/05/24 18:16:22 kardel
- * moved copy of shadow status to the beginning
- *
- * Revision 4.1 1998/05/24 09:38:47 kardel
- * streams initiated iopps calls (M_xHANGUP) are now consistent with the
- * respective calls from zs_xsisr()
- * simulation of CARRIER status to avoid unecessary M_xHANGUP messages
- *
- * Revision 4.0 1998/04/10 19:45:38 kardel
- * Start 4.0 release version numbering
- *
- * from V3 3.37 log info deleted 1998/04/11 kardel
- */
diff --git a/contrib/ntp/libparse/trim_info.c b/contrib/ntp/libparse/trim_info.c
deleted file mode 100644
index ab2e1fe..0000000
--- a/contrib/ntp/libparse/trim_info.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * /src/NTP/ntp-4/libparse/trim_info.c,v 4.2 1998/12/20 23:45:31 kardel RELEASE_19990228_A
- *
- * $Created: Sun Aug 2 20:20:34 1998 $
- *
- * Copyright (C) 1998 by Frank Kardel
- */
-#include "ntp_types.h"
-#include "trimble.h"
-
-cmd_info_t *
-trimble_convert(
- unsigned int cmd,
- cmd_info_t *tbl
- )
-{
- int i;
-
- for (i = 0; tbl[i].cmd != 0xFF; i++)
- {
- if (tbl[i].cmd == cmd)
- return &tbl[i];
- }
- return 0;
-}
-
-/*
- * trim_info.c,v
- * Revision 4.2 1998/12/20 23:45:31 kardel
- * fix types and warnings
- *
- * Revision 4.1 1998/08/09 22:27:48 kardel
- * Trimble TSIP support
- *
- */
diff --git a/contrib/ntp/librsaref/Makefile.am b/contrib/ntp/librsaref/Makefile.am
deleted file mode 100644
index f745088..0000000
--- a/contrib/ntp/librsaref/Makefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-#AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_LIBRARIES = @MAKE_LIBRSAREF@
-EXTRA_LIBRARIES = librsaref.a
-CLEANFILES = $(EXTRA_LIBRARIES)
-
-# NOTES:
-# don't use RSAREF's global.h - we use ours.
-
-@isRSAREF_TRUE@foo = digit.c digit.h
-@isRSAEURO_TRUE@foo = md4c.c shsc.c
-
-nodist_librsaref_a_SOURCES = \
- desc.c \
- md2c.c \
- md5c.c \
- nn.c \
- prime.c \
- r_dh.c \
- r_encode.c \
- r_enhanc.c \
- r_keygen.c \
- r_random.c \
- r_stdlib.c \
- rsa.c \
- des.h \
- md2.h \
- md5.h \
- nn.h \
- prime.h \
- r_random.h \
- rsa.h \
- rsaref.h $(foo)
-
-librsaref_a_LIBADD = @RSAOBJS@
-librsaref_a_DEPENDENCIES = $(librsaref_a_LIBADD)
-
-BUILT_SOURCES = $(nodist_librsaref_a_SOURCES)
-INCLUDES = -I$(top_srcdir)/include
-ETAGS_ARGS = Makefile.am
-
-DISTCLEANFILES = $(nodist_librsaref_a_SOURCES) stamp-rsaref
-
-#EXTRA_DIST =
-
-$(nodist_librsaref_a_SOURCES): stamp-rsaref
-
-stamp-rsaref:
- @rm -f stamp-rsaref stamp-rsarefT
- @echo timestamp > stamp-rsarefT 2> /dev/null
- for i in $(nodist_librsaref_a_SOURCES); do \
- case "@MAKE_LIBRSAREF@" in \
- '') touch $$i ;; \
- *) case "$$i" in \
- *.h) r_dst=$(srcdir)/$$i ;; \
- *) r_dst=$$i ;; \
- esac ; \
- cmp -s $${r_dst} $(srcdir)/../@RSADIR@/source/$$i 2>/dev/null \
- || cp $(srcdir)/../@RSADIR@/source/$$i $${r_dst} ;; \
- esac ; \
- done
- @echo timestamp > stamp-rsarefT 2> /dev/null
- @mv stamp-rsarefT stamp-rsaref
diff --git a/contrib/ntp/librsaref/Makefile.in b/contrib/ntp/librsaref/Makefile.in
deleted file mode 100644
index d316d4b..0000000
--- a/contrib/ntp/librsaref/Makefile.in
+++ /dev/null
@@ -1,403 +0,0 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# 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@
-
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-#AUTOMAKE_OPTIONS = ../util/ansi2knr
-
-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@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_HEADER = $(INSTALL_DATA)
-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@
-AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
-AWK = @AWK@
-CC = @CC@
-CFLAGS = @CFLAGS@
-CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
-CPP = @CPP@
-DCFD = @DCFD@
-DEPDIR = @DEPDIR@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
-EXEEXT = @EXEEXT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
-LN_S = @LN_S@
-MAKE_ADJTIMED = @MAKE_ADJTIMED@
-MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
-MAKE_LIBPARSE = @MAKE_LIBPARSE@
-MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
-MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
-MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
-MAKE_TICKADJ = @MAKE_TICKADJ@
-MAKE_TIMETRIM = @MAKE_TIMETRIM@
-OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
-PACKAGE = @PACKAGE@
-PATH_PERL = @PATH_PERL@
-PATH_SH = @PATH_SH@
-PROPDELAY = @PROPDELAY@
-RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
-TESTDCF = @TESTDCF@
-U = @U@
-VERSION = @VERSION@
-am__include = @am__include@
-am__quote = @am__quote@
-install_sh = @install_sh@
-
-noinst_LIBRARIES = @MAKE_LIBRSAREF@
-EXTRA_LIBRARIES = librsaref.a
-CLEANFILES = $(EXTRA_LIBRARIES)
-
-
-# NOTES:
-# don't use RSAREF's global.h - we use ours.
-@isRSAREF_TRUE@foo = digit.c digit.h
-@isRSAEURO_TRUE@foo = md4c.c shsc.c
-
-nodist_librsaref_a_SOURCES = \
- desc.c \
- md2c.c \
- md5c.c \
- nn.c \
- prime.c \
- r_dh.c \
- r_encode.c \
- r_enhanc.c \
- r_keygen.c \
- r_random.c \
- r_stdlib.c \
- rsa.c \
- des.h \
- md2.h \
- md5.h \
- nn.h \
- prime.h \
- r_random.h \
- rsa.h \
- rsaref.h $(foo)
-
-
-librsaref_a_LIBADD = @RSAOBJS@
-librsaref_a_DEPENDENCIES = $(librsaref_a_LIBADD)
-
-BUILT_SOURCES = $(nodist_librsaref_a_SOURCES)
-INCLUDES = -I$(top_srcdir)/include
-ETAGS_ARGS = Makefile.am
-
-DISTCLEANFILES = $(nodist_librsaref_a_SOURCES) stamp-rsaref
-subdir = librsaref
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-librsaref_a_AR = $(AR) cru
-nodist_librsaref_a_OBJECTS = desc.$(OBJEXT) md2c.$(OBJEXT) \
- md5c.$(OBJEXT) nn.$(OBJEXT) prime.$(OBJEXT) r_dh.$(OBJEXT) \
- r_encode.$(OBJEXT) r_enhanc.$(OBJEXT) r_keygen.$(OBJEXT) \
- r_random.$(OBJEXT) r_stdlib.$(OBJEXT) rsa.$(OBJEXT)
-librsaref_a_OBJECTS = $(nodist_librsaref_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)/desc.Po $(DEPDIR)/md2c.Po \
-@AMDEP_TRUE@ $(DEPDIR)/md5c.Po $(DEPDIR)/nn.Po \
-@AMDEP_TRUE@ $(DEPDIR)/prime.Po $(DEPDIR)/r_dh.Po \
-@AMDEP_TRUE@ $(DEPDIR)/r_encode.Po $(DEPDIR)/r_enhanc.Po \
-@AMDEP_TRUE@ $(DEPDIR)/r_keygen.Po $(DEPDIR)/r_random.Po \
-@AMDEP_TRUE@ $(DEPDIR)/r_stdlib.Po $(DEPDIR)/rsa.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 =
-DIST_COMMON = Makefile.am Makefile.in
-SOURCES = $(nodist_librsaref_a_SOURCES)
-
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu librsaref/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-
-AR = ar
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-librsaref.a: $(librsaref_a_OBJECTS) $(librsaref_a_DEPENDENCIES)
- -rm -f librsaref.a
- $(librsaref_a_AR) librsaref.a $(librsaref_a_OBJECTS) $(librsaref_a_LIBADD)
- $(RANLIB) librsaref.a
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/desc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/md2c.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/md5c.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nn.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/prime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/r_dh.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/r_encode.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/r_enhanc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/r_keygen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/r_random.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/r_stdlib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rsa.Po@am__quote@
-
-distclean-depend:
- -rm -rf $(DEPDIR)
-
-.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)/'`$<
-
-.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@
-uninstall-info-am:
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(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)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(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)
-
-GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
-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; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
- fi; \
- if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || 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 $(LIBRARIES)
-
-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)" \
- `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]*
- -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-generic clean-noinstLIBRARIES mostlyclean-am
-
-distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
- 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
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-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 tags uninstall uninstall-am \
- uninstall-info-am
-
-
-#EXTRA_DIST =
-
-$(nodist_librsaref_a_SOURCES): stamp-rsaref
-
-stamp-rsaref:
- @rm -f stamp-rsaref stamp-rsarefT
- @echo timestamp > stamp-rsarefT 2> /dev/null
- for i in $(nodist_librsaref_a_SOURCES); do \
- case "@MAKE_LIBRSAREF@" in \
- '') touch $$i ;; \
- *) case "$$i" in \
- *.h) r_dst=$(srcdir)/$$i ;; \
- *) r_dst=$$i ;; \
- esac ; \
- cmp -s $${r_dst} $(srcdir)/../@RSADIR@/source/$$i 2>/dev/null \
- || cp $(srcdir)/../@RSADIR@/source/$$i $${r_dst} ;; \
- esac ; \
- done
- @echo timestamp > stamp-rsarefT 2> /dev/null
- @mv stamp-rsarefT stamp-rsaref
-# 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/missing b/contrib/ntp/missing
deleted file mode 100755
index 6a37006..0000000
--- a/contrib/ntp/missing
+++ /dev/null
@@ -1,336 +0,0 @@
-#! /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/mkinstalldirs b/contrib/ntp/mkinstalldirs
deleted file mode 100755
index d2d5f21..0000000
--- a/contrib/ntp/mkinstalldirs
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /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/ntp_update b/contrib/ntp/ntp_update
deleted file mode 100755
index 599ca29..0000000
--- a/contrib/ntp/ntp_update
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh
-#
-# (hacked from egcs_update and pikt_update)
-#
-# Update a local CVS tree from the NTP repository, with an emphasis
-# on treating generated files correctly, so that autoconf, bison et
-# al are not required for the ``end'' user.
-#
-# By default all command-line options are passed to `cvs update` in
-# addition to $UPDATE_OPTIONS (defined below). If the first parameter
-# reads --nostdflags, $UPDATE_OPTIONS as well as this parameter itself
-# are omitted.
-#
-# Examples:
-#
-# ntp_update -r ntp_latest_snapshot
-# ntp_update -A
-# ntp_update --nostdflags -P -r ntp_1_1_branch foo/bar
-#
-#
-# (C) 1998 Free Software Foundation
-# Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
-#
-# This script is Free Software, and it can be copied, distributed and
-# modified as defined in the GNU General Public License. A copy of
-# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
-
-
-UPDATE_OPTIONS="-P -d"
-# Add -d to create any directories that exist in the repository but not
-# locally.
-# Add -A to reset any sticky tags, dates, or `-k' options.
-
-
-echo "Current directory is `pwd`."
-
-# First of all, check whether this indeed looks like a local CVS of ntp.
-if [ ! -d CVS ] || [ ! -f ntpd/ntpd.c ]; then
- echo "This does not seem to be an ntp CVS tree!"
- exit
-fi
-
-# Check command-line options
-
-if [ x"${1}"x = x"--nostdflags"x ]; then
- shift
-else
- set -- $UPDATE_OPTIONS ${1+"$@"}
-fi
-
-echo "Pass 1: Updating autoconf and bison source files"
-find . -name configure.in -o -name '*.y' -o -name copyright.htm | grep -v '^\./A\.'| xargs cvs -q update
-
-echo "Pass 2: Updating full tree"
-cvs -q update ${1+"$@"}
-
-echo "Pass 3: Fixing local tree"
-touch `find . -name aclocal.m4 -print`
-touch `find . -name configure -print`
-touch `find . -name Makefile.in -print`
-#touch `find texinfo -name \*.pot -print`
-#touch `find texinfo -name \*.gmo -print`
-# The following code should also touch the generated lex/yacc/rpc files
-for f in \
- stamp-h.in \
- COPYRIGHT
-do
- touch $f
-done
diff --git a/contrib/ntp/ntpd/Makefile.am b/contrib/ntp/ntpd/Makefile.am
deleted file mode 100644
index 0fa4e21..0000000
--- a/contrib/ntp/ntpd/Makefile.am
+++ /dev/null
@@ -1,60 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-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) ../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 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 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_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 \
- 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 \
- refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
- refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
- refclock_jupiter.c refclock_leitch.c refclock_local.c \
- refclock_msfees.c refclock_mx4200.c refclock_nmea.c refclock_oncore.c \
- refclock_palisade.c refclock_palisade.h refclock_parse.c \
- refclock_pcf.c refclock_pst.c refclock_ptbacts.c refclock_shm.c \
- refclock_tpro.c refclock_trak.c refclock_true.c refclock_tt560.c \
- refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c \
- refclock_zyfer.c refclock_ripencc.c refclock_neoclock4x.c
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-../libparse/libparse.a:
- cd ../libparse && $(MAKE)
-
-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
deleted file mode 100644
index eef0774..0000000
--- a/contrib/ntp/ntpd/Makefile.in
+++ /dev/null
@@ -1,960 +0,0 @@
-# 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
-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) ../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 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 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_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 \
- 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 \
- refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
- refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
- refclock_jupiter.c refclock_leitch.c refclock_local.c \
- refclock_msfees.c refclock_mx4200.c refclock_nmea.c refclock_oncore.c \
- refclock_palisade.c refclock_palisade.h refclock_parse.c \
- refclock_pcf.c refclock_pst.c refclock_ptbacts.c refclock_shm.c \
- refclock_tpro.c refclock_trak.c refclock_true.c refclock_tt560.c \
- refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.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 =
-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_DEPENDENCIES = version.o libntpd.a libntpd.a \
- ../libntp/libntp.a
-check_y2k_LDFLAGS =
-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 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 =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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 = $(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
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(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)
- @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)
-
-clean-checkPROGRAMS:
- -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
- @rm -f check_y2k$(EXEEXT)
- $(LINK) $(check_y2k_LDFLAGS) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
-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
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -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:
-@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`
-
-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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) 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) $(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
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-local
-check: check-am
-all-am: Makefile $(LIBRARIES) $(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)
- -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."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-noinstLIBRARIES mostlyclean-am
-
-distclean: distclean-am
- -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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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@
- test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-../libparse/libparse.a:
- cd ../libparse && $(MAKE)
-
-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.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/ntp/ntpd/check_y2k.c b/contrib/ntp/ntpd/check_y2k.c
deleted file mode 100644
index 6b83115..0000000
--- a/contrib/ntp/ntpd/check_y2k.c
+++ /dev/null
@@ -1,627 +0,0 @@
-/* check_y2k.c -- test ntp code constructs for Y2K correctness Y2KFixes [*/
-
- /*
- Code invoked by `make check`. Not part of ntpd and not to be
- installed.
-
- On any code I even wonder about, I've cut and pasted the code
- here and ran it as a test case just to be sure.
-
- For code not in "ntpd" proper, we have tried to call most
- repaired functions from herein to properly test them
- (something never done before!). This has found several bugs,
- not normal Y2K bugs, that will strike in Y2K so repair them
- we did.
-
- Program exits with 0 on success, 1 on Y2K failure (stdout messages).
- Exit of 2 indicates internal logic bug detected OR failure of
- what should be our correct formulas.
-
- While "make check" should only check logic for source within that
- specific directory, this check goes outside the scope of the local
- directory. It's not a perfect world (besides, there is a lot of
- interdependence here, and it really needs to be tested in
- a controled order).
- */
-
-/* { definitions lifted from ntpd.c to allow us to complie with
- "#include ntp.h". I have not taken the time to reduce the clutter. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntpd.h"
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#include <stdio.h>
-#include <errno.h>
-#ifndef SYS_WINNT
-# 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>
-# endif /* HAVE_SYS_IOCTL_H */
-# if !defined(VMS) /*wjm*/
-# include <sys/resource.h>
-# endif /* VMS */
-#else
-# include <signal.h>
-# include <process.h>
-# include <io.h>
-# include "../libntp/log.h"
-#endif /* SYS_WINNT */
-#if defined(HAVE_RTPRIO)
-# ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-# endif
-# ifdef HAVE_SYS_LOCK_H
-# include <sys/lock.h>
-# endif
-# include <sys/rtprio.h>
-#else
-# ifdef HAVE_PLOCK
-# ifdef HAVE_SYS_LOCK_H
-# include <sys/lock.h>
-# endif
-# endif
-#endif
-#if defined(HAVE_SCHED_SETSCHEDULER)
-# ifdef HAVE_SCHED_H
-# include <sched.h>
-# else
-# ifdef HAVE_SYS_SCHED_H
-# include <sys/sched.h>
-# endif
-# endif
-#endif
-#if defined(HAVE_SYS_MMAN_H)
-# include <sys/mman.h>
-#endif
-
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#ifdef SYS_DOMAINOS
-# include <apollo/base.h>
-#endif /* SYS_DOMAINOS */
-
-/* } end definitions lifted from ntpd.c */
-
-#include "ntp_calendar.h"
-#include "parse.h"
-
-#define GoodLeap(Year) (((Year)%4 || (!((Year)%100) && (Year)%400)) ? 0 : 13 )
-
-volatile int debug = 0; /* debugging requests for parse stuff */
-char const *progname = "check_y2k";
-
-long
-Days ( int Year ) /* return number of days since year "0" */
-{
- long Return;
- /* this is a known to be good algorithm */
- Return = Year * 365; /* first aproximation to the value */
- if ( Year >= 1 )
- { /* see notes in libparse/parse.c if you want a PROPER
- * **generic algorithm. */
- Return += (Year+3) / 4; /* add in (too many) leap days */
- Return -= (Year-1) / 100; /* reduce by (too many) centurys */
- Return += (Year-1) / 400; /* get final answer */
- }
-
- return Return;
-}
-
-static int year0 = 1900; /* sarting year for NTP time */
-static int yearend; /* ending year we test for NTP time.
- * 32-bit systems: through 2036, the
- **year in which NTP time overflows.
- * 64-bit systems: a reasonable upper
- **limit (well, maybe somewhat beyond
- **reasonable, but well before the
- **max time, by which time the earth
- **will be dead.) */
-static time_t Time;
-static struct tm LocalTime;
-
-#define Error(year) if ( (year)>=2036 && LocalTime.tm_year < 110 ) \
- Warnings++; else Fatals++
-
-int
-main( void )
-{
- int Fatals;
- int Warnings;
- int year;
-
- Time = time( (time_t *)NULL )
-#ifdef TESTTIMEOFFSET
- + test_time_offset
-#endif
- ;
- LocalTime = *localtime( &Time );
-
- year = ( sizeof( u_long ) > 4 ) /* save max span using year as temp */
- ? ( 400 * 3 ) /* three greater gregorian cycles */
- : ((int)(0x7FFFFFFF / 365.242 / 24/60/60)* 2 ); /*32-bit limit*/
- /* NOTE: will automacially expand test years on
- * 64 bit machines.... this may cause some of the
- * existing ntp logic to fail for years beyond
- * 2036 (the current 32-bit limit). If all checks
- * fail ONLY beyond year 2036 you may ignore such
- * errors, at least for a decade or so. */
- yearend = year0 + year;
-
- puts( " internal self check" );
- { /* verify our own logic used to verify repairs */
- unsigned long days;
-
- if ( year0 >= yearend )
- {
- fprintf( stdout, "year0=%d NOT LESS THAN yearend=%d (span=%d)\n",
- (int)year0, (int)yearend, (int)year );
- exit(2);
- }
-
- {
- int save_year;
-
- save_year = LocalTime.tm_year; /* save current year */
-
- year = 1980;
- LocalTime.tm_year = year - 1900;
- Fatals = Warnings = 0;
- Error(year); /* should increment Fatals */
- if ( Fatals == 0 )
- {
- fprintf( stdout,
- "%4d: %s(%d): FATAL DID NOT INCREMENT (Fatals=%d Warnings=%d)\n",
- (int)year, __FILE__, __LINE__, (int)Fatals, (int)Warnings );
- exit(2);
- }
-
- year = 2100; /* test year > limit but CURRENT year < limit */
- Fatals = Warnings = 0;
- Error(year); /* should increment Fatals */
- if ( Warnings == 0 )
- {
- fprintf( stdout,
- "%4d: %s(%d): WARNING DID NOT INCREMENT (Fatals=%d Warnings=%d)\n",
- (int)year, __FILE__, __LINE__, (int)Fatals, (int)Warnings );
- exit(2);
- }
- Fatals = Warnings = 0;
- LocalTime.tm_year = year - 1900; /* everything > limit */
- Error(1980); /* should increment Fatals */
- if ( Fatals == 0 )
- {
- fprintf( stdout,
- "%4d: %s(%d): FATALS DID NOT INCREMENT (Fatals=%d Warnings=%d)\n",
- (int)year, __FILE__, __LINE__, (int)Fatals, (int)Warnings );
- exit(2);
- }
-
- LocalTime.tm_year = save_year;
- }
-
- days = 365+1; /* days in year 0 + 1 more day */
- for ( year = 1; year <= 2500; year++ )
- {
- long Test;
- Test = Days( year );
- if ( days != Test )
- {
- fprintf( stdout, "%04d: Days() DAY COUNT ERROR: s/b=%ld was=%ld\n",
- year, (long)days, (long)Test );
- exit(2); /* would throw off many other tests */
- }
-
- Test = julian0(year); /* compare with julian0() macro */
- if ( days != Test )
- {
- fprintf( stdout, "%04d: julian0() DAY COUNT ERROR: s/b=%ld was=%ld\n",
- year, (long)days, (long)Test );
- exit(2); /* would throw off many other tests */
- }
-
- days += 365;
- if ( isleap_4(year) ) days++;
- }
-
- if ( isleap_4(1999) )
- {
- fprintf( stdout, "isleap_4(1999) REPORTED TRUE\n" );
- exit(2);
- }
- if ( !isleap_4(2000) )
- {
- fprintf( stdout, "isleap_4(2000) REPORTED FALSE\n" );
- exit(2);
- }
- if ( isleap_4(2001) )
- {
- fprintf( stdout, "isleap_4(1999) REPORTED TRUE\n" );
- exit(2);
- }
-
- if ( !isleap_tm(2000-1900) )
- {
- fprintf( stdout, "isleap_tm(100) REPORTED FALSE\n" );
- exit(2);
- }
- }
-
- Fatals = Warnings = 0;
-
- puts( " include/ntp.h" );
- { /* test our new isleap_*() #define "functions" */
-
- for ( year = 1400; year <= 2200; year++ )
- {
- int LeapSw;
- int IsLeapSw;
-
- LeapSw = GoodLeap(year);
- IsLeapSw = isleap_4(year);
-
- if ( !!LeapSw != !!IsLeapSw )
- {
- Error(year);
- fprintf( stdout,
- " %4d %2d %3d *** ERROR\n", year, LeapSw, IsLeapSw );
- break;
- }
-
- IsLeapSw = isleap_tm(year-1900);
-
- if ( !!LeapSw != !!IsLeapSw )
- {
- Error(year);
- fprintf( stdout,
- " %4d %2d %3d *** ERROR\n", year, LeapSw, IsLeapSw );
- break;
- }
- }
- }
-
- puts( " include/ntp_calendar.h" );
- { /* I belive this is good, but just to be sure... */
-
- /* we are testing this #define */
-#define is_leapyear(y) (y%4 == 0 && !(y%100 == 0 && !(y%400 == 0)))
-
- for ( year = 1400; year <= 2200; year++ )
- {
- int LeapSw;
-
- LeapSw = GoodLeap(year);
-
- if ( !(!LeapSw) != !(!is_leapyear(year)) )
- {
- Error(year);
- fprintf( stdout,
- " %4d %2d *** ERROR\n", year, LeapSw );
- break;
- }
- }
- }
-
-
- puts( " libparse/parse.c" );
- {
- long Days1970; /* days from 1900 to 1970 */
-
- struct ParseTime /* womp up a test structure to all cut/paste code */
- {
- int year;
- } Clock_Time, *clock_time;
-
- clock_time = &Clock_Time;
-
- /* first test this #define */
-#define days_per_year(x) ((x) % 4 ? 365 : ((x % 400) ? ((x % 100) ? 366 : 365) : 366))
-
- for ( year = 1400; year <= 2200; year++ )
- {
- int LeapSw;
- int DayCnt;
-
- LeapSw = GoodLeap(year);
- DayCnt = (int)days_per_year(year);
-
- if ( ( LeapSw ? 366 : 365 ) != DayCnt )
- {
- Error(year);
- fprintf( stdout,
- " days_per_year() %4d %2d %3d *** ERROR\n",
- year, LeapSw, DayCnt );
- break;
- }
- }
-
- /* test (what is now julian0) calculations */
-
- Days1970 = Days( 1970 ); /* get days since 1970 using a known good */
-
- for ( year = 1970; year < yearend; year++ )
- {
- unsigned long t;
- long DaysYear ;
-
- clock_time->year = year;
-
- /* here is the code we are testing, cut and pasted out of the source */
-#if 0 /* old BUGGY code that has Y2K (and many other) failures */
- /* ghealton: this logic FAILED with great frequency when run
- * over a period of time, including for year 2000. True, it
- * had more successes than failures, but that's not really good
- * enough for critical time distribution software.
- * It is so awful I wonder if it has had a history of failure
- * and fixes? */
- t = (clock_time->year - 1970) * 365;
- t += (clock_time->year >> 2) - (1970 >> 2);
- t -= clock_time->year / 100 - 1970 / 100;
- t += clock_time->year / 400 - 1970 / 400;
-
- /* (immediate feare of rounding errors on integer
- * **divisions proved well founded) */
-
-#else
- /* my replacement, based on Days() above */
- t = julian0(year) - julian0(1970);
-#endif
-
- /* compare result in t against trusted calculations */
- DaysYear = Days( year ); /* get days to this year */
- if ( t != DaysYear - Days1970 )
- {
- Error(year);
- fprintf( stdout,
- " %4d 1970=%-8ld %4d=%-8ld %-3ld t=%-8ld *** ERROR ***\n",
- year, (long)Days1970,
- year,
- (long)DaysYear,
- (long)(DaysYear - Days1970),
- (long)t );
- }
- }
-
-#if 1 /* { */
- {
- debug = 1; /* enable debugging */
- for ( year = 1970; year < yearend; year++ )
- { /* (limited by theory unix 2038 related bug lives by, but
- * ends in yearend) */
- clocktime_t ct;
- time_t Observed;
- time_t Expected;
- u_long Flag;
- unsigned long t;
-
- ct.day = 1;
- ct.month = 1;
- ct.year = year;
- ct.hour = ct.minute = ct.second = ct.usecond = 0;
- ct.utcoffset = 0;
- ct.utctime = 0;
- ct.flags = 0;
-
- Flag = 0;
- Observed = parse_to_unixtime( &ct, &Flag );
- if ( ct.year != year )
- {
- fprintf( stdout,
- "%04d: parse_to_unixtime(,%d) CORRUPTED ct.year: was %d\n",
- (int)year, (int)Flag, (int)ct.year );
- Error(year);
- break;
- }
- t = julian0(year) - julian0(1970); /* Julian day from 1970 */
- Expected = t * 24 * 60 * 60;
- if ( Observed != Expected || Flag )
- { /* time difference */
- fprintf( stdout,
- "%04d: parse_to_unixtime(,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)Flag,
- (unsigned long)Observed, (unsigned long)Expected,
- ((long)Observed - (long)Expected) );
- Error(year);
- break;
- }
-
- if ( year >= YEAR_PIVOT+1900 )
- {
- /* check year % 100 code we put into parse_to_unixtime() */
- ct.utctime = 0;
- ct.year = year % 100;
- Flag = 0;
-
- Observed = parse_to_unixtime( &ct, &Flag );
-
- if ( Observed != Expected || Flag )
- { /* time difference */
- fprintf( stdout,
-"%04d: parse_to_unixtime(%d,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)ct.year, (int)Flag,
- (unsigned long)Observed, (unsigned long)Expected,
- ((long)Observed - (long)Expected) );
- Error(year);
- break;
- }
-
- /* check year - 1900 code we put into parse_to_unixtime() */
- ct.utctime = 0;
- ct.year = year - 1900;
- Flag = 0;
-
- Observed = parse_to_unixtime( &ct, &Flag );
-
- if ( Observed != Expected || Flag )
- { /* time difference */
- fprintf( stdout,
-"%04d: parse_to_unixtime(%d,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)ct.year, (int)Flag,
- (unsigned long)Observed, (unsigned long)Expected,
- ((long)Observed - (long)Expected) );
- Error(year);
- break;
- }
-
-
- }
- }
-#endif /* } */
- }
- }
-
- puts( " libntp/caljulian.c" );
- { /* test caljulian() */
- struct calendar ot;
- u_long ntp_time; /* NTP time */
-
- year = year0; /* calculate the basic year */
- printf( " starting year %04d\n", (int)year0 );
- printf( " ending year %04d\n", (int)yearend );
-
-
- ntp_time = julian0( year0 ); /* NTP starts in 1900-01-01 */
-#if DAY_NTP_STARTS == 693596
- ntp_time -= 365; /* BIAS required for successful test */
-#endif
- if ( DAY_NTP_STARTS != ntp_time )
- {
- Error(year);
- fprintf( stdout,
- "%04d: DAY_NTP_STARTS (%ld) NOT TRUE VALUE OF %ld (%ld)\n",
- (int)year0,
- (long)DAY_NTP_STARTS, (long)ntp_time,
- (long)DAY_NTP_STARTS - (long)ntp_time );
- }
-
- for ( ; year < yearend; year++ )
- {
-
- /* 01-01 for the current year */
- ntp_time = Days( year ) - Days( year0 ); /* days into NTP time */
- ntp_time *= 24 * 60 * 60; /* convert into seconds */
- caljulian( ntp_time, &ot ); /* convert January 1 */
- if ( ot.year != year
- || ot.month != 1
- || ot.monthday != 1 )
- {
- Error(year);
- fprintf( stdout, "%lu: EXPECTED %04d-01-01: FOUND %04d-%02d-%02d\n",
- (unsigned long)ntp_time,
- year,
- (int)ot.year, (int)ot.month, (int)ot.monthday );
- break;
- }
-
- ntp_time += (31 + 28-1) * ( 24 * 60 * 60 ); /* advance to 02-28 */
- caljulian( ntp_time, &ot ); /* convert Feb 28 */
- if ( ot.year != year
- || ot.month != 2
- || ot.monthday != 28 )
- {
- Error(year);
- fprintf( stdout, "%lu: EXPECTED %04d-02-28: FOUND %04d-%02d-%02d\n",
- (unsigned long)ntp_time,
- year,
- (int)ot.year, (int)ot.month, (int)ot.monthday );
- break;
- }
-
- {
- int m; /* expected month */
- int d; /* expected day */
-
- m = isleap_4(year) ? 2 : 3;
- d = isleap_4(year) ? 29 : 1;
-
- ntp_time += ( 24 * 60 * 60 ); /* advance to the next day */
- caljulian( ntp_time, &ot ); /* convert this day */
- if ( ot.year != year
- || ot.month != m
- || ot.monthday != d )
- {
- Error(year);
- fprintf( stdout, "%lu: EXPECTED %04d-%02d-%02d: FOUND %04d-%02d-%02d\n",
- (unsigned long)ntp_time,
- year, m, d,
- (int)ot.year, (int)ot.month, (int)ot.monthday );
- break;
- }
-
- }
- }
- }
-
- puts( " libntp/caltontp.c" );
- { /* test caltontp() */
- struct calendar ot;
- u_long ntp_time; /* NTP time */
-
- year = year0; /* calculate the basic year */
- printf( " starting year %04d\n", (int)year0 );
- printf( " ending year %04d\n", (int)yearend );
-
-
- for ( ; year < yearend; year++ )
- {
- u_long ObservedNtp;
-
- /* 01-01 for the current year */
- ot.year = year;
- ot.month = ot.monthday = 1; /* unused, but set anyway JIC */
- ot.yearday = 1; /* this is the magic value used by caltontp() */
- ot.hour = ot.minute = ot.second = 0;
-
- ntp_time = Days( year ) - Days( year0 ); /* days into NTP time */
- ntp_time *= 24 * 60 * 60; /* convert into seconds */
- ObservedNtp = caltontp( &ot );
- if ( ntp_time != ObservedNtp )
- {
- Error(year);
- fprintf( stdout, "%d: EXPECTED %lu: FOUND %lu (%ld)\n",
- (int)year,
- (unsigned long)ntp_time, (unsigned long)ObservedNtp ,
- (long)ntp_time - (long)ObservedNtp );
-
- break;
- }
-
- /* now call caljulian as a type of failsafe supercheck */
- caljulian( ObservedNtp, &ot ); /* convert January 1 */
- if ( ot.year != year
- || ot.month != 1
- || ot.monthday != 1 )
- {
- Error(year);
- fprintf( stdout, "%lu: caljulian FAILSAFE EXPECTED %04d-01-01: FOUND %04d-%02d-%02d\n",
- (unsigned long)ObservedNtp,
- year,
- (int)ot.year, (int)ot.month, (int)ot.monthday );
- break;
- }
- }
- }
-
- if ( Warnings > 0 )
- fprintf( stdout, "%d WARNINGS\n", Warnings );
- if ( Fatals > 0 )
- fprintf( stdout, "%d FATAL ERRORS\n", Fatals );
- return Fatals ? 1 : 0;
-}
- /* Y2KFixes ] */
diff --git a/contrib/ntp/ntpd/cmd_args.c b/contrib/ntp/ntpd/cmd_args.c
deleted file mode 100644
index 3ed9b66..0000000
--- a/contrib/ntp/ntpd/cmd_args.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * cmd_args.c = command-line argument processing
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntpd.h"
-#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 = 1;
-
-#ifdef SYS_WINNT
-extern BOOL NoWinService;
-#endif
-
-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;
-#endif
-
-
-/*
- * getstartup - search through the options looking for a debugging flag
- */
-void
-getstartup(
- int argc,
- char *argv[]
- )
-{
- int errflg;
- extern int priority_done;
- int c;
-
-#ifdef DEBUG
- debug = 0; /* no debugging by default */
-#endif
-
- /*
- * This is a big hack. We don't really want to read command line
- * configuration until everything else is initialized, since
- * the ability to configure the system may depend on storage
- * and the like having been initialized. Except that we also
- * don't want to initialize anything until after detaching from
- * the terminal, but we won't know to do that until we've
- * parsed the command line. Do that now, crudely, and do it
- * again later. Our ntp_getopt() is explicitly reusable, by the
- * way. Your own mileage may vary.
- *
- * This hack is even called twice (to allow complete logging to file)
- */
- errflg = 0;
- progname = argv[0];
-
- /*
- * Decode argument list
- */
- while ((c = ntp_getopt(argc, argv, ntp_options)) != EOF)
- switch (c) {
-#ifdef DEBUG
- case 'd':
- ++debug;
- break;
- case 'D':
- debug = (int)atol(ntp_optarg);
- printf("Debug1: %s -> %x = %d\n", ntp_optarg, debug, debug);
- break;
-#else
- 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\n");
- ++errflg;
- break;
-#endif
- case 'L':
- listen_to_virtual_ips = 0;
- break;
- case 'l':
- {
- FILE *new_file;
-
- 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);
- if (syslog_file != NULL &&
- fileno(syslog_file) != fileno(new_file))
- (void)fclose(syslog_file);
-
- syslog_file = new_file;
- syslogit = 0;
- }
- else
- msyslog(LOG_ERR,
- "Cannot open log file %s",
- ntp_optarg);
- }
- break;
-
- case 'n':
- case 'q':
- ++nofork;
-#ifdef SYS_WINNT
- NoWinService = TRUE;
-#endif
- break;
-
- case 'N':
- 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;
- }
-
- if (errflg || ntp_optind != argc) {
- (void) fprintf(stderr, "usage: %s [ -abdgmnqx ] [ -c config_file ] [ -e e_delay ]\n", progname);
- (void) fprintf(stderr, "\t\t[ -f freq_file ] [ -k key_file ] [ -l log_file ]\n");
- (void) fprintf(stderr, "\t\t[ -p pid_file ] [ -r broad_delay ] [ -s statdir ]\n");
- (void) fprintf(stderr, "\t\t[ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]\n");
-#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 */
-
-#ifdef DEBUG
- if (debug) {
-#ifdef HAVE_SETVBUF
- static char buf[BUFSIZ];
- setvbuf(stdout, buf, _IOLBF, BUFSIZ);
-#else
- setlinebuf(stdout);
-#endif
- }
-#endif
-}
-
-/*
- * getCmdOpts - get command line options
- */
-void
-getCmdOpts(
- int argc,
- char *argv[]
- )
-{
- extern char *config_file;
- struct sockaddr_in inaddrntp;
- int errflg;
- int c;
-
- /*
- * Initialize, initialize
- */
- errflg = 0;
-#ifdef DEBUG
- debug = 0;
-#endif /* DEBUG */
-
- progname = argv[0];
-
- /*
- * Decode argument list
- */
- while ((c = ntp_getopt(argc, argv, ntp_options)) != EOF) {
- switch (c) {
- case 'a':
- proto_config(PROTO_AUTHENTICATE, 1, 0., NULL);
- break;
-
- case 'A':
- proto_config(PROTO_AUTHENTICATE, 0, 0., NULL);
- break;
-
- case 'b':
- proto_config(PROTO_BROADCLIENT, 1, 0., NULL);
- break;
-
- case 'c':
- config_file = ntp_optarg;
-#ifdef HAVE_NETINFO
- check_netinfo = 0;
-#endif
- break;
-
- case 'd':
-#ifdef DEBUG
- debug++;
-#else
- errflg++;
-#endif /* DEBUG */
- break;
-
- case 'D':
-#ifdef DEBUG
- debug = (int)atol(ntp_optarg);
- printf("Debug2: %s -> %x = %d\n", ntp_optarg, debug, debug);
-#else
- errflg++;
-#endif /* DEBUG */
- break;
-
- case 'f':
- stats_config(STATS_FREQ_FILE, ntp_optarg);
- break;
-
- case 'g':
- 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;
-
- case 'L': /* already done at pre-scan */
- case 'l': /* already done at pre-scan */
- break;
-
- case 'm':
- 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;
-
- case 'n': /* already done at pre-scan */
- break;
-
- case 'N': /* already done at pre-scan */
- break;
-
- case 'p':
- stats_config(STATS_PID_FILE, ntp_optarg);
- break;
-
- case 'P':
-#if defined(HAVE_SCHED_SETSCHEDULER)
- config_priority = (int)atol(ntp_optarg);
- config_priority_override = 1;
-#else
- errflg++;
-#endif
- break;
-
- case 'q':
- mode_ntpdate = TRUE;
- break;
-
- case 'r':
- do {
- double tmp;
-
- if (sscanf(ntp_optarg, "%lf", &tmp) != 1) {
- msyslog(LOG_ERR,
- "command line broadcast delay value %s undecodable",
- ntp_optarg);
- } else {
- 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;
-
- case 't':
- do {
- u_long tkey;
-
- tkey = (int)atol(ntp_optarg);
- if (tkey <= 0 || tkey > NTP_MAXKEY) {
- msyslog(LOG_ERR,
- "command line trusted key %s is invalid",
- ntp_optarg);
- } else {
- authtrust(tkey, 1);
- }
- } while (0);
- break;
-
- case 'v':
- case 'V':
- set_sys_var(ntp_optarg, strlen(ntp_optarg)+1,
- (u_short) (RW | ((c == 'V') ? DEF : 0)));
- break;
-
- case 'x':
- 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;
- }
- }
-
- if (errflg || ntp_optind != argc) {
- (void) fprintf(stderr, "usage: %s [ -abdgmnx ] [ -c config_file ] [ -e e_delay ]\n", progname);
- (void) fprintf(stderr, "\t\t[ -f freq_file ] [ -k key_file ] [ -l log_file ]\n");
- (void) fprintf(stderr, "\t\t[ -p pid_file ] [ -r broad_delay ] [ -s statdir ]\n");
- (void) fprintf(stderr, "\t\t[ -t trust_key ] [ -v sys_var ] [ -V default_sysvar ]\n");
-#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/jupiter.h b/contrib/ntp/ntpd/jupiter.h
deleted file mode 100644
index ed80b0c..0000000
--- a/contrib/ntp/ntpd/jupiter.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* @(#) $Header$ (LBL) */
-
-/*
- * Rockwell Jupiter GPS receiver definitions
- *
- * This is all based on the "Zodiac GPS Receiver Family Designer's
- * Guide" (dated 12/96)
- */
-
-#define JUPITER_SYNC 0x81ff /* sync word (book says 0xff81 !?!?) */
-#define JUPITER_ALL 0xffff /* disable all output messages */
-
-/* Output messages (sent by the Jupiter board) */
-#define JUPITER_O_GPOS 1000 /* geodetic position status */
-#define JUPITER_O_EPOS 1001 /* ECEF position status */
-#define JUPITER_O_CHAN 1002 /* channel summary */
-#define JUPITER_O_VIS 1003 /* visible satellites */
-#define JUPITER_O_DGPS 1005 /* differential GPS status */
-#define JUPITER_O_MEAS 1007 /* channel measurement */
-#define JUPITER_O_ID 1011 /* receiver id */
-#define JUPITER_O_USER 1012 /* user-settings output */
-#define JUPITER_O_TEST 1100 /* built-in test results */
-#define JUPITER_O_MARK 1102 /* measurement time mark */
-#define JUPITER_O_PULSE 1108 /* UTC time mark pulse output */
-#define JUPITER_O_PORT 1130 /* serial port com parameters in use */
-#define JUPITER_O_EUP 1135 /* EEPROM update */
-#define JUPITER_O_ESTAT 1136 /* EEPROM status */
-
-/* Input messages (sent to the Jupiter board) */
-#define JUPITER_I_PVTINIT 1200 /* geodetic position and velocity */
-#define JUPITER_I_USER 1210 /* user-defined datum */
-#define JUPITER_I_MAPSEL 1211 /* map datum select */
-#define JUPITER_I_ELEV 1212 /* satellite elevation mask control */
-#define JUPITER_I_CAND 1213 /* satellite candidate select */
-#define JUPITER_I_DGPS 1214 /* differential GPS control */
-#define JUPITER_I_COLD 1216 /* cold start control */
-#define JUPITER_I_VALID 1217 /* solution validity criteria */
-#define JUPITER_I_ALT 1219 /* user-entered altitude input */
-#define JUPITER_I_PLAT 1220 /* application platform control */
-#define JUPITER_I_NAV 1221 /* nav configuration */
-#define JUPITER_I_TEST 1300 /* preform built-in test command */
-#define JUPITER_I_RESTART 1303 /* restart command */
-#define JUPITER_I_PORT 1330 /* serial port com parameters */
-#define JUPITER_I_PROTO 1331 /* message protocol control */
-#define JUPITER_I_RDGPS 1351 /* raw DGPS RTCM SC-104 data */
-
-struct jheader {
- u_short sync; /* (JUPITER_SYNC) */
- u_short id; /* message id */
- u_short len; /* number of data short wordss (w/o cksum) */
- u_char reqid; /* JUPITER_REQID_MASK bits available as id */
- u_char flags; /* flags */
- u_short hsum; /* header cksum */
-};
-
-#define JUPITER_REQID_MASK 0x3f /* bits available as id */
-#define JUPITER_FLAG_NAK 0x01 /* negative acknowledgement */
-#define JUPITER_FLAG_ACK 0x02 /* acknowledgement */
-#define JUPITER_FLAG_REQUEST 0x04 /* request ACK or NAK */
-#define JUPITER_FLAG_QUERY 0x08 /* request one shot output message */
-#define JUPITER_FLAG_LOG 0x20 /* request periodic output message */
-#define JUPITER_FLAG_CONN 0x40 /* enable periodic message */
-#define JUPITER_FLAG_DISC 0x80 /* disable periodic message */
-
-#define JUPITER_H_FLAG_BITS \
- "\020\1NAK\2ACK\3REQUEST\4QUERY\5MBZ\6LOG\7CONN\10DISC"
-
-/* Log request messages (data payload when using JUPITER_FLAG_LOG) */
-struct jrequest {
- u_short trigger; /* if 0, trigger on time trigger on
- update (e.g. new almanac) */
- u_short interval; /* frequency in seconds */
- u_short offset; /* offset into minute */
- u_short dsum; /* checksum */
-};
-
-/* JUPITER_O_GPOS (1000) */
-struct jgpos {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- u_short sseq; /* sat measurement sequence number */
- u_short navval; /* navigation soltuion validity */
- u_short navtype; /* navigation solution type */
- u_short nmeas; /* # of measurements used in solution */
- u_short polar; /* if 1 then polar navigation */
- u_short gweek; /* GPS week number */
- u_short sweek[2]; /* GPS seconds into week */
- u_short nsweek[2]; /* GPS nanoseconds into second */
- u_short utcday; /* 1 to 31 */
- u_short utcmon; /* 1 to 12 */
- u_short utcyear; /* 1980 to 2079 */
- u_short utchour; /* 0 to 23 */
- u_short utcmin; /* 0 to 59 */
- u_short utcsec; /* 0 to 59 */
- u_short utcnsec[2]; /* 0 to 999999999 */
- u_short lat[2]; /* latitude (radians) */
- u_short lon[2]; /* longitude (radians) */
- u_short height[2]; /* height (meters) */
- u_short gsep; /* geoidal separation */
- u_short speed[2]; /* ground speed (meters/sec) */
- u_short course; /* true course (radians) */
- u_short mvar;
- u_short climb;
- u_short mapd;
- u_short herr[2];
- u_short verr[2];
- u_short terr[2];
- u_short hverr;
- u_short bias[2];
- u_short biassd[2];
- u_short drift[2];
- u_short driftsd[2];
- u_short dsum; /* checksum */
-};
-#define JUPITER_O_GPOS_NAV_NOALT 0x01 /* altitude used */
-#define JUPITER_O_GPOS_NAV_NODGPS 0x02 /* no differential GPS */
-#define JUPITER_O_GPOS_NAV_NOSAT 0x04 /* not enough satellites */
-#define JUPITER_O_GPOS_NAV_MAXH 0x08 /* exceeded max EHPE */
-#define JUPITER_O_GPOS_NAV_MAXV 0x10 /* exceeded max EVPE */
-
-/* JUPITER_O_CHAN (1002) */
-struct jchan {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- u_short sseq; /* sat measurement sequence number */
- u_short gweek; /* GPS week number */
- u_short sweek[2]; /* GPS seconds into week */
- u_short gpsns[2]; /* GPS nanoseconds from epoch */
- struct jchan2 {
- u_short flags; /* flags */
- u_short prn; /* satellite PRN */
- u_short chan; /* channel number */
- } sat[12];
- u_short dsum;
-};
-
-/* JUPITER_O_VIS (1003) */
-struct jvis {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- u_short gdop; /* best possible GDOP */
- u_short pdop; /* best possible PDOP */
- u_short hdop; /* best possible HDOP */
- u_short vdop; /* best possible VDOP */
- u_short tdop; /* best possible TDOP */
- u_short nvis; /* number of visible satellites */
- struct jvis2 {
- u_short prn; /* satellite PRN */
- u_short azi; /* satellite azimuth (radians) */
- u_short elev; /* satellite elevation (radians) */
- } sat[12];
- u_short dsum; /* checksum */
-};
-
-/* JUPITER_O_ID (1011) */
-struct jid {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- char chans[20]; /* number of channels (ascii) */
- char vers[20]; /* software version (ascii) */
- char date[20]; /* software date (ascii) */
- char opts[20]; /* software options (ascii) */
- char reserved[20];
- u_short dsum; /* checksum */
-};
-
-/* JUPITER_O_USER (1012) */
-struct juser {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- u_short status; /* operatinoal status */
- u_short coldtmo; /* cold start time-out */
- u_short dgpstmo; /* DGPS correction time-out*/
- u_short emask; /* elevation mask */
- u_short selcand[2]; /* selected candidate */
- u_short solflags; /* solution validity criteria */
- u_short nsat; /* number of satellites in track */
- u_short herr[2]; /* minimum expected horizontal error */
- u_short verr[2]; /* minimum expected vertical error */
- u_short platform; /* application platform */
- u_short dsum; /* checksum */
-};
-
-/* JUPITER_O_PULSE (1108) */
-struct jpulse {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- u_short reserved[5];
- u_short sweek[2]; /* GPS seconds into week */
- short offs; /* GPS to UTC time offset (seconds) */
- u_short offns[2]; /* GPS to UTC offset (nanoseconds) */
- u_short flags; /* flags */
- u_short dsum; /* checksum */
-};
-#define JUPITER_O_PULSE_VALID 0x1 /* time mark validity */
-#define JUPITER_O_PULSE_UTC 0x2 /* GPS/UTC sync */
-
-/* JUPITER_O_EUP (1135) */
-struct jeup {
- u_short stime[2]; /* set time (10 ms ticks) */
- u_short seq; /* sequence number */
- u_char dataid; /* data id */
- u_char prn; /* satellite PRN */
- u_short dsum; /* checksum */
-};
-
-/* JUPITER_I_RESTART (1303) */
-struct jrestart {
- u_short seq; /* sequence number */
- u_short flags;
- u_short dsum; /* checksum */
-};
-#define JUPITER_I_RESTART_INVRAM 0x01
-#define JUPITER_I_RESTART_INVEEPROM 0x02
-#define JUPITER_I_RESTART_INVRTC 0x04
-#define JUPITER_I_RESTART_COLD 0x80
-
-/* JUPITER_I_PVTINIT (1200) */
-struct jpvtinit {
- u_short flags;
- u_short gweek; /* GPS week number */
- u_short sweek[2]; /* GPS seconds into week */
- u_short utcday; /* 1 to 31 */
- u_short utcmon; /* 1 to 12 */
- u_short utcyear; /* 1980 to 2079 */
- u_short utchour; /* 0 to 23 */
- u_short utcmin; /* 0 to 59 */
- u_short utcsec; /* 0 to 59 */
- u_short lat[2]; /* latitude (radians) */
- u_short lon[2]; /* longitude (radians) */
- u_short height[2]; /* height (meters) */
- u_short speed[2]; /* ground speed (meters/sec) */
- u_short course; /* true course (radians) */
- u_short climb;
- u_short dsum;
-};
-#define JUPITER_I_PVTINIT_FORCE 0x01
-#define JUPITER_I_PVTINIT_GPSVAL 0x02
-#define JUPITER_I_PVTINIT_UTCVAL 0x04
-#define JUPITER_I_PVTINIT_POSVAL 0x08
-#define JUPITER_I_PVTINIT_ALTVAL 0x10
-#define JUPITER_I_PVTINIT_SPDVAL 0x12
-#define JUPITER_I_PVTINIT_MAGVAL 0x14
-#define JUPITER_I_PVTINIT_CLIMBVAL 0x18
-
-/* JUPITER_I_PLAT (1220) */
-struct jplat {
- u_short seq; /* sequence number */
- u_short platform; /* application platform */
- u_short dsum;
-};
-#define JUPITER_I_PLAT_DEFAULT 0 /* default dynamics */
-#define JUPITER_I_PLAT_LOW 2 /* pedestrian */
-#define JUPITER_I_PLAT_MED 5 /* land (e.g. automobile) */
-#define JUPITER_I_PLAT_HIGH 6 /* air */
diff --git a/contrib/ntp/ntpd/map_vme.c b/contrib/ntp/ntpd/map_vme.c
deleted file mode 100644
index e4569ce..0000000
--- a/contrib/ntp/ntpd/map_vme.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/********************************************************/
-/* map_vme.c */
-/* VME control of TrueTime VME-SG sync gen card */
-/* and TrueTime GPS-VME receiver card */
-/* Version for 700 series HPUX 9.0 */
-/* Richard E.Schmidt, US Naval Observatory, Washington */
-/* 27 March 94 */
-/********************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_GPSVME)
-#include <stdio.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#include <sys/rtprio.h> /* for rtprio */
-#include <sys/lock.h> /* for plock */
-#include "/etc/conf/machine/vme2.h"
-#include "/etc/conf/h/io.h"
-#include "gps.h"
-
-/* GLOBALS */
-void *gps_base;
-unsigned short *greg[NREGS];
-struct vme2_map_addr ma; /* memory mapped structure */
-int fd; /* file descriptor for VME */
-
-void unmap_vme ();
-
-caddr_t
-map_vme (
- char *filename
- )
-{
- int ret;
- caddr_t base;
- struct vme2_io_testx tx;
- caddr_t cp;
-
-#define VME_START_ADDR 0x00000 /* Starting address in A16N VME Space */
-#define VMESIZE 0xFF /* 256 bytes of A16N space length */
-
- /*
- To create the HP9000/700 series device file, /dev/vme2:
- mknod /dev/vme2 c 44 0x0; chmod 600 /dev/vme2
-
- Then must create /etc/vme.CFG and run /etc/vme_config and reboot.
- */
- if ((fd = open (filename, O_RDWR)) < 0) {
- printf("ERROR: VME bus adapter open failed. errno:%d\n",
- errno);
- if(errno == ENODEV) {
- printf("ENODEV. Is driver in kernel? vme2 in dfile?\n");
- }
- exit(errno);
- }
- tx.card_type = VME_A16;
- tx.vme_addr = VME_START_ADDR;
- tx.width = SHORT_WIDE;
-
- if(ioctl(fd, VME2_IO_TESTR, &tx)) {
- printf("ioctl to test VME space failed. Errno: %d\n",
- errno);
- exit(errno);
- }
- if(tx.error)
- printf("io_testr failed internal error %d\n",tx.error);
- if(tx.access_result < 0) {
- printf("io_testr failed\n");
- exit(2);
- }
-
- /* If successful mmap the device */
- /* NOW MAP THE CARD */
- ma.card_type = VME_A16;
- ma.vme_addr = VME_START_ADDR;
- ma.size = VMESIZE;
-
- if(ioctl(fd, VME2_MAP_ADDR, &ma)) {
- printf("ioctl to map VME space failed. Errno: %d\n",
- errno);
- exit(errno);
- }
- if(ma.error) {
- printf("ioctl to map VME failed\n");
- exit(ENOMEM);
- }
- base = ma.user_addr;
- return(base);
-}
-
-
-void
-unmap_vme(void)
-{
- if(ioctl(fd, VME2_UNMAP_ADDR, &ma))
- printf("ioctl to unmap VME space failed. Errno: %d\n",
- errno);
- close(fd);
- return;
-}
-
-
-int
-init_vme(boid)
-{
- /* set up address offsets */
-
- gps_base = map_vme (GPS_VME);
-
-/* offsets from base address: */
-
- greg[0] = (unsigned short *)gps_base + GFRZ1;
- greg[1] = (unsigned short *)gps_base + GUFRZ1;
- greg[2] = (unsigned short *)gps_base + GREG1A;
- greg[3] = (unsigned short *)gps_base + GREG1B;
- greg[4] = (unsigned short *)gps_base + GREG1C;
- greg[5] = (unsigned short *)gps_base + GREG1D;
- greg[6] = (unsigned short *)gps_base + GREG1E;
-
- return (0);
-}
-
-#else /* not (REFCLOCK && CLOCK_GPSVME) */
-int map_vme_bs;
-#endif /* not (REFCLOCK && CLOCK_GPSVME) */
diff --git a/contrib/ntp/ntpd/ntp_config.c b/contrib/ntp/ntpd/ntp_config.c
deleted file mode 100644
index f1428b1..0000000
--- a/contrib/ntp/ntpd/ntp_config.c
+++ /dev/null
@@ -1,2371 +0,0 @@
-/*
- * ntp_config.c - read and apply configuration information
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_NETINFO
-# include <netinfo/ni.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_filegen.h"
-#include "ntp_stdlib.h"
-#include "ntp_config.h"
-#include "ntp_cmdargs.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#include <signal.h>
-#ifndef SIGCHLD
-# define SIGCHLD SIGCLD
-#endif
-#if !defined(VMS)
-# ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-# endif
-#endif /* VMS */
-
-#ifdef SYS_WINNT
-# include <io.h>
-extern HANDLE ResolverThreadHandle;
-#endif /* SYS_WINNT */
-
-#include <netdb.h>
-
-extern int priority_done;
-
-/*
- * These routines are used to read the configuration file at
- * startup time. An entry in the file must fit on a single line.
- * Entries are processed as multiple tokens separated by white space
- * Lines are considered terminated when a '#' is encountered. Blank
- * lines are ignored.
- */
-/*
- * Translation table - keywords to function index
- */
-struct keyword {
- const char *text;
- int keytype;
-};
-
-/*
- * Command keywords
- */
-static struct keyword keywords[] = {
- { "automax", CONFIG_AUTOMAX },
- { "broadcast", CONFIG_BROADCAST },
- { "broadcastclient", CONFIG_BROADCASTCLIENT },
- { "broadcastdelay", CONFIG_BDELAY },
- { "calldelay", CONFIG_CDELAY},
-#ifdef OPENSSL
- { "crypto", CONFIG_CRYPTO },
-#endif /* OPENSSL */
- { "controlkey", CONFIG_CONTROLKEY },
- { "disable", CONFIG_DISABLE },
- { "driftfile", CONFIG_DRIFTFILE },
- { "enable", CONFIG_ENABLE },
- { "filegen", CONFIG_FILEGEN },
- { "fudge", CONFIG_FUDGE },
- { "includefile", CONFIG_INCLUDEFILE },
- { "keys", CONFIG_KEYS },
- { "keysdir", CONFIG_KEYSDIR },
- { "logconfig", CONFIG_LOGCONFIG },
- { "logfile", CONFIG_LOGFILE },
- { "manycastclient", CONFIG_MANYCASTCLIENT },
- { "manycastserver", CONFIG_MANYCASTSERVER },
- { "multicastclient", CONFIG_MULTICASTCLIENT },
- { "peer", CONFIG_PEER },
- { "phone", CONFIG_PHONE },
- { "pidfile", CONFIG_PIDFILE },
- { "discard", CONFIG_DISCARD },
- { "requestkey", CONFIG_REQUESTKEY },
- { "restrict", CONFIG_RESTRICT },
- { "revoke", CONFIG_REVOKE },
- { "server", CONFIG_SERVER },
- { "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 }
-};
-
-/*
- * "peer", "server", "broadcast" modifier keywords
- */
-static struct keyword mod_keywords[] = {
- { "autokey", CONF_MOD_SKEY },
- { "burst", CONF_MOD_BURST },
- { "iburst", CONF_MOD_IBURST },
- { "key", CONF_MOD_KEY },
- { "maxpoll", CONF_MOD_MAXPOLL },
- { "minpoll", CONF_MOD_MINPOLL },
- { "mode", CONF_MOD_MODE }, /* refclocks */
- { "noselect", CONF_MOD_NOSELECT },
- { "prefer", CONF_MOD_PREFER },
- { "ttl", CONF_MOD_TTL }, /* NTP peers */
- { "version", CONF_MOD_VERSION },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "restrict" modifier keywords
- */
-static struct keyword res_keywords[] = {
- { "ignore", CONF_RES_IGNORE },
- { "limited", CONF_RES_LIMITED },
- { "kod", CONF_RES_DEMOBILIZE },
- { "lowpriotrap", CONF_RES_LPTRAP },
- { "mask", CONF_RES_MASK },
- { "nomodify", CONF_RES_NOMODIFY },
- { "nopeer", CONF_RES_NOPEER },
- { "noquery", CONF_RES_NOQUERY },
- { "noserve", CONF_RES_NOSERVE },
- { "notrap", CONF_RES_NOTRAP },
- { "notrust", CONF_RES_NOTRUST },
- { "ntpport", CONF_RES_NTPPORT },
- { "version", CONF_RES_VERSION },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "trap" modifier keywords
- */
-static struct keyword trap_keywords[] = {
- { "port", CONF_TRAP_PORT },
- { "interface", CONF_TRAP_INTERFACE },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "fudge" modifier keywords
- */
-static struct keyword fudge_keywords[] = {
- { "flag1", CONF_FDG_FLAG1 },
- { "flag2", CONF_FDG_FLAG2 },
- { "flag3", CONF_FDG_FLAG3 },
- { "flag4", CONF_FDG_FLAG4 },
- { "refid", CONF_FDG_REFID },
- { "stratum", CONF_FDG_STRATUM },
- { "time1", CONF_FDG_TIME1 },
- { "time2", CONF_FDG_TIME2 },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "filegen" modifier keywords
- */
-static struct keyword filegen_keywords[] = {
- { "disable", CONF_FGEN_FLAG_DISABLE },
- { "enable", CONF_FGEN_FLAG_ENABLE },
- { "file", CONF_FGEN_FILE },
- { "link", CONF_FGEN_FLAG_LINK },
- { "nolink", CONF_FGEN_FLAG_NOLINK },
- { "type", CONF_FGEN_TYPE },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "type" modifier keywords
- */
-static struct keyword fgen_types[] = {
- { "age", FILEGEN_AGE },
- { "day", FILEGEN_DAY },
- { "month", FILEGEN_MONTH },
- { "none", FILEGEN_NONE },
- { "pid", FILEGEN_PID },
- { "week", FILEGEN_WEEK },
- { "year", FILEGEN_YEAR },
- { "", CONFIG_UNKNOWN}
-};
-
-/*
- * "enable", "disable" modifier keywords
- */
-static struct keyword flags_keywords[] = {
- { "auth", PROTO_AUTHENTICATE },
- { "bclient", PROTO_BROADCLIENT },
- { "calibrate", PROTO_CAL },
- { "kernel", PROTO_KERNEL },
- { "monitor", PROTO_MONITOR },
- { "ntp", PROTO_NTP },
- { "pps", PROTO_PPS },
- { "stats", PROTO_FILEGEN },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "discard" modifier keywords
- */
-static struct keyword discard_keywords[] = {
- { "average", CONF_DISCARD_AVERAGE },
- { "minimum", CONF_DISCARD_MINIMUM },
- { "monitor", CONF_DISCARD_MONITOR },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "tinker" modifier keywords
- */
-static struct keyword tinker_keywords[] = {
- { "step", CONF_CLOCK_MAX },
- { "panic", CONF_CLOCK_PANIC },
- { "dispersion", CONF_CLOCK_PHI },
- { "stepout", CONF_CLOCK_MINSTEP },
- { "allan", CONF_CLOCK_ALLAN },
- { "huffpuff", CONF_CLOCK_HUFFPUFF },
- { "freq", CONF_CLOCK_FREQ },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "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[] = {
- { "cert", CONF_CRYPTO_CERT },
- { "gqpar", CONF_CRYPTO_GQPAR },
- { "host", CONF_CRYPTO_RSA },
- { "iffpar", CONF_CRYPTO_IFFPAR },
- { "leap", CONF_CRYPTO_LEAP },
- { "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 }
-};
-
-/*
- * "logconfig" building blocks
- */
-struct masks {
- const char *name;
- unsigned long mask;
-};
-
-static struct masks logcfg_class[] = {
- { "clock", NLOG_OCLOCK },
- { "peer", NLOG_OPEER },
- { "sync", NLOG_OSYNC },
- { "sys", NLOG_OSYS },
- { (char *)0, 0 }
-};
-
-static struct masks logcfg_item[] = {
- { "info", NLOG_INFO },
- { "allinfo", NLOG_SYSINFO|NLOG_PEERINFO|NLOG_CLOCKINFO|NLOG_SYNCINFO },
- { "events", NLOG_EVENT },
- { "allevents", NLOG_SYSEVENT|NLOG_PEEREVENT|NLOG_CLOCKEVENT|NLOG_SYNCEVENT },
- { "status", NLOG_STATUS },
- { "allstatus", NLOG_SYSSTATUS|NLOG_PEERSTATUS|NLOG_CLOCKSTATUS|NLOG_SYNCSTATUS },
- { "statistics", NLOG_STATIST },
- { "allstatistics", NLOG_SYSSTATIST|NLOG_PEERSTATIST|NLOG_CLOCKSTATIST|NLOG_SYNCSTATIST },
- { "allclock", (NLOG_INFO|NLOG_STATIST|NLOG_EVENT|NLOG_STATUS)<<NLOG_OCLOCK },
- { "allpeer", (NLOG_INFO|NLOG_STATIST|NLOG_EVENT|NLOG_STATUS)<<NLOG_OPEER },
- { "allsys", (NLOG_INFO|NLOG_STATIST|NLOG_EVENT|NLOG_STATUS)<<NLOG_OSYS },
- { "allsync", (NLOG_INFO|NLOG_STATIST|NLOG_EVENT|NLOG_STATUS)<<NLOG_OSYNC },
- { "all", NLOG_SYSMASK|NLOG_PEERMASK|NLOG_CLOCKMASK|NLOG_SYNCMASK },
- { (char *)0, 0 }
-};
-
-/*
- * Limits on things
- */
-#define MAXTOKENS 20 /* 20 tokens on line */
-#define MAXLINE 1024 /* maximum length of line */
-#define MAXPHONE 5 /* maximum number of phone strings */
-#define MAXPPS 20 /* maximum length of PPS device string */
-#define MAXINCLUDELEVEL 5 /* maximum include file levels */
-
-/*
- * Miscellaneous macros
- */
-#define STRSAME(s1, s2) (*(s1) == *(s2) && strcmp((s1), (s2)) == 0)
-#define ISEOL(c) ((c) == '#' || (c) == '\n' || (c) == '\0')
-#define ISSPACE(c) ((c) == ' ' || (c) == '\t')
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-#define KEY_TYPE_MD5 4
-
-/*
- * 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 */
-#define RES_TEMPFILE "/tmp/ntpXXXXXX"
-#else
-static char res_file[MAX_PATH];
-#endif /* SYS_WINNT */
-
-/*
- * Definitions of things either imported from or exported to outside
- */
-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 */
-#if defined(HAVE_SCHED_SETSCHEDULER)
-int config_priority_override = 0;
-int config_priority;
-#endif
-
-const char *config_file;
-#ifdef HAVE_NETINFO
- struct netinfo_config_state *config_netinfo = NULL;
- int check_netinfo = 1;
-#endif /* HAVE_NETINFO */
-#ifdef SYS_WINNT
- char *alt_config_file;
- LPTSTR temp;
- char config_file_storage[MAX_PATH];
- char alt_config_file_storage[MAX_PATH];
-#endif /* SYS_WINNT */
-
-#ifdef HAVE_NETINFO
-/*
- * NetInfo configuration state
- */
-struct netinfo_config_state {
- void *domain; /* domain with config */
- ni_id config_dir; /* ID config dir */
- int prop_index; /* current property */
- int val_index; /* current value */
- char **val_list; /* value list */
-};
-#endif
-
-/*
- * Function prototypes
- */
-static unsigned long get_pfxmatch P((char **, struct masks *));
-static unsigned long get_match P((char *, struct masks *));
-static unsigned long get_logmask P((char *));
-#ifdef HAVE_NETINFO
-static struct netinfo_config_state *get_netinfo_config P((void));
-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 *, 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) && !defined(SYS_WINNT)
-static RETSIGTYPE catchchild P((int));
-#endif /* VMS */
-
-/*
- * get_pfxmatch - find value for prefixmatch
- * and update char * accordingly
- */
-static unsigned long
-get_pfxmatch(
- char ** s,
- struct masks *m
- )
-{
- while (m->name) {
- if (strncmp(*s, m->name, strlen(m->name)) == 0) {
- *s += strlen(m->name);
- return m->mask;
- } else {
- m++;
- }
- }
- return 0;
-}
-
-/*
- * get_match - find logmask value
- */
-static unsigned long
-get_match(
- char *s,
- struct masks *m
- )
-{
- while (m->name) {
- if (strcmp(s, m->name) == 0) {
- return m->mask;
- } else {
- m++;
- }
- }
- return 0;
-}
-
-/*
- * get_logmask - build bitmask for ntp_syslogmask
- */
-static unsigned long
-get_logmask(
- char *s
- )
-{
- char *t;
- unsigned long offset;
- unsigned long mask;
-
- t = s;
- offset = get_pfxmatch(&t, logcfg_class);
- mask = get_match(t, logcfg_item);
-
- if (mask)
- return mask << offset;
- else
- msyslog(LOG_ERR, "logconfig: illegal argument %s - ignored", s);
-
- return 0;
-}
-
-
-/*
- * getconfig - get command line options and read the configuration file
- */
-void
-getconfig(
- int argc,
- char *argv[]
- )
-{
- register int i;
- int c;
- int errflg;
- int istart;
- int peerversion;
- int minpoll;
- int maxpoll;
- int ttl;
- long stratum;
- unsigned long ul;
- keyid_t peerkey;
- u_char *peerkeystr;
- u_long fudgeflag;
- u_int peerflags;
- int hmode;
- 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 = 0;
- int tok = CONFIG_UNKNOWN;
- struct interface *localaddr;
- struct refclockstat clock_stat;
- FILEGEN *filegen;
-
- /*
- * Initialize, initialize
- */
- errflg = 0;
- /* HMS: don't initialize debug to 0 here! */
-#ifndef SYS_WINNT
- config_file = CONFIG_FILE;
-#else
- temp = CONFIG_FILE;
- if (!ExpandEnvironmentStrings((LPCTSTR)temp, (LPTSTR)config_file_storage, (DWORD)sizeof(config_file_storage))) {
- msyslog(LOG_ERR, "ExpandEnvironmentStrings CONFIG_FILE failed: %m\n");
- exit(1);
- }
- config_file = config_file_storage;
-
- temp = ALT_CONFIG_FILE;
- if (!ExpandEnvironmentStrings((LPCTSTR)temp, (LPTSTR)alt_config_file_storage, (DWORD)sizeof(alt_config_file_storage))) {
- msyslog(LOG_ERR, "ExpandEnvironmentStrings ALT_CONFIG_FILE failed: %m\n");
- exit(1);
- }
- alt_config_file = alt_config_file_storage;
-
-#endif /* SYS_WINNT */
- progname = argv[0];
- res_fp = NULL;
- memset((char *)sys_phone, 0, sizeof(sys_phone));
- ntp_syslogmask = NLOG_SYNCMASK; /* set more via logconfig */
-
- /*
- * install a non default variable with this daemon version
- */
- (void) sprintf(line, "daemon_version=\"%s\"", Version);
- set_sys_var(line, strlen(line)+1, RO);
-
- /*
- * Say how we're setting the time of day
- */
- (void) sprintf(line, "settimeofday=\"%s\"", set_tod_using);
- set_sys_var(line, strlen(line)+1, RO);
-
- /*
- * Initialize the loop.
- */
- loop_config(LOOP_DRIFTINIT, 0.);
-
- getCmdOpts(argc, argv);
-
- if (
- (fp[0] = fopen(FindConfig(config_file), "r")) == NULL
-#ifdef HAVE_NETINFO
- /* If there is no config_file, try NetInfo. */
- && check_netinfo && !(config_netinfo = get_netinfo_config())
-#endif /* HAVE_NETINFO */
- ) {
- fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig(config_file));
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(config_file));
-#ifdef SYS_WINNT
- /* Under WinNT try alternate_config_file name, first NTP.CONF, then NTP.INI */
-
- if ((fp[0] = fopen(FindConfig(alt_config_file), "r")) == NULL) {
-
- /*
- * Broadcast clients can sometimes run without
- * a configuration file.
- */
-
- fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig(alt_config_file));
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(alt_config_file));
- return;
- }
-#else /* not SYS_WINNT */
- return;
-#endif /* not SYS_WINNT */
- }
-
- for (;;) {
- if (fp[includelevel])
- tok = gettokens(fp[includelevel], line, tokens, &ntokens);
-#ifdef HAVE_NETINFO
- else
- tok = gettokens_netinfo(config_netinfo, tokens, &ntokens);
-#endif /* HAVE_NETINFO */
-
- if (tok == CONFIG_UNKNOWN) {
- if (includelevel > 0) {
- fclose(fp[includelevel--]);
- continue;
- } else {
- break;
- }
- }
-
- switch(tok) {
- case CONFIG_PEER:
- case CONFIG_SERVER:
- case CONFIG_MANYCASTCLIENT:
- case CONFIG_BROADCAST:
- if (tok == CONFIG_PEER)
- hmode = MODE_ACTIVE;
- else if (tok == CONFIG_SERVER)
- hmode = MODE_CLIENT;
- else if (tok == CONFIG_MANYCASTCLIENT)
- hmode = MODE_CLIENT;
- else
- hmode = MODE_BROADCAST;
-
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "No address for %s, line ignored",
- tokens[0]);
- 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;
- }
-
- if (!getnetnum(tokens[istart], &peeraddr, 0)) {
- errflg = -1;
- } else {
- errflg = 0;
-
- if (
-#ifdef REFCLOCK
- !ISREFCLOCKADR(&peeraddr) &&
-#endif
- ISBADADR(&peeraddr)) {
- msyslog(LOG_ERR,
- "attempt to configure invalid address %s",
- stoa(&peeraddr));
- break;
- }
- /*
- * Shouldn't be able to specify multicast
- * address for server/peer!
- * and unicast address for manycastclient!
- */
- if (peeraddr.ss_family == AF_INET) {
- if (((tok == CONFIG_SERVER) ||
- (tok == CONFIG_PEER)) &&
-#ifdef REFCLOCK
- !ISREFCLOCKADR(&peeraddr) &&
-#endif
- 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;
- }
- }
- 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;
- }
- }
- }
-
- peerversion = NTP_VERSION;
- minpoll = NTP_MINDPOLL;
- maxpoll = NTP_MAXDPOLL;
- peerkey = 0;
- peerkeystr = (u_char *)"*";
- peerflags = 0;
- ttl = 0;
- 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,
- "peer/server version requires an argument");
- errflg = 1;
- break;
- }
- peerversion = atoi(tokens[++i]);
- if ((u_char)peerversion > NTP_VERSION
- || (u_char)peerversion < NTP_OLDVERSION) {
- msyslog(LOG_ERR,
- "inappropriate version number %s, line ignored",
- tokens[i]);
- errflg = 1;
- }
- break;
-
- case CONF_MOD_KEY:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "key: argument required");
- errflg = 1;
- break;
- }
- peerkey = (int)atol(tokens[++i]);
- peerflags |= FLAG_AUTHENABLE;
- break;
-
- case CONF_MOD_MINPOLL:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "minpoll: argument required");
- errflg = 1;
- break;
- }
- minpoll = atoi(tokens[++i]);
- if (minpoll < NTP_MINPOLL) {
- msyslog(LOG_INFO,
- "minpoll: provided value (%d) is below minimum (%d)",
- minpoll, NTP_MINPOLL);
- minpoll = NTP_MINPOLL;
- }
- break;
-
- case CONF_MOD_MAXPOLL:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "maxpoll: argument required"
- );
- errflg = 1;
- break;
- }
- maxpoll = atoi(tokens[++i]);
- if (maxpoll > NTP_MAXPOLL) {
- msyslog(LOG_INFO,
- "maxpoll: provided value (%d) is above maximum (%d)",
- maxpoll, NTP_MAXPOLL);
- maxpoll = NTP_MAXPOLL;
- }
- break;
-
- case CONF_MOD_PREFER:
- peerflags |= FLAG_PREFER;
- break;
-
- case CONF_MOD_NOSELECT:
- peerflags |= FLAG_NOSELECT;
- break;
-
- case CONF_MOD_BURST:
- peerflags |= FLAG_BURST;
- break;
-
- case CONF_MOD_IBURST:
- peerflags |= FLAG_IBURST;
- break;
-#ifdef OPENSSL
- case CONF_MOD_SKEY:
- peerflags |= FLAG_SKEY |
- FLAG_AUTHENABLE;
- break;
-#endif /* OPENSSL */
-
- case CONF_MOD_TTL:
- if (i >= ntokens-1) {
- 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;
- }
- ttl = atoi(tokens[++i]);
- break;
-
- case CONFIG_UNKNOWN:
- errflg = 1;
- break;
- }
- if (minpoll > maxpoll) {
- msyslog(LOG_ERR,
- "config error: minpoll > maxpoll");
- errflg = 1;
- }
- if (errflg == 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",
- stoa(&peeraddr));
- }
- if (tok == CONFIG_MANYCASTCLIENT)
- proto_config(PROTO_MULTICAST_ADD,
- 0, 0., &peeraddr);
-
- } else if (errflg == -1) {
- save_resolve(tokens[1], hmode, peerversion,
- minpoll, maxpoll, peerflags, ttl,
- peerkey, peerkeystr);
- }
- break;
-
- case CONFIG_DRIFTFILE:
- if (ntokens >= 2)
- stats_config(STATS_FREQ_FILE, tokens[1]);
- else
- stats_config(STATS_FREQ_FILE, (char *)0);
- break;
-
- case CONFIG_PIDFILE:
- if (ntokens >= 2)
- stats_config(STATS_PID_FILE, tokens[1]);
- else
- stats_config(STATS_PID_FILE, (char *)0);
- break;
-
- case CONFIG_INCLUDEFILE:
- if (ntokens < 2) {
- msyslog(LOG_ERR, "includefile needs one argument");
- break;
- }
- if (includelevel >= MAXINCLUDELEVEL) {
- fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
- msyslog(LOG_INFO, "getconfig: Maximum include file level exceeded.");
- break;
- }
- includefile = fopen(FindConfig(tokens[1]), "r");
- if (includefile == NULL) {
- fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig(tokens[1]));
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(tokens[1]));
- break;
- }
- fp[++includelevel] = includefile;
- break;
-
- case CONFIG_LOGFILE:
- if (ntokens >= 2) {
- FILE *new_file;
-
- new_file = fopen(tokens[1], "a");
- if (new_file != NULL) {
- NLOG(NLOG_SYSINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "logging to file %s", tokens[1]);
- if (syslog_file != NULL &&
- fileno(syslog_file) != fileno(new_file))
- (void)fclose(syslog_file);
-
- syslog_file = new_file;
- syslogit = 0;
- }
- else
- msyslog(LOG_ERR,
- "Cannot open log file %s",
- tokens[1]);
- }
- else
- msyslog(LOG_ERR, "logfile needs one argument");
- break;
-
- case CONFIG_LOGCONFIG:
- for (i = 1; i < ntokens; i++)
- {
- int add = 1;
- int equals = 0;
- char * s = &tokens[i][0];
-
- switch (*s) {
- case '+':
- case '-':
- case '=':
- add = *s == '+';
- equals = *s == '=';
- s++;
- break;
-
- default:
- break;
- }
- if (equals) {
- ntp_syslogmask = get_logmask(s);
- } else {
- if (add) {
- ntp_syslogmask |= get_logmask(s);
- } else {
- ntp_syslogmask &= ~get_logmask(s);
- }
- }
-#ifdef DEBUG
- if (debug)
- printf("ntp_syslogmask = 0x%08lx (%s)\n", ntp_syslogmask, tokens[i]);
-#endif
- }
- break;
-
- case CONFIG_BROADCASTCLIENT:
- proto_config(PROTO_BROADCLIENT, 1, 0., NULL);
- break;
-
- case CONFIG_MULTICASTCLIENT:
- case CONFIG_MANYCASTSERVER:
- if (ntokens > 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;
- }
- /*
- * 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,
- 0, 0., &peeraddr);
- }
- } else
- proto_config(PROTO_MULTICAST_ADD,
- 0, 0., NULL);
- if (tok == CONFIG_MULTICASTCLIENT)
- sys_bclient = 1;
- else if (tok == CONFIG_MANYCASTSERVER)
- sys_manycastserver = 1;
- break;
-
- case CONFIG_KEYS:
- if (ntokens >= 2) {
- getauthkeys(tokens[1]);
- }
- break;
-
- 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:
- for (i = 1; i < ntokens; i++) {
- int temp;
- double ftemp;
-
- temp = matchkey(tokens[i++], tinker_keywords, 1);
- if (i > ntokens - 1) {
- msyslog(LOG_ERR,
- "tinker: missing argument");
- errflg++;
- break;
- }
- sscanf(tokens[i], "%lf", &ftemp);
- switch(temp) {
-
- case CONF_CLOCK_MAX:
- loop_config(LOOP_MAX, ftemp);
- break;
-
- case CONF_CLOCK_PANIC:
- loop_config(LOOP_PANIC, ftemp);
- break;
-
- case CONF_CLOCK_PHI:
- loop_config(LOOP_PHI, ftemp);
- break;
-
- case CONF_CLOCK_MINSTEP:
- loop_config(LOOP_MINSTEP, ftemp);
- break;
-
- case CONF_CLOCK_ALLAN:
- loop_config(LOOP_ALLAN, ftemp);
- break;
-
- case CONF_CLOCK_HUFFPUFF:
- loop_config(LOOP_HUFFPUFF, ftemp);
- break;
-
- case CONF_CLOCK_FREQ:
- loop_config(LOOP_FREQ, ftemp);
- break;
- }
- }
- break;
-
- 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 = (u_char) max(atoi(tokens[1]), KEY_REVOKE);
- break;
-
- case CONFIG_AUTOMAX:
- if (ntokens >= 2)
- sys_automax = 1 << max(atoi(tokens[1]), 10);
- break;
-
- case CONFIG_CRYPTO:
- if (ntokens == 1) {
- crypto_config(CRYPTO_CONF_NONE, NULL);
- break;
- }
- for (i = 1; i < ntokens; i++) {
- int temp;
-
- temp = matchkey(tokens[i++],
- crypto_keywords, 1);
- if (i > ntokens - 1) {
- msyslog(LOG_ERR,
- "crypto: missing argument");
- errflg++;
- break;
- }
- switch(temp) {
-
- case CONF_CRYPTO_CERT:
- crypto_config(CRYPTO_CONF_CERT,
- tokens[i]);
- break;
-
- case CONF_CRYPTO_RSA:
- crypto_config(CRYPTO_CONF_PRIV,
- tokens[i]);
- break;
-
- case CONF_CRYPTO_IFFPAR:
- crypto_config(CRYPTO_CONF_IFFPAR,
- tokens[i]);
- break;
-
- case CONF_CRYPTO_GQPAR:
- crypto_config(CRYPTO_CONF_GQPAR,
- tokens[i]);
- break;
-
- case CONF_CRYPTO_MVPAR:
- crypto_config(CRYPTO_CONF_MVPAR,
- tokens[i]);
- break;
-
- 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");
- break;
- }
- }
- break;
-#endif /* OPENSSL */
-
- case CONFIG_RESTRICT:
- if (ntokens < 2) {
- msyslog(LOG_ERR, "restrict requires an address");
- 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.
- */
- peerversion = 0;
- peerkey = 0;
- errflg = 0;
- 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,
- "mask keyword needs argument");
- errflg++;
- break;
- }
- i++;
- if (!getnetnum(tokens[i], &maskaddr, 1))
- errflg++;
- break;
-
- case CONF_RES_IGNORE:
- peerversion |= RES_IGNORE;
- break;
-
- case CONF_RES_NOSERVE:
- peerversion |= RES_DONTSERVE;
- break;
-
- case CONF_RES_NOTRUST:
- peerversion |= RES_DONTTRUST;
- break;
-
- case CONF_RES_NOQUERY:
- peerversion |= RES_NOQUERY;
- break;
-
- case CONF_RES_NOMODIFY:
- peerversion |= RES_NOMODIFY;
- break;
-
- case CONF_RES_NOPEER:
- peerversion |= RES_NOPEER;
- break;
-
- case CONF_RES_NOTRAP:
- peerversion |= RES_NOTRAP;
- break;
-
- case CONF_RES_LPTRAP:
- peerversion |= RES_LPTRAP;
- break;
-
- case CONF_RES_NTPPORT:
- peerkey |= RESM_NTPONLY;
- break;
-
- case CONF_RES_VERSION:
- peerversion |= RES_VERSION;
- break;
-
- case CONF_RES_DEMOBILIZE:
- peerversion |= RES_DEMOBILIZE;
- break;
-
- case CONF_RES_LIMITED:
- peerversion |= RES_LIMITED;
- break;
-
- case CONFIG_UNKNOWN:
- errflg++;
- break;
- }
- }
- if (SOCKNUL(&peeraddr))
- ANYSOCK(&maskaddr);
- if (!errflg)
- hack_restrict(RESTRICT_FLAGS, &peeraddr, &maskaddr,
- (int)peerkey, peerversion);
- break;
-
- case CONFIG_BDELAY:
- if (ntokens >= 2) {
- double tmp;
-
- if (sscanf(tokens[1], "%lf", &tmp) != 1) {
- msyslog(LOG_ERR,
- "broadcastdelay value %s undecodable",
- tokens[1]);
- } else {
- 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;
-
- tkey = atol(tokens[i]);
- if (tkey == 0) {
- msyslog(LOG_ERR,
- "trusted key %s unlikely",
- tokens[i]);
- } else {
- authtrust(tkey, 1);
- }
- }
- break;
-
- case CONFIG_REQUESTKEY:
- if (ntokens >= 2) {
- if (!atouint(tokens[1], &ul)) {
- msyslog(LOG_ERR,
- "%s is undecodable as request key",
- tokens[1]);
- } else if (ul == 0) {
- msyslog(LOG_ERR,
- "%s makes a poor request keyid",
- tokens[1]);
- } else {
-#ifdef DEBUG
- if (debug > 3)
- printf(
- "set info_auth_key to %08lx\n", ul);
-#endif
- info_auth_keyid = (keyid_t)ul;
- }
- }
- break;
-
- case CONFIG_CONTROLKEY:
- if (ntokens >= 2) {
- keyid_t ckey;
-
- ckey = atol(tokens[1]);
- if (ckey == 0) {
- msyslog(LOG_ERR,
- "%s makes a poor control keyid",
- tokens[1]);
- } else {
- ctl_auth_keyid = ckey;
- }
- }
- break;
-
- case CONFIG_TRAP:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "no address for trap command, line ignored");
- 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;
- }
-
- if (!getnetnum(tokens[istart], &peeraddr, 1))
- break;
-
- /*
- * Use peerversion for port number. Barf.
- */
- errflg = 0;
- peerversion = 0;
- localaddr = 0;
- 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,
- "trap port requires an argument");
- errflg = 1;
- break;
- }
- peerversion = atoi(tokens[++i]);
- if (peerversion <= 0
- || peerversion > 32767) {
- msyslog(LOG_ERR,
- "invalid port number %s, trap ignored",
- tokens[i]);
- errflg = 1;
- }
- break;
-
- case CONF_TRAP_INTERFACE:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "trap interface requires an argument");
- errflg = 1;
- break;
- }
-
- memset((char *)&maskaddr, 0,
- sizeof(maskaddr));
- maskaddr.ss_family = peeraddr.ss_family;
- if (!getnetnum(tokens[++i],
- &maskaddr, 1)) {
- errflg = 1;
- break;
- }
-
- localaddr = findinterface(&maskaddr);
- if (localaddr == NULL) {
- msyslog(LOG_ERR,
- "can't find interface with address %s",
- stoa(&maskaddr));
- errflg = 1;
- }
- break;
-
- case CONFIG_UNKNOWN:
- errflg++;
- break;
- }
-
- if (!errflg) {
- if (peerversion != 0)
- ((struct sockaddr_in6*)&peeraddr)->sin6_port = htons( (u_short) peerversion);
- else
- ((struct sockaddr_in6*)&peeraddr)->sin6_port = htons(TRAPPORT);
- if (localaddr == NULL)
- localaddr = ANY_INTERFACE_CHOOSE(&peeraddr);
- if (!ctlsettrap(&peeraddr, localaddr, 0,
- NTP_VERSION))
- msyslog(LOG_ERR,
- "can't set trap for %s, no resources",
- stoa(&peeraddr));
- }
- break;
-
- case CONFIG_FUDGE:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "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",
- stoa(&peeraddr));
- break;
- }
-
- memset((void *)&clock_stat, 0, sizeof clock_stat);
- fudgeflag = 0;
- errflg = 0;
- for (i = 2; i < ntokens-1; i++) {
- switch (c = matchkey(tokens[i],
- 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",
- stoa(&peeraddr));
- errflg = i;
- break;
- }
- clock_stat.haveflags |= CLK_HAVETIME1;
- break;
-
- case CONF_FDG_TIME2:
- if (sscanf(tokens[++i], "%lf",
- &clock_stat.fudgetime2) != 1) {
- msyslog(LOG_ERR,
- "fudge %s time2 value in error",
- stoa(&peeraddr));
- errflg = i;
- break;
- }
- clock_stat.haveflags |= CLK_HAVETIME2;
- break;
-
-
- case CONF_FDG_STRATUM:
- if (!atoint(tokens[++i], &stratum))
- {
- msyslog(LOG_ERR,
- "fudge %s stratum value in error",
- stoa(&peeraddr));
- errflg = i;
- break;
- }
- clock_stat.fudgeval1 = stratum;
- clock_stat.haveflags |= CLK_HAVEVAL1;
- break;
-
- case CONF_FDG_REFID:
- /* HMS: Endianness and 0 bytes? */
- /* XXX */
- strncpy((char *)&clock_stat.fudgeval2,
- tokens[++i], 4);
- clock_stat.haveflags |= CLK_HAVEVAL2;
- break;
-
- case CONF_FDG_FLAG1:
- case CONF_FDG_FLAG2:
- case CONF_FDG_FLAG3:
- case CONF_FDG_FLAG4:
- if (!atouint(tokens[++i], &fudgeflag)
- || fudgeflag > 1) {
- msyslog(LOG_ERR,
- "fudge %s flag value in error",
- stoa(&peeraddr));
- errflg = i;
- break;
- }
- switch(c) {
- case CONF_FDG_FLAG1:
- c = CLK_FLAG1;
- clock_stat.haveflags|=CLK_HAVEFLAG1;
- break;
- case CONF_FDG_FLAG2:
- c = CLK_FLAG2;
- clock_stat.haveflags|=CLK_HAVEFLAG2;
- break;
- case CONF_FDG_FLAG3:
- c = CLK_FLAG3;
- clock_stat.haveflags|=CLK_HAVEFLAG3;
- break;
- case CONF_FDG_FLAG4:
- c = CLK_FLAG4;
- clock_stat.haveflags|=CLK_HAVEFLAG4;
- break;
- }
- if (fudgeflag == 0)
- clock_stat.flags &= ~c;
- else
- clock_stat.flags |= c;
- break;
-
- case CONFIG_UNKNOWN:
- errflg = -1;
- break;
- }
- }
-
-#ifdef REFCLOCK
- /*
- * If reference clock support isn't defined the
- * fudge line will still be accepted and syntax
- * checked, but will essentially do nothing.
- */
- if (!errflg) {
- refclock_control(&peeraddr, &clock_stat,
- (struct refclockstat *)0);
- }
-#endif
- break;
-
- case CONFIG_STATSDIR:
- if (ntokens >= 2)
- stats_config(STATS_STATSDIR,tokens[1]);
- break;
-
- case CONFIG_STATISTICS:
- for (i = 1; i < ntokens; i++) {
- filegen = filegen_get(tokens[i]);
-
- if (filegen == NULL) {
- msyslog(LOG_ERR,
- "no statistics named %s available",
- tokens[i]);
- continue;
- }
-#ifdef DEBUG
- if (debug > 3)
- printf("enabling filegen for %s statistics \"%s%s\"\n",
- tokens[i], filegen->prefix, filegen->basename);
-#endif
- filegen->flag |= FGEN_FLAG_ENABLED;
- }
- break;
-
- case CONFIG_FILEGEN:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "no id for filegen command, line ignored");
- break;
- }
-
- filegen = filegen_get(tokens[1]);
- if (filegen == NULL) {
- msyslog(LOG_ERR,
- "unknown filegen \"%s\" ignored",
- tokens[1]);
- break;
- }
- /*
- * peerversion is (ab)used for filegen file (index)
- * peerkey is (ab)used for filegen type
- * peerflags is (ab)used for filegen flags
- */
- peerversion = 0;
- peerkey = filegen->type;
- peerflags = filegen->flag;
- errflg = 0;
-
- for (i = 2; i < ntokens; i++) {
- switch (matchkey(tokens[i],
- filegen_keywords, 1)) {
- case CONF_FGEN_FILE:
- if (i >= ntokens - 1) {
- msyslog(LOG_ERR,
- "filegen %s file requires argument",
- tokens[1]);
- errflg = i;
- break;
- }
- peerversion = ++i;
- break;
- case CONF_FGEN_TYPE:
- if (i >= ntokens -1) {
- msyslog(LOG_ERR,
- "filegen %s type requires argument",
- tokens[1]);
- errflg = i;
- break;
- }
- peerkey = matchkey(tokens[++i],
- fgen_types, 1);
- if (peerkey == CONFIG_UNKNOWN) {
- msyslog(LOG_ERR,
- "filegen %s unknown type \"%s\"",
- tokens[1], tokens[i]);
- errflg = i;
- break;
- }
- break;
-
- case CONF_FGEN_FLAG_LINK:
- peerflags |= FGEN_FLAG_LINK;
- break;
-
- case CONF_FGEN_FLAG_NOLINK:
- peerflags &= ~FGEN_FLAG_LINK;
- break;
-
- case CONF_FGEN_FLAG_ENABLE:
- peerflags |= FGEN_FLAG_ENABLED;
- break;
-
- case CONF_FGEN_FLAG_DISABLE:
- peerflags &= ~FGEN_FLAG_ENABLED;
- break;
- }
- }
- if (!errflg)
- filegen_config(filegen, tokens[peerversion],
- (u_char)peerkey, (u_char)peerflags);
- break;
-
- case CONFIG_SETVAR:
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "no value for setvar command - line ignored");
- } else {
- set_sys_var(tokens[1], strlen(tokens[1])+1,
- (u_short) (RW |
- ((((ntokens > 2)
- && !strcmp(tokens[2],
- "default")))
- ? DEF
- : 0)));
- }
- break;
-
- case CONFIG_ENABLE:
- for (i = 1; i < ntokens; i++) {
- int flag;
-
- flag = matchkey(tokens[i], flags_keywords, 1);
- if (flag == CONFIG_UNKNOWN) {
- msyslog(LOG_ERR,
- "enable unknown flag %s",
- tokens[i]);
- errflg = 1;
- break;
- }
- proto_config(flag, 1, 0., NULL);
- }
- break;
-
- case CONFIG_DISABLE:
- for (i = 1; i < ntokens; i++) {
- int flag;
-
- flag = matchkey(tokens[i], flags_keywords, 1);
- if (flag == CONFIG_UNKNOWN) {
- msyslog(LOG_ERR,
- "disable unknown flag %s",
- tokens[i]);
- errflg = 1;
- break;
- }
- proto_config(flag, 0, 0., NULL);
- }
- break;
-
- case CONFIG_PHONE:
- for (i = 1; i < ntokens && i < MAXPHONE; i++) {
- (void)strncpy(sys_phone[i - 1],
- tokens[i], MAXDIAL);
- }
- sys_phone[i - 1][0] = '\0';
- break;
-
- case CONFIG_ADJ: {
- double ftemp;
-
- sscanf(tokens[1], "%lf", &ftemp);
- proto_config(PROTO_ADJ, 0, ftemp, NULL);
- }
- break;
-
- }
- }
- if (fp[0])
- (void)fclose(fp[0]);
-
-#ifdef HAVE_NETINFO
- if (config_netinfo)
- free_netinfo_config(config_netinfo);
-#endif /* HAVE_NETINFO */
-
-#if !defined(VMS) && !defined(SYS_VXWORKS)
- /* find a keyid */
- if (info_auth_keyid == 0)
- req_keyid = 65535;
- else
- req_keyid = info_auth_keyid;
-
- /* if doesn't exist, make up one at random */
- if (!authhavekey(req_keyid)) {
- char rankey[9];
- int j;
-
- for (i = 0; i < 8; i++)
- for (j = 1; j < 100; ++j) {
- rankey[i] = (char) (RANDOM & 0xff);
- if (rankey[i] != 0) break;
- }
- rankey[8] = 0;
- authusekey(req_keyid, KEY_TYPE_MD5, (u_char *)rankey);
- authtrust(req_keyid, 1);
- if (!authhavekey(req_keyid)) {
- msyslog(LOG_ERR, "getconfig: Couldn't generate a valid random key!");
- /* HMS: Should this be fatal? */
- }
- }
-
- /* save keyid so we will accept config requests with it */
- info_auth_keyid = req_keyid;
-#endif /* !defined(VMS) && !defined(SYS_VXWORKS) */
-
- if (res_fp != NULL) {
- if (call_resolver) {
- /*
- * Need name resolution
- */
- do_resolve_internal();
- }
- }
-}
-
-
-#ifdef HAVE_NETINFO
-
-/*
- * get_netinfo_config - find the nearest NetInfo domain with an ntp
- * configuration and initialize the configuration state.
- */
-static struct netinfo_config_state *
-get_netinfo_config()
-{
- ni_status status;
- void *domain;
- ni_id config_dir;
- struct netinfo_config_state *config;
-
- if (ni_open(NULL, ".", &domain) != NI_OK) return NULL;
-
- while ((status = ni_pathsearch(domain, &config_dir, NETINFO_CONFIG_DIR)) == NI_NODIR) {
- void *next_domain;
- if (ni_open(domain, "..", &next_domain) != NI_OK) {
- ni_free(next_domain);
- break;
- }
- ni_free(domain);
- domain = next_domain;
- }
- if (status != NI_OK) {
- ni_free(domain);
- return NULL;
- }
-
- config = (struct netinfo_config_state *)malloc(sizeof(struct netinfo_config_state));
- config->domain = domain;
- config->config_dir = config_dir;
- config->prop_index = 0;
- config->val_index = 0;
- config->val_list = NULL;
-
- return config;
-}
-
-
-
-/*
- * free_netinfo_config - release NetInfo configuration state
- */
-static void
-free_netinfo_config(struct netinfo_config_state *config)
-{
- ni_free(config->domain);
- free(config);
-}
-
-
-
-/*
- * gettokens_netinfo - return tokens from NetInfo
- */
-static int
-gettokens_netinfo (
- struct netinfo_config_state *config,
- char **tokenlist,
- int *ntokens
- )
-{
- int prop_index = config->prop_index;
- int val_index = config->val_index;
- char **val_list = config->val_list;
-
- /*
- * Iterate through each keyword and look for a property that matches it.
- */
- again:
- if (!val_list) {
- for (; prop_index < (sizeof(keywords)/sizeof(keywords[0])); prop_index++)
- {
- ni_namelist namelist;
- struct keyword current_prop = keywords[prop_index];
-
- /*
- * For each value associated in the property, we're going to return
- * a separate line. We squirrel away the values in the config state
- * so the next time through, we don't need to do this lookup.
- */
- NI_INIT(&namelist);
- if (ni_lookupprop(config->domain, &config->config_dir, current_prop.text, &namelist) == NI_OK) {
- ni_index index;
-
- /* Found the property, but it has no values */
- if (namelist.ni_namelist_len == 0) continue;
-
- if (! (val_list = config->val_list = (char**)malloc(sizeof(char*) * (namelist.ni_namelist_len + 1))))
- { msyslog(LOG_ERR, "out of memory while configuring"); break; }
-
- 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)))
- { msyslog(LOG_ERR, "out of memory while configuring"); break; }
-
- strcpy(val_list[index], value);
- }
- val_list[index] = NULL;
-
- break;
- }
- ni_namelist_free(&namelist);
- }
- config->prop_index = prop_index;
- }
-
- /* No list; we're done here. */
- if (!val_list) return CONFIG_UNKNOWN;
-
- /*
- * We have a list of values for the current property.
- * Iterate through them and return each in order.
- */
- if (val_list[val_index])
- {
- int ntok = 1;
- int quoted = 0;
- char *tokens = val_list[val_index];
-
- msyslog(LOG_INFO, "%s %s", keywords[prop_index].text, val_list[val_index]);
-
- (const char*)tokenlist[0] = keywords[prop_index].text;
- for (ntok = 1; ntok < MAXTOKENS; ntok++) {
- tokenlist[ntok] = tokens;
- while (!ISEOL(*tokens) && (!ISSPACE(*tokens) || quoted))
- quoted ^= (*tokens++ == '"');
-
- if (ISEOL(*tokens)) {
- *tokens = '\0';
- break;
- } else { /* must be space */
- *tokens++ = '\0';
- while (ISSPACE(*tokens)) tokens++;
- if (ISEOL(*tokens)) break;
- }
- }
- *ntokens = ntok + 1;
-
- config->val_index++;
-
- return keywords[prop_index].keytype;
- }
-
- /* We're done with the current property. */
- prop_index = ++config->prop_index;
-
- /* Free val_list and reset counters. */
- for (val_index = 0; val_list[val_index]; val_index++)
- free(val_list[val_index]);
- free(val_list); val_list = config->val_list = NULL; val_index = config->val_index = 0;
-
- goto again;
-}
-
-#endif /* HAVE_NETINFO */
-
-
-/*
- * gettokens - read a line and return tokens
- */
-static int
-gettokens (
- FILE *fp,
- char *line,
- char **tokenlist,
- int *ntokens
- )
-{
- register char *cp;
- register int ntok;
- register int quoted = 0;
-
- /*
- * Find start of first token
- */
- again:
- while ((cp = fgets(line, MAXLINE, fp)) != NULL) {
- cp = line;
- while (ISSPACE(*cp))
- cp++;
- if (!ISEOL(*cp))
- break;
- }
- if (cp == NULL) {
- *ntokens = 0;
- return CONFIG_UNKNOWN; /* hack. Is recognized as EOF */
- }
-
- /*
- * Now separate out the tokens
- */
- for (ntok = 0; ntok < MAXTOKENS; ntok++) {
- tokenlist[ntok] = cp;
- while (!ISEOL(*cp) && (!ISSPACE(*cp) || quoted))
- quoted ^= (*cp++ == '"');
-
- if (ISEOL(*cp)) {
- *cp = '\0';
- break;
- } else { /* must be space */
- *cp++ = '\0';
- while (ISSPACE(*cp))
- cp++;
- if (ISEOL(*cp))
- break;
- }
- }
-
- /*
- * Return the match
- */
- *ntokens = ntok + 1;
- ntok = matchkey(tokenlist[0], keywords, 1);
- if (ntok == CONFIG_UNKNOWN)
- goto again;
- return ntok;
-}
-
-
-
-/*
- * matchkey - match a keyword to a list
- */
-static int
-matchkey(
- register char *word,
- register struct keyword *keys,
- int complain
- )
-{
- for (;;) {
- if (keys->keytype == CONFIG_UNKNOWN) {
- if (complain)
- msyslog(LOG_ERR,
- "configure: keyword \"%s\" unknown, line ignored",
- word);
- return CONFIG_UNKNOWN;
- }
- if (STRSAME(word, keys->text))
- return keys->keytype;
- keys++;
- }
-}
-
-
-/*
- * getnetnum - return a net number (this is crude, but careful)
- */
-static int
-getnetnum(
- const char *num,
- struct sockaddr_storage *addr,
- int complain
- )
-{
- struct addrinfo hints;
- struct addrinfo *ptr;
-
- /* 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;
-
- hints.ai_socktype = SOCK_DGRAM;
-#ifdef DEBUG
- if (debug > 3)
- printf("getaddrinfo %s\n", num);
-#endif
- if (getaddrinfo(num, "ntp", &hints, &ptr)!=0) {
- if (complain)
- msyslog(LOG_ERR,
- "getaddrinfo: \"%s\" invalid host address, line ignored",
- num);
-#ifdef DEBUG
- if (debug > 3)
- printf(
- "getaddrinfo: \"%s\" invalid host address%s.\n",
- num, (complain)
- ? ", line ignored"
- : "");
-#endif
- return 0;
- }
-
- memcpy(addr, ptr->ai_addr, ptr->ai_addrlen);
-#ifdef DEBUG
- if (debug > 1)
- printf("getnetnum given %s, got %s \n",
- num, stoa(addr));
-#endif
- freeaddrinfo(ptr);
- return 1;
-}
-
-
-#if !defined(VMS) && !defined(SYS_WINNT)
-/*
- * catchchild - receive the resolver's exit status
- */
-static RETSIGTYPE
-catchchild(
- int sig
- )
-{
- /*
- * We only start up one child, and if we're here
- * it should have already exited. Hence the following
- * shouldn't hang. If it does, please tell me.
- */
-#if !defined (SYS_WINNT) && !defined(SYS_VXWORKS)
- (void) wait(0);
-#endif /* SYS_WINNT && VXWORKS*/
-}
-#endif /* VMS */
-
-
-/*
- * save_resolve - save configuration info into a file for later name resolution
- */
-static void
-save_resolve(
- char *name,
- int mode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t keyid,
- u_char *keystr
- )
-{
-#ifndef SYS_VXWORKS
- if (res_fp == NULL) {
-#ifndef SYS_WINNT
- (void) strcpy(res_file, RES_TEMPFILE);
-#else
- /* no /tmp directory under NT */
- {
- if(!(GetTempPath((DWORD)MAX_PATH, (LPTSTR)res_file))) {
- msyslog(LOG_ERR, "cannot get pathname for temporary directory: %m");
- return;
- }
- (void) strcat(res_file, "ntpdXXXXXX");
- }
-#endif /* SYS_WINNT */
-#ifdef HAVE_MKSTEMP
- {
- int fd;
-
- res_fp = NULL;
- if ((fd = mkstemp(res_file)) != -1)
- res_fp = fdopen(fd, "r+");
- }
-#else
- (void) mktemp(res_file);
- res_fp = fopen(res_file, "w");
-#endif
- if (res_fp == NULL) {
- msyslog(LOG_ERR, "open failed for %s: %m", res_file);
- return;
- }
- }
-#ifdef DEBUG
- if (debug) {
- printf("resolving %s\n", name);
- }
-#endif
-
- (void)fprintf(res_fp, "%s %d %d %d %d %d %d %u %s\n", name,
- mode, version, minpoll, maxpoll, flags, ttl, keyid, keystr);
-#ifdef DEBUG
- if (debug > 1)
- printf("config: %s %d %d %d %d %x %d %u %s\n", name, mode,
- version, minpoll, maxpoll, flags, ttl, keyid, keystr);
-#endif
-
-#else /* SYS_VXWORKS */
- /* save resolve info to a struct */
-#endif /* SYS_VXWORKS */
-}
-
-
-/*
- * abort_resolve - terminate the resolver stuff and delete the file
- */
-static void
-abort_resolve(void)
-{
- /*
- * In an ideal world we would might reread the file and
- * log the hosts which aren't getting configured. Since
- * this is too much work, however, just close and delete
- * the temp file.
- */
- if (res_fp != NULL)
- (void) fclose(res_fp);
- res_fp = NULL;
-
-#ifndef SYS_VXWORKS /* we don't open the file to begin with */
-#if !defined(VMS)
- (void) unlink(res_file);
-#else
- (void) delete(res_file);
-#endif /* VMS */
-#endif /* SYS_VXWORKS */
-}
-
-
-/*
- * do_resolve_internal - start up the resolver function (not program)
- */
-/*
- * On VMS, this routine will simply refuse to resolve anything.
- *
- * Possible implementation: keep `res_file' in memory, do async
- * name resolution via QIO, update from within completion AST.
- * I'm unlikely to find the time for doing this, though. -wjm
- */
-static void
-do_resolve_internal(void)
-{
- int i;
-
- if (res_fp == NULL) {
- /* belch */
- msyslog(LOG_ERR,
- "do_resolve_internal: Fatal: res_fp == NULL");
- exit(1);
- }
-
- /* we are done with this now */
- (void) fclose(res_fp);
- res_fp = NULL;
-
-#if !defined(VMS) && !defined (SYS_VXWORKS)
- req_file = res_file; /* set up pointer to res file */
-#ifndef SYS_WINNT
- (void) signal_no_reset(SIGCHLD, catchchild);
-
-#ifndef SYS_VXWORKS
- i = fork();
- if (i == 0) {
- /*
- * this used to close everything
- * I don't think this is necessary
- */
- /*
- * To the unknown commenter above:
- * Well, I think it's better to clean up
- * after oneself. I have had problems with
- * refclock-io when intres was running - things
- * where fine again when ntpintres was gone.
- * So some systems react erratic at least.
- *
- * Frank Kardel
- *
- * 94-11-16:
- * Further debugging has proven that the above is
- * absolutely harmful. The internal resolver
- * is still in the SIGIO process group and the lingering
- * async io information causes it to process requests from
- * all file decriptor causing a race between the NTP daemon
- * and the resolver. which then eats data when it wins 8-(.
- * It is absolutly necessary to kill any IO associations
- * shared with the NTP daemon.
- *
- * We also block SIGIO (currently no ports means to
- * disable the signal handle for IO).
- *
- * Thanks to wgstuken@informatik.uni-erlangen.de to notice
- * that it is the ntp-resolver child running into trouble.
- *
- * THUS:
- */
-
- closelog();
- kill_asyncio(0);
-
- (void) signal_no_reset(SIGCHLD, SIG_DFL);
-
-#ifdef DEBUG
- if (0)
- debug = 2;
-#endif
-
-# ifndef LOG_DAEMON
- openlog("ntpd_initres", LOG_PID);
-# else /* LOG_DAEMON */
-
-# ifndef LOG_NTP
-# define LOG_NTP LOG_DAEMON
-# endif
- openlog("ntpd_initres", LOG_PID | LOG_NDELAY, LOG_NTP);
-#ifndef SYS_CYGWIN32
-# ifdef DEBUG
- if (debug)
- setlogmask(LOG_UPTO(LOG_DEBUG));
- else
-# endif /* DEBUG */
- setlogmask(LOG_UPTO(LOG_DEBUG)); /* @@@ was INFO */
-# endif /* LOG_DAEMON */
-#endif
-
- ntp_intres();
-
- /*
- * If we got here, the intres code screwed up.
- * Print something so we don't die without complaint
- */
- msyslog(LOG_ERR, "call to ntp_intres lost");
- abort_resolve();
- exit(1);
- }
-#else
- /* vxWorks spawns a thread... -casey */
- i = sp (ntp_intres);
- /*i = taskSpawn("ntp_intres",100,VX_FP_TASK,20000,ntp_intres);*/
-#endif
- if (i == -1) {
- msyslog(LOG_ERR, "fork() failed, can't start ntp_intres: %m");
- (void) signal_no_reset(SIGCHLD, SIG_DFL);
- abort_resolve();
- }
-#else /* SYS_WINNT */
- {
- /* NT's equivalent of fork() is _spawn(), but the start point
- * of the new process is an executable filename rather than
- * a function name as desired here.
- */
- DWORD dwThreadId;
- fflush(stdout);
- 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 */
- if (ResolverThreadHandle == NULL) {
- msyslog(LOG_ERR, "CreateThread() failed, can't start ntp_intres");
- abort_resolve();
- }
- }
-#endif /* SYS_WINNT */
-#else /* VMS VX_WORKS */
- msyslog(LOG_ERR,
- "Name resolution not implemented for VMS - use numeric addresses");
- abort_resolve();
-#endif /* VMS VX_WORKS */
-}
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
deleted file mode 100644
index 0ac0404..0000000
--- a/contrib/ntp/ntpd/ntp_control.c
+++ /dev/null
@@ -1,2928 +0,0 @@
-/*
- * ntp_control.c - respond to control messages and send async traps
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_control.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Structure to hold request procedure information
- */
-#define NOAUTH 0
-#define AUTH 1
-
-#define NO_REQUEST (-1)
-
-struct ctl_proc {
- short control_code; /* defined request code */
- u_short flags; /* flags word */
- void (*handler) P((struct recvbuf *, int)); /* handle request */
-};
-
-/*
- * Only one flag. Authentication required or not.
- */
-#define NOAUTH 0
-#define AUTH 1
-
-/*
- * 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 *,
- unsigned int));
-static void ctl_putdbl P((const char *, double));
-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, 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));
-static void ctl_putpeer P((int, struct peer *));
-#ifdef REFCLOCK
-static void ctl_putclock P((int, struct refclockstat *, int));
-#endif /* REFCLOCK */
-static struct ctl_var *ctl_getitem P((struct ctl_var *, char **));
-static u_long count_var P((struct ctl_var *));
-static void control_unspec P((struct recvbuf *, int));
-static void read_status P((struct recvbuf *, int));
-static void read_variables P((struct recvbuf *, int));
-static void write_variables P((struct recvbuf *, int));
-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_storage *,
- struct interface *));
-
-static struct ctl_proc control_codes[] = {
- { CTL_OP_UNSPEC, NOAUTH, control_unspec },
- { CTL_OP_READSTAT, NOAUTH, read_status },
- { CTL_OP_READVAR, NOAUTH, read_variables },
- { CTL_OP_WRITEVAR, AUTH, write_variables },
- { CTL_OP_READCLOCK, NOAUTH, read_clock_status },
- { CTL_OP_WRITECLOCK, NOAUTH, write_clock_status },
- { CTL_OP_SETTRAP, NOAUTH, set_trap },
- { CTL_OP_UNSETTRAP, NOAUTH, unset_trap },
- { NO_REQUEST, 0 }
-};
-
-/*
- * System variable values. The array can be indexed by the variable
- * index to find the textual name.
- */
-static struct ctl_var sys_var[] = {
- { 0, PADDING, "" }, /* 0 */
- { CS_LEAP, RW, "leap" }, /* 1 */
- { CS_STRATUM, RO, "stratum" }, /* 2 */
- { CS_PRECISION, RO, "precision" }, /* 3 */
- { CS_ROOTDELAY, RO, "rootdelay" }, /* 4 */
- { CS_ROOTDISPERSION, RO, "rootdispersion" }, /* 5 */
- { CS_REFID, RO, "refid" }, /* 6 */
- { CS_REFTIME, RO, "reftime" }, /* 7 */
- { CS_POLL, RO, "poll" }, /* 8 */
- { CS_PEERID, RO, "peer" }, /* 9 */
- { CS_STATE, RO, "state" }, /* 10 */
- { CS_OFFSET, RO, "offset" }, /* 11 */
- { CS_DRIFT, RO, "frequency" }, /* 12 */
- { CS_JITTER, RO, "jitter" }, /* 13 */
- { CS_CLOCK, RO, "clock" }, /* 14 */
- { CS_PROCESSOR, RO, "processor" }, /* 15 */
- { CS_SYSTEM, RO, "system" }, /* 16 */
- { CS_VERSION, RO, "version" }, /* 17 */
- { CS_STABIL, RO, "stability" }, /* 18 */
- { CS_VARLIST, RO, "sys_var_list" }, /* 19 */
-#ifdef OPENSSL
- { CS_FLAGS, RO, "flags" }, /* 20 */
- { CS_HOST, RO, "hostname" }, /* 21 */
- { 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 */
-};
-
-static struct ctl_var *ext_sys_var = (struct ctl_var *)0;
-
-/*
- * System variables we print by default (in fuzzball order,
- * more-or-less)
- */
-static u_char def_sys_var[] = {
- CS_VERSION,
- CS_PROCESSOR,
- CS_SYSTEM,
- CS_LEAP,
- CS_STRATUM,
- CS_PRECISION,
- CS_ROOTDELAY,
- CS_ROOTDISPERSION,
- CS_PEERID,
- CS_REFID,
- CS_REFTIME,
- CS_POLL,
- CS_CLOCK,
- CS_STATE,
- CS_OFFSET,
- CS_DRIFT,
- CS_JITTER,
- CS_STABIL,
-#ifdef OPENSSL
- CS_HOST,
- CS_DIGEST,
- CS_FLAGS,
- CS_PUBLIC,
- CS_REVTIME,
- CS_LEAPTAB,
- CS_CERTIF,
-#endif /* OPENSSL */
- 0
-};
-
-
-/*
- * Peer variable list
- */
-static struct ctl_var peer_var[] = {
- { 0, PADDING, "" }, /* 0 */
- { CP_CONFIG, RO, "config" }, /* 1 */
- { CP_AUTHENABLE, RO, "authenable" }, /* 2 */
- { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
- { CP_SRCADR, RO, "srcadr" }, /* 4 */
- { CP_SRCPORT, RO, "srcport" }, /* 5 */
- { CP_DSTADR, RO, "dstadr" }, /* 6 */
- { CP_DSTPORT, RO, "dstport" }, /* 7 */
- { CP_LEAP, RO, "leap" }, /* 8 */
- { CP_HMODE, RO, "hmode" }, /* 9 */
- { CP_STRATUM, RO, "stratum" }, /* 10 */
- { CP_PPOLL, RO, "ppoll" }, /* 11 */
- { CP_HPOLL, RO, "hpoll" }, /* 12 */
- { CP_PRECISION, RO, "precision" }, /* 13 */
- { CP_ROOTDELAY, RO, "rootdelay" }, /* 14 */
- { CP_ROOTDISPERSION, RO, "rootdispersion" }, /* 15 */
- { CP_REFID, RO, "refid" }, /* 16 */
- { CP_REFTIME, RO, "reftime" }, /* 17 */
- { CP_ORG, RO, "org" }, /* 18 */
- { CP_REC, RO, "rec" }, /* 19 */
- { CP_XMT, RO, "xmt" }, /* 20 */
- { CP_REACH, RO, "reach" }, /* 21 */
- { CP_VALID, RO, "unreach" }, /* 22 */
- { CP_TIMER, RO, "timer" }, /* 23 */
- { CP_DELAY, RO, "delay" }, /* 24 */
- { CP_OFFSET, RO, "offset" }, /* 25 */
- { CP_JITTER, RO, "jitter" }, /* 26 */
- { CP_DISPERSION, RO, "dispersion" }, /* 27 */
- { CP_KEYID, RO, "keyid" }, /* 28 */
- { CP_FILTDELAY, RO, "filtdelay=" }, /* 29 */
- { CP_FILTOFFSET, RO, "filtoffset=" }, /* 30 */
- { CP_PMODE, RO, "pmode" }, /* 31 */
- { CP_RECEIVED, RO, "received"}, /* 32 */
- { CP_SENT, RO, "sent" }, /* 33 */
- { CP_FILTERROR, RO, "filtdisp=" }, /* 34 */
- { CP_FLASH, RO, "flash" }, /* 35 */
- { CP_TTL, RO, "ttl" }, /* 36 */
- { CP_RANK, RO, "rank" }, /* 37 */
- { CP_VARLIST, RO, "peer_var_list" }, /* 38 */
-#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 */
-};
-
-
-/*
- * Peer variables we print by default
- */
-static u_char def_peer_var[] = {
- CP_SRCADR,
- CP_SRCPORT,
- CP_DSTADR,
- CP_DSTPORT,
- CP_LEAP,
- CP_STRATUM,
- CP_PRECISION,
- CP_ROOTDELAY,
- CP_ROOTDISPERSION,
- CP_REFID,
- CP_REACH,
- CP_VALID,
- CP_HMODE,
- CP_PMODE,
- CP_HPOLL,
- CP_PPOLL,
- CP_FLASH,
- CP_KEYID,
- CP_TTL,
- CP_OFFSET,
- CP_DELAY,
- CP_DISPERSION,
- CP_JITTER,
- CP_REFTIME,
- CP_ORG,
- CP_REC,
- CP_XMT,
- CP_FILTDELAY,
- CP_FILTOFFSET,
- CP_FILTERROR,
-#ifdef OPENSSL
- CP_HOST,
- CP_DIGEST,
- CP_FLAGS,
- CP_IDENT,
- CP_INITSEQ,
-#endif /* OPENSSL */
- 0
-};
-
-
-#ifdef REFCLOCK
-/*
- * Clock variable list
- */
-static struct ctl_var clock_var[] = {
- { 0, PADDING, "" }, /* 0 */
- { CC_TYPE, RO, "type" }, /* 1 */
- { CC_TIMECODE, RO, "timecode" }, /* 2 */
- { CC_POLL, RO, "poll" }, /* 3 */
- { CC_NOREPLY, RO, "noreply" }, /* 4 */
- { CC_BADFORMAT, RO, "badformat" }, /* 5 */
- { CC_BADDATA, RO, "baddata" }, /* 6 */
- { CC_FUDGETIME1, RO, "fudgetime1" }, /* 7 */
- { CC_FUDGETIME2, RO, "fudgetime2" }, /* 8 */
- { CC_FUDGEVAL1, RO, "stratum" }, /* 9 */
- { CC_FUDGEVAL2, RO, "refid" }, /* 10 */
- { CC_FLAGS, RO, "flags" }, /* 11 */
- { CC_DEVICE, RO, "device" }, /* 12 */
- { CC_VARLIST, RO, "clock_var_list" }, /* 13 */
- { 0, EOV, "" } /* 14 */
-};
-
-
-/*
- * Clock variables printed by default
- */
-static u_char def_clock_var[] = {
- CC_DEVICE,
- CC_TYPE, /* won't be output if device = known */
- CC_TIMECODE,
- CC_POLL,
- CC_NOREPLY,
- CC_BADFORMAT,
- CC_BADDATA,
- CC_FUDGETIME1,
- CC_FUDGETIME2,
- CC_FUDGEVAL1,
- CC_FUDGEVAL2,
- CC_FLAGS,
- 0
-};
-#endif
-
-
-/*
- * System and processor definitions.
- */
-#ifndef HAVE_UNAME
-# ifndef STR_SYSTEM
-# define STR_SYSTEM "UNIX"
-# endif
-# ifndef STR_PROCESSOR
-# define STR_PROCESSOR "unknown"
-# endif
-
-static char str_system[] = STR_SYSTEM;
-static char str_processor[] = STR_PROCESSOR;
-#else
-# include <sys/utsname.h>
-static struct utsname utsnamebuf;
-#endif /* HAVE_UNAME */
-
-/*
- * Trap structures. We only allow a few of these, and send a copy of
- * each async message to each live one. Traps time out after an hour, it
- * is up to the trap receipient to keep resetting it to avoid being
- * timed out.
- */
-/* ntp_request.c */
-struct ctl_trap ctl_trap[CTL_MAXTRAPS];
-int num_ctl_traps;
-
-/*
- * Type bits, for ctlsettrap() call.
- */
-#define TRAP_TYPE_CONFIG 0 /* used by configuration code */
-#define TRAP_TYPE_PRIO 1 /* priority trap */
-#define TRAP_TYPE_NONPRIO 2 /* nonpriority trap */
-
-
-/*
- * List relating reference clock types to control message time sources.
- * Index by the reference clock type. This list will only be used iff
- * the reference clock driver doesn't set peer->sstclktype to something
- * different than CTL_SST_TS_UNSPEC.
- */
-static u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
- CTL_SST_TS_LOCAL, /* REFCLK_LOCALCLOCK (1) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_TRAK (2) */
- CTL_SST_TS_HF, /* REFCLK_WWV_PST (3) */
- CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM (4) */
- CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
- CTL_SST_TS_UHF, /* REFCLK_GOES_TRAK (6) */
- CTL_SST_TS_HF, /* REFCLK_CHU (7) */
- CTL_SST_TS_LF, /* REFCLOCK_PARSE (default) (8) */
- CTL_SST_TS_LF, /* REFCLK_GPS_MX4200 (9) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
- CTL_SST_TS_ATOM, /* REFCLK_ATOM_LEITCH (13) */
- CTL_SST_TS_LF, /* REFCLK_MSF_EES (14) */
- CTL_SST_TS_UHF, /* REFCLK_TRUETIME (15) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
- CTL_SST_TS_TELEPHONE, /* REFCLK_NIST_ACTS (18) */
- CTL_SST_TS_HF, /* REFCLK_WWV_HEATH (19) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
- CTL_SST_TS_ATOM, /* REFCLK_ATOM_PPS (22) */
- CTL_SST_TS_TELEPHONE, /* REFCLK_PTB_ACTS (23) */
- CTL_SST_TS_TELEPHONE, /* REFCLK_USNO (24) */
- CTL_SST_TS_UHF, /* REFCLK_TRUETIME (25) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
- CTL_SST_TS_TELEPHONE, /* REFCLK_ARCRON_MSF (27) */
- CTL_SST_TS_TELEPHONE, /* REFCLK_SHM (28) */
- CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
- CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
- CTL_SST_TS_UHF, /* REFCLK_JUPITER (31) */
- CTL_SST_TS_LF, /* REFCLK_CHRONOLOG (32) */
- CTL_SST_TS_LF, /* REFCLK_DUMBCLOCK (32) */
- CTL_SST_TS_LF, /* REFCLK_ULINK (33) */
- CTL_SST_TS_LF, /* REFCLK_PCF (35) */
- CTL_SST_TS_LF, /* REFCLK_WWV (36) */
- CTL_SST_TS_LF, /* REFCLK_FG (37) */
- CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
- CTL_SST_TS_UHF, /* REFCLK_HOPF_PCI (39) */
- CTL_SST_TS_LF, /* REFCLK_JJY (40) */
- CTL_SST_TS_UHF, /* REFCLK_TT560 (41) */
- CTL_SST_TS_UHF, /* REFCLK_ZYFER (42) */
- CTL_SST_TS_UHF, /* REFCLK_RIPENCC (43) */
- CTL_SST_TS_UHF, /* REFCLK_NEOCLOCK4X (44) */
-};
-
-
-/*
- * Keyid used for authenticating write requests.
- */
-keyid_t ctl_auth_keyid;
-
-/*
- * We keep track of the last error reported by the system internally
- */
-static u_char ctl_sys_last_event;
-static u_char ctl_sys_num_events;
-
-
-/*
- * Statistic counters to keep track of requests and responses.
- */
-u_long ctltimereset; /* time stats reset */
-u_long numctlreq; /* number of requests we've received */
-u_long numctlbadpkts; /* number of bad control packets */
-u_long numctlresponses; /* number of resp packets sent with data */
-u_long numctlfrags; /* number of fragments sent */
-u_long numctlerrors; /* number of error responses sent */
-u_long numctltooshort; /* number of too short input packets */
-u_long numctlinputresp; /* number of responses on input */
-u_long numctlinputfrag; /* number of fragments on input */
-u_long numctlinputerr; /* number of input pkts with err bit set */
-u_long numctlbadoffset; /* number of input pkts with nonzero offset */
-u_long numctlbadversion; /* number of input pkts with unknown version */
-u_long numctldatatooshort; /* data too short for count */
-u_long numctlbadop; /* bad op code found in packet */
-u_long numasyncmsgs; /* number of async messages we've sent */
-
-/*
- * Response packet used by these routines. Also some state information
- * so that we can handle packet formatting within a common set of
- * subroutines. Note we try to enter data in place whenever possible,
- * but the need to set the more bit correctly means we occasionally
- * use the extra buffer and copy.
- */
-static struct ntp_control rpkt;
-static u_char res_version;
-static u_char res_opcode;
-static associd_t res_associd;
-static int res_offset;
-static u_char * datapt;
-static u_char * dataend;
-static int datalinelen;
-static int datanotbinflag;
-static struct sockaddr_storage *rmt_addr;
-static struct interface *lcl_inter;
-
-static u_char res_authenticate;
-static u_char res_authokay;
-static keyid_t res_keyid;
-
-#define MAXDATALINELEN (72)
-
-static u_char res_async; /* set to 1 if this is async trap response */
-
-/*
- * Pointers for saving state when decoding request packets
- */
-static char *reqpt;
-static char *reqend;
-
-/*
- * init_control - initialize request data
- */
-void
-init_control(void)
-{
- int i;
-
-#ifdef HAVE_UNAME
- uname(&utsnamebuf);
-#endif /* HAVE_UNAME */
-
- ctl_clr_stats();
-
- ctl_auth_keyid = 0;
- ctl_sys_last_event = EVNT_UNSPEC;
- ctl_sys_num_events = 0;
-
- num_ctl_traps = 0;
- for (i = 0; i < CTL_MAXTRAPS; i++)
- ctl_trap[i].tr_flags = 0;
-}
-
-
-/*
- * ctl_error - send an error response for the current request
- */
-static void
-ctl_error(
- int errcode
- )
-{
-#ifdef DEBUG
- if (debug >= 4)
- printf("sending control error %d\n", errcode);
-#endif
- /*
- * Fill in the fields. We assume rpkt.sequence and rpkt.associd
- * have already been filled in.
- */
- rpkt.r_m_e_op = (u_char) (CTL_RESPONSE|CTL_ERROR|(res_opcode &
- CTL_OP_MASK));
- rpkt.status = htons((u_short) ((errcode<<8) & 0xff00));
- rpkt.count = 0;
-
- /*
- * send packet and bump counters
- */
- if (res_authenticate && sys_authenticate) {
- int maclen;
-
- *(u_int32 *)((u_char *)&rpkt + CTL_HEADER_LEN) =
- htonl(res_keyid);
- maclen = authencrypt(res_keyid, (u_int32 *)&rpkt,
- CTL_HEADER_LEN);
- sendpkt(rmt_addr, lcl_inter, -2, (struct pkt *)&rpkt,
- CTL_HEADER_LEN + maclen);
- } else {
- sendpkt(rmt_addr, lcl_inter, -3, (struct pkt *)&rpkt,
- CTL_HEADER_LEN);
- }
- numctlerrors++;
-}
-
-
-/*
- * process_control - process an incoming control message
- */
-void
-process_control(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- register struct ntp_control *pkt;
- register int req_count;
- register int req_data;
- register struct ctl_proc *cc;
- int properlen;
- int maclen;
-
-#ifdef DEBUG
- if (debug > 2)
- printf("in process_control()\n");
-#endif
-
- /*
- * Save the addresses for error responses
- */
- numctlreq++;
- rmt_addr = &rbufp->recv_srcadr;
- lcl_inter = rbufp->dstadr;
- pkt = (struct ntp_control *)&rbufp->recv_pkt;
-
- /*
- * If the length is less than required for the header, or
- * it is a response or a fragment, ignore this.
- */
- if (rbufp->recv_length < CTL_HEADER_LEN
- || pkt->r_m_e_op & (CTL_RESPONSE|CTL_MORE|CTL_ERROR)
- || pkt->offset != 0) {
-#ifdef DEBUG
- if (debug)
- printf("invalid format in control packet\n");
-#endif
- if (rbufp->recv_length < CTL_HEADER_LEN)
- numctltooshort++;
- if (pkt->r_m_e_op & CTL_RESPONSE)
- numctlinputresp++;
- if (pkt->r_m_e_op & CTL_MORE)
- numctlinputfrag++;
- if (pkt->r_m_e_op & CTL_ERROR)
- numctlinputerr++;
- if (pkt->offset != 0)
- numctlbadoffset++;
- return;
- }
- res_version = PKT_VERSION(pkt->li_vn_mode);
- if (res_version > NTP_VERSION || res_version < NTP_OLDVERSION) {
-#ifdef DEBUG
- if (debug)
- printf("unknown version %d in control packet\n",
- res_version);
-#endif
- numctlbadversion++;
- return;
- }
-
- /*
- * Pull enough data from the packet to make intelligent
- * responses
- */
- rpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, res_version,
- MODE_CONTROL);
- res_opcode = pkt->r_m_e_op;
- rpkt.sequence = pkt->sequence;
- rpkt.associd = pkt->associd;
- rpkt.status = 0;
- res_offset = 0;
- res_associd = htons(pkt->associd);
- res_async = 0;
- res_authenticate = 0;
- res_keyid = 0;
- res_authokay = 0;
- req_count = (int)htons(pkt->count);
- datanotbinflag = 0;
- datalinelen = 0;
- datapt = rpkt.data;
- dataend = &(rpkt.data[CTL_MAX_DATA_LEN]);
-
- /*
- * We're set up now. Make sure we've got at least enough
- * incoming data space to match the count.
- */
- req_data = rbufp->recv_length - CTL_HEADER_LEN;
- if (req_data < req_count || rbufp->recv_length & 0x3) {
- ctl_error(CERR_BADFMT);
- numctldatatooshort++;
- return;
- }
-
- properlen = req_count + CTL_HEADER_LEN;
-#ifdef DEBUG
- if (debug > 2 && (rbufp->recv_length & 0x3) != 0)
- printf("Packet length %d unrounded\n",
- rbufp->recv_length);
-#endif
- /* round up proper len to a 8 octet boundary */
-
- properlen = (properlen + 7) & ~7;
- maclen = rbufp->recv_length - properlen;
- if ((rbufp->recv_length & (sizeof(u_long) - 1)) == 0 &&
- maclen >= MIN_MAC_LEN && maclen <= MAX_MAC_LEN &&
- sys_authenticate) {
- res_authenticate = 1;
- res_keyid = ntohl(*(u_int32 *)((u_char *)pkt +
- properlen));
-
-#ifdef DEBUG
- if (debug > 2)
- printf(
- "recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%d\n",
- rbufp->recv_length, properlen, res_keyid, maclen);
-#endif
- if (!authistrusted(res_keyid)) {
-#ifdef DEBUG
- if (debug > 2)
- printf("invalid keyid %08x\n",
- res_keyid);
-#endif
- } else if (authdecrypt(res_keyid, (u_int32 *)pkt,
- rbufp->recv_length - maclen, maclen)) {
-#ifdef DEBUG
- if (debug > 2)
- printf("authenticated okay\n");
-#endif
- res_authokay = 1;
- } else {
-#ifdef DEBUG
- if (debug > 2)
- printf("authentication failed\n");
-#endif
- res_keyid = 0;
- }
- }
-
- /*
- * Set up translate pointers
- */
- reqpt = (char *)pkt->data;
- reqend = reqpt + req_count;
-
- /*
- * Look for the opcode processor
- */
- for (cc = control_codes; cc->control_code != NO_REQUEST; cc++) {
- if (cc->control_code == res_opcode) {
-#ifdef DEBUG
- if (debug > 2)
- printf("opcode %d, found command handler\n",
- res_opcode);
-#endif
- if (cc->flags == AUTH && (!res_authokay ||
- res_keyid != ctl_auth_keyid)) {
- ctl_error(CERR_PERMISSION);
- return;
- }
- (cc->handler)(rbufp, restrict_mask);
- return;
- }
- }
-
- /*
- * Can't find this one, return an error.
- */
- numctlbadop++;
- ctl_error(CERR_BADOP);
- return;
-}
-
-
-/*
- * ctlpeerstatus - return a status word for this peer
- */
-u_short
-ctlpeerstatus(
- register struct peer *peer
- )
-{
- register u_short status;
-
- status = peer->status;
- if (peer->flags & FLAG_CONFIG)
- status |= CTL_PST_CONFIG;
- if (peer->flags & FLAG_AUTHENABLE)
- status |= CTL_PST_AUTHENABLE;
- if (peer->flags & FLAG_AUTHENTIC)
- status |= CTL_PST_AUTHENTIC;
- if (peer->reach != 0)
- status |= CTL_PST_REACH;
- return (u_short)CTL_PEER_STATUS(status, peer->num_events,
- peer->last_event);
-}
-
-
-/*
- * 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) |
- (this_clock->lastevent)));
-}
-#endif
-
-
-/*
- * ctlsysstatus - return the system status word
- */
-u_short
-ctlsysstatus(void)
-{
- register u_char this_clock;
-
- this_clock = CTL_SST_TS_UNSPEC;
- if (sys_peer != 0) {
- if (sys_peer->sstclktype != CTL_SST_TS_UNSPEC) {
- this_clock = sys_peer->sstclktype;
- if (pps_control)
- this_clock |= CTL_SST_TS_PPS;
- } else {
- if (sys_peer->refclktype < sizeof(clocktypes))
- this_clock =
- clocktypes[sys_peer->refclktype];
- if (pps_control)
- this_clock |= CTL_SST_TS_PPS;
- }
- }
- return (u_short)CTL_SYS_STATUS(sys_leap, this_clock,
- ctl_sys_num_events, ctl_sys_last_event);
-}
-
-
-/*
- * ctl_flushpkt - write out the current packet and prepare
- * another if necessary.
- */
-static void
-ctl_flushpkt(
- int more
- )
-{
- int dlen;
- int sendlen;
-
- if (!more && datanotbinflag) {
- /*
- * Big hack, output a trailing \r\n
- */
- *datapt++ = '\r';
- *datapt++ = '\n';
- }
- dlen = datapt - (u_char *)rpkt.data;
- sendlen = dlen + CTL_HEADER_LEN;
-
- /*
- * Pad to a multiple of 32 bits
- */
- while (sendlen & 0x3) {
- *datapt++ = '\0';
- sendlen++;
- }
-
- /*
- * Fill in the packet with the current info
- */
- rpkt.r_m_e_op = (u_char)(CTL_RESPONSE|more|(res_opcode &
- CTL_OP_MASK));
- rpkt.count = htons((u_short) dlen);
- rpkt.offset = htons( (u_short) res_offset);
- if (res_async) {
- register int i;
-
- for (i = 0; i < CTL_MAXTRAPS; i++) {
- if (ctl_trap[i].tr_flags & TRAP_INUSE) {
- rpkt.li_vn_mode =
- PKT_LI_VN_MODE(sys_leap,
- ctl_trap[i].tr_version,
- MODE_CONTROL);
- rpkt.sequence =
- htons(ctl_trap[i].tr_sequence);
- sendpkt(&ctl_trap[i].tr_addr,
- ctl_trap[i].tr_localaddr, -4,
- (struct pkt *)&rpkt, sendlen);
- if (!more)
- ctl_trap[i].tr_sequence++;
- numasyncmsgs++;
- }
- }
- } else {
- if (res_authenticate && sys_authenticate) {
- int maclen;
- int totlen = sendlen;
- keyid_t keyid = htonl(res_keyid);
-
- /*
- * If we are going to authenticate, then there
- * is an additional requirement that the MAC
- * begin on a 64 bit boundary.
- */
- while (totlen & 7) {
- *datapt++ = '\0';
- totlen++;
- }
- memcpy(datapt, &keyid, sizeof keyid);
- maclen = authencrypt(res_keyid,
- (u_int32 *)&rpkt, totlen);
- sendpkt(rmt_addr, lcl_inter, -5,
- (struct pkt *)&rpkt, totlen + maclen);
- } else {
- sendpkt(rmt_addr, lcl_inter, -6,
- (struct pkt *)&rpkt, sendlen);
- }
- if (more)
- numctlfrags++;
- else
- numctlresponses++;
- }
-
- /*
- * Set us up for another go around.
- */
- res_offset += dlen;
- datapt = (u_char *)rpkt.data;
-}
-
-
-/*
- * ctl_putdata - write data into the packet, fragmenting and starting
- * another if this one is full.
- */
-static void
-ctl_putdata(
- const char *dp,
- unsigned int dlen,
- int bin /* set to 1 when data is binary */
- )
-{
- int overhead;
-
- overhead = 0;
- if (!bin) {
- datanotbinflag = 1;
- overhead = 3;
- if (datapt != rpkt.data) {
- *datapt++ = ',';
- datalinelen++;
- if ((dlen + datalinelen + 1) >= MAXDATALINELEN)
- {
- *datapt++ = '\r';
- *datapt++ = '\n';
- datalinelen = 0;
- } else {
- *datapt++ = ' ';
- datalinelen++;
- }
- }
- }
-
- /*
- * Save room for trailing junk
- */
- if (dlen + overhead + datapt > dataend) {
- /*
- * Not enough room in this one, flush it out.
- */
- ctl_flushpkt(CTL_MORE);
- }
- memmove((char *)datapt, dp, (unsigned)dlen);
- datapt += dlen;
- datalinelen += dlen;
-}
-
-
-/*
- * ctl_putstr - write a tagged string into the response packet
- */
-static void
-ctl_putstr(
- const char *tag,
- const char *data,
- unsigned int len
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[400];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
- if (len > 0) {
- *cp++ = '=';
- *cp++ = '"';
- if (len > (int) (sizeof(buffer) - (cp - buffer) - 1))
- len = sizeof(buffer) - (cp - buffer) - 1;
- memmove(cp, data, (unsigned)len);
- cp += len;
- *cp++ = '"';
- }
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_putdbl - write a tagged, signed double into the response packet
- */
-static void
-ctl_putdbl(
- const char *tag,
- double ts
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
- *cp++ = '=';
- (void)sprintf(cp, "%.3f", ts);
- while (*cp != '\0')
- cp++;
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-/*
- * ctl_putuint - write a tagged unsigned integer into the response
- */
-static void
-ctl_putuint(
- const char *tag,
- u_long uval
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- (void) sprintf(cp, "%lu", uval);
- while (*cp != '\0')
- cp++;
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_puthex - write a tagged unsigned integer, in hex, into the response
- */
-static void
-ctl_puthex(
- const char *tag,
- u_long uval
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- (void) sprintf(cp, "0x%lx", uval);
- while (*cp != '\0')
- cp++;
- ctl_putdata(buffer,(unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_putint - write a tagged signed integer into the response
- */
-static void
-ctl_putint(
- const char *tag,
- long ival
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- (void) sprintf(cp, "%ld", ival);
- while (*cp != '\0')
- cp++;
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_putts - write a tagged timestamp, in hex, into the response
- */
-static void
-ctl_putts(
- const char *tag,
- l_fp *ts
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- (void) sprintf(cp, "0x%08lx.%08lx", ts->l_ui & 0xffffffffL,
- ts->l_uf & 0xffffffffL);
- while (*cp != '\0')
- cp++;
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_putadr - write an IP address into the response
- */
-static void
-ctl_putadr(
- const char *tag,
- u_int32 addr32,
- struct sockaddr_storage* addr
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- if (addr == NULL)
- cq = numtoa(addr32);
- else
- cq = stoa(addr);
- while (*cq != '\0')
- *cp++ = *cq++;
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_putid - write a tagged clock ID into the response
- */
-static void
-ctl_putid(
- const char *tag,
- char *id
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
-
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
-
- *cp++ = '=';
- cq = id;
- while (*cq != '\0' && (cq - id) < 4)
- *cp++ = *cq++;
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
-}
-
-
-/*
- * ctl_putarray - write a tagged eight element double array into the response
- */
-static void
-ctl_putarray(
- const char *tag,
- double *arr,
- int start
- )
-{
- register char *cp;
- register const char *cq;
- char buffer[200];
- int i;
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
- i = start;
- do {
- if (i == 0)
- i = NTP_SHIFT;
- i--;
- (void)sprintf(cp, " %.2f", arr[i] * 1e3);
- while (*cp != '\0')
- cp++;
- } while(i != start);
- ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
-}
-
-
-/*
- * ctl_putsys - output a system variable
- */
-static void
-ctl_putsys(
- int varid
- )
-{
- l_fp tmp;
- char str[256];
-#ifdef OPENSSL
- struct cert_info *cp;
- char cbuf[256];
-#endif /* OPENSSL */
-
- switch (varid) {
-
- case CS_LEAP:
- ctl_putuint(sys_var[CS_LEAP].text, sys_leap);
- break;
-
- case CS_STRATUM:
- ctl_putuint(sys_var[CS_STRATUM].text, sys_stratum);
- break;
-
- case CS_PRECISION:
- ctl_putint(sys_var[CS_PRECISION].text, sys_precision);
- break;
-
- case CS_ROOTDELAY:
- ctl_putdbl(sys_var[CS_ROOTDELAY].text, sys_rootdelay *
- 1e3);
- break;
-
- case CS_ROOTDISPERSION:
- ctl_putdbl(sys_var[CS_ROOTDISPERSION].text,
- sys_rootdispersion * 1e3);
- break;
-
- case CS_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);
- break;
-
- case CS_REFTIME:
- ctl_putts(sys_var[CS_REFTIME].text, &sys_reftime);
- break;
-
- case CS_POLL:
- ctl_putuint(sys_var[CS_POLL].text, sys_poll);
- break;
-
- case CS_PEERID:
- if (sys_peer == NULL)
- ctl_putuint(sys_var[CS_PEERID].text, 0);
- else
- ctl_putuint(sys_var[CS_PEERID].text,
- sys_peer->associd);
- break;
-
- case CS_STATE:
- ctl_putuint(sys_var[CS_STATE].text, (unsigned)state);
- break;
-
- case CS_OFFSET:
- ctl_putdbl(sys_var[CS_OFFSET].text, last_offset * 1e3);
- break;
-
- case CS_DRIFT:
- ctl_putdbl(sys_var[CS_DRIFT].text, drift_comp * 1e6);
- break;
-
- case CS_JITTER:
- ctl_putdbl(sys_var[CS_JITTER].text, sys_jitter * 1e3);
- break;
-
- case CS_CLOCK:
- get_systime(&tmp);
- ctl_putts(sys_var[CS_CLOCK].text, &tmp);
- break;
-
- case CS_PROCESSOR:
-#ifndef HAVE_UNAME
- ctl_putstr(sys_var[CS_PROCESSOR].text, str_processor,
- sizeof(str_processor) - 1);
-#else
- ctl_putstr(sys_var[CS_PROCESSOR].text,
- utsnamebuf.machine, strlen(utsnamebuf.machine));
-#endif /* HAVE_UNAME */
- break;
-
- case CS_SYSTEM:
-#ifndef HAVE_UNAME
- ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
- sizeof(str_system) - 1);
-#else
- sprintf(str, "%s/%s", utsnamebuf.sysname, utsnamebuf.release);
- ctl_putstr(sys_var[CS_SYSTEM].text, str, strlen(str));
-#endif /* HAVE_UNAME */
- break;
-
- case CS_VERSION:
- ctl_putstr(sys_var[CS_VERSION].text, Version,
- strlen(Version));
- break;
-
- case CS_STABIL:
- ctl_putdbl(sys_var[CS_STABIL].text, clock_stability *
- 1e6);
- break;
-
- case CS_VARLIST:
- {
- char buf[CTL_MAX_DATA_LEN];
- register char *s, *t, *be;
- register const char *ss;
- register int i;
- register struct ctl_var *k;
-
- s = buf;
- be = buf + sizeof(buf) -
- strlen(sys_var[CS_VARLIST].text) - 4;
- if (s > be)
- break; /* really long var name */
-
- strcpy(s, sys_var[CS_VARLIST].text);
- strcat(s, "=\"");
- s += strlen(s);
- t = s;
- for (k = sys_var; !(k->flags &EOV); k++) {
- if (k->flags & PADDING)
- continue;
- i = strlen(k->text);
- if (s+i+1 >= be)
- break;
-
- if (s != t)
- *s++ = ',';
- strcpy(s, k->text);
- s += i;
- }
-
- for (k = ext_sys_var; k && !(k->flags &EOV);
- k++) {
- if (k->flags & PADDING)
- continue;
-
- ss = k->text;
- if (!ss)
- continue;
-
- while (*ss && *ss != '=')
- ss++;
- i = ss - k->text;
- if (s + i + 1 >= be)
- break;
-
- if (s != t)
- *s++ = ',';
- strncpy(s, k->text,
- (unsigned)i);
- s += i;
- }
- if (s+2 >= be)
- break;
-
- *s++ = '"';
- *s = '\0';
-
- ctl_putdata(buf, (unsigned)( s - buf ),
- 0);
- }
- break;
-
-#ifdef OPENSSL
- case CS_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:
- if (sys_hostname != NULL)
- ctl_putstr(sys_var[CS_HOST].text, sys_hostname,
- strlen(sys_hostname));
- break;
-
- case CS_CERTIF:
- 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_PUBLIC:
- if (hostval.fstamp != 0)
- ctl_putuint(sys_var[CS_PUBLIC].text,
- ntohl(hostval.fstamp));
- break;
-
- case CS_REVTIME:
- if (hostval.tstamp != 0)
- ctl_putuint(sys_var[CS_REVTIME].text,
- ntohl(hostval.tstamp));
- break;
-
- case CS_LEAPTAB:
- if (tai_leap.fstamp != 0)
- ctl_putuint(sys_var[CS_LEAPTAB].text,
- ntohl(tai_leap.fstamp));
- if (sys_tai != 0)
- ctl_putuint(sys_var[CS_TAI].text, sys_tai);
- break;
-#endif /* OPENSSL */
- }
-}
-
-
-/*
- * ctl_putpeer - output a peer variable
- */
-static void
-ctl_putpeer(
- int varid,
- struct peer *peer
- )
-{
-#ifdef OPENSSL
- char str[256];
- struct autokey *ap;
-#endif /* OPENSSL */
-
- switch (varid) {
-
- case CP_CONFIG:
- ctl_putuint(peer_var[CP_CONFIG].text,
- (unsigned)((peer->flags & FLAG_CONFIG) != 0));
- break;
-
- case CP_AUTHENABLE:
- ctl_putuint(peer_var[CP_AUTHENABLE].text,
- (unsigned)((peer->flags & FLAG_AUTHENABLE) != 0));
- break;
-
- case CP_AUTHENTIC:
- ctl_putuint(peer_var[CP_AUTHENTIC].text,
- (unsigned)((peer->flags & FLAG_AUTHENTIC) != 0));
- break;
-
- case CP_SRCADR:
- ctl_putadr(peer_var[CP_SRCADR].text, 0,
- &peer->srcadr);
- break;
-
- case CP_SRCPORT:
- ctl_putuint(peer_var[CP_SRCPORT].text,
- ntohs(((struct sockaddr_in*)&peer->srcadr)->sin_port));
- break;
-
- case CP_DSTADR:
- 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(((struct sockaddr_in*)&peer->dstadr->sin)->sin_port) : 0));
- break;
-
- case CP_LEAP:
- ctl_putuint(peer_var[CP_LEAP].text, peer->leap);
- break;
-
- case CP_HMODE:
- ctl_putuint(peer_var[CP_HMODE].text, peer->hmode);
- break;
-
- case CP_STRATUM:
- ctl_putuint(peer_var[CP_STRATUM].text, peer->stratum);
- break;
-
- case CP_PPOLL:
- ctl_putuint(peer_var[CP_PPOLL].text, peer->ppoll);
- break;
-
- case CP_HPOLL:
- ctl_putuint(peer_var[CP_HPOLL].text, peer->hpoll);
- break;
-
- case CP_PRECISION:
- ctl_putint(peer_var[CP_PRECISION].text,
- peer->precision);
- break;
-
- case CP_ROOTDELAY:
- ctl_putdbl(peer_var[CP_ROOTDELAY].text,
- peer->rootdelay * 1e3);
- break;
-
- case CP_ROOTDISPERSION:
- ctl_putdbl(peer_var[CP_ROOTDISPERSION].text,
- peer->rootdispersion * 1e3);
- break;
-
- case CP_REFID:
- 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_putid(peer_var[CP_REFID].text,
- (char *)&peer->refid);
- } else {
- 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;
-
- case CP_REFTIME:
- ctl_putts(peer_var[CP_REFTIME].text, &peer->reftime);
- break;
-
- case CP_ORG:
- ctl_putts(peer_var[CP_ORG].text, &peer->org);
- break;
-
- case CP_REC:
- ctl_putts(peer_var[CP_REC].text, &peer->rec);
- break;
-
- case CP_XMT:
- ctl_putts(peer_var[CP_XMT].text, &peer->xmt);
- break;
-
- case CP_REACH:
- ctl_puthex(peer_var[CP_REACH].text, peer->reach);
- break;
-
- case CP_FLASH:
- ctl_puthex(peer_var[CP_FLASH].text, peer->flash);
- break;
-
- case CP_TTL:
- 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);
- break;
-
- case CP_DELAY:
- ctl_putdbl(peer_var[CP_DELAY].text, peer->delay * 1e3);
- break;
-
- case CP_OFFSET:
- ctl_putdbl(peer_var[CP_OFFSET].text, peer->offset *
- 1e3);
- break;
-
- case CP_JITTER:
- ctl_putdbl(peer_var[CP_JITTER].text,
- SQRT(peer->jitter) * 1e3);
- break;
-
- case CP_DISPERSION:
- ctl_putdbl(peer_var[CP_DISPERSION].text, peer->disp *
- 1e3);
- break;
-
- case CP_KEYID:
- ctl_putuint(peer_var[CP_KEYID].text, peer->keyid);
- break;
-
- case CP_FILTDELAY:
- ctl_putarray(peer_var[CP_FILTDELAY].text,
- peer->filter_delay, (int)peer->filter_nextpt);
- break;
-
- case CP_FILTOFFSET:
- ctl_putarray(peer_var[CP_FILTOFFSET].text,
- peer->filter_offset, (int)peer->filter_nextpt);
- break;
-
- case CP_FILTERROR:
- ctl_putarray(peer_var[CP_FILTERROR].text,
- peer->filter_disp, (int)peer->filter_nextpt);
- break;
-
- case CP_PMODE:
- ctl_putuint(peer_var[CP_PMODE].text, peer->pmode);
- break;
-
- case CP_RECEIVED:
- ctl_putuint(peer_var[CP_RECEIVED].text, peer->received);
- break;
-
- case CP_SENT:
- ctl_putuint(peer_var[CP_SENT].text, peer->sent);
- break;
-
- case CP_VARLIST:
- {
- char buf[CTL_MAX_DATA_LEN];
- register char *s, *t, *be;
- register int i;
- register struct ctl_var *k;
-
- s = buf;
- be = buf + sizeof(buf) -
- strlen(peer_var[CP_VARLIST].text) - 4;
- if (s > be)
- break; /* really long var name */
-
- strcpy(s, peer_var[CP_VARLIST].text);
- strcat(s, "=\"");
- s += strlen(s);
- t = s;
- for (k = peer_var; !(k->flags &EOV); k++) {
- if (k->flags & PADDING)
- continue;
-
- i = strlen(k->text);
- if (s + i + 1 >= be)
- break;
-
- if (s != t)
- *s++ = ',';
- strcpy(s, k->text);
- s += i;
- }
- if (s+2 >= be)
- break;
-
- *s++ = '"';
- *s = '\0';
- ctl_putdata(buf, (unsigned)(s - buf), 0);
- }
- break;
-#ifdef OPENSSL
- case CP_FLAGS:
- if (peer->crypto)
- ctl_puthex(peer_var[CP_FLAGS].text, peer->crypto);
- break;
-
- 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_HOST:
- if (peer->subject != NULL)
- ctl_putstr(peer_var[CP_HOST].text, peer->subject,
- strlen(peer->subject));
- break;
-
- case CP_IDENT:
- if (peer->issuer != NULL)
- ctl_putstr(peer_var[CP_IDENT].text, peer->issuer,
- strlen(peer->issuer));
- break;
-
- case CP_INITSEQ:
- if ((ap = (struct autokey *)peer->recval.ptr) == NULL)
- break;
- 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,
- ntohl(peer->recval.tstamp));
- break;
-#endif /* OPENSSL */
- }
-}
-
-
-#ifdef REFCLOCK
-/*
- * ctl_putclock - output clock variables
- */
-static void
-ctl_putclock(
- int varid,
- struct refclockstat *clock_stat,
- int mustput
- )
-{
- switch(varid) {
-
- case CC_TYPE:
- if (mustput || clock_stat->clockdesc == NULL
- || *(clock_stat->clockdesc) == '\0') {
- ctl_putuint(clock_var[CC_TYPE].text, clock_stat->type);
- }
- break;
- case CC_TIMECODE:
- ctl_putstr(clock_var[CC_TIMECODE].text,
- clock_stat->p_lastcode,
- (unsigned)clock_stat->lencode);
- break;
-
- case CC_POLL:
- ctl_putuint(clock_var[CC_POLL].text, clock_stat->polls);
- break;
-
- case CC_NOREPLY:
- ctl_putuint(clock_var[CC_NOREPLY].text,
- clock_stat->noresponse);
- break;
-
- case CC_BADFORMAT:
- ctl_putuint(clock_var[CC_BADFORMAT].text,
- clock_stat->badformat);
- break;
-
- case CC_BADDATA:
- ctl_putuint(clock_var[CC_BADDATA].text,
- clock_stat->baddata);
- break;
-
- case CC_FUDGETIME1:
- if (mustput || (clock_stat->haveflags & CLK_HAVETIME1))
- ctl_putdbl(clock_var[CC_FUDGETIME1].text,
- clock_stat->fudgetime1 * 1e3);
- break;
-
- case CC_FUDGETIME2:
- if (mustput || (clock_stat->haveflags & CLK_HAVETIME2)) ctl_putdbl(clock_var[CC_FUDGETIME2].text,
- clock_stat->fudgetime2 * 1e3);
- break;
-
- case CC_FUDGEVAL1:
- if (mustput || (clock_stat->haveflags & CLK_HAVEVAL1))
- ctl_putint(clock_var[CC_FUDGEVAL1].text,
- clock_stat->fudgeval1);
- break;
-
- case CC_FUDGEVAL2:
- if (mustput || (clock_stat->haveflags & CLK_HAVEVAL2)) {
- if (clock_stat->fudgeval1 > 1)
- ctl_putadr(clock_var[CC_FUDGEVAL2].text,
- (u_int32)clock_stat->fudgeval2, NULL);
- else
- ctl_putid(clock_var[CC_FUDGEVAL2].text,
- (char *)&clock_stat->fudgeval2);
- }
- break;
-
- case CC_FLAGS:
- if (mustput || (clock_stat->haveflags & (CLK_HAVEFLAG1 |
- CLK_HAVEFLAG2 | CLK_HAVEFLAG3 | CLK_HAVEFLAG4)))
- ctl_putuint(clock_var[CC_FLAGS].text,
- clock_stat->flags);
- break;
-
- case CC_DEVICE:
- if (clock_stat->clockdesc == NULL ||
- *(clock_stat->clockdesc) == '\0') {
- if (mustput)
- ctl_putstr(clock_var[CC_DEVICE].text,
- "", 0);
- } else {
- ctl_putstr(clock_var[CC_DEVICE].text,
- clock_stat->clockdesc,
- strlen(clock_stat->clockdesc));
- }
- break;
-
- case CC_VARLIST:
- {
- char buf[CTL_MAX_DATA_LEN];
- register char *s, *t, *be;
- register const char *ss;
- register int i;
- register struct ctl_var *k;
-
- s = buf;
- be = buf + sizeof(buf);
- if (s + strlen(clock_var[CC_VARLIST].text) + 4 >
- be)
- break; /* really long var name */
-
- strcpy(s, clock_var[CC_VARLIST].text);
- strcat(s, "=\"");
- s += strlen(s);
- t = s;
-
- for (k = clock_var; !(k->flags &EOV); k++) {
- if (k->flags & PADDING)
- continue;
-
- i = strlen(k->text);
- if (s + i + 1 >= be)
- break;
-
- if (s != t)
- *s++ = ',';
- strcpy(s, k->text);
- s += i;
- }
-
- for (k = clock_stat->kv_list; k && !(k->flags &
- EOV); k++) {
- if (k->flags & PADDING)
- continue;
-
- ss = k->text;
- if (!ss)
- continue;
-
- while (*ss && *ss != '=')
- ss++;
- i = ss - k->text;
- if (s+i+1 >= be)
- break;
-
- if (s != t)
- *s++ = ',';
- strncpy(s, k->text, (unsigned)i);
- s += i;
- *s = '\0';
- }
- if (s+2 >= be)
- break;
-
- *s++ = '"';
- *s = '\0';
- ctl_putdata(buf, (unsigned)( s - buf ), 0);
- }
- break;
- }
-}
-#endif
-
-
-
-/*
- * ctl_getitem - get the next data item from the incoming packet
- */
-static struct ctl_var *
-ctl_getitem(
- struct ctl_var *var_list,
- char **data
- )
-{
- register struct ctl_var *v;
- register char *cp;
- register char *tp;
- static struct ctl_var eol = { 0, EOV, };
- static char buf[128];
-
- /*
- * Delete leading commas and white space
- */
- while (reqpt < reqend && (*reqpt == ',' ||
- isspace((int)*reqpt)))
- reqpt++;
- if (reqpt >= reqend)
- return (0);
-
- if (var_list == (struct ctl_var *)0)
- return (&eol);
-
- /*
- * Look for a first character match on the tag. If we find
- * one, see if it is a full match.
- */
- v = var_list;
- cp = reqpt;
- while (!(v->flags & EOV)) {
- if (!(v->flags & PADDING) && *cp == *(v->text)) {
- tp = v->text;
- while (*tp != '\0' && *tp != '=' && cp <
- reqend && *cp == *tp) {
- cp++;
- tp++;
- }
- if ((*tp == '\0') || (*tp == '=')) {
- while (cp < reqend && isspace((int)*cp))
- cp++;
- if (cp == reqend || *cp == ',') {
- buf[0] = '\0';
- *data = buf;
- if (cp < reqend)
- cp++;
- reqpt = cp;
- return v;
- }
- if (*cp == '=') {
- cp++;
- tp = buf;
- while (cp < reqend && isspace((int)*cp))
- cp++;
- while (cp < reqend && *cp != ',') {
- *tp++ = *cp++;
- if (tp >= buf + sizeof(buf)) {
- ctl_error(CERR_BADFMT);
- numctlbadpkts++;
- msyslog(LOG_WARNING,
- "Possible 'ntpdx' exploit from %s:%d (possibly spoofed)\n",
- stoa(rmt_addr), SRCPORT(rmt_addr)
- );
- return (0);
- }
- }
- if (cp < reqend)
- cp++;
- *tp-- = '\0';
- while (tp >= buf) {
- if (!isspace((int)(*tp)))
- break;
- *tp-- = '\0';
- }
- reqpt = cp;
- *data = buf;
- return (v);
- }
- }
- cp = reqpt;
- }
- v++;
- }
- return v;
-}
-
-
-/*
- * control_unspec - response to an unspecified op-code
- */
-/*ARGSUSED*/
-static void
-control_unspec(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- struct peer *peer;
-
- /*
- * What is an appropriate response to an unspecified op-code?
- * I return no errors and no data, unless a specified assocation
- * doesn't exist.
- */
- if (res_associd != 0) {
- if ((peer = findpeerbyassoc(res_associd)) == 0) {
- ctl_error(CERR_BADASSOC);
- return;
- }
- rpkt.status = htons(ctlpeerstatus(peer));
- } else {
- rpkt.status = htons(ctlsysstatus());
- }
- ctl_flushpkt(0);
-}
-
-
-/*
- * read_status - return either a list of associd's, or a particular
- * peer's status.
- */
-/*ARGSUSED*/
-static void
-read_status(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- register int i;
- register struct peer *peer;
- u_short ass_stat[CTL_MAX_DATA_LEN / sizeof(u_short)];
-
-#ifdef DEBUG
- if (debug > 2)
- printf("read_status: ID %d\n", res_associd);
-#endif
- /*
- * Two choices here. If the specified association ID is
- * zero we return all known assocation ID's. Otherwise
- * we return a bunch of stuff about the particular peer.
- */
- if (res_associd == 0) {
- register int n;
-
- n = 0;
- rpkt.status = htons(ctlsysstatus());
- for (i = 0; i < HASH_SIZE; i++) {
- for (peer = assoc_hash[i]; peer != 0;
- peer = peer->ass_next) {
- ass_stat[n++] = htons(peer->associd);
- ass_stat[n++] =
- htons(ctlpeerstatus(peer));
- if (n ==
- CTL_MAX_DATA_LEN/sizeof(u_short)) {
- ctl_putdata((char *)ass_stat,
- n * sizeof(u_short), 1);
- n = 0;
- }
- }
- }
-
- if (n != 0)
- ctl_putdata((char *)ass_stat, n *
- sizeof(u_short), 1);
- ctl_flushpkt(0);
- } else {
- peer = findpeerbyassoc(res_associd);
- if (peer == 0) {
- ctl_error(CERR_BADASSOC);
- } else {
- register u_char *cp;
-
- rpkt.status = htons(ctlpeerstatus(peer));
- if (res_authokay)
- peer->num_events = 0;
- /*
- * For now, output everything we know about the
- * peer. May be more selective later.
- */
- for (cp = def_peer_var; *cp != 0; cp++)
- ctl_putpeer((int)*cp, peer);
- ctl_flushpkt(0);
- }
- }
-}
-
-
-/*
- * read_variables - return the variables the caller asks for
- */
-/*ARGSUSED*/
-static void
-read_variables(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- register struct ctl_var *v;
- register int i;
- char *valuep;
- u_char *wants;
- unsigned int gotvar = (CS_MAXCODE > CP_MAXCODE) ? (CS_MAXCODE +
- 1) : (CP_MAXCODE + 1);
- if (res_associd == 0) {
- /*
- * Wants system variables. Figure out which he wants
- * and give them to him.
- */
- rpkt.status = htons(ctlsysstatus());
- if (res_authokay)
- ctl_sys_num_events = 0;
- gotvar += count_var(ext_sys_var);
- wants = (u_char *)emalloc(gotvar);
- memset((char *)wants, 0, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
- if ((v = ctl_getitem(ext_sys_var,
- &valuep)) != 0) {
- if (v->flags & EOV) {
- ctl_error(CERR_UNKNOWNVAR);
- free((char *)wants);
- return;
- }
- wants[CS_MAXCODE + 1 +
- v->code] = 1;
- gotvar = 1;
- continue;
- } else {
- break; /* shouldn't happen ! */
- }
- }
- wants[v->code] = 1;
- gotvar = 1;
- }
- if (gotvar) {
- for (i = 1; i <= CS_MAXCODE; i++)
- if (wants[i])
- ctl_putsys(i);
- for (i = 0; ext_sys_var &&
- !(ext_sys_var[i].flags & EOV); i++)
- if (wants[i + CS_MAXCODE + 1])
- ctl_putdata(ext_sys_var[i].text,
- strlen(ext_sys_var[i].text),
- 0);
- } else {
- register u_char *cs;
- register struct ctl_var *kv;
-
- for (cs = def_sys_var; *cs != 0; cs++)
- ctl_putsys((int)*cs);
- for (kv = ext_sys_var; kv && !(kv->flags & EOV);
- kv++)
- if (kv->flags & DEF)
- ctl_putdata(kv->text,
- strlen(kv->text), 0);
- }
- free((char *)wants);
- } else {
- register struct peer *peer;
-
- /*
- * Wants info for a particular peer. See if we know
- * the guy.
- */
- peer = findpeerbyassoc(res_associd);
- if (peer == 0) {
- ctl_error(CERR_BADASSOC);
- return;
- }
- rpkt.status = htons(ctlpeerstatus(peer));
- if (res_authokay)
- peer->num_events = 0;
- wants = (u_char *)emalloc(gotvar);
- memset((char*)wants, 0, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
- if (v->flags & EOV) {
- ctl_error(CERR_UNKNOWNVAR);
- free((char *)wants);
- return;
- }
- wants[v->code] = 1;
- gotvar = 1;
- }
- if (gotvar) {
- for (i = 1; i <= CP_MAXCODE; i++)
- if (wants[i])
- ctl_putpeer(i, peer);
- } else {
- register u_char *cp;
-
- for (cp = def_peer_var; *cp != 0; cp++)
- ctl_putpeer((int)*cp, peer);
- }
- free((char *)wants);
- }
- ctl_flushpkt(0);
-}
-
-
-/*
- * write_variables - write into variables. We only allow leap bit
- * writing this way.
- */
-/*ARGSUSED*/
-static void
-write_variables(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- register struct ctl_var *v;
- register int ext_var;
- char *valuep;
- long val = 0;
-
- /*
- * If he's trying to write into a peer tell him no way
- */
- if (res_associd != 0) {
- ctl_error(CERR_PERMISSION);
- return;
- }
-
- /*
- * Set status
- */
- rpkt.status = htons(ctlsysstatus());
-
- /*
- * Look through the variables. Dump out at the first sign of
- * trouble.
- */
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- ext_var = 0;
- if (v->flags & EOV) {
- if ((v = ctl_getitem(ext_sys_var, &valuep)) !=
- 0) {
- if (v->flags & EOV) {
- ctl_error(CERR_UNKNOWNVAR);
- return;
- }
- ext_var = 1;
- } else {
- break;
- }
- }
- if (!(v->flags & CAN_WRITE)) {
- ctl_error(CERR_PERMISSION);
- return;
- }
- if (!ext_var && (*valuep == '\0' || !atoint(valuep,
- &val))) {
- ctl_error(CERR_BADFMT);
- return;
- }
- if (!ext_var && (val & ~LEAP_NOTINSYNC) != 0) {
- ctl_error(CERR_BADVALUE);
- return;
- }
-
- if (ext_var) {
- char *s = (char *)emalloc(strlen(v->text) +
- strlen(valuep) + 2);
- const char *t;
- char *tt = s;
-
- t = v->text;
- while (*t && *t != '=')
- *tt++ = *t++;
-
- *tt++ = '=';
- strcat(tt, valuep);
- set_sys_var(s, strlen(s)+1, v->flags);
- free(s);
- } else {
- /*
- * This one seems sane. Save it.
- */
- switch(v->code) {
-
- case CS_LEAP:
- default:
- ctl_error(CERR_UNSPEC); /* really */
- return;
- }
- }
- }
-
- /*
- * If we got anything, do it. xxx nothing to do ***
- */
- /*
- if (leapind != ~0 || leapwarn != ~0) {
- if (!leap_setleap((int)leapind, (int)leapwarn)) {
- ctl_error(CERR_PERMISSION);
- return;
- }
- }
- */
- ctl_flushpkt(0);
-}
-
-
-/*
- * read_clock_status - return clock radio status
- */
-/*ARGSUSED*/
-static void
-read_clock_status(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
-#ifndef REFCLOCK
- /*
- * If no refclock support, no data to return
- */
- ctl_error(CERR_BADASSOC);
-#else
- register struct ctl_var *v;
- register int i;
- register struct peer *peer;
- char *valuep;
- u_char *wants;
- unsigned int gotvar;
- struct refclockstat clock_stat;
-
- if (res_associd == 0) {
-
- /*
- * Find a clock for this jerk. If the system peer
- * is a clock use it, else search the hash tables
- * for one.
- */
- if (sys_peer != 0 && (sys_peer->flags & FLAG_REFCLOCK))
- {
- peer = sys_peer;
- } else {
- peer = 0;
- for (i = 0; peer == 0 && i < HASH_SIZE; i++) {
- for (peer = assoc_hash[i]; peer != 0;
- peer = peer->ass_next) {
- if (peer->flags & FLAG_REFCLOCK)
- break;
- }
- }
- if (peer == 0) {
- ctl_error(CERR_BADASSOC);
- return;
- }
- }
- } else {
- peer = findpeerbyassoc(res_associd);
- if (peer == 0 || !(peer->flags & FLAG_REFCLOCK)) {
- ctl_error(CERR_BADASSOC);
- return;
- }
- }
-
- /*
- * If we got here we have a peer which is a clock. Get his
- * status.
- */
- clock_stat.kv_list = (struct ctl_var *)0;
- refclock_control(&peer->srcadr, (struct refclockstat *)0,
- &clock_stat);
-
- /*
- * Look for variables in the packet.
- */
- rpkt.status = htons(ctlclkstatus(&clock_stat));
- gotvar = CC_MAXCODE + 1 + count_var(clock_stat.kv_list);
- wants = (u_char *)emalloc(gotvar);
- memset((char*)wants, 0, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(clock_var, &valuep)) != 0) {
- if (v->flags & EOV) {
- if ((v = ctl_getitem(clock_stat.kv_list,
- &valuep)) != 0) {
- if (v->flags & EOV) {
- ctl_error(CERR_UNKNOWNVAR);
- free((char*)wants);
- free_varlist(clock_stat.kv_list);
- return;
- }
- wants[CC_MAXCODE + 1 + v->code] = 1;
- gotvar = 1;
- continue;
- } else {
- break; /* shouldn't happen ! */
- }
- }
- wants[v->code] = 1;
- gotvar = 1;
- }
-
- if (gotvar) {
- for (i = 1; i <= CC_MAXCODE; i++)
- if (wants[i])
- ctl_putclock(i, &clock_stat, 1);
- for (i = 0; clock_stat.kv_list &&
- !(clock_stat.kv_list[i].flags & EOV); i++)
- if (wants[i + CC_MAXCODE + 1])
- ctl_putdata(clock_stat.kv_list[i].text,
- strlen(clock_stat.kv_list[i].text),
- 0);
- } else {
- register u_char *cc;
- register struct ctl_var *kv;
-
- for (cc = def_clock_var; *cc != 0; cc++)
- ctl_putclock((int)*cc, &clock_stat, 0);
- for (kv = clock_stat.kv_list; kv && !(kv->flags & EOV);
- kv++)
- if (kv->flags & DEF)
- ctl_putdata(kv->text, strlen(kv->text),
- 0);
- }
-
- free((char*)wants);
- free_varlist(clock_stat.kv_list);
-
- ctl_flushpkt(0);
-#endif
-}
-
-
-/*
- * write_clock_status - we don't do this
- */
-/*ARGSUSED*/
-static void
-write_clock_status(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- ctl_error(CERR_PERMISSION);
-}
-
-/*
- * Trap support from here on down. We send async trap messages when the
- * upper levels report trouble. Traps can by set either by control
- * messages or by configuration.
- */
-/*
- * set_trap - set a trap in response to a control message
- */
-static void
-set_trap(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- int traptype;
-
- /*
- * See if this guy is allowed
- */
- if (restrict_mask & RES_NOTRAP) {
- ctl_error(CERR_PERMISSION);
- return;
- }
-
- /*
- * Determine his allowed trap type.
- */
- traptype = TRAP_TYPE_PRIO;
- if (restrict_mask & RES_LPTRAP)
- traptype = TRAP_TYPE_NONPRIO;
-
- /*
- * Call ctlsettrap() to do the work. Return
- * an error if it can't assign the trap.
- */
- if (!ctlsettrap(&rbufp->recv_srcadr, rbufp->dstadr, traptype,
- (int)res_version))
- ctl_error(CERR_NORESOURCE);
- ctl_flushpkt(0);
-}
-
-
-/*
- * unset_trap - unset a trap in response to a control message
- */
-static void
-unset_trap(
- struct recvbuf *rbufp,
- int restrict_mask
- )
-{
- int traptype;
-
- /*
- * We don't prevent anyone from removing his own trap unless the
- * trap is configured. Note we also must be aware of the
- * possibility that restriction flags were changed since this
- * guy last set his trap. Set the trap type based on this.
- */
- traptype = TRAP_TYPE_PRIO;
- if (restrict_mask & RES_LPTRAP)
- traptype = TRAP_TYPE_NONPRIO;
-
- /*
- * Call ctlclrtrap() to clear this out.
- */
- if (!ctlclrtrap(&rbufp->recv_srcadr, rbufp->dstadr, traptype))
- ctl_error(CERR_BADASSOC);
- ctl_flushpkt(0);
-}
-
-
-/*
- * ctlsettrap - called to set a trap
- */
-int
-ctlsettrap(
- struct sockaddr_storage *raddr,
- struct interface *linter,
- int traptype,
- int version
- )
-{
- register struct ctl_trap *tp;
- register struct ctl_trap *tptouse;
-
- /*
- * See if we can find this trap. If so, we only need update
- * the flags and the time.
- */
- if ((tp = ctlfindtrap(raddr, linter)) != NULL) {
- switch (traptype) {
-
- case TRAP_TYPE_CONFIG:
- tp->tr_flags = TRAP_INUSE|TRAP_CONFIGURED;
- break;
-
- case TRAP_TYPE_PRIO:
- if (tp->tr_flags & TRAP_CONFIGURED)
- return (1); /* don't change anything */
- tp->tr_flags = TRAP_INUSE;
- break;
-
- case TRAP_TYPE_NONPRIO:
- if (tp->tr_flags & TRAP_CONFIGURED)
- return (1); /* don't change anything */
- tp->tr_flags = TRAP_INUSE|TRAP_NONPRIO;
- break;
- }
- tp->tr_settime = current_time;
- tp->tr_resets++;
- return (1);
- }
-
- /*
- * First we heard of this guy. Try to find a trap structure
- * for him to use, clearing out lesser priority guys if we
- * have to. Clear out anyone who's expired while we're at it.
- */
- tptouse = NULL;
- for (tp = ctl_trap; tp < &ctl_trap[CTL_MAXTRAPS]; tp++) {
- if ((tp->tr_flags & TRAP_INUSE) &&
- !(tp->tr_flags & TRAP_CONFIGURED) &&
- ((tp->tr_settime + CTL_TRAPTIME) > current_time)) {
- tp->tr_flags = 0;
- num_ctl_traps--;
- }
- if (!(tp->tr_flags & TRAP_INUSE)) {
- tptouse = tp;
- } else if (!(tp->tr_flags & TRAP_CONFIGURED)) {
- switch (traptype) {
-
- case TRAP_TYPE_CONFIG:
- if (tptouse == NULL) {
- tptouse = tp;
- break;
- }
- if (tptouse->tr_flags & TRAP_NONPRIO &&
- !(tp->tr_flags & TRAP_NONPRIO))
- break;
-
- if (!(tptouse->tr_flags & TRAP_NONPRIO)
- && tp->tr_flags & TRAP_NONPRIO) {
- tptouse = tp;
- break;
- }
- if (tptouse->tr_origtime <
- tp->tr_origtime)
- tptouse = tp;
- break;
-
- case TRAP_TYPE_PRIO:
- if (tp->tr_flags & TRAP_NONPRIO) {
- if (tptouse == NULL ||
- (tptouse->tr_flags &
- TRAP_INUSE &&
- tptouse->tr_origtime <
- tp->tr_origtime))
- tptouse = tp;
- }
- break;
-
- case TRAP_TYPE_NONPRIO:
- break;
- }
- }
- }
-
- /*
- * If we don't have room for him return an error.
- */
- if (tptouse == NULL)
- return (0);
-
- /*
- * Set up this structure for him.
- */
- tptouse->tr_settime = tptouse->tr_origtime = current_time;
- tptouse->tr_count = tptouse->tr_resets = 0;
- tptouse->tr_sequence = 1;
- tptouse->tr_addr = *raddr;
- tptouse->tr_localaddr = linter;
- tptouse->tr_version = (u_char) version;
- tptouse->tr_flags = TRAP_INUSE;
- if (traptype == TRAP_TYPE_CONFIG)
- tptouse->tr_flags |= TRAP_CONFIGURED;
- else if (traptype == TRAP_TYPE_NONPRIO)
- tptouse->tr_flags |= TRAP_NONPRIO;
- num_ctl_traps++;
- return (1);
-}
-
-
-/*
- * ctlclrtrap - called to clear a trap
- */
-int
-ctlclrtrap(
- struct sockaddr_storage *raddr,
- struct interface *linter,
- int traptype
- )
-{
- register struct ctl_trap *tp;
-
- if ((tp = ctlfindtrap(raddr, linter)) == NULL)
- return (0);
-
- if (tp->tr_flags & TRAP_CONFIGURED
- && traptype != TRAP_TYPE_CONFIG)
- return (0);
-
- tp->tr_flags = 0;
- num_ctl_traps--;
- return (1);
-}
-
-
-/*
- * ctlfindtrap - find a trap given the remote and local addresses
- */
-static struct ctl_trap *
-ctlfindtrap(
- 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)
- && (NSRCPORT(raddr) == NSRCPORT(&tp->tr_addr))
- && SOCKCMP(raddr, &tp->tr_addr)
- && (linter == tp->tr_localaddr) )
- return (tp);
- }
- return (struct ctl_trap *)NULL;
-}
-
-
-/*
- * report_event - report an event to the trappers
- */
-void
-report_event(
- int err,
- struct peer *peer
- )
-{
- register int i;
-
- /*
- * Record error code in proper spots, but have mercy on the
- * log file.
- */
- 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) {
- NLOG(NLOG_SYSEVENT)
- msyslog(LOG_INFO, "system event '%s' (0x%02x) status '%s' (0x%02x)",
- eventstr(err), err,
- sysstatstr(ctlsysstatus()), ctlsysstatus());
-#ifdef DEBUG
- if (debug)
- printf("report_event: system event '%s' (0x%02x) status '%s' (0x%02x)\n",
- eventstr(err), err,
- sysstatstr(ctlsysstatus()),
- ctlsysstatus());
-#endif
- ctl_sys_last_event = (u_char)err;
- }
- } else if (peer != 0) {
- char *src;
-
-#ifdef REFCLOCK
- if (ISREFCLOCKADR(&peer->srcadr))
- src = refnumtoa(&peer->srcadr);
- else
-#endif
- src = stoa(&peer->srcadr);
-
- peer->last_event = (u_char)(err & ~PEER_EVENT);
- if (peer->num_events < CTL_PEER_MAXEVENTS)
- peer->num_events++;
- NLOG(NLOG_PEEREVENT)
- msyslog(LOG_INFO, "peer %s event '%s' (0x%02x) status '%s' (0x%02x)",
- src, eventstr(err), err,
- peerstatstr(ctlpeerstatus(peer)),
- ctlpeerstatus(peer));
-#ifdef DEBUG
- if (debug)
- printf( "peer %s event '%s' (0x%02x) status '%s' (0x%02x)\n",
- src, eventstr(err), err,
- peerstatstr(ctlpeerstatus(peer)),
- ctlpeerstatus(peer));
-#endif
- } else {
- msyslog(LOG_ERR,
- "report_event: err '%s' (0x%02x), no peer",
- eventstr(err), err);
-#ifdef DEBUG
- printf(
- "report_event: peer event '%s' (0x%02x), no peer\n",
- eventstr(err), err);
-#endif
- return;
- }
-
- /*
- * If no trappers, return.
- */
- if (num_ctl_traps <= 0)
- return;
-
- /*
- * Set up the outgoing packet variables
- */
- res_opcode = CTL_OP_ASYNCMSG;
- res_offset = 0;
- res_async = 1;
- res_authenticate = 0;
- datapt = rpkt.data;
- dataend = &(rpkt.data[CTL_MAX_DATA_LEN]);
- if (!(err & PEER_EVENT)) {
- rpkt.associd = 0;
- rpkt.status = htons(ctlsysstatus());
-
- /*
- * For now, put everything we know about system
- * variables. Don't send crypto strings.
- */
- for (i = 1; i <= CS_MAXCODE; i++) {
-#ifdef OPENSSL
- if (i > CS_VARLIST)
- continue;
-#endif /* OPENSSL */
- ctl_putsys(i);
- }
-#ifdef REFCLOCK
- /*
- * for clock exception events: add clock variables to
- * reflect info on exception
- */
- if (err == EVNT_CLOCKEXCPT) {
- struct refclockstat clock_stat;
- struct ctl_var *kv;
-
- clock_stat.kv_list = (struct ctl_var *)0;
- refclock_control(&peer->srcadr,
- (struct refclockstat *)0, &clock_stat);
- ctl_puthex("refclockstatus",
- ctlclkstatus(&clock_stat));
- for (i = 1; i <= CC_MAXCODE; i++)
- ctl_putclock(i, &clock_stat, 0);
- for (kv = clock_stat.kv_list; kv &&
- !(kv->flags & EOV); kv++)
- if (kv->flags & DEF)
- ctl_putdata(kv->text,
- strlen(kv->text), 0);
- free_varlist(clock_stat.kv_list);
- }
-#endif /* REFCLOCK */
- } else {
- rpkt.associd = htons(peer->associd);
- rpkt.status = htons(ctlpeerstatus(peer));
-
- /*
- * Dump it all. Later, maybe less.
- */
- for (i = 1; i <= CP_MAXCODE; i++) {
-#ifdef OPENSSL
- if (i > CP_VARLIST)
- continue;
-#endif /* OPENSSL */
- ctl_putpeer(i, peer);
- }
-#ifdef REFCLOCK
- /*
- * for clock exception events: add clock variables to
- * reflect info on exception
- */
- if (err == EVNT_PEERCLOCK) {
- struct refclockstat clock_stat;
- struct ctl_var *kv;
-
- clock_stat.kv_list = (struct ctl_var *)0;
- refclock_control(&peer->srcadr,
- (struct refclockstat *)0, &clock_stat);
-
- ctl_puthex("refclockstatus",
- ctlclkstatus(&clock_stat));
-
- for (i = 1; i <= CC_MAXCODE; i++)
- ctl_putclock(i, &clock_stat, 0);
- for (kv = clock_stat.kv_list; kv &&
- !(kv->flags & EOV); kv++)
- if (kv->flags & DEF)
- ctl_putdata(kv->text,
- strlen(kv->text), 0);
- free_varlist(clock_stat.kv_list);
- }
-#endif /* REFCLOCK */
- }
-
- /*
- * We're done, return.
- */
- ctl_flushpkt(0);
-}
-
-
-/*
- * ctl_clr_stats - clear stat counters
- */
-void
-ctl_clr_stats(void)
-{
- ctltimereset = current_time;
- numctlreq = 0;
- numctlbadpkts = 0;
- numctlresponses = 0;
- numctlfrags = 0;
- numctlerrors = 0;
- numctlfrags = 0;
- numctltooshort = 0;
- numctlinputresp = 0;
- numctlinputfrag = 0;
- numctlinputerr = 0;
- numctlbadoffset = 0;
- numctlbadversion = 0;
- numctldatatooshort = 0;
- numctlbadop = 0;
- numasyncmsgs = 0;
-}
-
-static u_long
-count_var(
- struct ctl_var *k
- )
-{
- register u_long c;
-
- if (!k)
- return (0);
-
- c = 0;
- while (!(k++->flags & EOV))
- c++;
- return (c);
-}
-
-char *
-add_var(
- struct ctl_var **kv,
- u_long size,
- u_short def
- )
-{
- register u_long c;
- register struct ctl_var *k;
-
- c = count_var(*kv);
-
- k = *kv;
- *kv = (struct ctl_var *)emalloc((c+2)*sizeof(struct ctl_var));
- if (k) {
- memmove((char *)*kv, (char *)k,
- sizeof(struct ctl_var)*c);
- free((char *)k);
- }
- (*kv)[c].code = (u_short) c;
- (*kv)[c].text = (char *)emalloc(size);
- (*kv)[c].flags = def;
- (*kv)[c+1].code = 0;
- (*kv)[c+1].text = (char *)0;
- (*kv)[c+1].flags = EOV;
- return (char *)(*kv)[c].text;
-}
-
-void
-set_var(
- struct ctl_var **kv,
- const char *data,
- u_long size,
- u_short def
- )
-{
- register struct ctl_var *k;
- register const char *s;
- register const char *t;
- char *td;
-
- if (!data || !size)
- return;
-
- k = *kv;
- if (k != NULL) {
- while (!(k->flags & EOV)) {
- s = data;
- t = k->text;
- if (t) {
- while (*t != '=' && *s - *t == 0) {
- s++;
- t++;
- }
- if (*s == *t && ((*t == '=') || !*t)) {
- free((void *)k->text);
- td = (char *)emalloc(size);
- memmove(td, data, size);
- k->text =td;
- k->flags = def;
- return;
- }
- } else {
- td = (char *)emalloc(size);
- memmove(td, data, size);
- k->text = td;
- k->flags = def;
- return;
- }
- k++;
- }
- }
- td = add_var(kv, size, def);
- memmove(td, data, size);
-}
-
-void
-set_sys_var(
- char *data,
- u_long size,
- u_short def
- )
-{
- set_var(&ext_sys_var, data, size, def);
-}
-
-void
-free_varlist(
- struct ctl_var *kv
- )
-{
- struct ctl_var *k;
- if (kv) {
- for (k = kv; !(k->flags & EOV); k++)
- free((void *)k->text);
- free((void *)kv);
- }
-}
diff --git a/contrib/ntp/ntpd/ntp_crypto.c b/contrib/ntp/ntpd/ntp_crypto.c
deleted file mode 100644
index 3e67703..0000000
--- a/contrib/ntp/ntpd/ntp_crypto.c
+++ /dev/null
@@ -1,4031 +0,0 @@
-/*
- * ntp_crypto.c - NTP version 4 public key routines
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#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 "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 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.
- */
-/*
- * Cryptodefines
- */
-#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
- */
-u_int32 crypto_flags = 0x0; /* status word */
-u_int sys_tai; /* current UTC offset from TAI */
-
-/*
- * Global cryptodata in network byte order
- */
-struct cert_info *cinfo = NULL; /* certificate info/value */
-struct value hostval; /* host value */
-struct value pubkey; /* public key */
-struct value tai_leap; /* leapseconds table */
-
-/*
- * Private cryptodata in host byte order
- */
-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 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 *));
-
-#ifdef SYS_WINNT
-int
-readlink(char * link, char * file, int len) {
- return (-1);
-}
-#endif
-
-/*
- * session_key - generate session key
- *
- * This routine generates a session key from the source address,
- * 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
-session_key(
- 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 */
- )
-{
- 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.
- */
- 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, dgst, len);
- authtrust(keyno, lifetime);
- }
-#ifdef DEBUG
- if (debug > 1)
- printf(
- "session_key: %s > %s %08x %08x hash %08x life %lu\n",
- stoa(srcadr), stoa(dstadr), keyno,
- private, keyid, lifetime);
-#endif
- return (keyid);
-}
-
-
-/*
- * make_keylist - generate key list
- *
- * This routine constructs a pseudo-random sequence by repeatedly
- * hashing the session key starting from a given source address,
- * destination address, private value and the next key ID of the
- * preceeding session key. The last entry on the list is saved along
- * with its sequence number and public signature.
- */
-void
-make_keylist(
- struct peer *peer, /* peer structure pointer */
- struct interface *dstadr /* interface */
- )
-{
- EVP_MD_CTX ctx; /* signature context */
- tstamp_t tstamp; /* NTP timestamp */
- struct autokey *ap; /* autokey pointer */
- 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.
- */
- tstamp = crypto_time();
- if (peer->keylist == NULL)
- peer->keylist = emalloc(sizeof(keyid_t) *
- NTP_MAXSESSION);
-
- /*
- * Generate an initial key ID which is unique and greater than
- * NTP_MAXKEY.
- */
- while (1) {
- keyid = (u_long)RANDOM & 0xffffffff;
- if (keyid <= NTP_MAXKEY)
- continue;
- if (authhavekey(keyid))
- continue;
- break;
- }
-
- /*
- * Generate up to NTP_MAXSESSION session keys. Stop if the
- * next one would not be unique or not a session key ID or if
- * it would expire before the next poll. The private value
- * included in the hash is zero if broadcast mode, the peer
- * cookie if client mode or the host cookie if symmetric modes.
- */
- lifetime = min(sys_automax, (unsigned long) NTP_MAXSESSION * (1 <<(peer->kpoll)));
- if (peer->hmode == MODE_BROADCAST)
- cookie = 0;
- else
- 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, lifetime);
- lifetime -= 1 << peer->kpoll;
- if (auth_havekey(keyid) || keyid <= NTP_MAXKEY ||
- 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. Use the public values
- * timestamp as filestamp.
- */
- 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);
- 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 fs %u poll %d\n",
- ntohl(ap->seq), ntohl(ap->key), cookie,
- ntohl(vp->tstamp), ntohl(vp->fstamp), peer->kpoll);
-#endif
-}
-
-
-/*
- * crypto_recv - parse extension fields
- *
- * This routine is called when the packet has been matched to an
- * association and passed sanity, format and MAC checks. We believe the
- * 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 proventic
- * bit is not set.
- */
-int
-crypto_recv(
- struct peer *peer, /* peer structure pointer */
- struct recvbuf *rbufp /* packet buffer pointer */
- )
-{
- 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 */
-
- /*
- * Initialize. Note that the packet has already been checked for
- * 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.
- */
- authlen = LEN_PKT_NOMAC;
- while ((has_mac = rbufp->recv_length - authlen) > MAX_MAC_LEN) {
- 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: 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 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:
-
- /*
- * 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: %s\n", statstr);
-#endif
- break;
-
- /*
- * 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_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);
- }
- 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: %s\n", statstr);
-#endif
- break;
-
- /*
- * 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_IFF | 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;
-
- /*
- * 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_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: %s\n", statstr);
-#endif
- break;
-
- /*
- * 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.
- */
- case CRYPTO_GQ | 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;
-
- /*
- * 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: %s\n", statstr);
-#endif
- break;
-
- /*
- * MV
- */
- case CRYPTO_MV | 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;
-
- /*
- * 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: %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:
-
- /*
- * 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;
-
- /*
- * 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;
-
- 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;
-
- /*
- * Cookie request in symmetric modes. Roll a random
- * cookie and install in symmetric mode. Encrypt for the
- * response, which is transmitted later.
- */
- 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;
- }
-
- /*
- * 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: %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:
-
- /*
- * Discard the message if invalid or identity
- * not confirmed or signature not verified with
- * respect to the cookie values.
- */
- if (!(peer->crypto & CRYPTO_FLAG_VRFY))
- break;
-
- if ((rval = crypto_verify(ep, &peer->cookval,
- peer)) != XEVNT_OK)
- break;
-
- /*
- * Decrypt the cookie, hunting all the time for
- * errors.
- */
- 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;
- }
-
- /*
- * Install cookie values and light the cookie
- * bit. If this is not broadcast client mode, we
- * are done here.
- */
- 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;
-
- /*
- * 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_AUTO | CRYPTO_RESP:
-
- /*
- * 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;
-
- /*
- * Install autokey values and light the
- * autokey bit. This is not hard.
- */
- 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: %s\n", statstr);
-#endif
- break;
-
- /*
- * 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:
-
- /*
- * 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;
- }
- /* fall through */
-
- case CRYPTO_TAI | CRYPTO_RESP:
-
- /*
- * Discard the message if invalid or identity
- * not confirmed or signature not verified with
- * respect to the leapsecond table values.
- */
- 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;
- }
- crypto_flags |= CRYPTO_FLAG_TAI;
- 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 */
- 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;
-
- /*
- * 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.
- */
- case CRYPTO_IFF:
- case CRYPTO_GQ:
- case CRYPTO_MV:
- case CRYPTO_SIGN:
- if (len < VALUE_LEN) {
- rval = XEVNT_LEN;
- 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);
-}
-
-
-/*
- * 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 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
-crypto_xmit(
- 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 */
- 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. 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;
- rval = XEVNT_OK;
- switch (opcode & 0xffff0000) {
-
- /*
- * 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:
- case CRYPTO_ASSOC:
- len += crypto_send(fp, &hostval);
- if (crypto_time() == 0)
- fp->fstamp = 0;
- else
- fp->fstamp = htonl(crypto_flags);
- break;
-
- /*
- * Send certificate request. Use the values from the extension
- * field.
- */
- 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';
- }
- 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 challenge in Schnorr (IFF) identity scheme.
- */
- case CRYPTO_IFF:
- if ((peer = findpeerbyassoc(ep->pkt[0])) == NULL) {
- opcode |= CRYPTO_ERROR;
- break;
- }
- if ((rval = crypto_alice(peer, &vtemp)) == XEVNT_OK)
- len += crypto_send(fp, &vtemp);
- value_free(&vtemp);
- break;
-
- /*
- * 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 challenge in Guillou-Quisquater (GQ) identity scheme.
- */
- case CRYPTO_GQ:
- if ((peer = findpeerbyassoc(ep->pkt[0])) == NULL) {
- opcode |= CRYPTO_ERROR;
- break;
- }
- 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 challenge in MV identity scheme.
- */
- case CRYPTO_MV:
- if ((peer = findpeerbyassoc(ep->pkt[0])) == NULL) {
- opcode |= CRYPTO_ERROR;
- break;
- }
- if ((rval = crypto_alice3(peer, &vtemp)) == XEVNT_OK)
- len += crypto_send(fp, &vtemp);
- value_free(&vtemp);
- break;
-
- /*
- * Send response in MV identity scheme.
- */
- 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;
- }
- 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;
-
- /*
- * 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_AUTO | CRYPTO_RESP:
- if ((peer = findpeerbyassoc(associd)) == NULL) {
- opcode |= CRYPTO_ERROR;
- break;
- }
- peer->flags &= ~FLAG_ASSOC;
- len += crypto_send(fp, &peer->sndval);
- break;
-
- /*
- * 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 & CRYPTO_FLAG_TAI)
- len += crypto_send(fp, &tai_leap);
- break;
-
- /*
- * Default - Fall through for requests; for unknown responses,
- * flag as error.
- */
- default:
- if (opcode & CRYPTO_RESP)
- opcode |= CRYPTO_ERROR;
- }
-
- /*
- * 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.
- */
- 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: %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);
-}
-
-
-/*
- * 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
- */
-static int
-crypto_verify(
- struct exten *ep, /* extension pointer */
- struct value *vp, /* value pointer */
- struct peer *peer /* peer structure pointer */
- )
-{
- 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;
-
- /*
- * 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.
- */
- 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);
- }
-
- /*
- * 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.
- */
- 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;
-
- /*
- * 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.
- */
- } 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;
- }
- }
-#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);
- }
-
- /*
- * Encrypt the cookie, encode in ASN.1 and sign.
- */
- 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];
-
- /*
- * 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 (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);
- peer->ident_pkey = crypto_key(filename, &peer->fstamp);
- if (peer->ident_pkey != NULL)
- return (CRYPTO_MV);
- }
-
- /*
- * No compatible identity scheme is available. Use the default
- * TC scheme.
- */
- 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);
-
- /*
- * If a response, send our ID; if a request, send the
- * responder's ID.
- */
- 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_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.
- */
-u_int
-crypto_send(
- struct exten *ep, /* extension field pointer */
- struct value *vp /* value pointer */
- )
-{
- u_int len, temp32;
- int i;
-
- /*
- * Copy data. If the data field is empty or zero length, encode
- * an empty value with length zero.
- */
- 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;
- hostval.tstamp = htonl(tstamp);
-
- /*
- * Sign public key and timestamps. The filestamp is derived from
- * the host key file extension from wherever the file was
- * generated.
- */
- 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 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.
- */
- 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 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 = 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));
- 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("crypto_update: %s\n", statstr);
-#endif
-}
-
-
-/*
- * value_free - free value structure components.
- *
- * Returns void (no errors)
- */
-void
-value_free(
- struct value *vp /* value structure */
- )
-{
- 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 */
-
- /*
- * 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 (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);
- }
-
- /*
- * 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->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;
-
- /*
- * 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
- 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);
- }
-
- /*
- * 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.
- */
- 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);
- }
-
- /*
- * 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
- return (XEVNT_ID);
-}
-
-
-/*
- ***********************************************************************
- * *
- * The following routines implement the Mu-Varadharajan (MV) identity *
- * scheme *
- * *
- ***********************************************************************
- */
-/*
- * 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 */
- )
-{
- DSA *dsa; /* MV 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_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
- 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,
- "cert_parse: expired %s",
- ret->subject);
- cert_free(ret);
- X509_free(cert);
- return (NULL);
- }
-
- /*
- * Build the value structure to sign and send later.
- */
- 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);
- }
-
- /*
- * 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.
- */
- 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);
-
- /*
- * Sign and verify the certificate.
- */
- 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);
- }
- 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 > 1)
- X509_print_fp(stdout, cert);
-#endif
- X509_free(cert);
- return (XEVNT_OK);
-}
-
-
-/*
- * 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
- */
-int
-cert_valid(
- struct cert_info *cinf, /* certificate information structure */
- EVP_PKEY *pkey /* public key */
- )
-{
- 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;
-
- /*
- * 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)
- return (NULL);
-
- /*
- * Read the filestamp, which is contained in the first line.
- */
- 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);
- }
-
- /*
- * 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);
- }
-
- /*
- * Leave tracks in the cryptostats.
- */
- 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);
-}
-
-
-/*
- * 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;
-
- /*
- * 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.
- */
- if (*cp == '/')
- strcpy(filename, cp);
- else
- snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
- str = fopen(filename, "r");
- if (str == NULL)
- return (NULL);
-
- /*
- * Read the filestamp, which is contained in the first line.
- */
- if ((ptr = fgets(linkname, MAXFILENAME, str)) == NULL) {
- msyslog(LOG_ERR, "crypto_cert: no data %s\n",
- filename);
- return (NULL);
- }
- 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_cert: %s\n", statstr);
-#endif
- return (ret);
-}
-
-
-/*
- * 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 */
- )
-{
- 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 */
-#endif /* NTP_API */
-#endif /* KERNEL_PLL */
-
- /*
- * 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.
- */
- if (*cp == '/')
- strcpy(filename, cp);
- else
- snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
- 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
- * coredump by infiltrating naughty values. Empty lines and
- * comments are ignored. Other lines must begin with two
- * integers followed by junk or comments. The first integer is
- * the NTP seconds of leap insertion, the second is the offset
- * of TAI relative to UTC after that insertion. The second word
- * must equal the initial insertion of ten seconds on 1 January
- * 1972 plus one second for each succeeding insertion.
- */
- i = 0;
- while (i < MAX_LEAP) {
- ptr = fgets(buf, NTP_MAXSTRLEN - 1, str);
- if (ptr == NULL)
- break;
- if (strlen(buf) < 1)
- continue;
- if (*buf == '#')
- continue;
- if (sscanf(buf, "%u %u", &leapsec[i], &offset) != 2)
- continue;
- if (i != (int)(offset - TAI_1972)) {
- break;
- }
- i++;
- }
- fclose(str);
- if (ptr != NULL) {
- msyslog(LOG_INFO,
- "crypto_tai: leapseconds file %s error %d", cp,
- rval);
- exit (-1);
- }
-
- /*
- * The extension field table entries consists of the NTP seconds
- * of leap insertion in reverse order, so that the most recent
- * insertion is the first entry in the table.
- */
- len = i * 4;
- tai_leap.vallen = htonl(len);
- ptr = emalloc(len);
- tai_leap.ptr = (unsigned char *) ptr;
- for (; i >= 0; i--) {
- *ptr++ = (char) htonl(leapsec[i]);
- }
- crypto_flags |= CRYPTO_FLAG_TAI;
- sys_tai = len / 4 + TAI_1972 - 1;
-#ifdef KERNEL_PLL
-#if NTP_API > 3
- ntv.modes = MOD_TAI;
- ntv.constant = sys_tai;
- if (ntp_adjtime(&ntv) == TIME_ERROR)
- 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;
-
- /*
- * Initialize structures.
- */
- 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 (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_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 data from crypto configuration command.
- */
-void
-crypto_config(
- int item, /* configuration item */
- char *cp /* file name */
- )
-{
- switch (item) {
-
- /*
- * 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_PW:
- passwd = emalloc(strlen(cp) + 1);
- strcpy(passwd, cp);
- break;
-
- /*
- * Set host file name.
- */
- case CRYPTO_CONF_PRIV:
- host_file = emalloc(strlen(cp) + 1);
- strcpy(host_file, cp);
- break;
-
- /*
- * Set sign key file name.
- */
- case CRYPTO_CONF_SIGN:
- sign_file = emalloc(strlen(cp) + 1);
- strcpy(sign_file, cp);
- break;
-
- /*
- * Set iff parameters file name.
- */
- case CRYPTO_CONF_IFFPAR:
- iffpar_file = emalloc(strlen(cp) + 1);
- strcpy(iffpar_file, cp);
- break;
-
- /*
- * Set gq parameters file name.
- */
- case CRYPTO_CONF_GQPAR:
- gqpar_file = emalloc(strlen(cp) + 1);
- strcpy(gqpar_file, cp);
- break;
-
- /*
- * Set mv parameters file name.
- */
- 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 leapseconds file name.
- */
- 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 /* OPENSSL */
diff --git a/contrib/ntp/ntpd/ntp_filegen.c b/contrib/ntp/ntpd/ntp_filegen.c
deleted file mode 100644
index 59a1d91..0000000
--- a/contrib/ntp/ntpd/ntp_filegen.c
+++ /dev/null
@@ -1,547 +0,0 @@
-/*
- * ntp_filegen.c,v 3.12 1994/01/25 19:06:11 kardel Exp
- *
- * implements file generations support for NTP
- * logfiles and statistic files
- *
- *
- * Copyright (C) 1992, 1996 by Rainer Pruy
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * This code may be modified and used freely
- * provided credits remain intact.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_string.h"
-#include "ntp_calendar.h"
-#include "ntp_filegen.h"
-#include "ntp_stdlib.h"
-
-/*
- * NTP is intended to run long periods of time without restart.
- * Thus log and statistic files generated by NTP will grow large.
- *
- * this set of routines provides a central interface
- * to generating files using file generations
- *
- * the generation of a file is changed according to file generation type
- */
-
-
-/*
- * redefine this if your system dislikes filename suffixes like
- * X.19910101 or X.1992W50 or ....
- */
-#define SUFFIX_SEP '.'
-
-/*
- * other constants
- */
-#define FGEN_AGE_SECS (24*60*60) /* life time of FILEGEN_AGE in seconds */
-
-static void filegen_open P((FILEGEN *, u_long));
-static int valid_fileref P((char *, char *));
-#ifdef UNUSED
-static FILEGEN *filegen_unregister P((char *));
-#endif /* UNUSED */
-
-/*
- * open a file generation according to the current settings of gen
- * will also provide a link to basename if requested to do so
- */
-
-static void
-filegen_open(
- FILEGEN *gen,
- u_long newid
- )
-{
- char *filename;
- char *basename;
- u_int len;
- FILE *fp;
- struct calendar cal;
-
- len = strlen(gen->prefix) + strlen(gen->basename) + 1;
- basename = (char*)emalloc(len);
- sprintf(basename, "%s%s", gen->prefix, gen->basename);
-
- switch(gen->type) {
- default:
- msyslog(LOG_ERR, "unsupported file generations type %d for \"%s\" - reverting to FILEGEN_NONE",
- gen->type, basename);
- gen->type = FILEGEN_NONE;
-
- /*FALLTHROUGH*/
- case FILEGEN_NONE:
- filename = (char*)emalloc(len);
- sprintf(filename,"%s", basename);
- break;
-
- case FILEGEN_PID:
- filename = (char*)emalloc(len + 1 + 1 + 10);
- sprintf(filename,"%s%c#%ld", basename, SUFFIX_SEP, newid);
- break;
-
- case FILEGEN_DAY:
- /* You can argue here in favor of using MJD, but
- * I would assume it to be easier for humans to interpret dates
- * in a format they are used to in everyday life.
- */
- caljulian(newid,&cal);
- filename = (char*)emalloc(len + 1 + 4 + 2 + 2);
- sprintf(filename, "%s%c%04d%02d%02d",
- basename, SUFFIX_SEP, cal.year, cal.month, cal.monthday);
- break;
-
- case FILEGEN_WEEK:
- /*
- * This is still a hack
- * - the term week is not correlated to week as it is used
- * normally - it just refers to a period of 7 days
- * starting at Jan 1 - 'weeks' are counted starting from zero
- */
- caljulian(newid,&cal);
- filename = (char*)emalloc(len + 1 + 4 + 1 + 2);
- sprintf(filename, "%s%c%04dw%02d",
- basename, SUFFIX_SEP, cal.year, cal.yearday / 7);
- break;
-
- case FILEGEN_MONTH:
- caljulian(newid,&cal);
- filename = (char*)emalloc(len + 1 + 4 + 2);
- sprintf(filename, "%s%c%04d%02d",
- basename, SUFFIX_SEP, cal.year, cal.month);
- break;
-
- case FILEGEN_YEAR:
- caljulian(newid,&cal);
- filename = (char*)emalloc(len + 1 + 4);
- sprintf(filename, "%s%c%04d", basename, SUFFIX_SEP, cal.year);
- break;
-
- case FILEGEN_AGE:
- filename = (char*)emalloc(len + 1 + 2 + 10);
- sprintf(filename, "%s%ca%08ld", basename, SUFFIX_SEP, newid);
- break;
- }
-
- if (gen->type != FILEGEN_NONE) {
- /*
- * check for existence of a file with name 'basename'
- * as we disallow such a file
- * if FGEN_FLAG_LINK is set create a link
- */
- struct stat stats;
- /*
- * try to resolve name collisions
- */
- static u_long conflicts = 0;
-
-#ifndef S_ISREG
-#define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
-#endif
- if (stat(basename, &stats) == 0) {
- /* Hm, file exists... */
- if (S_ISREG(stats.st_mode)) {
- if (stats.st_nlink <= 1) {
- /*
- * Oh, it is not linked - try to save it
- */
- char *savename = (char*)emalloc(len + 1 + 1 + 10 + 10);
- sprintf(savename, "%s%c%dC%lu",
- basename,
- SUFFIX_SEP,
- (int) getpid(),
- (u_long)conflicts++);
- if (rename(basename, savename) != 0)
- msyslog(LOG_ERR," couldn't save %s: %m", basename);
- free(savename);
- } else {
- /*
- * there is at least a second link tpo this file
- * just remove the conflicting one
- */
- if (
-#if !defined(VMS)
- unlink(basename) != 0
-#else
- delete(basename) != 0
-#endif
- )
- msyslog(LOG_ERR, "couldn't unlink %s: %m", basename);
- }
- } else {
- /*
- * Ehh? Not a regular file ?? strange !!!!
- */
- msyslog(LOG_ERR, "expected regular file for %s (found mode 0%lo)",
- basename, (unsigned long)stats.st_mode);
- }
- } else {
- /*
- * stat(..) failed, but it is absolutely correct for
- * 'basename' not to exist
- */
- if (errno != ENOENT)
- msyslog(LOG_ERR,"stat(%s) failed: %m", basename);
- }
- }
-
- /*
- * now, try to open new file generation...
- */
- fp = fopen(filename, "a");
-
-#ifdef DEBUG
- if (debug > 3)
- printf("opening filegen (type=%d/id=%lu) \"%s\"\n",
- gen->type, (u_long)newid, filename);
-#endif
-
- if (fp == NULL) {
- /* open failed -- keep previous state
- *
- * 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 losing output
- *
- * ignore errors due to missing directories
- */
-
- if (errno != ENOENT)
- msyslog(LOG_ERR, "can't open %s: %m", filename);
- } else {
- if (gen->fp != NULL) {
- fclose(gen->fp);
- }
- gen->fp = fp;
- gen->id = newid;
-
- if (gen->flag & FGEN_FLAG_LINK) {
- /*
- * need to link file to basename
- * have to use hardlink for now as I want to allow
- * gen->basename spanning directory levels
- * this would make it more complex to get the correct
- * filename for symlink
- *
- * Ok, it would just mean taking the part following
- * the last '/' in the name.... Should add it later....
- */
-
- /* Windows NT does not support file links -Greg Schueman 1/18/97 */
-
-#if defined SYS_WINNT || defined SYS_VXWORKS
- SetLastError(0); /* On WinNT, don't support FGEN_FLAG_LINK */
-#elif defined(VMS)
- errno = 0; /* On VMS, don't support FGEN_FLAG_LINK */
-#else /* not (VMS) / VXWORKS / WINNT ; DO THE LINK) */
- if (link(filename, basename) != 0)
- if (errno != EEXIST)
- msyslog(LOG_ERR, "can't link(%s, %s): %m", filename, basename);
-#endif /* SYS_WINNT || VXWORKS */
- } /* flags & FGEN_FLAG_LINK */
- } /* else fp == NULL */
-
- free(basename);
- free(filename);
- return;
-}
-
-/*
- * this function sets up gen->fp to point to the correct
- * generation of the file for the time specified by 'now'
- *
- * 'now' usually is interpreted as second part of a l_fp as is in the cal...
- * library routines
- */
-
-void
-filegen_setup(
- FILEGEN *gen,
- u_long now
- )
-{
- u_long new_gen = ~ (u_long) 0;
- struct calendar cal;
-
- if (!(gen->flag & FGEN_FLAG_ENABLED)) {
- if (gen->fp != NULL)
- fclose(gen->fp);
- return;
- }
-
- switch (gen->type) {
- case FILEGEN_NONE:
- if (gen->fp != NULL) return; /* file already open */
- break;
-
- case FILEGEN_PID:
- new_gen = getpid();
- break;
-
- case FILEGEN_DAY:
- caljulian(now, &cal);
- cal.hour = cal.minute = cal.second = 0;
- new_gen = caltontp(&cal);
- break;
-
- case FILEGEN_WEEK:
- /* Would be nice to have a calweekstart() routine */
- /* so just use a hack ... */
- /* just round time to integral 7 day period for actual year */
- new_gen = now - (now - calyearstart(now)) % TIMES7(SECSPERDAY)
- + 60;
- /*
- * just to be sure -
- * the computation above would fail in the presence of leap seconds
- * so at least carry the date to the next day (+60 (seconds))
- * and go back to the start of the day via calendar computations
- */
- caljulian(new_gen, &cal);
- cal.hour = cal.minute = cal.second = 0;
- new_gen = caltontp(&cal);
- break;
-
- case FILEGEN_MONTH:
- caljulian(now, &cal);
- cal.yearday = (u_short) (cal.yearday - cal.monthday + 1);
- cal.monthday = 1;
- cal.hour = cal.minute = cal.second = 0;
- new_gen = caltontp(&cal);
- break;
-
- case FILEGEN_YEAR:
- new_gen = calyearstart(now);
- break;
-
- case FILEGEN_AGE:
- new_gen = current_time - (current_time % FGEN_AGE_SECS);
- break;
- }
- /*
- * try to open file if not yet open
- * reopen new file generation file on change of generation id
- */
- if (gen->fp == NULL || gen->id != new_gen) {
- filegen_open(gen, new_gen);
- }
-}
-
-
-/*
- * change settings for filegen files
- */
-void
-filegen_config(
- FILEGEN *gen,
- char *basename,
- u_int type,
- u_int flag
- )
-{
- /*
- * if nothing would be changed...
- */
- if ((basename == gen->basename || strcmp(basename,gen->basename) == 0) &&
- type == gen->type &&
- flag == gen->flag)
- return;
-
- /*
- * validate parameters
- */
- if (!valid_fileref(gen->prefix,basename))
- return;
-
- if (gen->fp != NULL)
- fclose(gen->fp);
-
-#ifdef DEBUG
- if (debug > 2)
- printf("configuring filegen:\n\tprefix:\t%s\n\tbasename:\t%s -> %s\n\ttype:\t%d -> %d\n\tflag: %x -> %x\n",
- gen->prefix, gen->basename, basename, gen->type, type, gen->flag, flag);
-#endif
- if (gen->basename != basename || strcmp(gen->basename, basename) != 0) {
- free(gen->basename);
- gen->basename = (char*)emalloc(strlen(basename) + 1);
- strcpy(gen->basename, basename);
- }
- gen->type = (u_char) type;
- gen->flag = (u_char) flag;
-
- /*
- * make filegen use the new settings
- * special action is only required when a generation file
- * is currently open
- * otherwise the new settings will be used anyway at the next open
- */
- if (gen->fp != NULL) {
- l_fp now;
-
- get_systime(&now);
- filegen_setup(gen, now.l_ui);
- }
-}
-
-
-/*
- * check whether concatenating prefix and basename
- * yields a legal filename
- */
-static int
-valid_fileref(
- char *prefix,
- char *basename
- )
-{
- /*
- * prefix cannot be changed dynamically
- * (within the context of filegen)
- * so just reject basenames containing '..'
- *
- * ASSUMPTION:
- * file system parts 'below' prefix may be
- * specified without infringement of security
- *
- * restricing prefix to legal values
- * has to be ensured by other means
- * (however, it would be possible to perform some checks here...)
- */
- register char *p = basename;
-
- /*
- * Just to catch, dumb errors opening up the world...
- */
- if (prefix == NULL || *prefix == '\0')
- return 0;
-
- if (basename == NULL)
- return 0;
-
- for (p = basename; p; p = strchr(p, '/')) {
- if (*p == '.' && *(p+1) == '.' && (*(p+2) == '\0' || *(p+2) == '/'))
- return 0;
- }
-
- return 1;
-}
-
-
-/*
- * filegen registry
- */
-
-static struct filegen_entry {
- char *name;
- FILEGEN *filegen;
- struct filegen_entry *next;
-} *filegen_registry = NULL;
-
-
-FILEGEN *
-filegen_get(
- char *name
- )
-{
- struct filegen_entry *f = filegen_registry;
-
- while(f) {
- if (f->name == name || strcmp(name, f->name) == 0) {
-#ifdef XXX /* this gives the Alpha compiler fits */
- if (debug > 3)
- printf("filegen_get(\"%s\") = %x\n", name,
- (u_int)f->filegen);
-#endif
- return f->filegen;
- }
- f = f->next;
- }
-#ifdef DEBUG
- if (debug > 3)
- printf("filegen_get(\"%s\") = NULL\n", name);
-#endif
- return NULL;
-}
-
-void
-filegen_register(
- const char *name,
- FILEGEN *filegen
- )
-{
- struct filegen_entry **f = &filegen_registry;
-
-#ifdef XXX /* this gives the Alpha compiler fits */
- if (debug > 3)
- printf("filegen_register(\"%s\",%x)\n", name, (u_int)filegen);
-#endif
- while (*f) {
- if ((*f)->name == name || strcmp(name, (*f)->name) == 0) {
-#ifdef XXX /* this gives the Alpha compiler fits */
- if (debug > 4) {
- printf("replacing filegen %x\n", (u_int)(*f)->filegen);
- }
-#endif
- (*f)->filegen = filegen;
- return;
- }
- f = &((*f)->next);
- }
-
- *f = (struct filegen_entry *) emalloc(sizeof(struct filegen_entry));
- if (*f) {
- (*f)->next = NULL;
- (*f)->name = (char*)emalloc(strlen(name) + 1);
- strcpy((*f)->name, name);
- (*f)->filegen = filegen;
-#ifdef DEBUG
- if (debug > 5) {
- printf("adding new filegen\n");
- }
-#endif
- }
-
- return;
-}
-
-#ifdef UNUSED
-static FILEGEN *
-filegen_unregister(
- char *name
- )
-{
- struct filegen_entry **f = &filegen_registry;
-
-#ifdef DEBUG
- if (debug > 3)
- printf("filegen_unregister(\"%s\")\n", name);
-#endif
-
- while (*f) {
- if (strcmp((*f)->name,name) == 0) {
- struct filegen_entry *ff = *f;
- FILEGEN *fg;
-
- *f = (*f)->next;
- fg = ff->filegen;
- free(ff->name);
- free(ff);
- return fg;
- }
- f = &((*f)->next);
- }
- return NULL;
-}
-#endif /* UNUSED */
diff --git a/contrib/ntp/ntpd/ntp_intres.c b/contrib/ntp/ntpd/ntp_intres.c
deleted file mode 100644
index 7f27f21..0000000
--- a/contrib/ntp/ntpd/ntp_intres.c
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*
- * ripped off from ../ntpres/ntpres.c by Greg Troxel 4/2/92
- * routine callable from ntpd, rather than separate program
- * also, key info passed in via a global, so no key file needed.
- */
-
-/*
- * ntpres - process configuration entries which require use of the resolver
- *
- * This is meant to be run by ntpd on the fly. It is not guaranteed
- * to work properly if run by hand. This is actually a quick hack to
- * stave off violence from people who hate using numbers in the
- * configuration file (at least I hope the rest of the daemon is
- * better than this). Also might provide some ideas about how one
- * might go about autoconfiguring an NTP distribution network.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_request.h"
-#include "ntp_stdlib.h"
-#include "ntp_syslog.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <signal.h>
-
-/**/
-#include <netinet/in.h>
-#include <arpa/inet.h>
-/**/
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h> /* MAXHOSTNAMELEN (often) */
-#endif
-
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-/*
- * Each item we are to resolve and configure gets one of these
- * structures defined for it.
- */
-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
-#define ce_maxpoll ce_config.maxpoll
-#define ce_flags ce_config.flags
-#define ce_ttl ce_config.ttl
-#define ce_keyid ce_config.keyid
-#define ce_keystr ce_config.keystr
-
-/*
- * confentries is a pointer to the list of configuration entries
- * we have left to do.
- */
-static struct conf_entry *confentries = NULL;
-
-/*
- * We take an interrupt every thirty seconds, at which time we decrement
- * config_timer and resolve_timer. The former is set to 2, so we retry
- * unsucessful reconfigurations every minute. The latter is set to
- * an exponentially increasing value which starts at 2 and increases to
- * 32. When this expires we retry failed name resolutions.
- *
- * We sleep SLEEPTIME seconds before doing anything, to give the server
- * time to arrange itself.
- */
-#define MINRESOLVE 2
-#define MAXRESOLVE 32
-#define CONFIG_TIME 2
-#define ALARM_TIME 30
-#define SLEEPTIME 2
-
-static volatile int config_timer = 0;
-static volatile int resolve_timer = 0;
-
-static int resolve_value; /* next value of resolve timer */
-
-/*
- * Big hack attack
- */
-#define LOCALHOST 0x7f000001 /* 127.0.0.1, in hex, of course */
-#define SKEWTIME 0x08000000 /* 0.03125 seconds as a l_fp fraction */
-
-/*
- * Select time out. Set to 2 seconds. The server is on the local machine,
- * after all.
- */
-#define TIMEOUT_SEC 2
-#define TIMEOUT_USEC 0
-
-
-/*
- * Input processing. The data on each line in the configuration file
- * is supposed to consist of entries in the following order
- */
-#define TOK_HOSTNAME 0
-#define TOK_HMODE 1
-#define TOK_VERSION 2
-#define TOK_MINPOLL 3
-#define TOK_MAXPOLL 4
-#define TOK_FLAGS 5
-#define TOK_TTL 6
-#define TOK_KEYID 7
-#define TOK_KEYSTR 8
-#define NUMTOK 9
-
-#define MAXLINESIZE 512
-
-
-/*
- * File descriptor for ntp request code.
- */
-static SOCKET sockfd = INVALID_SOCKET; /* NT uses SOCKET */
-
-/* stuff to be filled in by caller */
-
-keyid_t req_keyid; /* request keyid */
-char *req_file; /* name of the file with configuration info */
-
-/* end stuff to be filled in */
-
-
-static RETSIGTYPE bong P((int));
-static void checkparent P((void));
-static void removeentry P((struct conf_entry *));
-static void addentry P((char *, int, int, int, int, u_int,
- int, keyid_t, char *));
-static int findhostaddr P((struct conf_entry *));
-static void openntp P((void));
-static int request P((struct conf_peer *));
-static char * nexttoken P((char **));
-static void readconf P((FILE *, char *));
-static void doconfigure P((int));
-
-struct ntp_res_t_pkt { /* Tagged packet: */
- void *tag; /* For the caller */
- u_int32 paddr; /* IP to look up, or 0 */
- char name[MAXHOSTNAMELEN]; /* Name to look up (if 1st byte is not 0) */
-};
-
-struct ntp_res_c_pkt { /* Control packet: */
- char name[MAXHOSTNAMELEN];
- u_int32 paddr;
- int mode;
- int version;
- int minpoll;
- int maxpoll;
- u_int flags;
- int ttl;
- keyid_t keyid;
- u_char keystr[MAXFILENAME];
-};
-
-
-/*
- * ntp_res_recv: Process an answer from the resolver
- */
-
-void
-ntp_res_recv(void)
-{
- /*
- We have data ready on our descriptor.
- It may be an EOF, meaning the resolver process went away.
- Otherwise, it will be an "answer".
- */
-}
-
-
-/*
- * ntp_intres needs;
- *
- * req_key(???), req_keyid, req_file valid
- * syslog still open
- */
-
-void
-ntp_intres(void)
-{
- FILE *in;
-#ifdef HAVE_SIGSUSPEND
- sigset_t set;
-
- sigemptyset(&set);
-#endif /* HAVE_SIGSUSPEND */
-
-#ifdef DEBUG
- if (debug > 1) {
- msyslog(LOG_INFO, "NTP_INTRES running");
- }
-#endif
-
- /* check out auth stuff */
- if (sys_authenticate) {
- if (!authistrusted(req_keyid)) {
- msyslog(LOG_ERR, "invalid request keyid %08x",
- req_keyid );
- exit(1);
- }
- }
-
- /*
- * Read the configuration info
- * {this is bogus, since we are forked, but it is easier
- * to keep this code - gdt}
- */
- if ((in = fopen(req_file, "r")) == NULL) {
- msyslog(LOG_ERR, "can't open configuration file %s: %m",
- req_file);
- exit(1);
- }
- readconf(in, req_file);
- (void) fclose(in);
-
- if (!debug )
- (void) unlink(req_file);
-
- /*
- * Sleep a little to make sure the server is completely up
- */
-
- sleep(SLEEPTIME);
-
- /*
- * Make a first cut at resolving the bunch
- */
- doconfigure(1);
- if (confentries == NULL) {
-#if defined SYS_WINNT
- ExitThread(0); /* Don't want to kill whole NT process */
-#else
- exit(0); /* done that quick */
-#endif
- }
-
- /*
- * Here we've got some problem children. Set up the timer
- * and wait for it.
- */
- resolve_value = resolve_timer = MINRESOLVE;
- config_timer = CONFIG_TIME;
-#ifndef SYS_WINNT
- (void) signal_no_reset(SIGALRM, bong);
- alarm(ALARM_TIME);
-#endif /* SYS_WINNT */
-
- for (;;) {
- if (confentries == NULL)
- exit(0);
-
- checkparent();
-
- if (resolve_timer == 0) {
- if (resolve_value < MAXRESOLVE)
- resolve_value <<= 1;
- resolve_timer = resolve_value;
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "resolve_timer: 0->%d", resolve_timer);
-#endif
- config_timer = CONFIG_TIME;
- doconfigure(1);
- continue;
- } else if (config_timer == 0) {
- config_timer = CONFIG_TIME;
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "config_timer: 0->%d", config_timer);
-#endif
- doconfigure(0);
- continue;
- }
-#ifndef SYS_WINNT
- /*
- * There is a race in here. Is okay, though, since
- * all it does is delay things by 30 seconds.
- */
-# ifdef HAVE_SIGSUSPEND
- sigsuspend(&set);
-# else
- sigpause(0);
-# endif /* HAVE_SIGSUSPEND */
-#else
- if (config_timer > 0)
- config_timer--;
- if (resolve_timer > 0)
- resolve_timer--;
- sleep(ALARM_TIME);
-#endif /* SYS_WINNT */
- }
-}
-
-
-#ifndef SYS_WINNT
-/*
- * bong - service and reschedule an alarm() interrupt
- */
-static RETSIGTYPE
-bong(
- int sig
- )
-{
- if (config_timer > 0)
- config_timer--;
- if (resolve_timer > 0)
- resolve_timer--;
- alarm(ALARM_TIME);
-}
-#endif /* SYS_WINNT */
-
-/*
- * checkparent - see if our parent process is still running
- *
- * No need to worry in the Windows NT environment whether the
- * main thread is still running, because if it goes
- * down it takes the whole process down with it (in
- * which case we won't be running this thread either)
- * Turn function into NOP;
- */
-
-static void
-checkparent(void)
-{
-#if !defined (SYS_WINNT) && !defined (SYS_VXWORKS)
-
- /*
- * If our parent (the server) has died we will have been
- * inherited by init. If so, exit.
- */
- if (getppid() == 1) {
- msyslog(LOG_INFO, "parent died before we finished, exiting");
- exit(0);
- }
-#endif /* SYS_WINNT && SYS_VXWORKS*/
-}
-
-
-
-/*
- * removeentry - we are done with an entry, remove it from the list
- */
-static void
-removeentry(
- struct conf_entry *entry
- )
-{
- register struct conf_entry *ce;
-
- ce = confentries;
- if (ce == entry) {
- confentries = ce->ce_next;
- return;
- }
-
- while (ce != NULL) {
- if (ce->ce_next == entry) {
- ce->ce_next = entry->ce_next;
- return;
- }
- ce = ce->ce_next;
- }
-}
-
-
-/*
- * addentry - add an entry to the configuration list
- */
-static void
-addentry(
- char *name,
- int mode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t keyid,
- char *keystr
- )
-{
- register char *cp;
- register struct conf_entry *ce;
- unsigned int len;
-
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "intres: <%s> %d %d %d %d %x %d %x %s\n", name,
- mode, version, minpoll, maxpoll, flags, ttl, keyid,
- keystr);
-#endif
- len = strlen(name) + 1;
- cp = (char *)emalloc(len);
- memmove(cp, name, len);
-
- 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;
- ce->ce_maxpoll = (u_char)maxpoll;
- ce->ce_flags = (u_char)flags;
- ce->ce_ttl = (u_char)ttl;
- ce->ce_keyid = keyid;
- strncpy((char *)ce->ce_keystr, keystr, MAXFILENAME);
- ce->ce_next = NULL;
-
- if (confentries == NULL) {
- confentries = ce;
- } else {
- register struct conf_entry *cep;
-
- for (cep = confentries; cep->ce_next != NULL;
- cep = cep->ce_next)
- /* nothing */;
- cep->ce_next = ce;
- }
-}
-
-
-/*
- * findhostaddr - resolve a host name into an address (Or vice-versa)
- *
- * Given one of {ce_peeraddr,ce_name}, find the other one.
- * It returns 1 for "success" and 0 for an uncorrectable failure.
- * Note that "success" includes try again errors. You can tell that you
- * got a "try again" since {ce_peeraddr,ce_name} will still be zero.
- */
-static int
-findhostaddr(
- struct conf_entry *entry
- )
-{
- struct addrinfo *addr;
- int error;
-
- checkparent(); /* make sure our guy is still running */
-
- 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 == NULL && !SOCKNUL(&entry->peer_store)) {
- msyslog(LOG_ERR, "findhostaddr: both ce_name and ce_peeraddr are undefined!");
- return 0;
- }
-
- if (entry->ce_name) {
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "findhostaddr: Resolving <%s>",
- entry->ce_name);
-#endif /* DEBUG */
- 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 %s>",
- stoa(&entry->peer_store));
-#endif
- 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 (error != 0) {
- /*
- * If the resolver is in use, see if the failure is
- * temporary. If so, return success.
- */
- if (h_errno == TRY_AGAIN)
- return (1);
- return (0);
- }
-
- if (entry->ce_name) {
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "findhostaddr: name resolved.");
-#endif
-
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "findhostaddr: address resolved.");
-#endif
- }
-
- return (1);
-}
-
-
-/*
- * openntp - open a socket to the ntp server
- */
-static void
-openntp(void)
-{
- struct addrinfo hints;
- struct addrinfo *addrResult;
-
- if (sockfd >= 0)
- return;
-
- 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);
- }
-
- /*
- * Make the socket non-blocking. We'll wait with select()
- */
-#ifndef SYS_WINNT
-#if defined(O_NONBLOCK)
- if (fcntl(sockfd, F_SETFL, O_NONBLOCK) == -1) {
- msyslog(LOG_ERR, "fcntl(O_NONBLOCK) failed: %m");
- exit(1);
- }
-#else
-#if defined(FNDELAY)
- if (fcntl(sockfd, F_SETFL, FNDELAY) == -1) {
- msyslog(LOG_ERR, "fcntl(FNDELAY) failed: %m");
- exit(1);
- }
-#else
-# include "Bletch: NEED NON BLOCKING IO"
-#endif /* FNDDELAY */
-#endif /* O_NONBLOCK */
-#else /* SYS_WINNT */
- {
- int on = 1;
- if (ioctlsocket(sockfd,FIONBIO,(u_long *) &on) == SOCKET_ERROR) {
- msyslog(LOG_ERR, "ioctlsocket(FIONBIO) fails: %m");
- exit(1); /* Windows NT - set socket in non-blocking mode */
- }
- }
-#endif /* SYS_WINNT */
- if (connect(sockfd, addrResult->ai_addr, addrResult->ai_addrlen) == -1) {
- msyslog(LOG_ERR, "openntp: connect() failed: %m");
- exit(1);
- }
- freeaddrinfo(addrResult);
-}
-
-
-/*
- * request - send a configuration request to the server, wait for a response
- */
-static int
-request(
- struct conf_peer *conf
- )
-{
- fd_set fdset;
- struct timeval tvout;
- struct req_pkt reqpkt;
- l_fp ts;
- int n;
-#ifdef SYS_WINNT
- HANDLE hReadWriteEvent = NULL;
- BOOL ret;
- DWORD NumberOfBytesWritten, NumberOfBytesRead, dwWait;
- OVERLAPPED overlap;
-#endif /* SYS_WINNT */
-
- checkparent(); /* make sure our guy is still running */
-
- if (sockfd < 0)
- openntp();
-
-#ifdef SYS_WINNT
- hReadWriteEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
-#endif /* SYS_WINNT */
-
- /*
- * Try to clear out any previously received traffic so it
- * doesn't fool us. Note the socket is nonblocking.
- */
- tvout.tv_sec = 0;
- tvout.tv_usec = 0;
- FD_ZERO(&fdset);
- FD_SET(sockfd, &fdset);
- while (select(sockfd + 1, &fdset, (fd_set *)0, (fd_set *)0, &tvout) >
- 0) {
- recv(sockfd, (char *)&reqpkt, REQ_LEN_MAC, 0);
- FD_ZERO(&fdset);
- FD_SET(sockfd, &fdset);
- }
-
- /*
- * Make up a request packet with the configuration info
- */
- memset((char *)&reqpkt, 0, sizeof(reqpkt));
-
- reqpkt.rm_vn_mode = RM_VN_MODE(0, 0, 0);
- reqpkt.auth_seq = AUTH_SEQ(1, 0); /* authenticated, no seq */
- reqpkt.implementation = IMPL_XNTPD; /* local implementation */
- reqpkt.request = REQ_CONFIG; /* configure a new peer */
- reqpkt.err_nitems = ERR_NITEMS(0, 1); /* one item */
- reqpkt.mbz_itemsize = MBZ_ITEMSIZE(sizeof(struct conf_peer));
- /* Make sure mbz_itemsize <= sizeof reqpkt.data */
- if (sizeof(struct conf_peer) > sizeof (reqpkt.data)) {
- msyslog(LOG_ERR, "Bletch: conf_peer is too big for reqpkt.data!");
- exit(1);
- }
- memmove(reqpkt.data, (char *)conf, sizeof(struct conf_peer));
- reqpkt.keyid = htonl(req_keyid);
-
- get_systime(&ts);
- L_ADDUF(&ts, SKEWTIME);
- HTONL_FP(&ts, &reqpkt.tstamp);
- n = 0;
- if (sys_authenticate)
- n = authencrypt(req_keyid, (u_int32 *)&reqpkt, REQ_LEN_NOMAC);
-
- /*
- * Done. Send it.
- */
-#ifndef SYS_WINNT
- n = send(sockfd, (char *)&reqpkt, (unsigned)(REQ_LEN_NOMAC + n), 0);
- if (n < 0) {
- msyslog(LOG_ERR, "send to NTP server failed: %m");
- return 0; /* maybe should exit */
- }
-#else
- /* In the NT world, documentation seems to indicate that there
- * exist _write and _read routines that can be used to do blocking
- * I/O on sockets. Problem is these routines require a socket
- * handle obtained through the _open_osf_handle C run-time API
- * of which there is no explanation in the documentation. We need
- * nonblocking write's and read's anyway for our purpose here.
- * We're therefore forced to deviate a little bit from the Unix
- * model here and use the ReadFile and WriteFile Win32 I/O API's
- * on the socket
- */
- overlap.Offset = overlap.OffsetHigh = (DWORD)0;
- overlap.hEvent = hReadWriteEvent;
- ret = WriteFile((HANDLE)sockfd, (char *)&reqpkt, REQ_LEN_NOMAC + n,
- (LPDWORD)&NumberOfBytesWritten, (LPOVERLAPPED)&overlap);
- if ((ret == FALSE) && (GetLastError() != ERROR_IO_PENDING)) {
- msyslog(LOG_ERR, "send to NTP server failed: %m");
- return 0;
- }
- dwWait = WaitForSingleObject(hReadWriteEvent, (DWORD) TIMEOUT_SEC * 1000);
- if ((dwWait == WAIT_FAILED) || (dwWait == WAIT_TIMEOUT)) {
- if (dwWait == WAIT_FAILED)
- msyslog(LOG_ERR, "WaitForSingleObject failed: %m");
- return 0;
- }
-#endif /* SYS_WINNT */
-
-
- /*
- * Wait for a response. A weakness of the mode 7 protocol used
- * is that there is no way to associate a response with a
- * particular request, i.e. the response to this configuration
- * request is indistinguishable from that to any other. I should
- * fix this some day. In any event, the time out is fairly
- * pessimistic to make sure that if an answer is coming back
- * at all, we get it.
- */
- for (;;) {
- FD_ZERO(&fdset);
- FD_SET(sockfd, &fdset);
- tvout.tv_sec = TIMEOUT_SEC;
- tvout.tv_usec = TIMEOUT_USEC;
-
- n = select(sockfd + 1, &fdset, (fd_set *)0,
- (fd_set *)0, &tvout);
-
- if (n < 0)
- {
- if (errno != EINTR)
- msyslog(LOG_ERR, "select() fails: %m");
- return 0;
- }
- else if (n == 0)
- {
- if (debug)
- msyslog(LOG_INFO, "select() returned 0.");
- return 0;
- }
-
-#ifndef SYS_WINNT
- n = recv(sockfd, (char *)&reqpkt, REQ_LEN_MAC, 0);
- if (n <= 0) {
- if (n < 0) {
- msyslog(LOG_ERR, "recv() fails: %m");
- return 0;
- }
- continue;
- }
-#else /* Overlapped I/O used on non-blocking sockets on Windows NT */
- ret = ReadFile((HANDLE)sockfd, (char *)&reqpkt, (DWORD)REQ_LEN_MAC,
- (LPDWORD)&NumberOfBytesRead, (LPOVERLAPPED)&overlap);
- if ((ret == FALSE) && (GetLastError() != ERROR_IO_PENDING)) {
- msyslog(LOG_ERR, "ReadFile() fails: %m");
- return 0;
- }
- dwWait = WaitForSingleObject(hReadWriteEvent, (DWORD) TIMEOUT_SEC * 1000);
- if ((dwWait == WAIT_FAILED) || (dwWait == WAIT_TIMEOUT)) {
- if (dwWait == WAIT_FAILED) {
- msyslog(LOG_ERR, "WaitForSingleObject fails: %m");
- return 0;
- }
- continue;
- }
- n = NumberOfBytesRead;
-#endif /* SYS_WINNT */
-
- /*
- * Got one. Check through to make sure it is what
- * we expect.
- */
- if (n < RESP_HEADER_SIZE) {
- msyslog(LOG_ERR, "received runt response (%d octets)",
- n);
- continue;
- }
-
- if (!ISRESPONSE(reqpkt.rm_vn_mode)) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO, "received non-response packet");
-#endif
- continue;
- }
-
- if (ISMORE(reqpkt.rm_vn_mode)) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO, "received fragmented packet");
-#endif
- continue;
- }
-
- if ( ( (INFO_VERSION(reqpkt.rm_vn_mode) < 2)
- || (INFO_VERSION(reqpkt.rm_vn_mode) > NTP_VERSION))
- || INFO_MODE(reqpkt.rm_vn_mode) != MODE_PRIVATE) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "version (%d/%d) or mode (%d/%d) incorrect",
- INFO_VERSION(reqpkt.rm_vn_mode),
- NTP_VERSION,
- INFO_MODE(reqpkt.rm_vn_mode),
- MODE_PRIVATE);
-#endif
- continue;
- }
-
- if (INFO_SEQ(reqpkt.auth_seq) != 0) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "nonzero sequence number (%d)",
- INFO_SEQ(reqpkt.auth_seq));
-#endif
- continue;
- }
-
- if (reqpkt.implementation != IMPL_XNTPD ||
- reqpkt.request != REQ_CONFIG) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "implementation (%d) or request (%d) incorrect",
- reqpkt.implementation, reqpkt.request);
-#endif
- continue;
- }
-
- if (INFO_NITEMS(reqpkt.err_nitems) != 0 ||
- INFO_MBZ(reqpkt.mbz_itemsize) != 0 ||
- INFO_ITEMSIZE(reqpkt.mbz_itemsize) != 0) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "nitems (%d) mbz (%d) or itemsize (%d) nonzero",
- INFO_NITEMS(reqpkt.err_nitems),
- INFO_MBZ(reqpkt.mbz_itemsize),
- INFO_ITEMSIZE(reqpkt.mbz_itemsize));
-#endif
- continue;
- }
-
- n = INFO_ERR(reqpkt.err_nitems);
- switch (n) {
- case INFO_OKAY:
- /* success */
- return 1;
-
- case INFO_ERR_IMPL:
- msyslog(LOG_ERR,
- "ntpd reports implementation mismatch!");
- return 0;
-
- case INFO_ERR_REQ:
- msyslog(LOG_ERR,
- "ntpd says configuration request is unknown!");
- return 0;
-
- case INFO_ERR_FMT:
- msyslog(LOG_ERR,
- "ntpd indicates a format error occurred!");
- return 0;
-
- case INFO_ERR_NODATA:
- msyslog(LOG_ERR,
- "ntpd indicates no data available!");
- return 0;
-
- case INFO_ERR_AUTH:
- msyslog(LOG_ERR,
- "ntpd returns a permission denied error!");
- return 0;
-
- default:
- msyslog(LOG_ERR,
- "ntpd returns unknown error code %d!", n);
- return 0;
- }
- }
-}
-
-
-/*
- * nexttoken - return the next token from a line
- */
-static char *
-nexttoken(
- char **lptr
- )
-{
- register char *cp;
- register char *tstart;
-
- cp = *lptr;
-
- /*
- * Skip leading white space
- */
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- /*
- * If this is the end of the line, return nothing.
- */
- if (*cp == '\n' || *cp == '\0') {
- *lptr = cp;
- return NULL;
- }
-
- /*
- * Must be the start of a token. Record the pointer and look
- * for the end.
- */
- tstart = cp++;
- while (*cp != ' ' && *cp != '\t' && *cp != '\n' && *cp != '\0')
- cp++;
-
- /*
- * Terminate the token with a \0. If this isn't the end of the
- * line, space to the next character.
- */
- if (*cp == '\n' || *cp == '\0')
- *cp = '\0';
- else
- *cp++ = '\0';
-
- *lptr = cp;
- return tstart;
-}
-
-
-/*
- * readconf - read the configuration information out of the file we
- * were passed. Note that since the file is supposed to be
- * machine generated, we bail out at the first sign of trouble.
- */
-static void
-readconf(
- FILE *fp,
- char *name
- )
-{
- register int i;
- char *token[NUMTOK];
- u_long intval[NUMTOK];
- u_int flags;
- char buf[MAXLINESIZE];
- char *bp;
-
- while (fgets(buf, MAXLINESIZE, fp) != NULL) {
-
- bp = buf;
- for (i = 0; i < NUMTOK; i++) {
- if ((token[i] = nexttoken(&bp)) == NULL) {
- msyslog(LOG_ERR,
- "tokenizing error in file `%s', quitting",
- name);
- exit(1);
- }
- }
-
- for (i = 1; i < NUMTOK - 1; i++) {
- if (!atouint(token[i], &intval[i])) {
- msyslog(LOG_ERR,
- "format error for integer token `%s', file `%s', quitting",
- token[i], name);
- exit(1);
- }
- }
-
- if (intval[TOK_HMODE] != MODE_ACTIVE &&
- intval[TOK_HMODE] != MODE_CLIENT &&
- intval[TOK_HMODE] != MODE_BROADCAST) {
- msyslog(LOG_ERR, "invalid mode (%ld) in file %s",
- intval[TOK_HMODE], name);
- exit(1);
- }
-
- if (intval[TOK_VERSION] > NTP_VERSION ||
- intval[TOK_VERSION] < NTP_OLDVERSION) {
- msyslog(LOG_ERR, "invalid version (%ld) in file %s",
- intval[TOK_VERSION], name);
- exit(1);
- }
- if (intval[TOK_MINPOLL] < NTP_MINPOLL ||
- intval[TOK_MINPOLL] > NTP_MAXPOLL) {
- msyslog(LOG_ERR, "invalid MINPOLL value (%ld) in file %s",
- intval[TOK_MINPOLL], name);
- exit(1);
- }
-
- if (intval[TOK_MAXPOLL] < NTP_MINPOLL ||
- intval[TOK_MAXPOLL] > NTP_MAXPOLL) {
- msyslog(LOG_ERR, "invalid MAXPOLL value (%ld) in file %s",
- intval[TOK_MAXPOLL], name);
- exit(1);
- }
-
- if ((intval[TOK_FLAGS] & ~(FLAG_AUTHENABLE | FLAG_PREFER |
- FLAG_NOSELECT | FLAG_BURST | FLAG_IBURST | FLAG_SKEY))
- != 0) {
- msyslog(LOG_ERR, "invalid flags (%ld) in file %s",
- intval[TOK_FLAGS], name);
- exit(1);
- }
-
- flags = 0;
- if (intval[TOK_FLAGS] & FLAG_AUTHENABLE)
- flags |= CONF_FLAG_AUTHENABLE;
- if (intval[TOK_FLAGS] & FLAG_PREFER)
- flags |= CONF_FLAG_PREFER;
- if (intval[TOK_FLAGS] & FLAG_NOSELECT)
- flags |= CONF_FLAG_NOSELECT;
- if (intval[TOK_FLAGS] & FLAG_BURST)
- flags |= CONF_FLAG_BURST;
- if (intval[TOK_FLAGS] & FLAG_IBURST)
- flags |= CONF_FLAG_IBURST;
- if (intval[TOK_FLAGS] & FLAG_SKEY)
- flags |= CONF_FLAG_SKEY;
-
- /*
- * This is as good as we can check it. Add it in.
- */
- addentry(token[TOK_HOSTNAME], (int)intval[TOK_HMODE],
- (int)intval[TOK_VERSION], (int)intval[TOK_MINPOLL],
- (int)intval[TOK_MAXPOLL], flags, (int)intval[TOK_TTL],
- intval[TOK_KEYID], token[TOK_KEYSTR]);
- }
-}
-
-
-/*
- * doconfigure - attempt to resolve names and configure the server
- */
-static void
-doconfigure(
- int dores
- )
-{
- register struct conf_entry *ce;
- register struct conf_entry *ceremove;
-
- ce = confentries;
- while (ce != NULL) {
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "doconfigure: <%s> has peeraddr %s",
- ce->ce_name, stoa(&ce->peer_store));
-#endif
- if (dores && !SOCKNUL(&(ce->peer_store))) {
- if (!findhostaddr(ce)) {
- msyslog(LOG_ERR,
- "couldn't resolve `%s', giving up on it",
- ce->ce_name);
- ceremove = ce;
- ce = ceremove->ce_next;
- removeentry(ceremove);
- continue;
- }
- }
-
- if (!SOCKNUL(&ce->peer_store)) {
- if (request(&ce->ce_config)) {
- ceremove = ce;
- ce = ceremove->ce_next;
- removeentry(ceremove);
- continue;
- }
-#ifdef DEBUG
- if (debug > 1) {
- msyslog(LOG_INFO,
- "doconfigure: request() FAILED, maybe next time.");
- }
-#endif
- }
- ce = ce->ce_next;
- }
-}
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
deleted file mode 100644
index 9f2acea..0000000
--- a/contrib/ntp/ntpd/ntp_io.c
+++ /dev/null
@@ -1,2257 +0,0 @@
-/*
- * ntp_io.c - input/output routines for ntpd. The socket-opening code
- * was shamelessly stolen from ntpd.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "iosignal.h"
-#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>
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#else /* Some old linux systems at least have in_system.h instead. */
-# ifdef HAVE_NETINET_IN_SYSTEM_H
-# include <netinet/in_system.h>
-# endif
-#endif /* HAVE_NETINET_IN_SYSTM_H */
-#ifdef HAVE_NETINET_IP_H
-# include <netinet/ip.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_SOCKIO_H /* UXPV: SIOC* #defines (Frank Vance <fvance@waii.com>) */
-# include <sys/sockio.h>
-#endif
-#include <arpa/inet.h>
-
-extern int listen_to_virtual_ips;
-
-#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
-
-#endif
-
-/*
- * We do asynchronous input using the SIGIO facility. A number of
- * recvbuf buffers are preallocated for input. In the signal
- * handler we poll to see which sockets are ready and read the
- * packets from them into the recvbuf's along with a time stamp and
- * an indication of the source host and the interface it was received
- * through. This allows us to get as accurate receive time stamps
- * as possible independent of other processing going on.
- *
- * We watch the number of recvbufs available to the signal handler
- * and allocate more when this number drops below the low water
- * mark. If the signal handler should run out of buffers in the
- * interim it will drop incoming frames, the idea being that it is
- * better to drop a packet than to be inaccurate.
- */
-
-
-/*
- * Other statistics of possible interest
- */
-volatile u_long packets_dropped; /* total number of packets dropped on reception */
-volatile u_long packets_ignored; /* packets received on wild card interface */
-volatile u_long packets_received; /* total number of packets received */
-u_long packets_sent; /* total number of packets sent */
-u_long packets_notsent; /* total number of packets which couldn't be sent */
-
-volatile u_long handler_calls; /* number of calls to interrupt handler */
-volatile u_long handler_pkts; /* number of pkts received by handler */
-u_long io_timereset; /* time counters were reset */
-
-/*
- * Interface stuff
- */
-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
-/*
- * Refclock stuff. We keep a chain of structures with data concerning
- * the guys we are doing I/O for.
- */
-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_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
- */
-void
-init_io(void)
-{
-#ifdef SYS_WINNT
- init_transmitbuff();
-#endif /* SYS_WINNT */
-
- /*
- * Init buffer free list and stat counters
- */
- init_recvbuff(RECV_INIT);
-
- packets_dropped = packets_received = 0;
- packets_ignored = 0;
- packets_sent = packets_notsent = 0;
- handler_calls = handler_pkts = 0;
- io_timereset = 0;
- loopback_interface = NULL;
- loopback6_interface = NULL;
-
-#ifdef REFCLOCK
- refio = 0;
-#endif
-
-#if defined(HAVE_SIGNALED_IO)
- (void) set_signal();
-#endif
-
-#ifdef SYS_WINNT
- if (!Win32InitSockets())
- {
- 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
- */
- BLOCKIO();
- (void) create_sockets(htons(NTP_PORT));
- UNBLOCKIO();
-
-#ifdef DEBUG
- if (debug)
- printf("init_io: maxactivefd %d\n", maxactivefd);
-#endif
-}
-
-int
-create_wildcards(u_short port) {
-
- 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 IPv6 address
- */
- 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++;
- }
-#endif
- return (idx);
-}
-
-isc_boolean_t
-address_okay(isc_interface_t *isc_if) {
-
-#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
-
- if (listen_to_virtual_ips == 0 && (strchr(isc_if->name, (int)':') != NULL))
- return (ISC_FALSE);
-
- /* 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;
- }
-
- 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 (((isc_if->flags & INTERFACE_F_LOOPBACK) != 0) && (loopback_interface == NULL))
- {
- loopback_interface = itf;
- }
- }
-#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 /* HAVE_IPV6 */
-
- /* 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;
-
-#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
-
- 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))
- {
- isc_interface_t isc_if;
- unsigned int family;
-
- result = isc_interfaceiter_current(iter, &isc_if);
- if (result != ISC_R_SUCCESS)
- break;
-
- /* See if we have a valid family to use */
- family = isc_if.address.family;
- if (family != AF_INET && family != AF_INET6)
- continue;
- if (scan_ipv4 == ISC_FALSE && family == AF_INET)
- continue;
- if (scan_ipv6 == ISC_FALSE && family == AF_INET6)
- 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++;
- }
- }
- isc_interfaceiter_destroy(&iter);
-
- 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);
- 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
- }
-
- /*
- * Now that we have opened all the sockets, turn off the reuse
- * flag for security.
- */
- set_reuseaddr(0);
-
- /*
- * Blacklist all bound interface addresses
- * Wildcard interfaces are ignored.
- */
-
- 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);
- for (i = 0; i < ninterfaces; i++) {
- printf("interface %d: fd=%d, bfd=%d, name=%.8s, flags=0x%x\n",
- i,
- inter_list[i].fd,
- inter_list[i].bfd,
- inter_list[i].name,
- inter_list[i].flags);
- /* Leave these as three printf calls. */
- printf(" sin=%s",
- stoa((&inter_list[i].sin)));
- if (inter_list[i].flags & INT_BROADCAST)
- printf(" bcast=%s,",
- stoa((&inter_list[i].bcast)));
- printf(" mask=%s\n",
- stoa((&inter_list[i].mask)));
- }
- }
-#endif
- return ninterfaces;
-}
-
-/*
- * io_setbclient - open the broadcast client sockets
- */
-void
-io_setbclient(void)
-{
- int 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;
-
-#ifdef SYS_SOLARIS
- inter_list[i].bcast.sin_addr.s_addr = htonl(INADDR_ANY);
-#endif
-#ifdef OPEN_BCAST_SOCKET /* Was: !SYS_DOMAINOS && !SYS_LINUX */
- inter_list[i].bfd = open_socket(&inter_list[i].bcast,
- INT_BROADCAST, 1);
- 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");
- }
- }
- }
-}
-
-
-/*
- * io_multicast_add() - add multicast group address
- */
-void
-io_multicast_add(
- struct sockaddr_storage addr
- )
-{
-#ifdef MCAST
- struct ip_mreq mreq;
- int i = ninterfaces; /* Use the next interface */
- u_int32 haddr = ntohl(((struct sockaddr_in*)&addr)->sin_addr.s_addr);
- struct in_addr iaddr;
- SOCKET s;
- struct sockaddr_in *sinp;
-
-#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;
- }
- 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;
-
-#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 */
- }
-
-#ifdef DEBUG
- if (debug)
- printf("io_multicast_add %s\n", stoa(&addr));
-#endif
-#else /* MCAST */
- netsyslog(LOG_ERR,
- "cannot add multicast address %s as no MCAST support",
- stoa(&addr));
-#endif /* MCAST */
-}
-
-/*
- * io_unsetbclient - close the broadcast client sockets
- */
-void
-io_unsetbclient(void)
-{
- int 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 = INVALID_SOCKET;
- inter_list[i].flags &= ~INT_BCASTOPEN;
- }
-}
-
-
-/*
- * io_multicast_del() - delete multicast group address
- */
-void
-io_multicast_del(
- struct sockaddr_storage addr
- )
-{
-#ifdef MCAST
- int i;
- struct ip_mreq mreq;
- u_int32 haddr;
-
-#ifdef HAVE_IPV6
- struct ipv6_mreq mreq6;
- struct in6_addr haddr6;
-#endif /* HAVE_IPV6 */
-
- switch (addr.ss_family)
- {
- case AF_INET :
-
- haddr = ntohl(((struct sockaddr_in*)&addr)->sin_addr.s_addr);
-
- if (!IN_CLASSD(haddr))
- {
- netsyslog(LOG_ERR,
- "invalid multicast address %s", stoa(&addr));
- return;
- }
-
- /*
- * 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++)
- {
- /* 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 */
- netsyslog(LOG_ERR, "this function requires multicast kernel");
-#endif /* not MCAST */
-}
-
-
-/*
- * open_socket - open a socket, returning the file descriptor
- */
-
-static SOCKET
-open_socket(
- struct sockaddr_storage *addr,
- int flags,
- int turn_off_reuse
- )
-{
- 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 */
-#ifndef SYS_WINNT
- 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
- 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)))
- {
- 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 (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, SOCKLEN(addr)) < 0) {
- char buff[160];
-
- 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 multicast address
- */
- 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 INVALID_SOCKET;
-#endif
- }
-#ifdef DEBUG
- if (debug)
- printf("bind() fd %d, family %d, port %d, addr %s, flags=%d\n",
- fd,
- 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,
- */
-
-#ifdef USE_FIONBIO
- /* in vxWorks we use FIONBIO, but the others are defined for old systems, so
- * all hell breaks loose if we leave them defined
- */
-#undef O_NONBLOCK
-#undef FNDELAY
-#undef O_NDELAY
-#endif
-
-#if defined(O_NONBLOCK) /* POSIX */
- if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
- {
- 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)
- {
- 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)
- {
- netsyslog(LOG_ERR, "fcntl(O_NDELAY) fails on address %s: %m",
- stoa(addr));
- exit(1);
- /*NOTREACHED*/
- }
-#elif defined(FIONBIO)
-# if defined(VMS)
- if (ioctl(fd,FIONBIO,&on) < 0)
-# elif defined(SYS_WINNT)
- if (ioctlsocket(fd,FIONBIO,(u_long *) &on) == SOCKET_ERROR)
-# else
- if (ioctl(fd,FIONBIO,&on) < 0)
-# endif
- {
- netsyslog(LOG_ERR, "ioctl(FIONBIO) fails on address %s: %m",
- stoa(addr));
- exit(1);
- /*NOTREACHED*/
- }
-#elif defined(FIOSNBIO)
- if (ioctl(fd,FIOSNBIO,&on) < 0)
- {
- netsyslog(LOG_ERR, "ioctl(FIOSNBIO) fails on address %s: %m",
- stoa(addr));
- exit(1);
- /*NOTREACHED*/
- }
-#else
-# include "Bletch: Need non-blocking I/O!"
-#endif
-
-#ifdef HAVE_SIGNALED_IO
- init_socket_sig(fd);
-#endif /* not HAVE_SIGNALED_IO */
-
- /*
- * Turn off the SO_REUSEADDR socket option. It apparently
- * causes heartburn on systems with multicast IP installed.
- * On normal systems it only gets looked at when the address
- * is being bound anyway..
- */
- if (turn_off_reuse)
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
- (char *)&off, sizeof(off)))
- {
- netsyslog(LOG_ERR, "setsockopt SO_REUSEADDR off fails on address %s: %m",
- stoa(addr));
- }
-
-#ifdef SO_BROADCAST
- /* if this interface can support broadcast, set SO_BROADCAST */
- if (flags & INT_BROADCAST)
- {
- if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST,
- (char *)&on, sizeof(on)))
- {
- netsyslog(LOG_ERR, "setsockopt(SO_BROADCAST) on address %s: %m",
- stoa(addr));
- }
- }
-#endif /* SO_BROADCAST */
-
-#if !defined(SYS_WINNT) && !defined(VMS)
-# ifdef DEBUG
- if (debug > 1)
- printf("flags for fd %d: 0%o\n", fd,
- fcntl(fd, F_GETFL, 0));
-# endif
-#endif /* SYS_WINNT || VMS */
-
- return fd;
-}
-
-
-/*
- * close_socket - close a socket and remove from the activefd list
- */
-static void
-close_socket(
- SOCKET fd
- )
-{
- 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) {
- newmax = 0;
- for (i = 0; i < maxactivefd; i++)
- if (FD_ISSET(i, &activefds))
- newmax = i;
- maxactivefd = newmax;
- }
-#endif
- delete_socket_from_list(fd);
-
-}
-
-
-/*
- * 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(
- 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) {
- 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 */
-/*
- * sendpkt - send a packet to the specified destination. Maintain a
- * send error cache so that only the first consecutive error for a
- * destination is logged.
- */
-void
-sendpkt(
- struct sockaddr_storage *dest,
- struct interface *inter,
- int ttl,
- struct pkt *pkt,
- int len
- )
-{
- int cc, slot;
-#ifdef SYS_WINNT
- DWORD err;
-#endif /* SYS_WINNT */
-
- /*
- * Send error caches. Empty slots have port == 0
- * Set ERRORCACHESIZE to 0 to disable
- */
- struct cache {
- u_short port;
- 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, stoa(dest),
- stoa(&inter->sin), ttl, len);
-#endif
-
-#ifdef MCAST
-
- switch (inter->sin.ss_family) {
-
- case AF_INET :
-
- /*
- * 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 (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(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
-#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)
-#endif
- {
- /*
- * Remember this, if there's an empty slot
- */
- 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
- {
- inter->sent++;
- packets_sent++;
- /*
- * He's not bad any more
- */
- if (slot >= 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 */
- }
- }
- }
-}
-
-#if !defined(HAVE_IO_COMPLETION_PORT)
-/*
- * fdbits - generate ascii representation of fd_set (FAU debug support)
- * HFDF format - highest fd first.
- */
-static char *
-fdbits(
- int count,
- fd_set *set
- )
-{
- static char buffer[256];
- char * buf = buffer;
-
- count = (count < 256) ? count : 255;
-
- while (count >= 0)
- {
- *buf++ = FD_ISSET(count, set) ? '#' : '-';
- count--;
- }
- *buf = '\0';
-
- return buffer;
-}
-
-/*
- * input_handler - receive packets asynchronously
- */
-void
-input_handler(
- l_fp *cts
- )
-{
- register int i, n;
- register struct recvbuf *rb;
- register int doing;
- register SOCKET fd;
- struct timeval tvzero;
- int fromlen;
- l_fp ts; /* Timestamp at BOselect() gob */
- l_fp ts_e; /* Timestamp at EOselect() gob */
- fd_set fds;
- int select_count = 0;
- static int handler_count = 0;
-
- ++handler_count;
- if (handler_count != 1)
- msyslog(LOG_ERR, "input_handler: handler_count is %d!", handler_count);
- handler_calls++;
- ts = *cts;
-
- for (;;)
- {
- /*
- * Do a poll to see who has data
- */
-
- fds = activefds;
- tvzero.tv_sec = tvzero.tv_usec = 0;
-
- /*
- * If we have something to do, freeze a timestamp.
- * See below for the other cases (nothing (left) to do or error)
- */
- while (0 < (n = select(maxactivefd+1, &fds, (fd_set *)0, (fd_set *)0, &tvzero)))
- {
- ++select_count;
- ++handler_pkts;
-
-#ifdef REFCLOCK
- /*
- * Check out the reference clocks first, if any
- */
- if (refio != 0)
- {
- register struct refclockio *rp;
-
- for (rp = refio; rp != 0 && n > 0; rp = rp->next)
- {
- fd = rp->fd;
- if (FD_ISSET(fd, &fds))
- {
- n--;
- if (free_recvbuffs() == 0)
- {
- char buf[RX_BUFF_SIZE];
-
- (void) read(fd, buf, sizeof buf);
- packets_dropped++;
- goto select_again;
- }
-
- rb = get_free_recv_buffer();
-
- i = (rp->datalen == 0
- || rp->datalen > sizeof(rb->recv_space))
- ? sizeof(rb->recv_space) : rp->datalen;
- rb->recv_length =
- read(fd, (char *)&rb->recv_space, (unsigned)i);
-
- if (rb->recv_length == -1)
- {
- 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.
- */
- rb->recv_srcclock = rp->srcclock;
- rb->dstadr = 0;
- rb->fd = fd;
- rb->recv_time = ts;
- rb->receiver = rp->clock_recv;
-
- if (rp->io_input)
- {
- /*
- * have direct
- * input routine
- * for refclocks
- */
- if (rp->io_input(rb) == 0)
- {
- /*
- * data
- * was
- * consumed
- * -
- * nothing
- * to
- * pass
- * up
- * into
- * block
- * input
- * machine
- */
- freerecvbuf(rb);
-#if 1
- goto select_again;
-#else
- continue;
-#endif
- }
- }
-
- add_full_recv_buffer(rb);
-
- rp->recvcount++;
- packets_received++;
- }
- }
- }
-#endif /* REFCLOCK */
-
- /*
- * Loop through the interfaces looking for data
- * to read.
- */
- for (i = ninterfaces - 1; (i >= 0) && (n > 0); i--)
- {
- for (doing = 0; (doing < 2) && (n > 0); doing++)
- {
- if (doing == 0)
- {
- fd = inter_list[i].fd;
- }
- else
- {
- if (!(inter_list[i].flags & INT_BCASTOPEN))
- break;
- fd = inter_list[i].bfd;
- }
- if (fd < 0) continue;
- if (FD_ISSET(fd, &fds))
- {
- 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
- * packet.
- */
- if (
-#ifdef UDP_WILDCARD_DELIVERY
- /*
- * these guys manage to put properly addressed
- * packets into the wildcard queue
- */
- (free_recvbuffs() == 0)
-#else
- ((i == wildipv4) || (i == wildipv6)||
- (free_recvbuffs() == 0))
-#endif
- )
- {
- char buf[RX_BUFF_SIZE];
- struct sockaddr_storage from;
-
- fromlen = sizeof from;
- (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,
- stoa(&from));
-#endif
- if (i == wildipv4 || i == wildipv6)
- packets_ignored++;
- else
- packets_dropped++;
- goto select_again;
- }
-
- rb = get_free_recv_buffer();
-
- fromlen = sizeof(struct sockaddr_storage);
- rb->recv_length = recvfrom(fd,
- (char *)&rb->recv_space,
- sizeof(rb->recv_space), 0,
- (struct sockaddr *)&rb->recv_srcadr,
- &fromlen);
- if (rb->recv_length == 0
-#ifdef EWOULDBLOCK
- || errno==EWOULDBLOCK
-#endif
-#ifdef EAGAIN
- || errno==EAGAIN
-#endif
- ) {
- freerecvbuf(rb);
- continue;
- }
- else if (rb->recv_length < 0)
- {
- 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);
-#endif
- freerecvbuf(rb);
- continue;
- }
-#ifdef DEBUG
- 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
-
- /*
- * Got one. Mark how and when it got here,
- * put it on the full list and do bookkeeping.
- */
- rb->dstadr = &inter_list[i];
- rb->fd = fd;
- rb->recv_time = ts;
- rb->receiver = receive;
-
- add_full_recv_buffer(rb);
-
- inter_list[i].received++;
- packets_received++;
- goto select_again;
- }
- /* Check more interfaces */
- }
- }
- select_again:;
- /*
- * Done everything from that select. Poll again.
- */
- }
-
- /*
- * If nothing more to do, try again.
- * If nothing to do, just return.
- * If an error occurred, complain and return.
- */
- if (n == 0)
- {
- if (select_count == 0) /* We really had nothing to do */
- {
- if (debug)
- 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.
- */
- L_SUB(&ts_e, &ts);
- if (debug > 3)
- netsyslog(LOG_INFO, "input_handler: Processed a gob of fd's in %s msec", lfptoms(&ts_e, 6));
-
- /* just bail. */
- --handler_count;
- return;
- }
- else if (n == -1)
- {
- int err = errno;
-
- /*
- * extended FAU debugging output
- */
- 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;
-
- fds = activefds;
- for (j = 0; j <= maxactivefd; j++)
- if (
- (FD_ISSET(j, &fds) && (read(j, &b, 0) == -1))
- )
- netsyslog(LOG_ERR, "Bad file descriptor %d", j);
- }
- --handler_count;
- return;
- }
- }
- msyslog(LOG_ERR, "input_handler: fell out of infinite for(;;) loop!");
- --handler_count;
- return;
-}
-
-#endif
-/*
- * findinterface - find interface corresponding to address
- */
-struct interface *
-findinterface(
- struct sockaddr_storage *addr
- )
-{
- 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.
- */
- 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)
-#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)
-#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 (SOCKCMP(&inter_list[i].sin, &saddr))
- return (&inter_list[i]);
- }
- return ANY_INTERFACE_CHOOSE(addr);
-}
-
-/*
- * findbcastinter - find broadcast interface corresponding to address
- */
-struct interface *
-findbcastinter(
- struct sockaddr_storage *addr
- )
-{
-#if !defined(MPE) && (defined(SIOCGIFCONF) || defined(SYS_WINNT))
- register int 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
- * address or the network portion of the IP address.
- * Sloppy.
- */
- if (!(inter_list[i].flags & INT_BROADCAST))
- continue;
- 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_CHOOSE(addr);
-}
-
-
-/*
- * io_clr_stats - clear I/O module statistics
- */
-void
-io_clr_stats(void)
-{
- packets_dropped = 0;
- packets_ignored = 0;
- packets_received = 0;
- packets_sent = 0;
- packets_notsent = 0;
-
- handler_calls = 0;
- handler_pkts = 0;
- io_timereset = current_time;
-}
-
-
-#ifdef REFCLOCK
-/*
- * This is a hack so that I don't have to fool with these ioctls in the
- * pps driver ... we are already non-blocking and turn on SIGIO thru
- * another mechanisim
- */
-int
-io_addclock_simple(
- struct refclockio *rio
- )
-{
- BLOCKIO();
- /*
- * Stuff the I/O structure in the list and mark the descriptor
- * in use. There is a harmless (I hope) race condition here.
- */
- 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;
-}
-
-/*
- * io_addclock - add a reference clock to the list and arrange that we
- * get SIGIO interrupts from it.
- */
-int
-io_addclock(
- struct refclockio *rio
- )
-{
- BLOCKIO();
- /*
- * Stuff the I/O structure in the list and mark the descriptor
- * in use. There is a harmless (I hope) race condition here.
- */
- rio->next = refio;
- refio = rio;
-
-# ifdef HAVE_SIGNALED_IO
- if (init_clock_sig(rio))
- {
- refio = rio->next;
- UNBLOCKIO();
- return 0;
- }
-# 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;
-}
-
-/*
- * io_closeclock - close the clock in the I/O structure given
- */
-void
-io_closeclock(
- struct refclockio *rio
- )
-{
- /*
- * Remove structure from the list
- */
- if (refio == rio)
- {
- refio = rio->next;
- }
- else
- {
- register struct refclockio *rp;
-
- for (rp = refio; rp != 0; rp = rp->next)
- if (rp->next == rio)
- {
- rp->next = rio->next;
- break;
- }
-
- if (rp == 0)
- {
- /*
- * Internal error. Report it.
- */
- msyslog(LOG_ERR,
- "internal error: refclockio structure not found");
- return;
- }
- }
-
- /*
- * Close the descriptor.
- */
- close_file(rio->fd);
-}
-#endif /* REFCLOCK */
-
- /*
- * I/O Completion Ports don't care about select and fd_set
- */
-#ifndef HAVE_IO_COMPLETION_PORT
-void
-kill_asyncio(
- int startfd
- )
-{
- SOCKET i;
-
- BLOCKIO();
- 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
deleted file mode 100644
index 99d1cc4..0000000
--- a/contrib/ntp/ntpd/ntp_loopfilter.c
+++ /dev/null
@@ -1,1000 +0,0 @@
-/*
- * 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>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include <signal.h>
-#include <setjmp.h>
-
-#if defined(VMS) && defined(VMS_LOCALUNIT) /*wjm*/
-#include "ntp_refclock.h"
-#endif /* VMS */
-
-#ifdef KERNEL_PLL
-#include "ntp_syscall.h"
-#endif /* KERNEL_PLL */
-
-/*
- * This is an implementation of the clock discipline algorithm described
- * in UDel TR 97-4-3, as amended. It operates as an adaptive parameter,
- * hybrid phase/frequency-lock loop. A number of sanity checks are
- * 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 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 CLOCK_PLL 16. /* PLL loop gain */
-#define CLOCK_FLL 8. /* FLL loop gain */
-#define CLOCK_AVG 4. /* parameter averaging constant */
-#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 PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
-
-/*
- * Clock discipline state machine. This is used to control the
- * synchronization behavior during initialization and following a
- * timewarp.
- *
- * State < max > max Comments
- * ====================================================
- * NSET FREQ FREQ no ntp.drift
- *
- * FSET TSET if (allow) TSET, ntp.drift
- * else FREQ
- *
- * TSET SYNC FREQ time set
- *
- * FREQ SYNC if (mu < 900) FREQ calculate frequency
- * else if (allow) TSET
- * else FREQ
- *
- * SYNC SYNC if (mu < 900) SYNC normal state
- * else SPIK
- *
- * SPIK SYNC if (allow) TSET spike detector
- * else FREQ
- */
-#define S_NSET 0 /* clock never set */
-#define S_FSET 1 /* frequency set from the drift file */
-#define S_TSET 2 /* time set */
-#define S_FREQ 3 /* frequency mode */
-#define S_SYNC 4 /* clock synchronized */
-#define S_SPIK 5 /* spike detected */
-
-/*
- * Kernel PLL/PPS state machine. This is used with the kernel PLL
- * modifications described in the README.kernel file.
- *
- * If kernel support for the ntp_adjtime() system call is available, the
- * ntp_control flag is set. The ntp_enable and kern_enable flags can be
- * set at configuration time or run time using ntpdc. If ntp_enable is
- * false, the discipline loop is unlocked and no correctios of any kind
- * are made. If both ntp_control and kern_enable are set, the kernel
- * support is used as described above; if false, the kernel is bypassed
- * entirely and the daemon PLL used instead.
- *
- * Each update to a prefer peer sets pps_stratum if it survives the
- * intersection algorithm and its time is within range. The PPS time
- * discipline is enabled (STA_PPSTIME bit set in the status word) when
- * pps_stratum is true and the PPS frequency discipline is enabled. If
- * the PPS time discipline is enabled and the kernel reports a PPS
- * signal is present, the pps_control variable is set to the current
- * time. If the current time is later than pps_control by PPS_MAXAGE
- * (120 s), this variable is set to zero.
- *
- * If an external clock is present, the clock driver sets STA_CLK in the
- * status word. When the local clock driver sees this bit, it updates
- * via this routine, which then calls ntp_adjtime() with the STA_PLL bit
- * set to zero, in which case the system clock is not adjusted. This is
- * also a signal for the external clock driver to discipline the system
- * clock.
- */
-/*
- * Program variables that can be tinkered.
- */
-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 allan_xpt = CLOCK_ALLAN; /* Allan intercept (s) */
-
-/*
- * Program variables
- */
-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, u_long, double)); /* transition function */
-
-#ifdef KERNEL_PLL
-struct timex ntv; /* kernel API parameters */
-int pll_status; /* status bits for kernel pll */
-int pll_nano; /* nanosecond kernel switch */
-#endif /* KERNEL_PLL */
-
-/*
- * Clock state machine control flags
- */
-int ntp_enable; /* clock discipline enabled */
-int pll_control; /* kernel support available */
-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_panic = FALSE; /* allow panic correction */
-int mode_ntpdate = FALSE; /* exit on first clock set */
-
-/*
- * Clock state machine variables
- */
-u_char sys_poll = NTP_MINDPOLL; /* system poll interval (log2 s) */
-int state; /* clock discipline state */
-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) */
-
-/*
- * Huff-n'-puff filter variables
- */
-static double *sys_huffpuff; /* huff-n'-puff filter */
-static int sys_hufflen; /* huff-n'-puff filter stages */
-static int sys_huffptr; /* huff-n'-puff filter pointer */
-static double sys_mindly; /* huff-n'-puff filter min delay */
-
-#if defined(KERNEL_PLL)
-/* Emacs cc-mode goes nuts if we split the next line... */
-#define MOD_BITS (MOD_OFFSET | MOD_MAXERROR | MOD_ESTERROR | \
- MOD_STATUS | MOD_TIMECONST)
-#ifdef SIGSYS
-static void pll_trap P((int)); /* configuration trap */
-static struct sigaction sigsys; /* current sigaction status */
-static struct sigaction newsigsys; /* new sigaction status */
-static sigjmp_buf env; /* environment var. for pll_trap() */
-#endif /* SIGSYS */
-#endif /* KERNEL_PLL */
-
-/*
- * init_loopfilter - initialize loop filter data
- */
-void
-init_loopfilter(void)
-{
- /*
- * Initialize state variables. Initially, we expect no drift
- * file, so set the state to S_NSET.
- */
- rstclock(S_NSET, current_time, 0);
-}
-
-/*
- * 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(
- struct peer *peer, /* synch source peer structure */
- double fp_offset, /* clock offset (s) */
- double epsil /* jittter (square s*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 */
-
- /*
- * If the loop is opened, monitor and record the offsets
- * anyway in order to determine the open-loop response.
- */
-#ifdef DEBUG
- if (debug)
- printf(
- "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);
- return (0);
- }
-
- /*
- * If the clock is way off, panic is declared. The clock_panic
- * defaults to 1000 s; if set to zero, the panic will never
- * occur. The allow_panic defaults to FALSE, so the first panic
- * will exit. It can be set TRUE by a command line option, in
- * which case the clock will be set anyway and time marches on.
- * But, allow_panic will be set it FALSE when the update is
- * within the step range; so, subsequent panics will exit.
- */
- if (fabs(fp_offset) > clock_panic && clock_panic > 0 &&
- !allow_panic) {
- msyslog(LOG_ERR,
- "time correction of %.0f seconds exceeds sanity limit (%.0f); set clock manually to the correct UTC time.",
- fp_offset, clock_panic);
- return (-1);
- }
-
- /*
- * If simulating ntpdate, set the clock directly, rather than
- * using the discipline. The clock_max defines the step
- * threshold, above which the clock will be stepped instead of
- * slewed. The value defaults to 128 ms, but can be set to even
- * unreasonable values. If set to zero, the clock will never be
- * stepped.
- *
- * Note that if ntpdate is active, the terminal does not detach,
- * so the termination comments print directly to the console.
- */
- if (mode_ntpdate) {
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
- step_systime(fp_offset);
- msyslog(LOG_NOTICE, "time reset %+.6f s",
- fp_offset);
- printf("ntpd: time set %+.6fs\n", fp_offset);
- } else {
- adj_systime(fp_offset);
- msyslog(LOG_NOTICE, "time slew %+.6f s",
- fp_offset);
- printf("ntpd: time slew %+.6fs\n", fp_offset);
- }
- record_loop_stats(fp_offset, drift_comp, SQRT(epsil),
- clock_stability, sys_poll);
- exit (0);
- }
-
- /*
- * If the clock has never been set, set it and initialize the
- * discipline parameters. We then switch to frequency mode to
- * speed the inital convergence process. If lucky, after an hour
- * the ntp.drift file is created and initialized and we don't
- * get here again.
- */
- if (state == S_NSET) {
- 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);
- }
-
- /*
- * Update the jitter estimate.
- */
- oerror = sys_jitter;
- dtemp = SQUARE(sys_jitter);
- sys_jitter = SQRT(dtemp + (epsil - dtemp) / CLOCK_AVG);
-
- /*
- * The huff-n'-puff filter finds the lowest delay in the recent
- * interval. This is used to correct the offset by one-half the
- * difference between the sample delay and minimum delay. This
- * is most effective if the delays are highly assymetric and
- * clockhopping is avoided and the clock frequency wander is
- * relatively small.
- */
- if (sys_huffpuff != NULL) {
- if (peer->delay < sys_huffpuff[sys_huffptr])
- sys_huffpuff[sys_huffptr] = peer->delay;
- if (peer->delay < sys_mindly)
- sys_mindly = peer->delay;
- if (fp_offset > 0)
- dtemp = -(peer->delay - sys_mindly) / 2;
- else
- dtemp = (peer->delay - sys_mindly) / 2;
- fp_offset += dtemp;
-#ifdef DEBUG
- if (debug)
- printf(
- "local_clock: size %d mindly %.6f huffpuff %.6f\n",
- sys_hufflen, sys_mindly, dtemp);
-#endif
- }
-
- /*
- * Clock state machine transition function. This is where the
- * action is and defines how the system reacts to large phase
- * and frequency errors. There are two main regimes: when the
- * offset exceeds the step threshold and when it does not.
- * However, if the step threshold is set to zero, a step will
- * never occur. See the instruction manual for the details how
- * these actions interact with the command line options.
- */
- retval = 0;
- if (sys_poll > peer->maxpoll)
- sys_poll = peer->maxpoll;
- else if (sys_poll < peer->minpoll)
- sys_poll = peer->minpoll;
- clock_frequency = flladj = plladj = 0;
- mu = peer->epoch - last_time;
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
- switch (state) {
-
- /*
- * In S_TSET state the time has been set at the last
- * valid update and the offset at that time set to zero.
- * If following that we cruise outside the capture
- * range, assume a really bad frequency error and switch
- * to S_FREQ state.
- */
- case S_TSET:
- state = S_FREQ;
- break;
-
- /*
- * In S_SYNC state we ignore outlyers. At the first
- * outlyer after the stepout threshold, switch to S_SPIK
- * state.
- */
- case S_SYNC:
- if (mu < clock_minstep)
- return (0);
- state = S_SPIK;
- return (0);
-
- /*
- * In S_FREQ state we ignore outlyers. At the first
- * outlyer after 900 s, compute the apparent phase and
- * frequency correction.
- */
- case S_FREQ:
- if (mu < clock_minstep)
- return (0);
- /* fall through to S_SPIK */
-
- /*
- * In S_SPIK state a large correction is necessary.
- * Since the outlyer may be due to a large frequency
- * error, compute the apparent frequency correction.
- */
- case S_SPIK:
- clock_frequency = (fp_offset - clock_offset) /
- mu;
- /* fall through to default */
-
- /*
- * We get here directly in S_FSET state and indirectly
- * from S_FREQ and S_SPIK states. The clock is either
- * reset or shaken, but never stirred.
- */
- default:
- 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 {
- switch (state) {
-
- /*
- * In S_FSET state this is the first update. Adjust the
- * phase, but don't adjust the frequency until the next
- * update.
- */
- case S_FSET:
- rstclock(S_TSET, peer->epoch, fp_offset);
- break;
-
- /*
- * In S_FREQ state ignore updates until the stepout
- * threshold. After that, correct the phase and
- * frequency and switch to S_SYNC state.
- */
- case S_FREQ:
- if (mu < clock_minstep)
- return (0);
- clock_frequency = (fp_offset - clock_offset) /
- mu;
- rstclock(S_SYNC, peer->epoch, fp_offset);
- break;
-
- /*
- * Either the clock has just been set or the previous
- * update was a spike and ignored. Since this update is
- * not an outlyer, fold the tent and resume life.
- */
- case S_TSET:
- case S_SPIK:
- state = S_SYNC;
- /* fall through to default */
-
- /*
- * We come here in the normal case for linear phase and
- * 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;
- 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",
- dtemp, oerror);
-#endif
- last_offset = fp_offset;
- return (0);
- }
-*/
-
- /*
- * 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.
- */
- 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;
- break;
- }
- }
-
-#ifdef KERNEL_PLL
- /*
- * This code segment works when clock adjustments are made using
- * precision time kernel support and the ntp_adjtime() system
- * call. This support is available in Solaris 2.6 and later,
- * Digital Unix 4.0 and later, FreeBSD, Linux and specially
- * modified kernels for HP-UX 9 and Ultrix 4. In the case of the
- * DECstation 5000/240 and Alpha AXP, additional kernel
- * modifications provide a true microsecond clock and nanosecond
- * clock, respectively.
- */
- if (pll_control && kern_enable) {
-
- /*
- * We initialize the structure for the ntp_adjtime()
- * system call. We have to convert everything to
- * microseconds or nanoseconds first. Do not update the
- * system variables if the ext_enable flag is set. In
- * this case, the external clock driver will update the
- * variables, which will be read later by the local
- * clock driver. Afterwards, remember the time and
- * frequency offsets for jitter and stability values and
- * to update the drift file.
- */
- memset(&ntv, 0, sizeof(ntv));
- if (ext_enable) {
- ntv.modes = MOD_STATUS;
- } else {
- ntv.modes = MOD_BITS;
- if (clock_offset < 0)
- dtemp = -.5;
- else
- dtemp = .5;
- if (pll_nano) {
- ntv.offset = (int32)(clock_offset *
- 1e9 + dtemp);
- ntv.constant = sys_poll;
- } else {
- ntv.offset = (int32)(clock_offset *
- 1e6 + dtemp);
- ntv.constant = sys_poll - 4;
- }
- if (clock_frequency != 0) {
- ntv.modes |= MOD_FREQUENCY;
- ntv.freq = (int32)((clock_frequency +
- drift_comp) * 65536e6);
- }
- ntv.esterror = (u_int32)(sys_jitter * 1e6);
- ntv.maxerror = (u_int32)((sys_rootdelay / 2 +
- sys_rootdispersion) * 1e6);
- ntv.status = STA_PLL;
-
- /*
- * Set the leap bits in the status word.
- */
- if (sys_leap == LEAP_NOTINSYNC) {
- ntv.status |= STA_UNSYNC;
- } else if (calleapwhen(sys_reftime.l_ui) <
- CLOCK_DAY) {
- if (sys_leap & LEAP_ADDSECOND)
- ntv.status |= STA_INS;
- else if (sys_leap & LEAP_DELSECOND)
- ntv.status |= STA_DEL;
- }
-
- /*
- * Switch to FLL mode if the poll interval is
- * greater than MAXDPOLL, so that the kernel
- * loop behaves as the daemon loop; viz.,
- * selects the FLL when necessary, etc. For
- * legacy only.
- */
- if (sys_poll > NTP_MAXDPOLL)
- ntv.status |= STA_FLL;
-
- /*
- * If the PPS signal is up and enabled, light
- * the frequency bit. If the PPS driver is
- * working, light the phase bit as well. If not,
- * douse the lights, since somebody else may
- * have left the switch on.
- */
- if (pps_enable && pll_status & STA_PPSSIGNAL) {
- ntv.status |= STA_PPSFREQ;
- if (pps_stratum < STRATUM_UNSPEC)
- ntv.status |= STA_PPSTIME;
- } else {
- ntv.status &= ~(STA_PPSFREQ |
- STA_PPSTIME);
- }
- }
-
- /*
- * Pass the stuff to the kernel. If it squeals, turn off
- * the pigs. In any case, fetch the kernel offset and
- * frequency and pretend we did it here.
- */
- if (ntp_adjtime(&ntv) == TIME_ERROR) {
- if (ntv.status != pll_status)
- 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)
- clock_offset = ntv.offset / 1e9;
- else
- clock_offset = ntv.offset / 1e6;
- clock_frequency = ntv.freq / 65536e6 - drift_comp;
- flladj = plladj = 0;
-
- /*
- * If the kernel PPS is lit, monitor its performance.
- */
- if (ntv.status & STA_PPSTIME) {
- pps_control = current_time;
- if (pll_nano)
- sys_jitter = ntv.jitter / 1e9;
- else
- sys_jitter = ntv.jitter / 1e6;
- }
- }
-#endif /* KERNEL_PLL */
-
- /*
- * Adjust the clock frequency and calculate the stability. If
- * kernel support is available, we use the results of the kernel
- * discipline instead of the PLL/FLL discipline. In this case,
- * drift_comp is a sham and used only for updating the drift
- * file and for billboard eye candy.
- */
- dtemp = clock_frequency + flladj + plladj;
- etemp = drift_comp + dtemp;
- if (etemp > NTP_MAXFREQ)
- drift_comp = NTP_MAXFREQ;
- else if (etemp <= -NTP_MAXFREQ)
- drift_comp = -NTP_MAXFREQ;
- 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
- * compare the apparent frequency change induced by the system
- * jitter over the poll interval, or fritter, to the frequency
- * stability. If the fritter is greater than the stability,
- * phase noise predominates and the averaging interval is
- * increased; otherwise, it is decreased. A bit of hysteresis
- * helps calm the dance. Works best using burst mode.
- */
- if (state == S_SYNC) {
- if (sys_jitter > ULOGTOD(sys_poll) * clock_stability &&
- fabs(clock_offset) < CLOCK_PGATE * sys_jitter) {
- tc_counter += sys_poll;
- if (tc_counter > CLOCK_LIMIT) {
- tc_counter = CLOCK_LIMIT;
- if (sys_poll < peer->maxpoll) {
- tc_counter = 0;
- sys_poll++;
- }
- }
- } else {
- tc_counter -= sys_poll << 1;
- if (tc_counter < -CLOCK_LIMIT) {
- tc_counter = -CLOCK_LIMIT;
- if (sys_poll > peer->minpoll) {
- tc_counter = 0;
- sys_poll--;
- }
- }
- }
- }
-
- /*
- * Update the system time variables.
- */
- 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 %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;
-
- /*
- * Update the dispersion since the last update. In contrast to
- * NTPv3, NTPv4 does not declare unsynchronized after one day,
- * since the dispersion check serves this function. Also,
- * since the poll interval can exceed one day, the old test
- * would be counterproductive. Note we do this even with
- * external clocks, since the clock driver will recompute the
- * maximum error and the local clock driver will pick it up and
- * pass to the common refclock routines. Very elegant.
- */
- 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_SYNCEVENT | NLOG_SYSEVENT)
- msyslog(LOG_NOTICE, "pps sync disabled");
- pps_control = 0;
- }
-
- /*
- * If NTP is disabled or ntpdate mode enabled or the kernel
- * discipline enabled, we have no business going further.
- */
- if (!ntp_enable || mode_ntpdate || (pll_control && kern_enable))
- return;
-
- /*
- * Intricate wrinkle for legacy only. If the local clock driver
- * is in use and selected for synchronization, somebody else may
- * tinker the adjtime() syscall. If this is the case, the driver
- * is marked prefer and we have to avoid calling adjtime(),
- * since that may truncate the other guy's requests.
- */
- if (sys_peer != 0) {
- if (sys_peer->refclktype == REFCLK_LOCALCLOCK &&
- sys_peer->flags & FLAG_PREFER)
- return;
- }
-
- /*
- * Implement the phase and frequency adjustments. Note the
- * black art formerly practiced here has been whitewashed.
- */
- adjustment = clock_offset / (CLOCK_PLL * ULOGTOD(sys_poll));
- clock_offset -= adjustment;
- adj_systime(adjustment + drift_comp);
-#endif /* LOCKCLOCK */
-}
-
-
-/*
- * Clock state machine. Enter new state and set state variables.
- */
-static void
-rstclock(
- int trans, /* new state */
- u_long epoch, /* last time */
- double offset /* last offset */
- )
-{
- tc_counter = 0;
- sys_poll = NTP_MINPOLL;
- 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
-}
-
-
-/*
- * huff-n'-puff filter
- */
-void
-huffpuff()
-{
- int i;
-
- if (sys_huffpuff == NULL)
- return;
- sys_huffptr = (sys_huffptr + 1) % sys_hufflen;
- sys_huffpuff[sys_huffptr] = 1e9;
- sys_mindly = 1e9;
- for (i = 0; i < sys_hufflen; i++) {
- if (sys_huffpuff[i] < sys_mindly)
- sys_mindly = sys_huffpuff[i];
- }
-}
-
-
-/*
- * loop_config - configure the loop filter
- *
- * LOCKCLOCK: The LOOP_DRIFTINIT and LOOP_DRIFTCOMP cases are no-ops.
- */
-void
-loop_config(
- int item,
- double freq
- )
-{
- int i;
-
- switch (item) {
-
- case LOOP_DRIFTINIT:
-
-#ifndef LOCKCLOCK
-#ifdef KERNEL_PLL
- /*
- * Assume the kernel supports the ntp_adjtime() syscall.
- * If that syscall works, initialize the kernel
- * variables. Otherwise, continue leaving no harm
- * 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
- ntv.modes = MOD_BITS | MOD_NANO;
-#else
- ntv.modes = MOD_BITS;
-#endif /* STA_NANO */
- ntv.maxerror = MAXDISPERSE;
- ntv.esterror = MAXDISPERSE;
- ntv.status = STA_UNSYNC;
-#ifdef SIGSYS
- /*
- * Use sigsetjmp() to save state and then call
- * ntp_adjtime(); if it fails, then siglongjmp() is used
- * to return control
- */
- newsigsys.sa_handler = pll_trap;
- newsigsys.sa_flags = 0;
- if (sigaction(SIGSYS, &newsigsys, &sigsys)) {
- msyslog(LOG_ERR,
- "sigaction() fails to save SIGSYS trap: %m");
- pll_control = 0;
- }
- if (sigsetjmp(env, 1) == 0)
- ntp_adjtime(&ntv);
- if ((sigaction(SIGSYS, &sigsys,
- (struct sigaction *)NULL))) {
- msyslog(LOG_ERR,
- "sigaction() fails to restore SIGSYS trap: %m");
- pll_control = 0;
- }
-#else /* SIGSYS */
- ntp_adjtime(&ntv);
-#endif /* SIGSYS */
- pll_status = ntv.status;
- if (pll_control) {
-#ifdef STA_NANO
- if (pll_status & STA_NANO)
- pll_nano = 1;
- if (pll_status & STA_CLK)
- ext_enable = 1;
-#endif /* STA_NANO */
- 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
- /*
- * 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.
- */
- if (freq <= NTP_MAXFREQ && freq >= -NTP_MAXFREQ) {
- drift_comp = freq;
- rstclock(S_FSET, current_time, 0);
- } else {
- drift_comp = 0;
- }
-
-#ifdef KERNEL_PLL
- /*
- * Sanity check. If the kernel is enabled, load the
- * frequency and light up the loop. If not, set the
- * kernel frequency to zero and leave the loop dark. In
- * either case set the time to zero to cancel any
- * previous nonsense.
- */
- if (pll_control) {
- memset((char *)&ntv, 0, sizeof(ntv));
- ntv.modes = MOD_OFFSET | MOD_FREQUENCY;
- if (kern_enable) {
- ntv.modes |= MOD_STATUS;
- ntv.status = STA_PLL;
- ntv.freq = (int32)(drift_comp *
- 65536e6);
- }
- (void)ntp_adjtime(&ntv);
- }
-#endif /* KERNEL_PLL */
-#endif /* LOCKCLOCK */
- break;
-
- /*
- * Special tinker variables for Ulrich Windl. Very dangerous.
- */
- case LOOP_MAX: /* step threshold */
- clock_max = freq;
- break;
-
- case LOOP_PANIC: /* panic threshold */
- clock_panic = freq;
- break;
-
- case LOOP_PHI: /* dispersion rate */
- clock_phi = freq;
- break;
-
- case LOOP_MINSTEP: /* watchdog bark */
- clock_minstep = freq;
- break;
-
- case LOOP_ALLAN: /* Allan intercept */
- allan_xpt = freq;
- break;
-
- case LOOP_HUFFPUFF: /* huff-n'-puff filter length */
- if (freq < HUFFPUFF)
- freq = HUFFPUFF;
- sys_hufflen = (int)(freq / HUFFPUFF);
- sys_huffpuff = (double *)emalloc(sizeof(double) *
- sys_hufflen);
- for (i = 0; i < sys_hufflen; i++)
- sys_huffpuff[i] = 1e9;
- sys_mindly = 1e9;
- break;
-
- case LOOP_FREQ: /* initial frequency */
- drift_comp = freq / 1e6;
- rstclock(S_FSET, current_time, 0);
- break;
- }
-}
-
-
-#if defined(KERNEL_PLL) && defined(SIGSYS)
-/*
- * _trap - trap processor for undefined syscalls
- *
- * This nugget is called by the kernel when the SYS_ntp_adjtime()
- * syscall bombs because the silly thing has not been implemented in
- * the kernel. In this case the phase-lock loop is emulated by
- * the stock adjtime() syscall and a lot of indelicate abuse.
- */
-static RETSIGTYPE
-pll_trap(
- int arg
- )
-{
- pll_control = 0;
- siglongjmp(env, 1);
-}
-#endif /* KERNEL_PLL && SIGSYS */
diff --git a/contrib/ntp/ntpd/ntp_monitor.c b/contrib/ntp/ntpd/ntp_monitor.c
deleted file mode 100644
index 6b288fc..0000000
--- a/contrib/ntp/ntpd/ntp_monitor.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * ntp_monitor - monitor ntpd statistics
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <signal.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-
-/*
- * 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.
- *
- * 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.
- *
- * 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
- * than 8K bytes in a mode 7 response packet, and that each structure
- * will require about 20 bytes of space in the response.
- *
- * ... I don't believe the above is true anymore ... jdg
- */
-#ifndef MAXMONMEM
-#define MAXMONMEM 600 /* we allocate up to 600 structures */
-#endif
-#ifndef MONMEMINC
-#define MONMEMINC 40 /* allocate them 40 at a time */
-#endif
-
-/*
- * Hashing stuff
- */
-#define MON_HASH_SIZE 128
-#define MON_HASH_MASK (MON_HASH_SIZE-1)
-#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.
- */
-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; /* 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; /* 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 *));
-
-/*
- * init_mon - initialize monitoring global data
- */
-void
-init_mon(void)
-{
- /*
- * Don't do much of anything here. We don't allocate memory
- * until someone explicitly starts us.
- */
- mon_enabled = MON_OFF;
- mon_have_memory = 0;
-
- mon_total_mem = 0;
- mon_mem_increments = 0;
- mon_free = NULL;
- memset(&mon_hash[0], 0, sizeof mon_hash);
- memset(&mon_mru_list, 0, sizeof mon_mru_list);
-}
-
-
-/*
- * mon_start - start up the monitoring software
- */
-void
-mon_start(
- int mode
- )
-{
-
- if (mon_enabled != MON_OFF) {
- mon_enabled |= mode;
- return;
- }
- if (mode == MON_OFF)
- return;
-
- if (!mon_have_memory) {
- mon_total_mem = 0;
- mon_mem_increments = 0;
- mon_free = NULL;
- mon_getmoremem();
- mon_have_memory = 1;
- }
-
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
- mon_enabled = mode;
-}
-
-
-/*
- * mon_stop - stop the monitoring software
- */
-void
-mon_stop(
- int mode
- )
-{
- register struct mon_data *md, *md_next;
- register int i;
-
- if (mon_enabled == MON_OFF)
- return;
- if ((mon_enabled & mode) == 0 || mode == MON_OFF)
- return;
-
- mon_enabled &= ~mode;
- if (mon_enabled != MON_OFF)
- return;
-
- /*
- * Put everything back on the free list
- */
- for (i = 0; i < MON_HASH_SIZE; i++) {
- md = mon_hash[i]; /* get next list */
- mon_hash[i] = NULL; /* zero the list head */
- while (md != NULL) {
- md_next = md->hash_next;
- md->hash_next = mon_free;
- mon_free = md;
- md = md_next;
- }
- }
-
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
-}
-
-
-/*
- * ntp_monitor - record stats about this packet
- */
-void
-ntp_monitor(
- struct recvbuf *rbufp
- )
-{
- register struct pkt *pkt;
- register struct mon_data *md;
- struct sockaddr_storage addr;
- register int hash;
- register int mode;
-
- if (mon_enabled == MON_OFF)
- return;
-
- pkt = &rbufp->recv_pkt;
- 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) {
-
- /*
- * 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->rmtport = NSRCPORT(&rbufp->recv_srcadr);
- md->mode = (u_char) mode;
- md->version = PKT_VERSION(pkt->li_vn_mode);
-
- /*
- * Shuffle to the head of the MRU list.
- */
- md->mru_next->mru_prev = md->mru_prev;
- md->mru_prev->mru_next = md->mru_next;
- 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;
- return;
- }
- md = md->hash_next;
- }
-
- /*
- * If we got here, this is the first we've heard of this
- * guy. Get him some memory, either from the free list
- * or from the tail of the MRU list.
- */
- if (mon_free == NULL && mon_total_mem >= MAXMONMEM) {
-
- /*
- * 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);
- } else {
- if (mon_free == NULL)
- mon_getmoremem();
- md = mon_free;
- mon_free = md->hash_next;
- }
-
- /*
- * Got one, initialize it
- */
- md->avg_interval = 0;
- md->lasttime = current_time;
- md->count = 1;
- 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 = (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.
- */
- 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;
-}
-
-
-/*
- * mon_getmoremem - get more memory and put it on the free list
- */
-static void
-mon_getmoremem(void)
-{
- register struct mon_data *md;
- register int i;
- struct mon_data *freedata; /* 'old' free list (null) */
-
- 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++;
- }
-
- /*
- * md now points at the last. Link in the rest of the chain.
- */
- md->hash_next = freedata;
- mon_total_mem += MONMEMINC;
- mon_mem_increments++;
-}
-
-static void
-remove_from_hash(
- struct mon_data *md
- )
-{
- register int hash;
- register struct mon_data *md_prev;
-
- hash = MON_HASH(&md->rmtadr);
- if (mon_hash[hash] == md) {
- mon_hash[hash] = md->hash_next;
- } else {
- md_prev = mon_hash[hash];
- while (md_prev->hash_next != md) {
- md_prev = md_prev->hash_next;
- if (md_prev == NULL) {
- /* logic error */
- return;
- }
- }
- md_prev->hash_next = md->hash_next;
- }
-}
diff --git a/contrib/ntp/ntpd/ntp_peer.c b/contrib/ntp/ntpd/ntp_peer.c
deleted file mode 100644
index cf8a600..0000000
--- a/contrib/ntp/ntpd/ntp_peer.c
+++ /dev/null
@@ -1,880 +0,0 @@
-/*
- * ntp_peer.c - management of data maintained for peer associations
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "ntpd.h"
-#include "ntp_stdlib.h"
-#ifdef OPENSSL
-#include "openssl/rand.h"
-#endif /* OPENSSL */
-
-/*
- * Table of valid association combinations
- * ---------------------------------------
- *
- * packet->mode
- * peer->mode | UNSPEC ACTIVE PASSIVE CLIENT SERVER BCAST
- * ---------- | ---------------------------------------------
- * NO_PEER | e 1 e 1 1 1
- * ACTIVE | e 1 1 0 0 0
- * PASSIVE | e 1 e 0 0 0
- * CLIENT | e 0 0 0 1 1
- * SERVER | e 0 0 0 0 0
- * BCAST | e 0 0 0 0 0
- * CONTROL | e 0 0 0 0 0
- * PRIVATE | e 0 0 0 0 0
- * BCLIENT | e 0 0 0 e 1
- *
- * One point to note here: a packet in BCAST mode can potentially match
- * a peer in CLIENT mode, but we that is a special case and we check for
- * that early in the decision process. This avoids having to keep track
- * of what kind of associations are possible etc... We actually
- * circumvent that problem by requiring that the first b(m)roadcast
- * received after the change back to BCLIENT mode sets the clock.
- */
-
-int AM[AM_MODES][AM_MODES] = {
-/* { UNSPEC, ACTIVE, PASSIVE, CLIENT, SERVER, BCAST } */
-
-/*NONE*/{ AM_ERR, AM_NEWPASS, AM_ERR, AM_FXMIT, AM_MANYCAST, AM_NEWBCL},
-
-/*A*/ { AM_ERR, AM_PROCPKT, AM_PROCPKT, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
-
-/*P*/ { AM_ERR, AM_PROCPKT, AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
-
-/*C*/ { AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_PROCPKT, AM_POSSBCL},
-
-/*S*/ { AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
-
-/*BCST*/{ AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
-
-/*CNTL*/{ AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
-
-/*PRIV*/{ AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
-
-/*BCL*/ { AM_ERR, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH, AM_ERR, AM_PROCPKT},
-};
-
-#define MATCH_ASSOC(x,y) AM[(x)][(y)]
-
-/*
- * These routines manage the allocation of memory to peer structures
- * and the maintenance of the peer hash table. The two main entry
- * points are findpeer(), which looks for matching peer sturctures in
- * the peer list, newpeer(), which allocates a new peer structure and
- * adds it to the list, and unpeer(), which demobilizes the association
- * and deallocates the structure.
- */
-/*
- * Peer hash tables
- */
-struct peer *peer_hash[HASH_SIZE]; /* peer hash table */
-int peer_hash_count[HASH_SIZE]; /* peers in each bucket */
-struct peer *assoc_hash[HASH_SIZE]; /* association ID hash table */
-int assoc_hash_count[HASH_SIZE]; /* peers in each bucket */
-static struct peer *peer_free; /* peer structures free list */
-int peer_free_count; /* count of free structures */
-
-/*
- * Association ID. We initialize this value randomly, then assign a new
- * value every time the peer structure is incremented.
- */
-static associd_t current_association_ID; /* association ID */
-
-/*
- * Memory allocation watermarks.
- */
-#define INIT_PEER_ALLOC 15 /* initialize for 15 peers */
-#define INC_PEER_ALLOC 5 /* when run out, add 5 more */
-
-/*
- * Miscellaneous statistic counters which may be queried.
- */
-u_long peer_timereset; /* time stat counters zeroed */
-u_long findpeer_calls; /* calls to findpeer */
-u_long assocpeer_calls; /* calls to findpeerbyassoc */
-u_long peer_allocations; /* allocations from free list */
-u_long peer_demobilizations; /* structs freed to free list */
-int total_peer_structs; /* peer structs */
-int peer_associations; /* active associations */
-static struct peer init_peer_alloc[INIT_PEER_ALLOC]; /* init alloc */
-
-static void getmorepeermem P((void));
-
-/*
- * init_peer - initialize peer data structures and counters
- *
- * N.B. We use the random number routine in here. It had better be
- * initialized prior to getting here.
- */
-void
-init_peer(void)
-{
- register int i;
-
- /*
- * Clear hash table and counters.
- */
- for (i = 0; i < HASH_SIZE; i++) {
- peer_hash[i] = 0;
- peer_hash_count[i] = 0;
- assoc_hash[i] = 0;
- assoc_hash_count[i] = 0;
- }
-
- /*
- * Clear stat counters
- */
- findpeer_calls = peer_allocations = 0;
- assocpeer_calls = peer_demobilizations = 0;
-
- /*
- * Initialize peer memory.
- */
- peer_free = 0;
- for (i = 0; i < INIT_PEER_ALLOC; i++) {
- init_peer_alloc[i].next = peer_free;
- peer_free = &init_peer_alloc[i];
- }
- total_peer_structs = INIT_PEER_ALLOC;
- peer_free_count = INIT_PEER_ALLOC;
-
- /*
- * Initialize our first association ID
- */
- current_association_ID = (associd_t)ranp2(16);
- if (current_association_ID == 0)
- current_association_ID = 1;
-}
-
-
-/*
- * getmorepeermem - add more peer structures to the free list
- */
-static void
-getmorepeermem(void)
-{
- register int i;
- register struct peer *peer;
-
- peer = (struct peer *)emalloc(INC_PEER_ALLOC *
- sizeof(struct peer));
- for (i = 0; i < INC_PEER_ALLOC; i++) {
- peer->next = peer_free;
- peer_free = peer;
- peer++;
- }
-
- total_peer_structs += INC_PEER_ALLOC;
- peer_free_count += INC_PEER_ALLOC;
-}
-
-
-/*
- * findexistingpeer - return a pointer to a peer in the hash table
- */
-struct peer *
-findexistingpeer(
- struct sockaddr_storage *addr,
- struct peer *start_peer,
- int mode
- )
-{
- register struct peer *peer;
-
- /*
- * start_peer is included so we can locate instances of the
- * same peer through different interfaces in the hash table.
- */
- if (start_peer == 0)
- peer = peer_hash[HASH_ADDR(addr)];
- else
- peer = start_peer->next;
-
- while (peer != 0) {
- if (SOCKCMP(addr, &peer->srcadr)
- && NSRCPORT(addr) == NSRCPORT(&peer->srcadr)) {
- if (mode == -1)
- return (peer);
- else if (peer->hmode == mode)
- break;
- }
- peer = peer->next;
- }
- return (peer);
-}
-
-
-/*
- * findpeer - find and return a peer in the hash table.
- */
-struct peer *
-findpeer(
- struct sockaddr_storage *srcadr,
- struct interface *dstadr,
- int fd,
- int pkt_mode,
- int *action
- )
-{
- register struct peer *peer;
- int hash;
-
- findpeer_calls++;
- hash = HASH_ADDR(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.
- */
- *action = MATCH_ASSOC(peer->hmode, pkt_mode);
-
- /*
- * Sigh! Check if BCLIENT peer in client
- * server mode, else return error.
- */
- if ((*action == AM_POSSBCL) && !(peer->flags &
- FLAG_MCAST))
- *action = AM_ERR;
-
- /*
- * if an error was returned, exit back right
- * here.
- */
- if (*action == AM_ERR)
- return ((struct peer *)0);
-
- /*
- * if a match is found, we stop our search.
- */
- if (*action != AM_NOMATCH)
- break;
- }
- }
-
- /*
- * If no matching association is found
- */
- if (peer == 0) {
- *action = MATCH_ASSOC(NO_PEER, pkt_mode);
- return ((struct peer *)0);
- }
- peer->dstadr = dstadr;
- return (peer);
-}
-
-/*
- * findpeerbyassocid - find and return a peer using his association ID
- */
-struct peer *
-findpeerbyassoc(
- u_int assoc
- )
-{
- register struct peer *peer;
- int hash;
-
- assocpeer_calls++;
-
- hash = assoc & HASH_MASK;
- for (peer = assoc_hash[hash]; peer != 0; peer =
- peer->ass_next) {
- if (assoc == peer->associd)
- return (peer);
- }
- return (NULL);
-}
-
-
-/*
- * clear_all - flush all time values for all associations
- */
-void
-clear_all(void)
-{
- struct peer *peer, *next_peer;
- int n;
-
- /*
- * This routine is called when the clock is stepped, and so all
- * previously saved time values are untrusted.
- */
- for (n = 0; n < HASH_SIZE; n++) {
- for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
- next_peer = peer->next;
- if (peer->flags & FLAG_CONFIG) {
- if (!(peer->cast_flags & (MDF_ACAST |
- MDF_MCAST | MDF_BCAST)))
- peer_clear(peer, "STEP");
- } else {
- unpeer(peer);
- }
- }
- }
-#ifdef DEBUG
- if (debug)
- printf("clear_all: at %lu\n", current_time);
-#endif
-}
-
-
-/*
- * unpeer - remove peer structure from hash table and free structure
- */
-void
-unpeer(
- struct peer *peer_to_remove
- )
-{
- int hash;
-#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, "NULL");
- hash = HASH_ADDR(&peer_to_remove->srcadr);
- peer_hash_count[hash]--;
- peer_demobilizations++;
-#ifdef REFCLOCK
- /*
- * If this peer is actually a clock, shut it down first
- */
- if (peer_to_remove->flags & FLAG_REFCLOCK)
- refclock_unpeer(peer_to_remove);
-#endif
- peer_to_remove->action = 0; /* disable timeout actions */
- if (peer_hash[hash] == peer_to_remove)
- peer_hash[hash] = peer_to_remove->next;
- else {
- register struct peer *peer;
-
- peer = peer_hash[hash];
- while (peer != 0 && peer->next != peer_to_remove)
- peer = peer->next;
-
- if (peer == 0) {
- peer_hash_count[hash]++;
- msyslog(LOG_ERR, "peer struct for %s not in table!",
- stoa(&peer->srcadr));
- } else {
- peer->next = peer_to_remove->next;
- }
- }
-
- /*
- * Remove him from the association hash as well.
- */
- hash = peer_to_remove->associd & HASH_MASK;
- assoc_hash_count[hash]--;
- if (assoc_hash[hash] == peer_to_remove)
- assoc_hash[hash] = peer_to_remove->ass_next;
- else {
- register struct peer *peer;
-
- peer = assoc_hash[hash];
- while (peer != 0 && peer->ass_next != peer_to_remove)
- peer = peer->ass_next;
-
- if (peer == 0) {
- assoc_hash_count[hash]++;
- msyslog(LOG_ERR,
- "peer struct for %s not in association table!",
- stoa(&peer->srcadr));
- } else {
- peer->ass_next = peer_to_remove->ass_next;
- }
- }
- peer_to_remove->next = peer_free;
- peer_free = peer_to_remove;
- peer_free_count++;
- peer_associations--;
-}
-
-
-/*
- * peer_config - configure a new association
- */
-struct peer *
-peer_config(
- struct sockaddr_storage *srcadr,
- struct interface *dstadr,
- int hmode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t key,
- u_char *keystr
- )
-{
- register struct peer *peer;
- u_char cast_flags;
-
- /*
- * First search from the beginning for an association with given
- * remote address and mode. If an interface is given, search
- * from there to find the association which matches that
- * destination.
- */
- peer = findexistingpeer(srcadr, (struct peer *)0, hmode);
- if (dstadr != 0) {
- while (peer != 0) {
- if (peer->dstadr == dstadr)
- break;
- peer = findexistingpeer(srcadr, peer, hmode);
- }
- }
-
- /*
- * We do a dirty little jig to figure the cast flags. This is
- * probably not the best place to do this, at least until the
- * configure code is rebuilt. Note only one flag can be set.
- */
- switch (hmode) {
-
- case MODE_BROADCAST:
- 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(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;
- }
-
- /*
- * If the peer is already configured, some dope has a duplicate
- * configureation entry or another dope is wiggling from afar.
- */
- if (peer != 0) {
- peer->hmode = (u_char)hmode;
- 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->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. 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);
-}
-
-
-/*
- * newpeer - initialize a new peer association
- */
-struct peer *
-newpeer(
- struct sockaddr_storage *srcadr,
- struct interface *dstadr,
- int hmode,
- int version,
- int minpoll,
- int maxpoll,
- u_int 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
- * the initialization requires knowlege of our system state.
- */
- if (peer_free_count == 0)
- getmorepeermem();
- peer = peer_free;
- peer_free = peer->next;
- peer_free_count--;
- peer_associations++;
- 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
- * the dance peters out, there is always the wildcard interface.
- * This might happen in some systems and would preclude proper
- * operation with public key cryptography.
- */
- if (ISREFCLOCKADR(srcadr))
- peer->dstadr = loopback_interface;
- else if (cast_flags & (MDF_BCLNT | MDF_ACAST | MDF_MCAST | MDF_BCAST)) {
- peer->dstadr = findbcastinter(srcadr);
- /*
- * 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);
- peer->srcadr = *srcadr;
- peer->hmode = (u_char)hmode;
- peer->version = (u_char)version;
- peer->minpoll = (u_char)max(NTP_MINPOLL, minpoll);
- peer->maxpoll = (u_char)min(NTP_MAXPOLL, maxpoll);
- peer->flags = flags;
- if (key != 0)
- peer->flags |= FLAG_AUTHENABLE;
- if (key > NTP_MAXKEY)
- peer->flags |= FLAG_SKEY;
- peer->cast_flags = cast_flags;
- peer->ttl = (u_char)ttl;
- peer->keyid = key;
- peer->precision = sys_precision;
- 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++;
-
- /*
- * Note time on statistics timers.
- */
- peer->timereset = current_time;
- peer->timereachable = current_time;
- peer->timereceived = current_time;
-#ifdef REFCLOCK
- if (ISREFCLOCKADR(&peer->srcadr)) {
- /*
- * We let the reference clock support do clock
- * dependent initialization. This includes setting
- * the peer timer, since the clock may have requirements
- * for this.
- */
- if (!refclock_newpeer(peer)) {
- /*
- * Dump it, something screwed up
- */
- peer->next = peer_free;
- peer_free = peer;
- peer_free_count++;
- return (NULL);
- }
- }
-#endif
-
- /*
- * Put the new peer in the hash tables.
- */
- i = HASH_ADDR(&peer->srcadr);
- peer->next = peer_hash[i];
- peer_hash[i] = peer;
- peer_hash_count[i]++;
- i = peer->associd & HASH_MASK;
- 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 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->ttl, peer->keyid);
-#endif
- return (peer);
-}
-
-
-/*
- * peer_unconfig - remove the configuration bit from a peer
- */
-int
-peer_unconfig(
- struct sockaddr_storage *srcadr,
- struct interface *dstadr,
- int mode
- )
-{
- register struct peer *peer;
- int num_found;
-
- num_found = 0;
- peer = findexistingpeer(srcadr, (struct peer *)0, mode);
- while (peer != 0) {
- if (peer->flags & FLAG_CONFIG
- && (dstadr == 0 || peer->dstadr == dstadr)) {
- num_found++;
-
- /*
- * Tricky stuff here. If the peer is polling us
- * in active mode, turn off the configuration
- * bit and make the mode passive. This allows us
- * to avoid dumping a lot of history for peers
- * we might choose to keep track of in passive
- * mode. The protocol will eventually terminate
- * undesirables on its own.
- */
- if (peer->hmode == MODE_ACTIVE
- && peer->pmode == MODE_ACTIVE) {
- peer->hmode = MODE_PASSIVE;
- peer->flags &= ~FLAG_CONFIG;
- } else {
- unpeer(peer);
- peer = 0;
- }
- }
- peer = findexistingpeer(srcadr, peer, mode);
- }
- return (num_found);
-}
-
-/*
- * peer_clr_stats - clear peer module stat counters
- */
-void
-peer_clr_stats(void)
-{
- findpeer_calls = 0;
- assocpeer_calls = 0;
- peer_allocations = 0;
- peer_demobilizations = 0;
- peer_timereset = current_time;
-}
-
-/*
- * peer_reset - reset stat counters in a peer structure
- */
-void
-peer_reset(
- struct peer *peer
- )
-{
- if (peer == 0)
- return;
- peer->sent = 0;
- peer->received = 0;
- peer->processed = 0;
- peer->badauth = 0;
- peer->bogusorg = 0;
- peer->oldpkt = 0;
- peer->seldisptoolarge = 0;
- peer->selbroken = 0;
- peer->rank = 0;
- peer->timereset = current_time;
-}
-
-
-/*
- * peer_all_reset - reset all peer stat counters
- */
-void
-peer_all_reset(void)
-{
- struct peer *peer;
- int hash;
-
- for (hash = 0; hash < HASH_SIZE; hash++)
- for (peer = peer_hash[hash]; peer != 0; peer = peer->next)
- peer_reset(peer);
-}
-
-
-#ifdef OPENSSL
-/*
- * expire_all - flush all crypto data and update timestamps.
- */
-void
-expire_all(void)
-{
- struct peer *peer, *next_peer;
- int n;
-
- /*
- * This routine is called about once per day from the timer
- * routine and when the client is first synchronized. Search the
- * peer list for all associations and flush only the key list
- * and cookie. If a manycast client association, flush
- * 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->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->crypto &= ~(CRYPTO_FLAG_AUTO |
- CRYPTO_FLAG_AGREE);
- }
-
- }
- }
- RAND_bytes((u_char *)&sys_private, 4);
- crypto_update();
- resetmanycast();
-}
-#endif /* OPENSSL */
-
-
-/*
- * findmanycastpeer - find and return a manycast peer
- */
-struct peer *
-findmanycastpeer(
- struct recvbuf *rbufp
- )
-{
- register struct peer *peer;
- struct pkt *pkt;
- l_fp p_org;
- int i;
-
- /*
- * This routine is called upon arrival of a client-mode message
- * from a manycast server. Search the peer list for a manycast
- * client association where the last transmit timestamp matches
- * the originate timestamp. This assumes the transmit timestamps
- * for possibly more than one manycast association are unique.
- */
- pkt = &rbufp->recv_pkt;
- for (i = 0; i < HASH_SIZE; i++) {
- if (peer_hash_count[i] == 0)
- continue;
-
- for (peer = peer_hash[i]; peer != 0; peer =
- peer->next) {
- if (peer->cast_flags & MDF_ACAST) {
- NTOHL_FP(&pkt->org, &p_org);
- if (L_ISEQU(&peer->xmt, &p_org))
- return (peer);
- }
- }
- }
- return (NULL);
-}
-
-
-/*
- * resetmanycast - reset all manycast clients
- */
-void
-resetmanycast(void)
-{
- register struct peer *peer;
- int i;
-
- /*
- * This routine is called when the number of client associations
- * falls below the minimum. Search the peer list for manycast
- * client associations and reset the ttl and poll interval.
- */
- for (i = 0; i < HASH_SIZE; i++) {
- if (peer_hash_count[i] == 0)
- continue;
-
- for (peer = peer_hash[i]; peer != 0; peer =
- peer->next) {
- if (peer->cast_flags & MDF_ACAST) {
- peer->ttl = 0;
- poll_update(peer, 0);
- }
- }
- }
-}
diff --git a/contrib/ntp/ntpd/ntp_proto.c b/contrib/ntp/ntpd/ntp_proto.c
deleted file mode 100644
index 451bc9a..0000000
--- a/contrib/ntp/ntpd/ntp_proto.c
+++ /dev/null
@@ -1,3208 +0,0 @@
-/*
- * 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>
-#endif
-
-#include "ntpd.h"
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-#include "ntp_control.h"
-#include "ntp_string.h"
-
-#include <stdio.h>
-
-#if defined(VMS) && defined(VMS_LOCALUNIT) /*wjm*/
-#include "ntp_refclock.h"
-#endif
-
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
-#include <sys/sysctl.h>
-#endif
-
-/*
- * System variables are declared here. See Section 3.2 of the
- * specification.
- */
-u_char sys_leap; /* system leap indicator */
-u_char sys_stratum; /* stratum of system */
-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_prefer; /* our cherished peer */
-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 /* OPENSSL */
-
-/*
- * Nonspecified system state variables.
- */
-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_char leap_consensus; /* consensus of survivor leap bits */
-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 */
-int peer_ntpdate; /* active peers in ntpdate mode */
-int sys_survivors; /* truest of the truechimers */
-#ifdef OPENSSL
-char *sys_hostname; /* gethostname() name */
-#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 since reset */
-u_long sys_received; /* packets received */
-u_long sys_processed; /* packets processed */
-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));
-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
- * specification.
- */
-void
-transmit(
- struct peer *peer /* peer structure pointer */
- )
-{
- 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->cast_flags & (MDF_BCAST | MDF_MCAST)) {
-
- /*
- * In broadcast mode the poll interval is fixed
- * at minpoll.
- */
- hpoll = peer->minpoll;
- } 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 {
-
- /*
- * 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) {
-
- /*
- * 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);
- return;
- }
- }
- if (peer->burst == 0) {
- u_char oreach;
-
- 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();
- }
- if (peer_unfit(peer))
- hpoll++;
- else
- hpoll = sys_poll;
- if (peer->flags & FLAG_BURST)
- peer->burst = NTP_BURST;
- }
- } else {
-
- /*
- * Source rate control. If we are restrained,
- * each burst consists of only one packet.
- */
- if (memcmp((char *)&peer->refid, "RSTR", 4) ==
- 0)
- peer->burst = 0;
- 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 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) {
- poll_update(
- peer, hpoll);
- return;
- }
- msyslog(LOG_NOTICE,
- "no reply; clock not set");
- exit (0);
- }
- poll_update(peer, hpoll);
- return;
- }
- }
- }
- peer->outdate = current_time;
-
- /*
- * 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;
- }
- peer_xmit(peer);
- poll_update(peer, hpoll);
-}
-
-/*
- * receive - Receive Procedure. See section 3.4.3 in the specification.
- */
-void
-receive(
- struct recvbuf *rbufp
- )
-{
- 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;
-
- /*
- * Monitor the packet and get restrictions. Note that the packet
- * length for control and private mode packets must be checked
- * by the service routines. Note that no statistics counters are
- * recorded for restrict violations, since these counters are in
- * the restriction routine. Note the careful distinctions here
- * between a packet with a format error and a packet that is
- * 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 > 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) {
- sys_restricted++;
- return; /* no anything */
- }
- 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 (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 */
- }
-
- /*
- * 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.
- */
- if (hismode == MODE_UNSPEC) {
- if (PKT_VERSION(pkt->li_vn_mode) == NTP_OLDVERSION) {
- hismode = MODE_CLIENT;
- } else {
- sys_badlength++;
- return; /* invalid mode */
- }
- }
-
- /*
- * 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 (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
- * an extension field is present by measuring the MAC size. If
- * the number of words following the packet header is 0 or 1, no
- * MAC is present and the packet is not authenticated. If 1, the
- * packet is a reply to a previous request that failed to
- * authenticate. If 3, the packet is authenticated with DES; if
- * 5, the packet is authenticated with MD5. If greater than 5,
- * an extension field is present. If 2 or 4, the packet is a
- * runt and goes poof! with a brilliant flash.
- */
- authlen = LEN_PKT_NOMAC;
- has_mac = rbufp->recv_length - authlen;
- while (has_mac > 0) {
- int temp;
-
- if (has_mac % 4 != 0 || has_mac < 0) {
- sys_badlength++;
- return; /* bad MAC length */
- }
- if (has_mac == 1 * 4 || has_mac == 3 * 4 || has_mac ==
- MAX_MAC_LEN) {
- skeyid = ntohl(((u_int32 *)pkt)[authlen / 4]);
- break;
-
- } else if (has_mac > MAX_MAC_LEN) {
- temp = ntohl(((u_int32 *)pkt)[authlen / 4]) &
- 0xffff;
- if (temp < 4 || temp > NTP_MAXEXTEN || temp % 4
- != 0) {
- sys_badlength++;
- return; /* bad MAC length */
- }
- authlen += temp;
- has_mac -= temp;
- } else {
- sys_badlength++;
- 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 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
- * found when the association was mobilized with respect to a
- * designated remote address. We assume packets arriving from
- * the remote address arrive via this interface and the local
- * address used to construct the autokey is the unicast address
- * of the interface. However, if the sender is a broadcaster,
- * the interface broadcast address is used instead.
- * Notwithstanding this technobabble, if the sender is a
- * multicaster, the broadcast address is null, so we use the
- * unicast address anyway. Don't ask.
- */
- peer = findpeer(&rbufp->recv_srcadr, rbufp->dstadr, rbufp->fd,
- hismode, &retcode);
- is_authentic = 0;
- dstadr_sin = &rbufp->dstadr->sin;
- if (has_mac == 0) {
-#ifdef DEBUG
- if (debug)
- printf("receive: at %ld %s<-%s mode %d code %d\n",
- current_time, stoa(&rbufp->dstadr->sin),
- stoa(&rbufp->recv_srcadr), hismode,
- retcode);
-#endif
- } else {
-#ifdef OPENSSL
- /*
- * For autokey modes, generate the session key
- * and install in the key cache. Use the socket
- * broadcast or unicast address as appropriate.
- */
- if (skeyid > NTP_MAXKEY) {
-
- /*
- * More on the autokey dance (AKD). A cookie is
- * constructed from public and private values.
- * For broadcast packets, the cookie is public
- * (zero). For packets that match no
- * association, the cookie is hashed from the
- * addresses and private value. For server
- * packets, the cookie was previously obtained
- * from the server. For symmetric modes, the
- * cookie was previously constructed using an
- * agreement protocol; however, should PKI be
- * unavailable, we construct a fake agreement as
- * the EXOR of the peer and host cookies.
- *
- * hismode ephemeral persistent
- * =======================================
- * active 0 cookie#
- * passive 0% cookie#
- * client sys cookie 0%
- * server 0% sys cookie
- * broadcast 0 0
- *
- * # if unsync, 0
- * % can't happen
- */
- if (hismode == MODE_BROADCAST) {
-
- /*
- * For broadcaster, use the interface
- * broadcast address when available;
- * otherwise, use the unicast address
- * found when the association was
- * mobilized.
- */
- pkeyid = 0;
- if (!SOCKNUL(&rbufp->dstadr->bcast))
- dstadr_sin =
- &rbufp->dstadr->bcast;
- } else if (peer == NULL) {
- pkeyid = session_key(
- &rbufp->recv_srcadr, dstadr_sin, 0,
- sys_private, 0);
- } else {
- pkeyid = peer->pcookie;
- }
-
- /*
- * The session key includes both the public
- * values and cookie. In case of an extension
- * field, the cookie used for authentication
- * purposes is zero. Note the hash is saved for
- * use later in the autokey mambo.
- */
- if (authlen > LEN_PKT_NOMAC && pkeyid != 0) {
- session_key(&rbufp->recv_srcadr,
- dstadr_sin, skeyid, 0, 2);
- tkeyid = session_key(
- &rbufp->recv_srcadr, dstadr_sin,
- skeyid, pkeyid, 0);
- } else {
- tkeyid = session_key(
- &rbufp->recv_srcadr, dstadr_sin,
- skeyid, pkeyid, 2);
- }
-
- }
-#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. If the packet is authentic, it may mobilize an
- * association.
- */
- if (authdecrypt(skeyid, (u_int32 *)pkt, authlen,
- has_mac)) {
- is_authentic = 1;
- restrict_mask &= ~RES_DONTTRUST;
- } else {
- sys_badauth++;
- }
-#ifdef OPENSSL
- if (skeyid > NTP_MAXKEY)
- authtrust(skeyid, 0);
-#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, stoa(dstadr_sin),
- stoa(&rbufp->recv_srcadr), hismode, retcode,
- skeyid, authlen, has_mac,
- is_authentic);
-#endif
- }
-
- /*
- * The association matching rules are implemented by a set of
- * routines and a table in ntp_peer.c. A packet matching an
- * 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 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:
-
- /*
- * This is a client mode packet not matching a known
- * association. If from a manycast client we run a few
- * sanity checks before deciding to send a unicast
- * server response. Otherwise, it must be a client
- * request, so send a server response and go home.
- */
- if (sys_manycastserver && (rbufp->dstadr->flags &
- INT_MULTICAST)) {
-
- /*
- * 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 ||
- 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
- * send a crypto-NAK to tell the caller about this.
- */
- if (has_mac && !is_authentic)
- fast_xmit(rbufp, MODE_SERVER, 0, restrict_mask);
- else
- fast_xmit(rbufp, MODE_SERVER, skeyid,
- restrict_mask);
- return;
-
- case AM_MANYCAST:
-
- /*
- * This is a server mode packet returned in response to
- * a client mode packet sent to a multicast group
- * address. The originate timestamp is a good nonce to
- * reliably associate the reply with what was sent. If
- * 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 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. If the guy is already here, don't fire
- * up a duplicate.
- */
- if (restrict_mask & RES_DONTTRUST) {
- sys_restricted++;
- return; /* no trust */
- }
-
- if (sys_authenticate && !is_authentic)
- return; /* bad auth */
-
- 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),
- 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 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_DONTTRUST) {
- sys_restricted++;
- return; /* no trust */
- }
- if (sys_authenticate && !is_authentic) {
- fast_xmit(rbufp, MODE_PASSIVE, 0,
- restrict_mask);
- return; /* bad auth */
- }
- if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
- MODE_PASSIVE, PKT_VERSION(pkt->li_vn_mode),
- 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 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_DONTTRUST) {
- sys_restricted++;
- return; /* no trust */
- }
- if (sys_authenticate && !is_authentic)
- return; /* bad auth */
-
- if (!sys_bclient)
- return; /* not a client */
-
- if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
- MODE_CLIENT, PKT_VERSION(pkt->li_vn_mode),
- 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:
-
- /*
- * 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. 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);
-#endif
- return;
- }
-
- /*
- * 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.
- */
- peer->timereceived = current_time;
- peer->received++;
- 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);
-
- /*
- * 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.
- */
- } else {
- 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: 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 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 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.
- *
- * 4. If this is a server reply, check only to see that the
- * transmitted key ID matches the received 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 (crypto_flags && (peer->flags & FLAG_SKEY)) {
- peer->flash |= TEST10;
- 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 if ((ap = (struct autokey *)peer->recval.ptr) !=
- NULL) {
- int i;
-
- for (i = 0; ; i++) {
- if (tkeyid == peer->pkeyid ||
- tkeyid == ap->key) {
- peer->flash &= ~TEST10;
- peer->pkeyid = skeyid;
- break;
- }
- if (i > ap->seq)
- break;
- tkeyid = session_key(
- &rbufp->recv_srcadr, dstadr_sin,
- tkeyid, pkeyid, 0);
- }
- }
- if (!(peer->crypto & CRYPTO_FLAG_PROV)) /* test 11 */
- peer->flash |= TEST11; /* not proventic */
-
- /*
- * If the transmit queue is nonempty, clamp the host
- * poll interval to the packet poll interval.
- */
- 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 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 /* 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. 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);
-}
-
-
-/*
- * process_packet - Packet Procedure, a la Section 3.4.4 of the
- * specification. Or almost, at least. If we're in here we have a
- * reasonable expectation that we will be having a long term
- * relationship with this host.
- */
-void
-process_packet(
- register struct peer *peer,
- register struct pkt *pkt,
- l_fp *recv_ts
- )
-{
- 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
- * the receive timestamp and poll interval in the header. We
- * need these even if there are other problems in order to crank
- * up the state machine.
- */
- sys_processed++;
- peer->processed++;
- p_del = FPTOD(NTOHS_FP(pkt->rootdelay));
- p_disp = FPTOD(NTOHS_FP(pkt->rootdispersion));
- NTOHL_FP(&pkt->reftime, &p_reftime);
- NTOHL_FP(&pkt->rec, &p_rec);
- NTOHL_FP(&pkt->xmt, &p_xmt);
- 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 unsynchronized server.
- */
- if (L_ISHIS(&peer->org, &p_xmt)) /* count old packets */
- peer->oldpkt++;
- 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 */
-
- /*
- * 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 from address: %s\n",
- peer->flash, stoa(&peer->srcadr));
-#endif
- return;
- }
- peer->leap = pleap;
- peer->stratum = pstratum;
- peer->refid = pkt->refid;
-
- /*
- * Test for valid peer data (tests 6-8)
- */
- ci = p_xmt;
- L_SUB(&ci, &p_reftime);
- LFPTOD(&ci, dtemp);
- if (pleap == LEAP_NOTINSYNC || /* test 6 */
- pstratum >= STRATUM_UNSPEC || dtemp < 0)
- peer->flash |= TEST6; /* bad synch */
- if (!(peer->flags & FLAG_CONFIG) && sys_peer != NULL) { /* test 7 */
- if (pstratum > sys_stratum && pmode != MODE_ACTIVE)
- peer->flash |= TEST7; /* bad stratum */
- }
- if (p_del < 0 || p_disp < 0 || p_del / /* test 8 */
- 2 + p_disp >= MAXDISPERSE)
- peer->flash |= TEST8; /* bad peer values */
-
- /*
- * If any tests fail at this point, the packet is discarded.
- */
- if (peer->flash) {
-#ifdef DEBUG
- if (debug)
- printf("packet: bad header %03x\n",
- peer->flash);
-#endif
- return;
- }
-
- /*
- * The header is valid. Capture the remaining header values and
- * mark as reachable.
- */
- record_raw_stats(&peer->srcadr, &peer->dstadr->sin, &p_org,
- &p_rec, &p_xmt, &peer->rec);
- peer->pmode = pmode;
- peer->ppoll = pkt->ppoll;
- peer->precision = pkt->precision;
- peer->rootdelay = p_del;
- peer->rootdispersion = p_disp;
- peer->reftime = p_reftime;
- if (!(peer->reach)) {
- report_event(EVNT_REACH, peer);
- peer->timereachable = current_time;
- }
- peer->reach |= 1;
- peer->unreach = 0;
- poll_update(peer, 0);
-
- /*
- * If running in a client/server association, calculate the
- * clock offset c, roundtrip delay d and dispersion e. We use
- * the equations (reordered from those in the spec). Note that,
- * in a broadcast association, org has been set to the time of
- * last reception. Note the computation of dispersion includes
- * the system precision plus that due to the frequency error
- * since the originate time.
- *
- * Let t1 = p_org, t2 = p_rec, t3 = p_xmt, t4 = peer->rec:
- */
- 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
- * (t1 - t0) corrected by the one-way delay, but we can't
- * measure that directly. Therefore, we start up in MODE_CLIENT
- * mode, set FLAG_MCAST and exchange eight messages to determine
- * the clock offset. When the last message is sent, we switch to
- * 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);
- peer->estbdelay = peer->offset - p_offset;
- if (peer->hmode == MODE_CLIENT)
- return;
-
- peer->flags &= ~FLAG_MCAST;
- }
- DTOLFP(peer->estbdelay, &t34);
- L_ADD(&ci, &t34);
- p_del = peer->delay;
- } else {
- L_ADD(&ci, &t21); /* (t2 - t1) + (t3 - t4) */
- L_RSHIFT(&ci);
- 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) /* test 9 */
- peer->flash |= TEST9; /* bad root distance */
-
- /*
- * If any flasher bits remain set at this point, abandon ship.
- * Otherwise, forward to the clock filter.
- */
- if (peer->flash) {
-#ifdef DEBUG
- if (debug)
- printf("packet: bad packet data %03x\n",
- peer->flash);
-#endif
- return;
- }
- clock_filter(peer, p_offset, p_del, p_disp);
- clock_select();
- record_peer_stats(&peer->srcadr, ctlpeerstatus(peer),
- peer->offset, peer->delay, peer->disp,
- SQRT(peer->jitter));
-}
-
-
-/*
- * clock_update - Called at system process update intervals.
- */
-static void
-clock_update(void)
-{
- u_char oleap;
- u_char ostratum;
-
- /*
- * Reset/adjust the system clock. Do this only if there is a
- * system peer and the peer epoch is not older than the last
- * update.
- */
- if (sys_peer == NULL)
- return;
- if (sys_peer->epoch <= last_time)
- return;
-#ifdef DEBUG
- if (debug)
- printf("clock_update: at %ld assoc %d \n", current_time,
- peer_associations);
-#endif
- oleap = sys_leap;
- ostratum = sys_stratum;
- switch (local_clock(sys_peer, sys_offset, sys_syserr)) {
-
- /*
- * Clock is too screwed up. Just exit for now.
- */
- case -1:
- report_event(EVNT_SYSFAULT, NULL);
- exit (-1);
- /*NOTREACHED*/
-
- /*
- * Clock was stepped. Flush all time values of all peers.
- */
- case 1:
- clear_all();
- sys_peer = NULL;
- sys_stratum = STRATUM_UNSPEC;
- memcpy(&sys_refid, "STEP", 4);
- sys_poll = NTP_MINPOLL;
- report_event(EVNT_CLOCKRESET, NULL);
-#ifdef OPENSSL
- if (oleap != LEAP_NOTINSYNC)
- expire_all();
-#endif /* OPENSSL */
- break;
-
- /*
- * Update the system stratum, leap bits, root delay, root
- * dispersion, reference ID and reference time. We also update
- * select dispersion and max frequency error. If the leap
- * changes, we gotta reroll the keys.
- */
- default:
- 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_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, NULL);
-#ifdef OPENSSL
- expire_all();
-#endif /* OPENSSL */
- }
- }
- if (ostratum != sys_stratum)
- report_event(EVNT_PEERSTCHG, NULL);
-}
-
-
-/*
- * poll_update - update peer poll interval
- */
-void
-poll_update(
- struct peer *peer,
- int hpoll
- )
-{
-#ifdef OPENSSL
- int oldpoll;
-#endif /* OPENSSL */
-
- /*
- * A little foxtrot to determine what controls the poll
- * interval. If the peer is reachable, but the last four polls
- * have not been answered, use the minimum. If declared
- * truechimer, use the system poll interval. This allows each
- * association to ramp up the poll interval for useless sources
- * and to clamp it to the minimum when first starting up.
- */
-#ifdef OPENSSL
- oldpoll = peer->kpoll;
-#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 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 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) {
-#endif /* OPENSSL */
- if (hpoll == 0 && peer->nextdate != current_time)
- return;
-#ifdef REFCLOCK
- else if (peer->flags & FLAG_REFCLOCK)
- peer->nextdate += RESP_DELAY;
-#endif
- else if (peer->flags & (FLAG_IBURST | FLAG_BURST) &&
- peer->burst == NTP_BURST)
- peer->nextdate += sys_calldelay;
- else
- peer->nextdate += BURST_DELAY;
- } else if (peer->cast_flags & MDF_ACAST) {
- if (sys_survivors >= sys_minclock || peer->ttl >=
- sys_ttlmax)
- peer->kpoll = (u_char) (peer->hpoll + 3);
- else
- peer->kpoll = peer->hpoll;
- peer->nextdate = peer->outdate + RANDPOLL(peer->kpoll);
- } else {
- 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 OPENSSL
- /*
- * Bit of crass arrogance at this point. If the poll interval
- * has changed and we have a keylist, the lifetimes in the
- * keylist are probably bogus. In this case purge the keylist
- * and regenerate it later.
- */
- if (peer->kpoll != oldpoll)
- key_expire(peer);
-#endif /* OPENSSL */
-#ifdef DEBUG
- if (debug > 1)
- printf("poll_update: at %lu %s flags %04x poll %d burst %d last %lu next %lu\n",
- current_time, ntoa(&peer->srcadr), peer->flags,
- peer->kpoll, peer->burst, peer->outdate,
- peer->nextdate);
-#endif
-}
-
-
-/*
- * clear - clear peer filter registers. See Section 3.4.8 of the spec.
- */
-void
-peer_clear(
- struct peer *peer, /* peer structure */
- char *ident /* tally lights */
- )
-{
- u_char oreach, i;
-
- /*
- * If cryptographic credentials have been acquired, toss them to
- * Valhalla. Note that autokeys are ephemeral, in that they are
- * tossed immediately upon use. Therefore, the keylist can be
- * purged anytime without needing to preserve random keys. Note
- * that, if the peer is purged, the cryptographic variables are
- * purged, too. This makes it much harder to sneak in some
- * unauthenticated data in the clock filter.
- */
- oreach = peer->reach;
-#ifdef OPENSSL
- key_expire(peer);
- 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 */
-
- /*
- * Wipe the association clean and initialize the nonzero values.
- */
- 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->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;
- peer->filter_disp[i] = MAXDISPERSE;
- peer->filter_epoch[i] = current_time;
- }
-
- /*
- * 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.
- */
- 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
-}
-
-
-/*
- * clock_filter - add incoming clock sample to filter register and run
- * the filter procedure to find the best sample.
- */
-void
-clock_filter(
- 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 */
- int i, j, k, m;
- double dsp, jit, dtemp, etemp;
-
- /*
- * Shift the new sample into the register and discard the oldest
- * one. The new offset and delay come directly from the
- * timestamp calculations. The dispersion grows from the last
- * outbound packet or reference clock update to the present time
- * and increased by the sum of the peer precision and the system
- * precision. The delay can sometimes swing negative due to
- * frequency skew, so it is clamped non-negative.
- */
- dsp = min(LOGTOD(peer->precision) + LOGTOD(sys_precision) +
- sample_disp, MAXDISPERSE);
- j = peer->filter_nextpt;
- peer->filter_offset[j] = sample_offset;
- peer->filter_delay[j] = max(0, sample_delay);
- peer->filter_disp[j] = dsp;
- j++; j %= NTP_SHIFT;
- peer->filter_nextpt = (u_short) j;
-
- /*
- * Update dispersions since the last update and at the same
- * time initialize the distance and index lists. The distance
- * list uses a compound metric. If the sample is valid and
- * younger than the minimum Allan intercept, use delay;
- * otherwise, use biased dispersion.
- */
- dtemp = clock_phi * (current_time - peer->update);
- peer->update = current_time;
- for (i = NTP_SHIFT - 1; i >= 0; i--) {
- 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)
- 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];
- ord[i] = j;
- j++; j %= NTP_SHIFT;
- }
- peer->filter_epoch[j] = current_time;
-
- /*
- * Sort the samples in both lists by distance.
- */
- for (i = 1; i < NTP_SHIFT; i++) {
- for (j = 0; j < i; j++) {
- if (dst[j] > dst[i]) {
- k = ord[j];
- ord[j] = ord[i];
- ord[i] = k;
- etemp = dst[j];
- dst[j] = dst[i];
- dst[i] = etemp;
- }
- }
- }
-
- /*
- * Copy the index list to the association structure so ntpq
- * can see it later. Prune the distance list to samples less
- * than MAXDISTANCE, but keep at least two valid samples for
- * jitter calculation.
- */
- m = 0;
- for (i = 0; i < NTP_SHIFT; i++) {
- peer->filter_order[i] = (u_char) ord[i];
- if (dst[i] >= MAXDISPERSE || (m >= 2 && dst[i] >=
- MAXDISTANCE))
- continue;
- m++;
- }
-
- /*
- * Compute the dispersion and jitter squares. The dispersion
- * is weighted exponentially by NTP_FWEIGHT (0.5) so it is
- * 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.
- */
- jit = 0;
- peer->disp = 0;
- k = ord[0];
- for (i = NTP_SHIFT - 1; i >= 0; i--) {
-
- j = ord[i];
- peer->disp = NTP_FWEIGHT * (peer->disp +
- peer->filter_disp[j]);
- if (i < m)
- jit += DIFF(peer->filter_offset[j],
- peer->filter_offset[k]);
- }
-
- /*
- * If no acceptable samples remain in the shift register,
- * quietly tiptoe home leaving only the dispersion. Otherwise,
- * save the offset, delay and jitter average. Note the jitter
- * must not be less than the system precision.
- */
- if (m == 0)
- return;
- 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)
- jit /= m - 1;
- peer->jitter = max(jit, SQUARE(LOGTOD(sys_precision)));
-
- /*
- * A new sample is useful only if it is younger than the last
- * one used, but only if the sucker has been synchronized.
- */
- if (peer->filter_epoch[k] <= peer->epoch && sys_leap !=
- LEAP_NOTINSYNC) {
-#ifdef DEBUG
- if (debug)
- printf("clock_filter: discard %lu\n",
- peer->epoch - peer->filter_epoch[k]);
-#endif
- return;
- }
-
- /*
- * 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.
- */
- 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: popcorn %.6f %.6f\n",
- etemp, dtemp);
-#endif
- return;
- }
-
- /*
- * The mitigated sample statistics are saved for later
- * processing.
- */
- peer->epoch = peer->filter_epoch[k];
-#ifdef DEBUG
- if (debug)
- printf(
- "clock_filter: n %d off %.6f del %.6f dsp %.6f jit %.6f, age %lu\n",
- m, peer->offset, peer->delay, peer->disp,
- SQRT(peer->jitter), peer->update - peer->epoch);
-#endif
-}
-
-
-/*
- * 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)
-{
- 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;
- struct peer *typepps = NULL;
- struct peer *typesystem = NULL;
-
- static int list_alloc = 0;
- static struct endpoint *endpoint = NULL;
- static int *indx = NULL;
- static struct peer **peer_list = NULL;
- static u_int endpoint_size = 0;
- static u_int indx_size = 0;
- static u_int peer_list_size = 0;
-
- /*
- * Initialize and create endpoint, index and peer lists big
- * enough to handle all associations.
- */
- osys_peer = sys_peer;
- sys_peer = NULL;
- osurv = sys_survivors;
- sys_survivors = 0;
- sys_prefer = NULL;
-#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) {
- if (list_alloc > 0) {
- free(endpoint);
- free(indx);
- free(peer_list);
- }
- while (list_alloc < nlist) {
- list_alloc += 5;
- endpoint_size += 5 * 3 * sizeof(*endpoint);
- indx_size += 5 * 3 * sizeof(*indx);
- peer_list_size += 5 * sizeof(*peer_list);
- }
- endpoint = emalloc(endpoint_size);
- indx = emalloc(indx_size);
- peer_list = emalloc(peer_list_size);
- }
-
- /*
- * Initially, we populate the island with all the rifraff peers
- * that happen to be lying around. Those with seriously
- * defective clocks are immediately booted off the island. Then,
- * 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 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++) {
- for (peer = peer_hash[n]; peer != NULL; peer =
- peer->next) {
- peer->flags &= ~FLAG_SYSPEER;
- peer->status = CTL_PST_SEL_REJECT;
-
- /*
- * Leave the island immediately if the peer is
- * unfit to synchronize.
- */
- if (peer_unfit(peer))
- continue;
-
- /*
- * Don't allow the local clock or modem drivers
- * in the kitchen at this point, unless the
- * prefer peer. Do that later, but only if
- * nobody else is around. These guys are all
- * configured, so we never throw them away.
- */
- if (peer->refclktype == REFCLK_LOCALCLOCK
-#if defined(VMS) && defined(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;
- if (!(peer->flags & FLAG_PREFER))
- continue; /* no acts */
- }
-
- /*
- * If we get this far, the peer can stay on the
- * island, but does not yet have the immunity
- * idol.
- */
- peer->status = CTL_PST_SEL_SANE;
- peer_list[nlist++] = peer;
-
- /*
- * Insert each interval endpoint on the sorted
- * list.
- */
- e = peer->offset; /* Upper end */
- f = root_distance(peer);
- e = e + f;
- for (i = nl3 - 1; i >= 0; i--) {
- if (e >= endpoint[indx[i]].val)
- break;
- indx[i + 3] = indx[i];
- }
- indx[i + 3] = nl3;
- endpoint[nl3].type = 1;
- endpoint[nl3++].val = e;
-
- e = e - f; /* Center point */
- for (; i >= 0; i--) {
- if (e >= endpoint[indx[i]].val)
- break;
- indx[i + 2] = indx[i];
- }
- indx[i + 2] = nl3;
- endpoint[nl3].type = 0;
- endpoint[nl3++].val = e;
-
- e = e - f; /* Lower end */
- for (; i >= 0; i--) {
- if (e >= endpoint[indx[i]].val)
- break;
- indx[i + 1] = indx[i];
- }
- indx[i + 1] = nl3;
- endpoint[nl3].type = -1;
- endpoint[nl3++].val = e;
- }
- }
-#ifdef DEBUG
- if (debug > 2)
- for (i = 0; i < nl3; i++)
- printf("select: endpoint %2d %.6f\n",
- endpoint[indx[i]].type,
- endpoint[indx[i]].val);
-#endif
- /*
- * 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++;
- }
- n = 0;
- for (j = nl3 - 1; j >= 0; j--) {
- high = endpoint[indx[j]].val;
- n += endpoint[indx[j]].type;
- 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;
- }
-
- /*
- * 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 leave
- * the island to the rats.
- */
- if (high <= low) {
- if (typeacts != 0) {
- typeacts->status = CTL_PST_SEL_SANE;
- peer_list[0] = typeacts;
- nlist = 1;
- } else if (typelocal != 0) {
- typelocal->status = CTL_PST_SEL_SANE;
- peer_list[0] = typelocal;
- nlist = 1;
- } else {
- if (osys_peer != NULL) {
- sys_poll = NTP_MINPOLL;
- NLOG(NLOG_SYNCSTATUS)
- msyslog(LOG_INFO,
- "no servers reachable");
- report_event(EVNT_PEERSTCHG, NULL);
- }
- if (osurv > 0)
- resetmanycast();
- return;
- }
- }
-
- /*
- * 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, 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 && (peer->offset <= low || peer->offset >=
- high)) {
- if (!(peer->flags & FLAG_CONFIG))
- unpeer(peer);
- continue;
- }
- peer->status = CTL_PST_SEL_DISTSYSPEER;
- 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;
- else
- j--;
- }
- for (k = j; k > 0; k--) {
- if (d >= synch[k - 1])
- break;
- peer_list[k] = peer_list[k - 1];
- error[k] = error[k - 1];
- synch[k] = synch[k - 1];
- }
- peer_list[k] = peer;
- error[k] = peer->jitter;
- synch[k] = d;
- 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 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 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.
- */
- while (1) {
- d = 1e9;
- e = -1e9;
- k = 0;
- for (i = 0; i < nlist; i++) {
- if (error[i] < d)
- d = error[i];
- f = 0;
- if (nlist > 1) {
- for (j = 0; j < nlist; j++)
- f += DIFF(peer_list[j]->offset,
- peer_list[i]->offset);
- f /= nlist - 1;
- }
- 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: drop %s select %.6f jitter %.6f\n",
- ntoa(&peer_list[k]->srcadr),
- SQRT(sys_selerr), SQRT(d));
-#endif
- 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];
- error[j - 1] = error[j];
- }
- nlist--;
- }
-
- /*
- * 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 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.
- *
- * 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.
- */
- 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;
- 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
- * peers (type REFCLK_NIST_ATOM etc with FLAG_PREFER), (2) pps
- * peers (type REFCLK_ATOM_PPS), (3) remaining prefer peers
- * (flag FLAG_PREFER), (4) the existing system peer, if any, (5)
- * the head of the survivor list. Note that only one peer can be
- * declared prefer. The order of preference is in the order
- * stated. Note that all of these must be at the lowest stratum,
- * i.e., the stratum of the head of the survivor list.
- */
- if (sys_prefer)
- sw = sys_prefer->refclktype == REFCLK_LOCALCLOCK ||
- sys_prefer->sstclktype == CTL_SST_TS_TELEPHONE ||
- !typepps;
- else
- sw = 0;
- if (sw) {
- sys_peer = sys_prefer;
- sys_peer->status = CTL_PST_SEL_SYSPEER;
- sys_offset = sys_peer->offset;
- sys_syserr = sys_peer->jitter;
-#ifdef DEBUG
- if (debug > 1)
- printf("select: prefer offset %.6f\n",
- sys_offset);
-#endif
- }
-#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");
- pps_control = current_time;
-#ifdef DEBUG
- if (debug > 1)
- printf("select: pps offset %.6f\n",
- sys_offset);
-#endif
- } else {
- if (typesystem)
- sys_peer = osys_peer;
- 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
- if (debug > 1)
- printf("select: combine offset %.6f\n",
- sys_offset);
-#endif
- }
-#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();
-}
-
-/*
- * clock_combine - combine offsets from selected peers
- */
-static double
-clock_combine(
- struct peer **peers,
- int npeers
- )
-{
- int i;
- double x, y, z;
-
- y = z = 0;
- for (i = 0; i < npeers; i++) {
- x = root_distance(peers[i]);
- y += 1. / x;
- z += peers[i]->offset / x;
- }
- return (z / y);
-}
-
-/*
- * root_distance - compute synchronization distance from peer to root
- */
-static double
-root_distance(
- struct peer *peer
- )
-{
- /*
- * Careful squeak here. The value returned must be greater than
- * zero blamed on the peer jitter, which must be at least the
- * square of sys_precision.
- */
- return ((peer->rootdelay + peer->delay) / 2 +
- peer->rootdispersion + peer->disp + clock_phi *
- (current_time - peer->update) + SQRT(peer->jitter));
-}
-
-/*
- * peer_xmit - send packet for persistent association.
- */
-static void
-peer_xmit(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct pkt xpkt; /* transmit packet */
- int sendlen, authlen;
- keyid_t xkeyid = 0; /* transmit key ID */
- l_fp xmt_tx;
-
- /*
- * Initialize transmit packet header fields.
- */
- xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, peer->version,
- peer->hmode);
- xpkt.stratum = STRATUM_TO_PKT(sys_stratum);
- xpkt.ppoll = peer->hpoll;
- xpkt.precision = sys_precision;
- xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
- xpkt.rootdispersion = HTONS_FP(DTOUFP(sys_rootdispersion));
- xpkt.refid = sys_refid;
- HTONL_FP(&sys_reftime, &xpkt.reftime);
- HTONL_FP(&peer->org, &xpkt.org);
- HTONL_FP(&peer->rec, &xpkt.rec);
-
- /*
- * If the received packet contains a MAC, the transmitted packet
- * is authenticated and contains a MAC. If not, the transmitted
- * packet is not authenticated.
- *
- * In the current I/O semantics the default interface is set
- * until after receiving a packet and setting the right
- * interface. So, the first packet goes out unauthenticated.
- * That's why the really icky test next is here.
- */
- sendlen = LEN_PKT_NOMAC;
- if (!(peer->flags & FLAG_AUTHENABLE)) {
- get_systime(&peer->xmt);
- HTONL_FP(&peer->xmt, &xpkt.xmt);
- 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, stoa(&peer->dstadr->sin),
- stoa(&peer->srcadr), peer->hmode);
-#endif
- return;
- }
-
- /*
- * The received packet contains a MAC, so the transmitted packet
- * must be authenticated. If autokey is enabled, fuss with the
- * various modes; otherwise, private key cryptography is used.
- */
-#ifdef OPENSSL
- if (crypto_flags && (peer->flags & FLAG_SKEY)) {
- struct exten *exten; /* extension field */
- u_int opcode;
-
- /*
- * The Public Key Dance (PKD): Cryptographic credentials
- * are contained in extension fields, each including a
- * 4-octet length/code word followed by a 4-octet
- * association ID and optional additional data. Optional
- * data includes a 4-octet data length field followed by
- * the data itself. Request messages are sent from a
- * configured association; response messages can be sent
- * from a configured association or can take the fast
- * path without ever matching an association. Response
- * messages have the same code as the request, but have
- * a response bit and possibly an error bit set. In this
- * implementation, a message may contain no more than
- * one command and no more than one response.
- *
- * Cryptographic session keys include both a public and
- * a private componet. Request and response messages
- * using extension fields are always sent with the
- * private component set to zero. Packets without
- * extension fields indlude the private component when
- * the session key is generated.
- */
- while (1) {
-
- /*
- * Allocate and initialize a keylist if not
- * already done. Then, use the list in inverse
- * order, discarding keys once used. Keep the
- * latest key around until the next one, so
- * clients can use client/server packets to
- * compute propagation delay.
- *
- * Note that once a key is used from the list,
- * it is retained in the key cache until the
- * next key is used. This is to allow a client
- * to retrieve the encrypted session key
- * identifier to verify authenticity.
- *
- * If for some reason a key is no longer in the
- * key cache, a birthday has happened and the
- * pseudo-random sequence is probably broken. In
- * that case, purge the keylist and regenerate
- * it.
- */
- if (peer->keynumber == 0)
- make_keylist(peer, peer->dstadr);
- else
- peer->keynumber--;
- xkeyid = peer->keylist[peer->keynumber];
- if (authistrusted(xkeyid))
- break;
- else
- key_expire(peer);
- }
- peer->keyid = xkeyid;
- switch (peer->hmode) {
-
- /*
- * 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)
- exten = crypto_args(peer, CRYPTO_AUTO |
- CRYPTO_RESP, NULL);
- else
- 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 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:
- 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)
- 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 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.
- *
- * 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 != 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)
- 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))
- 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.
- * Most intricate.
- */
- if (sendlen > LEN_PKT_NOMAC)
- session_key(&peer->dstadr->sin, &peer->srcadr,
- xkeyid, 0, 2);
- }
-#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_INFO,
- "transmit: encryption key %d not found", xkeyid);
- if (peer->flags & FLAG_CONFIG)
- peer_clear(peer, "NKEY");
- else
- unpeer(peer);
- return;
- }
- sendlen += authlen;
-#ifdef OPENSSL
- if (xkeyid > NTP_MAXKEY)
- authtrust(xkeyid, 0);
-#endif /* OPENSSL */
- get_systime(&xmt_tx);
- if (sendlen > sizeof(xpkt)) {
- msyslog(LOG_ERR, "buffer overflow %u", sendlen);
- exit (-1);
- }
- sendpkt(&peer->srcadr, peer->dstadr, sys_ttl[peer->ttl], &xpkt,
- sendlen);
-
- /*
- * Calculate the encryption delay. Keep the minimum over
- * the latest two samples.
- */
- L_SUB(&xmt_tx, &peer->xmt);
- L_ADD(&xmt_tx, &sys_authdelay);
- sys_authdly[1] = sys_authdly[0];
- sys_authdly[0] = xmt_tx.l_uf;
- if (sys_authdly[0] < sys_authdly[1])
- sys_authdelay.l_uf = sys_authdly[0];
- else
- sys_authdelay.l_uf = sys_authdly[1];
- peer->sent++;
-#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, authlen, peer->keynumber);
-#endif
-#else
-#ifdef DEBUG
- if (debug)
- 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, authlen);
-#endif
-#endif /* OPENSSL */
-}
-
-
-/*
- * fast_xmit - Send packet for nonpersistent association. Note that
- * neither the source or destination can be a broadcast address.
- */
-static void
-fast_xmit(
- struct recvbuf *rbufp, /* receive packet pointer */
- 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; /* 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
- * buffer provided. We leave some fields intact as received. If
- * the gazinta was from a multicast address, the gazouta must go
- * out another way.
- */
- rpkt = &rbufp->recv_pkt;
- if (rbufp->dstadr->flags & INT_MULTICAST)
- rbufp->dstadr = findinterface(&rbufp->recv_srcadr);
-
- /*
- * 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_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);
- xpkt.stratum = STRATUM_TO_PKT(sys_stratum);
- xpkt.refid = sys_refid;
- }
- xpkt.ppoll = rpkt->ppoll;
- xpkt.precision = sys_precision;
- xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
- xpkt.rootdispersion =
- HTONS_FP(DTOUFP(sys_rootdispersion));
- HTONL_FP(&sys_reftime, &xpkt.reftime);
- xpkt.org = rpkt->xmt;
- HTONL_FP(&rbufp->recv_time, &xpkt.rec);
-
- /*
- * If the received packet contains a MAC, the transmitted packet
- * is authenticated and contains a MAC. If not, the transmitted
- * packet is not authenticated.
- */
- sendlen = LEN_PKT_NOMAC;
- if (rbufp->recv_length == sendlen) {
- get_systime(&xmt_ts);
- HTONL_FP(&xmt_ts, &xpkt.xmt);
- sendpkt(&rbufp->recv_srcadr, rbufp->dstadr, 0, &xpkt,
- sendlen);
-#ifdef DEBUG
- if (debug)
- printf("transmit: at %ld %s->%s mode %d\n",
- current_time, stoa(&rbufp->dstadr->sin),
- stoa(&rbufp->recv_srcadr), xmode);
-#endif
- return;
- }
-
- /*
- * The received packet contains a MAC, so the transmitted packet
- * must be authenticated. For private-key cryptography, use the
- * predefined private keys to generate the cryptosum. For
- * autokey cryptography, use the server private value to
- * generate the cookie, which is unique for every source-
- * destination-key ID combination.
- */
-#ifdef OPENSSL
- if (xkeyid > NTP_MAXKEY) {
- keyid_t cookie;
-
- /*
- * The only way to get here is a reply to a legitimate
- * client request message, so the mode must be
- * MODE_SERVER. If an extension field is present, there
- * can be only one and that must be a command. Do what
- * needs, but with private value of zero so the poor
- * jerk can decode it. If no extension field is present,
- * use the cookie to generate the session key.
- */
- cookie = session_key(&rbufp->recv_srcadr,
- &rbufp->dstadr->sin, 0, sys_private, 0);
- if (rbufp->recv_length >= (int)(sendlen + MAX_MAC_LEN + 2 *
- sizeof(u_int32))) {
- session_key(&rbufp->dstadr->sin,
- &rbufp->recv_srcadr, xkeyid, 0, 2);
- 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 /* 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 OPENSSL
- if (xkeyid > NTP_MAXKEY)
- authtrust(xkeyid, 0);
-#endif /* OPENSSL */
- get_systime(&xmt_tx);
- if (sendlen > sizeof(xpkt)) {
- msyslog(LOG_ERR, "buffer overflow %u", sendlen);
- exit (-1);
- }
- sendpkt(&rbufp->recv_srcadr, rbufp->dstadr, 0, &xpkt, sendlen);
-
- /*
- * Calculate the encryption delay. Keep the minimum over the
- * latest two samples.
- */
- L_SUB(&xmt_tx, &xmt_ts);
- L_ADD(&xmt_tx, &sys_authdelay);
- sys_authdly[1] = sys_authdly[0];
- sys_authdly[0] = xmt_tx.l_uf;
- if (sys_authdly[0] < sys_authdly[1])
- sys_authdelay.l_uf = sys_authdly[0];
- else
- sys_authdelay.l_uf = sys_authdly[1];
-#ifdef DEBUG
- if (debug)
- 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, authlen);
-#endif
-}
-
-
-#ifdef OPENSSL
-/*
- * key_expire - purge the key list
- */
-void
-key_expire(
- struct peer *peer /* peer structure pointer */
- )
-{
- int i;
-
- if (peer->keylist != NULL) {
- for (i = 0; i <= peer->keynumber; i++)
- authtrust(peer->keylist[i], 0);
- free(peer->keylist);
- peer->keylist = NULL;
- }
- value_free(&peer->sndval);
- peer->keynumber = 0;
-#ifdef DEBUG
- if (debug)
- printf("key_expire: at %lu\n", current_time);
-#endif
-}
-#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 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 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)
-{
- 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;
- }
-
- /*
- * 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;
- int i;
-
- /*
- * Fill in the sys_* stuff. Default is don't listen to
- * broadcasting, authenticate.
- */
- 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;
- 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;
- 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 /* OPENSSL */
-
- /*
- * Default these to enable
- */
- ntp_enable = 1;
-#ifndef KERNEL_FLL_BUG
- kern_enable = 1;
-#endif
- pps_enable = 0;
- stats_control = 1;
-}
-
-
-/*
- * proto_config - configure the protocol module
- */
-void
-proto_config(
- int item,
- u_long value,
- double dvalue,
- struct sockaddr_storage* svalue
- )
-{
- /*
- * Figure out what he wants to change, then do it
- */
- switch (item) {
-
- /*
- * Turn on/off kernel discipline.
- */
- case PROTO_KERNEL:
- kern_enable = (int)value;
- break;
-
- /*
- * Turn on/off clock discipline.
- */
- case PROTO_NTP:
- ntp_enable = (int)value;
- break;
-
- /*
- * Turn on/off monitoring.
- */
- case PROTO_MONITOR:
- if (value)
- mon_start(MON_ON);
- else
- mon_stop(MON_ON);
- break;
-
- /*
- * Turn on/off statistics.
- */
- case PROTO_FILEGEN:
- stats_control = (int)value;
- break;
-
- /*
- * Turn on/off facility to listen to broadcasts.
- */
- case PROTO_BROADCLIENT:
- sys_bclient = (int)value;
- if (value)
- io_setbclient();
- else
- io_unsetbclient();
- break;
-
- /*
- * Add muliticast group address.
- */
- case PROTO_MULTICAST_ADD:
- if (svalue)
- io_multicast_add(*svalue);
- break;
-
- /*
- * Delete multicast group address.
- */
- case PROTO_MULTICAST_DEL:
- if (svalue)
- io_multicast_del(*svalue);
- break;
-
- /*
- * Set default broadcast delay.
- */
- case PROTO_BROADDELAY:
- sys_bdelay = dvalue;
- break;
-
- /*
- * Set modem call delay.
- */
- case PROTO_CALLDELAY:
- sys_calldelay = (int)value;
- break;
-
- /*
- * Require authentication to mobilize ephemeral associations.
- */
- case PROTO_AUTHENTICATE:
- sys_authenticate = (int)value;
- break;
-
- /*
- * Turn on/off PPS discipline.
- */
- case PROTO_PPS:
- 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:
- cal_enable = (int)value;
- break;
-#endif
- default:
-
- /*
- * Log this error.
- */
- msyslog(LOG_INFO,
- "proto_config: illegal item %d, value %ld",
- item, value);
- }
-}
-
-
-/*
- * proto_clr_stats - clear protocol stat counters
- */
-void
-proto_clr_stats(void)
-{
- 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_badauth = 0;
- sys_limitrejected = 0;
-}
diff --git a/contrib/ntp/ntpd/ntp_refclock.c b/contrib/ntp/ntpd/ntp_refclock.c
deleted file mode 100644
index 172fbda..0000000
--- a/contrib/ntp/ntpd/ntp_refclock.c
+++ /dev/null
@@ -1,1129 +0,0 @@
-/*
- * ntp_refclock - processing support for reference clocks
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_tty.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
-#ifdef REFCLOCK
-
-#ifdef TTYCLK
-# ifdef HAVE_SYS_CLKDEFS_H
-# include <sys/clkdefs.h>
-# include <stropts.h>
-# endif
-# ifdef HAVE_SYS_SIO_H
-# include <sys/sio.h>
-# endif
-#endif /* TTYCLK */
-
-#ifdef HAVE_PPSCLOCK_H
-#include <sys/ppsclock.h>
-#endif /* HAVE_PPSCLOCK_H */
-
-#ifdef KERNEL_PLL
-#include "ntp_syscall.h"
-#endif /* KERNEL_PLL */
-
-/*
- * Reference clock support is provided here by maintaining the fiction
- * that the clock is actually a peer. As no packets are exchanged with a
- * reference clock, however, we replace the transmit, receive and packet
- * procedures with separate code to simulate them. Routines
- * refclock_transmit() and refclock_receive() maintain the peer
- * variables in a state analogous to an actual peer and pass reference
- * clock data on through the filters. Routines refclock_peer() and
- * refclock_unpeer() are called to initialize and terminate reference
- * clock associations. A set of utility routines is included to open
- * serial devices, process sample data, edit input lines to extract
- * embedded timestamps and to peform various debugging functions.
- *
- * The main interface used by these routines is the refclockproc
- * structure, which contains for most drivers the decimal equivalants of
- * the year, day, month, hour, second and millisecond/microsecond
- * decoded from the ASCII timecode. Additional information includes the
- * receive timestamp, exception report, statistics tallies, etc. In
- * addition, there may be a driver-specific unit structure used for
- * local control of the device.
- *
- * The support routines are passed a pointer to the peer structure,
- * 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 (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.
- */
-#define MAXUNIT 4 /* max units */
-#define FUDGEFAC .1 /* fudge correction factor */
-
-int fdpps; /* pps file descriptor */
-int cal_enable; /* enable refclock calibrate */
-
-/*
- * Type/unit peer index. Used to find the peer structure for control and
- * debugging. When all clock drivers have been converted to new style,
- * this dissapears.
- */
-static struct peer *typeunit[REFCLK_MAX + 1][MAXUNIT];
-
-/*
- * Forward declarations
- */
-#ifdef QSORT_USES_VOID_P
-static int refclock_cmpl_fp P((const void *, const void *));
-#else
-static int refclock_cmpl_fp P((const double *, const double *));
-#endif /* QSORT_USES_VOID_P */
-static int refclock_sample P((struct refclockproc *));
-
-/*
- * refclock_report - note the occurance of an event
- *
- * This routine presently just remembers the report and logs it, but
- * does nothing heroic for the trap handler. It tries to be a good
- * citizen and bothers the system log only if things change.
- */
-void
-refclock_report(
- struct peer *peer,
- int code
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
- if (pp == NULL)
- return;
- if (code == CEVNT_BADREPLY)
- pp->badformat++;
- if (code == CEVNT_BADTIME)
- pp->baddata++;
- if (code == CEVNT_TIMEOUT)
- pp->noreply++;
- if (pp->currentstatus != 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),
- ceventstr(code), code);
- else {
- NLOG(NLOG_CLOCKEVENT)
- msyslog(LOG_INFO,
- "clock %s event '%s' (0x%02x)",
- refnumtoa(&peer->srcadr),
- ceventstr(code), code);
- }
- }
-#ifdef DEBUG
- if (debug)
- printf("clock %s event '%s' (0x%02x)\n",
- refnumtoa(&peer->srcadr),
- ceventstr(code), code);
-#endif
-}
-
-
-/*
- * init_refclock - initialize the reference clock drivers
- *
- * This routine calls each of the drivers in turn to initialize internal
- * variables, if necessary. Most drivers have nothing to say at this
- * point.
- */
-void
-init_refclock(void)
-{
- int i, j;
-
- for (i = 0; i < (int)num_refclock_conf; i++) {
- if (refclock_conf[i]->clock_init != noentry)
- (refclock_conf[i]->clock_init)();
- for (j = 0; j < MAXUNIT; j++)
- typeunit[i][j] = 0;
- }
-}
-
-
-/*
- * refclock_newpeer - initialize and start a reference clock
- *
- * 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.
- */
-int
-refclock_newpeer(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- u_char clktype;
- int unit;
-
- /*
- * 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",
- stoa(&peer->srcadr));
- return (0);
- }
- clktype = (u_char)REFCLOCKTYPE(&peer->srcadr);
- unit = REFCLOCKUNIT(&peer->srcadr);
- if (clktype >= num_refclock_conf || unit >= MAXUNIT ||
- refclock_conf[clktype]->clock_start == noentry) {
- msyslog(LOG_ERR,
- "refclock_newpeer: clock type %d invalid\n",
- clktype);
- return (0);
- }
-
- /*
- * Allocate and initialize interface structure
- */
- pp = (struct refclockproc *)emalloc(sizeof(struct refclockproc));
- if (pp == NULL)
- return (0);
- memset((char *)pp, 0, sizeof(struct refclockproc));
- typeunit[clktype][unit] = peer;
- peer->procptr = pp;
-
- /*
- * Initialize structures
- */
- peer->refclktype = clktype;
- peer->refclkunit = (u_char)unit;
- peer->flags |= FLAG_REFCLOCK;
- peer->maxpoll = peer->minpoll;
- peer->stratum = STRATUM_REFCLOCK;
- pp->type = clktype;
- pp->timestarted = current_time;
-
- /*
- * Set peer.pmode based on the hmode. For appearances only.
- */
- switch (peer->hmode) {
- case MODE_ACTIVE:
- peer->pmode = MODE_PASSIVE;
- break;
-
- default:
- peer->pmode = MODE_SERVER;
- break;
- }
-
- /*
- * Do driver dependent initialization. The above defaults
- * can be wiggled, then finish up for consistency.
- */
- if (!((refclock_conf[clktype]->clock_start)(unit, peer))) {
- refclock_unpeer(peer);
- return (0);
- }
- peer->hpoll = peer->minpoll;
- peer->ppoll = peer->maxpoll;
- peer->refid = pp->refid;
- return (1);
-}
-
-
-/*
- * refclock_unpeer - shut down a clock
- */
-void
-refclock_unpeer(
- struct peer *peer /* peer structure pointer */
- )
-{
- u_char clktype;
- int unit;
-
- /*
- * Wiggle the driver to release its resources, then give back
- * the interface structure.
- */
- if (!peer->procptr)
- return;
- clktype = peer->refclktype;
- unit = peer->refclkunit;
- if (refclock_conf[clktype]->clock_shutdown != noentry)
- (refclock_conf[clktype]->clock_shutdown)(unit, peer);
- free(peer->procptr);
- peer->procptr = 0;
-}
-
-
-/*
- * refclock_transmit - simulate the transmit procedure
- *
- * 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.
- */
-void
-refclock_transmit(
- struct peer *peer /* peer structure pointer */
- )
-{
- u_char clktype;
- int unit;
- u_long next;
-
- clktype = peer->refclktype;
- unit = peer->refclkunit;
- peer->sent++;
-
- /*
- * This is a ripoff of the peer transmit routine, but
- * specialized for reference clocks. We do a little less
- * protocol here and call the driver-specific transmit routine.
- */
- next = peer->outdate;
- if (peer->burst == 0) {
- u_char oreach;
-#ifdef DEBUG
- if (debug)
- printf("refclock_transmit: at %ld %s\n",
- current_time, stoa(&(peer->srcadr)));
-#endif
-
- /*
- * Update reachability and poll variables like the
- * network code.
- */
- oreach = peer->reach;
- peer->reach <<= 1;
- if (!peer->reach) {
- if (oreach) {
- report_event(EVNT_UNREACH, peer);
- peer->timereachable = current_time;
- peer_clear(peer, "NONE");
- }
- } else {
- if (!(oreach & 0x03)) {
- clock_filter(peer, 0., 0., MAXDISPERSE);
- clock_select();
- }
- if (peer->flags & FLAG_BURST)
- peer->burst = NSTAGE;
- }
- next = current_time;
- }
- get_systime(&peer->xmt);
- if (refclock_conf[clktype]->clock_poll != noentry)
- (refclock_conf[clktype]->clock_poll)(unit, peer);
- peer->outdate = next;
- if (peer->burst > 0)
- peer->burst--;
- poll_update(peer, 0);
-}
-
-
-/*
- * Compare two doubles - used with qsort()
- */
-#ifdef QSORT_USES_VOID_P
-static int
-refclock_cmpl_fp(
- const void *p1,
- const void *p2
- )
-{
- const double *dp1 = (const double *)p1;
- const double *dp2 = (const double *)p2;
-
- if (*dp1 < *dp2)
- return (-1);
- if (*dp1 > *dp2)
- return (1);
- return (0);
-}
-#else
-static int
-refclock_cmpl_fp(
- const double *dp1,
- const double *dp2
- )
-{
- if (*dp1 < *dp2)
- return (-1);
- if (*dp1 > *dp2)
- return (1);
- return (0);
-}
-#endif /* QSORT_USES_VOID_P */
-
-
-/*
- * refclock_process_offset - update median filter
- *
- * This routine uses the given offset and timestamps to construct a new
- * entry in the median filter circular buffer. Samples that overflow the
- * filter are quietly discarded.
- */
-void
-refclock_process_offset(
- 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->lastrec = lastrec;
- lftemp = lasttim;
- L_SUB(&lftemp, &lastrec);
- LFPTOD(&lftemp, doffset);
- SAMPLE(doffset + fudge);
-}
-
-/*
- * refclock_process - process a sample from the clock
- *
- * This routine converts the timecode in the form days, hours, minutes,
- * seconds and milliseconds/microseconds to internal timestamp format,
- * then constructs a new entry in the median filter circular buffer.
- * Return success (1) if the data are correct and consistent with the
- * converntional calendar.
-*/
-int
-refclock_process(
- struct refclockproc *pp /* refclock structure pointer */
- )
-{
- l_fp offset, ltemp;
-
- /*
- * Compute the timecode timestamp from the days, hours, minutes,
- * seconds and milliseconds/microseconds of the timecode. Use
- * clocktime() for the aggregate seconds and the msec/usec for
- * the fraction, when present. Note that this code relies on the
- * filesystem time for the years and does not use the years of
- * the timecode.
- */
- if (!clocktime(pp->day, pp->hour, pp->minute, pp->second, GMT,
- pp->lastrec.l_ui, &pp->yearstart, &offset.l_ui))
- return (0);
- offset.l_uf = 0;
- DTOLFP(pp->nsec / 1e9, &ltemp);
- L_ADD(&offset, &ltemp);
- refclock_process_offset(pp, offset, pp->lastrec,
- pp->fudgetime1);
- return (1);
-}
-
-/*
- * refclock_sample - process a pile of samples from the clock
- *
- * This routine implements a recursive median filter to suppress spikes
- * in the data, as well as determine a performance statistic. It
- * calculates the mean offset and jitter (squares). A time adjustment
- * fudgetime1 can be added to the final offset to compensate for various
- * systematic errors. The routine returns the number of samples
- * processed, which could be zero.
- */
-static int
-refclock_sample(
- struct refclockproc *pp /* refclock structure pointer */
- )
-{
- int i, j, k, m, n;
- double offset;
- double off[MAXSTAGE];
-
- /*
- * Copy the raw offsets and sort into ascending order. Don't do
- * anything if the buffer is empty.
- */
- n = 0;
- 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);
-
- /*
- * Reject the furthest from the median of the samples until
- * approximately 60 percent of the samples remain.
- */
- i = 0; j = n;
- m = n - (n * 2) / NSTAGE;
- while ((j - i) > m) {
- offset = off[(j + i) / 2];
- if (off[j - 1] - offset < offset - off[i])
- i++; /* reject low end */
- else
- j--; /* reject high end */
- }
-
- /*
- * Determine the offset and jitter.
- */
- offset = 0;
- for (k = i; k < j; k++)
- offset += off[k];
- pp->offset = offset / m;
- if (m > 1)
- pp->jitter = SQUARE(off[i] - off[j - 1]);
- else
- pp->jitter = 0;
-#ifdef DEBUG
- if (debug)
- printf(
- "refclock_sample: n %d offset %.6f disp %.6f jitter %.6f\n",
- n, pp->offset, pp->disp, SQRT(pp->jitter));
-#endif
- return (n);
-}
-
-
-/*
- * refclock_receive - simulate the receive and packet procedures
- *
- * 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.
- */
-void
-refclock_receive(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
-
-#ifdef DEBUG
- if (debug)
- printf("refclock_receive: at %lu %s\n",
- current_time, stoa(&peer->srcadr));
-#endif
-
- /*
- * Do a little sanity dance and update the peer structure. Groom
- * the median filter samples and give the data to the clock
- * filter.
- */
- peer->received++;
- pp = peer->procptr;
- peer->processed++;
- peer->timereceived = current_time;
- peer->leap = pp->leap;
- if (peer->leap == LEAP_NOTINSYNC) {
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
- if (!peer->reach)
- report_event(EVNT_REACH, peer);
- peer->reach |= 1;
- peer->reftime = pp->lastref;
- peer->org = pp->lastrec;
- peer->rootdispersion = pp->disp;
- get_systime(&peer->rec);
- if (!refclock_sample(pp))
- return;
- clock_filter(peer, pp->offset, 0., pp->jitter);
- clock_select();
- record_peer_stats(&peer->srcadr, ctlpeerstatus(peer),
- peer->offset, peer->delay, clock_phi * (current_time -
- peer->epoch), SQRT(peer->jitter));
- if (cal_enable && last_offset < MINDISPERSE) {
-#ifdef KERNEL_PLL
- if (peer != sys_peer || pll_status & STA_PPSTIME)
-#else
- if (peer != sys_peer)
-#endif /* KERNEL_PLL */
- pp->fudgetime1 -= pp->offset * FUDGEFAC;
- else
- pp->fudgetime1 -= pp->fudgetime1 * FUDGEFAC;
- }
-}
-
-/*
- * refclock_gtlin - groom next input line and extract timestamp
- *
- * 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 tty_clk 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.
- */
-int
-refclock_gtlin(
- struct recvbuf *rbufp, /* receive buffer pointer */
- char *lineptr, /* current line pointer */
- int bmax, /* remaining characters in line */
- l_fp *tsptr /* pointer to timestamp returned */
- )
-{
- char *dpt, *dpend, *dp;
- int i;
- l_fp trtmp, tstmp;
- char c;
-
- /*
- * Check for the presence of a timestamp left by the tty_clock
- * module and, if present, use that instead of the buffer
- * timestamp captured by the I/O routines. We recognize a
- * timestamp by noting its value is earlier than the buffer
- * timestamp, but not more than one second earlier.
- */
- dpt = (char *)rbufp->recv_buffer;
- dpend = dpt + rbufp->recv_length;
- trtmp = rbufp->recv_time;
-
- if (dpend >= dpt + 8) {
- if (buftvtots(dpend - 8, &tstmp)) {
- L_SUB(&trtmp, &tstmp);
- if (trtmp.l_ui == 0) {
-#ifdef DEBUG
- if (debug > 1) {
- printf(
- "refclock_gtlin: fd %d ldisc %s",
- rbufp->fd, lfptoa(&trtmp, 6));
- get_systime(&trtmp);
- L_SUB(&trtmp, &tstmp);
- printf(" sigio %s\n", lfptoa(&trtmp, 6));
- }
-#endif
- dpend -= 8;
- trtmp = tstmp;
- } else
- trtmp = rbufp->recv_time;
- }
- }
-
- /*
- * Edit timecode to remove control chars. Don't monkey with the
- * line buffer if the input buffer contains no ASCII printing
- * characters.
- */
- if (dpend - dpt > bmax - 1)
- dpend = dpt + bmax - 1;
- for (dp = lineptr; dpt < dpend; dpt++) {
- c = (char) (*dpt & 0x7f);
- if (c >= ' ')
- *dp++ = c;
- }
- i = dp - lineptr;
- if (i > 0)
- *dp = '\0';
-#ifdef DEBUG
- 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);
-}
-
-/*
- * The following code does not apply to WINNT & VMS ...
- */
-#if !defined SYS_VXWORKS && !defined SYS_WINNT
-#if defined(HAVE_TERMIOS) || defined(HAVE_SYSV_TTYS) || defined(HAVE_BSD_TTYS)
-
-/*
- * refclock_open - open serial port for reference clock
- *
- * This routine opens a serial port for I/O and sets default options. It
- * returns the file descriptor if success and zero if failure.
- */
-int
-refclock_open(
- char *dev, /* device name pointer */
- int speed, /* serial port speed (code) */
- int lflags /* line discipline flags */
- )
-{
- int fd, i;
- int flags;
- TTY ttyb, *ttyp;
-#ifdef TIOCMGET
- u_long ltemp;
-#endif /* TIOCMGET */
- int omode;
-
- /*
- * Open serial port and set default options
- */
- flags = lflags;
-
- omode = O_RDWR;
-#ifdef O_NONBLOCK
- omode |= O_NONBLOCK;
-#endif
-#ifdef O_NOCTTY
- omode |= O_NOCTTY;
-#endif
-
- fd = open(dev, omode, 0777);
-
- if (fd < 0) {
- msyslog(LOG_ERR, "refclock_open: %s: %m", dev);
- return (0);
- }
-
- /*
- * This little jewel lights up the PPS file descriptor if the
- * device name matches the name in the pps line in the
- * configuration file. This is so the atom driver can glom onto
- * the right device. Very silly.
- */
- if (strcmp(dev, pps_device) == 0)
- fdpps = fd;
-
- /*
- * The following sections initialize the serial line port in
- * canonical (line-oriented) mode and set the specified line
- * speed, 8 bits and no parity. The modem control, break, erase
- * and kill functions are normally disabled. There is a
- * different section for each terminal interface, as selected at
- * compile time.
- */
- ttyp = &ttyb;
-
-#ifdef HAVE_TERMIOS
- /*
- * POSIX serial line parameters (termios interface)
- */
- if (tcgetattr(fd, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: fd %d tcgetattr: %m", fd);
- return (0);
- }
-
- /*
- * Set canonical mode and local connection; set specified speed,
- * 8 bits and no parity; map CR to NL; ignore break.
- */
- ttyp->c_iflag = IGNBRK | IGNPAR | ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = CS8 | CLOCAL | CREAD;
- (void)cfsetispeed(&ttyb, (u_int)speed);
- (void)cfsetospeed(&ttyb, (u_int)speed);
- ttyp->c_lflag = ICANON;
- for (i = 0; i < NCCS; ++i)
- {
- ttyp->c_cc[i] = '\0';
- }
-
- /*
- * Some special cases
- */
- if (flags & LDISC_RAW) {
- ttyp->c_iflag = 0;
- ttyp->c_lflag = 0;
- ttyp->c_cc[VMIN] = 1;
- }
-#if defined(TIOCMGET) && !defined(SCO5_CLOCK)
- /*
- * If we have modem control, check to see if modem leads are
- * active; if so, set remote connection. This is necessary for
- * the kernel pps mods to work.
- */
- ltemp = 0;
- if (ioctl(fd, TIOCMGET, (char *)&ltemp) < 0)
- msyslog(LOG_ERR,
- "refclock_open: fd %d TIOCMGET failed: %m", fd);
-#ifdef DEBUG
- if (debug)
- printf("refclock_open: fd %d modem status 0x%lx\n",
- fd, ltemp);
-#endif
- if (ltemp & TIOCM_DSR)
- ttyp->c_cflag &= ~CLOCAL;
-#endif /* TIOCMGET */
- if (tcsetattr(fd, TCSANOW, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: fd %d TCSANOW failed: %m", fd);
- return (0);
- }
- if (tcflush(fd, TCIOFLUSH) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: fd %d TCIOFLUSH failed: %m", fd);
- return (0);
- }
-#endif /* HAVE_TERMIOS */
-
-#ifdef HAVE_SYSV_TTYS
-
- /*
- * System V serial line parameters (termio interface)
- *
- */
- if (ioctl(fd, TCGETA, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: fd %d TCGETA failed: %m", fd);
- return (0);
- }
-
- /*
- * Set canonical mode and local connection; set specified speed,
- * 8 bits and no parity; map CR to NL; ignore break.
- */
- ttyp->c_iflag = IGNBRK | IGNPAR | ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = speed | CS8 | CLOCAL | CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
-
- /*
- * Some special cases
- */
- if (flags & LDISC_RAW) {
- ttyp->c_iflag = 0;
- ttyp->c_lflag = 0;
- }
-#ifdef TIOCMGET
- /*
- * If we have modem control, check to see if modem leads are
- * active; if so, set remote connection. This is necessary for
- * the kernel pps mods to work.
- */
- ltemp = 0;
- if (ioctl(fd, TIOCMGET, (char *)&ltemp) < 0)
- msyslog(LOG_ERR,
- "refclock_open: fd %d TIOCMGET failed: %m", fd);
-#ifdef DEBUG
- if (debug)
- printf("refclock_open: fd %d modem status %lx\n",
- fd, ltemp);
-#endif
- if (ltemp & TIOCM_DSR)
- ttyp->c_cflag &= ~CLOCAL;
-#endif /* TIOCMGET */
- if (ioctl(fd, TCSETA, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: fd %d TCSETA failed: %m", fd);
- return (0);
- }
-#endif /* HAVE_SYSV_TTYS */
-
-#ifdef HAVE_BSD_TTYS
-
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- */
- if (ioctl(fd, TIOCGETP, (char *)ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: fd %d TIOCGETP %m", fd);
- return (0);
- }
- ttyp->sg_ispeed = ttyp->sg_ospeed = speed;
- ttyp->sg_flags = EVENP | ODDP | CRMOD;
- if (ioctl(fd, TIOCSETP, (char *)ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_open: TIOCSETP failed: %m");
- return (0);
- }
-#endif /* HAVE_BSD_TTYS */
- if (!refclock_ioctl(fd, flags)) {
- (void)close(fd);
- msyslog(LOG_ERR,
- "refclock_open: fd %d ioctl failed: %m", fd);
- return (0);
- }
- return (fd);
-}
-#endif /* HAVE_TERMIOS || HAVE_SYSV_TTYS || HAVE_BSD_TTYS */
-#endif /* SYS_VXWORKS SYS_WINNT */
-
-/*
- * refclock_ioctl - set serial port control functions
- *
- * This routine attempts to hide the internal, system-specific details
- * of serial ports. It can handle POSIX (termios), SYSV (termio) and BSD
- * (sgtty) interfaces with varying degrees of success. The routine sets
- * up optional features such as tty_clk. The routine returns 1 if
- * success and 0 if failure.
- */
-int
-refclock_ioctl(
- int fd, /* file descriptor */
- int flags /* line discipline flags */
- )
-{
- /* simply return 1 if no UNIX line discipline is supported */
-#if !defined SYS_VXWORKS && !defined SYS_WINNT
-#if defined(HAVE_TERMIOS) || defined(HAVE_SYSV_TTYS) || defined(HAVE_BSD_TTYS)
-
-#ifdef TTYCLK
- TTY ttyb, *ttyp;
-#endif /* TTYCLK */
-
-#ifdef DEBUG
- if (debug)
- printf("refclock_ioctl: fd %d flags 0x%x\n", fd, flags);
-#endif
- if (flags == 0)
- return (1);
-#if !(defined(HAVE_TERMIOS) || defined(HAVE_BSD_TTYS))
- if (flags & (LDISC_CLK | LDISC_PPS | LDISC_ACTS)) {
- msyslog(LOG_ERR,
- "refclock_ioctl: unsupported terminal interface");
- return (0);
- }
-#endif /* HAVE_TERMIOS HAVE_BSD_TTYS */
-#ifdef TTYCLK
- ttyp = &ttyb;
-#endif /* TTYCLK */
-
- /*
- * The following features may or may not require System V
- * STREAMS support, depending on the particular implementation.
- */
-#if defined(TTYCLK)
- /*
- * The TTYCLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module and System V STREAMS
- * support. If not available, don't complain.
- */
- if (flags & (LDISC_CLK | LDISC_CLKPPS | LDISC_ACTS)) {
- int rval = 0;
-
- if (ioctl(fd, I_PUSH, "clk") < 0) {
- msyslog(LOG_NOTICE,
- "refclock_ioctl: I_PUSH clk failed: %m");
- } else {
- char *str;
-
- if (flags & LDISC_CLKPPS)
- str = "\377";
- else if (flags & LDISC_ACTS)
- str = "*";
- else
- str = "\n";
-#ifdef CLK_SETSTR
- if ((rval = ioctl(fd, CLK_SETSTR, str)) < 0)
- msyslog(LOG_ERR,
- "refclock_ioctl: CLK_SETSTR failed: %m");
- if (debug)
- printf("refclock_ioctl: fd %d CLK_SETSTR %d str %s\n",
- fd, rval, str);
-#endif
- }
- }
-#endif /* TTYCLK */
-#endif /* HAVE_TERMIOS || HAVE_SYSV_TTYS || HAVE_BSD_TTYS */
-#endif /* SYS_VXWORKS SYS_WINNT */
- return (1);
-}
-
-/*
- * refclock_control - set and/or return clock values
- *
- * 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 fudgetimes, fudgevalues, reference
- * ID and stratum.
- */
-void
-refclock_control(
- struct sockaddr_storage *srcadr,
- struct refclockstat *in,
- struct refclockstat *out
- )
-{
- struct peer *peer;
- struct refclockproc *pp;
- u_char clktype;
- int unit;
-
- /*
- * 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;
- peer = typeunit[clktype][unit];
- if (peer == NULL)
- return;
- if (peer->procptr == NULL)
- return;
- pp = peer->procptr;
-
- /*
- * Initialize requested data
- */
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- pp->fudgetime1 = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- pp->fudgetime2 = in->fudgetime2;
- if (in->haveflags & CLK_HAVEVAL1)
- pp->stratum = (u_char) in->fudgeval1;
- if (in->haveflags & CLK_HAVEVAL2)
- pp->refid = in->fudgeval2;
- peer->stratum = pp->stratum;
- if (peer->stratum == STRATUM_REFCLOCK || peer->stratum ==
- STRATUM_UNSPEC)
- peer->refid = pp->refid;
- else
- 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;
- }
- if (in->haveflags & CLK_HAVEFLAG2) {
- pp->sloppyclockflag &= ~CLK_FLAG2;
- pp->sloppyclockflag |= in->flags & CLK_FLAG2;
- }
- if (in->haveflags & CLK_HAVEFLAG3) {
- pp->sloppyclockflag &= ~CLK_FLAG3;
- pp->sloppyclockflag |= in->flags & CLK_FLAG3;
- }
- if (in->haveflags & CLK_HAVEFLAG4) {
- pp->sloppyclockflag &= ~CLK_FLAG4;
- pp->sloppyclockflag |= in->flags & CLK_FLAG4;
- }
- }
-
- /*
- * Readback requested data
- */
- if (out != 0) {
- out->haveflags = CLK_HAVETIME1 | CLK_HAVEVAL1 |
- CLK_HAVEVAL2 | CLK_HAVEFLAG4;
- out->fudgetime1 = pp->fudgetime1;
- out->fudgetime2 = pp->fudgetime2;
- out->fudgeval1 = pp->stratum;
- out->fudgeval2 = pp->refid;
- out->flags = (u_char) pp->sloppyclockflag;
-
- out->timereset = current_time - pp->timestarted;
- out->polls = pp->polls;
- out->noresponse = pp->noreply;
- out->badformat = pp->badformat;
- out->baddata = pp->baddata;
-
- out->lastevent = pp->lastevent;
- out->currentstatus = pp->currentstatus;
- out->type = pp->type;
- out->clockdesc = pp->clockdesc;
- out->lencode = pp->lencode;
- out->p_lastcode = pp->a_lastcode;
- }
-
- /*
- * Give the stuff to the clock
- */
- if (refclock_conf[clktype]->clock_control != noentry)
- (refclock_conf[clktype]->clock_control)(unit, in, out, peer);
-}
-
-
-/*
- * refclock_buginfo - return debugging info
- *
- * This routine is used mainly for debugging. It returns designated
- * values from the interface structure that can be displayed using
- * ntpdc and the clkbug command.
- */
-void
-refclock_buginfo(
- struct sockaddr_storage *srcadr, /* clock address */
- struct refclockbug *bug /* output structure */
- )
-{
- struct peer *peer;
- struct refclockproc *pp;
- u_char clktype;
- int unit;
- int i;
-
- /*
- * 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;
- peer = typeunit[clktype][unit];
- if (peer == NULL)
- return;
- pp = peer->procptr;
-
- /*
- * Copy structure values
- */
- bug->nvalues = 8;
- bug->svalues = 0x0000003f;
- bug->values[0] = pp->year;
- bug->values[1] = pp->day;
- bug->values[2] = pp->hour;
- bug->values[3] = pp->minute;
- bug->values[4] = pp->second;
- bug->values[5] = pp->nsec;
- bug->values[6] = pp->yearstart;
- bug->values[7] = pp->coderecv;
- bug->stimes = 0xfffffffc;
- bug->times[0] = pp->lastref;
- bug->times[1] = pp->lastrec;
- for (i = 2; i < (int)bug->ntimes; i++)
- DTOLFP(pp->filter[i - 2], &bug->times[i]);
-
- /*
- * Give the stuff to the clock
- */
- if (refclock_conf[clktype]->clock_buginfo != noentry)
- (refclock_conf[clktype]->clock_buginfo)(unit, bug, peer);
-}
-
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/ntp_request.c b/contrib/ntp/ntpd/ntp_request.c
deleted file mode 100644
index eacba28..0000000
--- a/contrib/ntp/ntpd/ntp_request.c
+++ /dev/null
@@ -1,2756 +0,0 @@
-/*
- * ntp_request.c - respond to information requests
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_request.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <stddef.h>
-#include <signal.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "recvbuff.h"
-
-#ifdef KERNEL_PLL
-#include "ntp_syscall.h"
-#endif /* KERNEL_PLL */
-
-/*
- * Structure to hold request procedure information
- */
-#define NOAUTH 0
-#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 (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 */
-};
-
-/*
- * Universal request codes
- */
-static struct req_proc univ_codes[] = {
- { NO_REQUEST, NOAUTH, 0, 0 }
-};
-
-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_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_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_storage *, struct interface *, struct req_pkt *));
-#endif /* KERNEL_PLL */
-#ifdef REFCLOCK
-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_storage *, struct interface *, struct req_pkt *));
-#endif /* REFCLOCK */
-
-/*
- * ntpd request codes
- */
-static struct req_proc ntp_codes[] = {
- { 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, 0, get_kernel_info },
-#endif
-#ifdef REFCLOCK
- { 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, 0 }
-};
-
-
-/*
- * Authentication keyid used to authenticate requests. Zero means we
- * don't allow writing anything.
- */
-keyid_t info_auth_keyid;
-
-/*
- * Statistic counters to keep track of requests and responses.
- */
-u_long numrequests; /* number of requests we've received */
-u_long numresppkts; /* number of resp packets sent with data */
-
-u_long errorcounter[INFO_ERR_AUTH+1]; /* lazy way to count errors, indexed */
-/* by the error code */
-
-/*
- * A hack. To keep the authentication module clear of ntp-ism's, we
- * include a time reset variable for its stats here.
- */
-static u_long auth_timereset;
-
-/*
- * Response packet used by these routines. Also some state information
- * so that we can handle packet formatting within a common set of
- * subroutines. Note we try to enter data in place whenever possible,
- * but the need to set the more bit correctly means we occasionally
- * use the extra buffer and copy.
- */
-static struct resp_pkt rpkt;
-static int reqver;
-static int seqno;
-static int nitems;
-static int itemsize;
-static int databytes;
-static char exbuf[RESP_DATA_SIZE];
-static int usingexbuf;
-static struct sockaddr_storage *toaddr;
-static struct interface *frominter;
-
-/*
- * init_request - initialize request data
- */
-void
-init_request (void)
-{
- int i;
-
- numrequests = 0;
- numresppkts = 0;
- auth_timereset = 0;
- info_auth_keyid = 0; /* by default, can't do this */
-
- for (i = 0; i < sizeof(errorcounter)/sizeof(errorcounter[0]); i++)
- errorcounter[i] = 0;
-}
-
-
-/*
- * req_ack - acknowledge request with no data
- */
-static void
-req_ack(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt,
- int errcode
- )
-{
- /*
- * fill in the fields
- */
- rpkt.rm_vn_mode = RM_VN_MODE(RESP_BIT, 0, reqver);
- rpkt.auth_seq = AUTH_SEQ(0, 0);
- rpkt.implementation = inpkt->implementation;
- rpkt.request = inpkt->request;
- rpkt.err_nitems = ERR_NITEMS(errcode, 0);
- rpkt.mbz_itemsize = MBZ_ITEMSIZE(0);
-
- /*
- * send packet and bump counters
- */
- sendpkt(srcadr, inter, -1, (struct pkt *)&rpkt, RESP_HEADER_SIZE);
- errorcounter[errcode]++;
-}
-
-
-/*
- * prepare_pkt - prepare response packet for transmission, return pointer
- * to storage for data item.
- */
-static char *
-prepare_pkt(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *pkt,
- u_int structsize
- )
-{
-#ifdef DEBUG
- if (debug > 3)
- printf("request: preparing pkt\n");
-#endif
-
- /*
- * Fill in the implementation, request and itemsize fields
- * since these won't change.
- */
- rpkt.implementation = pkt->implementation;
- rpkt.request = pkt->request;
- rpkt.mbz_itemsize = MBZ_ITEMSIZE(structsize);
-
- /*
- * Compute the static data needed to carry on.
- */
- toaddr = srcadr;
- frominter = inter;
- seqno = 0;
- nitems = 0;
- itemsize = structsize;
- databytes = 0;
- usingexbuf = 0;
-
- /*
- * return the beginning of the packet buffer.
- */
- return &rpkt.data[0];
-}
-
-
-/*
- * more_pkt - return a data pointer for a new item.
- */
-static char *
-more_pkt(void)
-{
- /*
- * If we were using the extra buffer, send the packet.
- */
- if (usingexbuf) {
-#ifdef DEBUG
- if (debug > 2)
- printf("request: sending pkt\n");
-#endif
- rpkt.rm_vn_mode = RM_VN_MODE(RESP_BIT, MORE_BIT, reqver);
- rpkt.auth_seq = AUTH_SEQ(0, seqno);
- rpkt.err_nitems = htons((u_short)nitems);
- sendpkt(toaddr, frominter, -1, (struct pkt *)&rpkt,
- RESP_HEADER_SIZE+databytes);
- numresppkts++;
-
- /*
- * Copy data out of exbuf into the packet.
- */
- memmove(&rpkt.data[0], exbuf, (unsigned)itemsize);
- seqno++;
- databytes = 0;
- nitems = 0;
- usingexbuf = 0;
- }
-
- databytes += itemsize;
- nitems++;
- if (databytes + itemsize <= RESP_DATA_SIZE) {
-#ifdef DEBUG
- if (debug > 3)
- printf("request: giving him more data\n");
-#endif
- /*
- * More room in packet. Give him the
- * next address.
- */
- return &rpkt.data[databytes];
- } else {
- /*
- * No room in packet. Give him the extra
- * buffer unless this was the last in the sequence.
- */
-#ifdef DEBUG
- if (debug > 3)
- printf("request: into extra buffer\n");
-#endif
- if (seqno == MAXSEQ)
- return (char *)0;
- else {
- usingexbuf = 1;
- return exbuf;
- }
- }
-}
-
-
-/*
- * flush_pkt - we're done, return remaining information.
- */
-static void
-flush_pkt(void)
-{
-#ifdef DEBUG
- if (debug > 2)
- printf("request: flushing packet, %d items\n", nitems);
-#endif
- /*
- * Must send the last packet. If nothing in here and nothing
- * has been sent, send an error saying no data to be found.
- */
- if (seqno == 0 && nitems == 0)
- req_ack(toaddr, frominter, (struct req_pkt *)&rpkt,
- INFO_ERR_NODATA);
- else {
- rpkt.rm_vn_mode = RM_VN_MODE(RESP_BIT, 0, reqver);
- rpkt.auth_seq = AUTH_SEQ(0, seqno);
- rpkt.err_nitems = htons((u_short)nitems);
- sendpkt(toaddr, frominter, -1, (struct pkt *)&rpkt,
- RESP_HEADER_SIZE+databytes);
- numresppkts++;
- }
-}
-
-
-
-/*
- * process_private - process private mode (7) packets
- */
-void
-process_private(
- struct recvbuf *rbufp,
- int mod_okay
- )
-{
- struct req_pkt *inpkt;
- struct req_pkt_tail *tailinpkt;
- struct sockaddr_storage *srcadr;
- struct interface *inter;
- struct req_proc *proc;
- int ec;
- short temp_size;
-
- /*
- * Initialize pointers, for convenience
- */
- inpkt = (struct req_pkt *)&rbufp->recv_pkt;
- srcadr = &rbufp->recv_srcadr;
- inter = rbufp->dstadr;
-
-#ifdef DEBUG
- if (debug > 2)
- printf("process_private: impl %d req %d\n",
- inpkt->implementation, inpkt->request);
-#endif
-
- /*
- * Do some sanity checks on the packet. Return a format
- * error if it fails.
- */
- ec = 0;
- if ( (++ec, ISRESPONSE(inpkt->rm_vn_mode))
- || (++ec, ISMORE(inpkt->rm_vn_mode))
- || (++ec, INFO_VERSION(inpkt->rm_vn_mode) > NTP_VERSION)
- || (++ec, INFO_VERSION(inpkt->rm_vn_mode) < NTP_OLDVERSION)
- || (++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_HDR)
- ) {
- 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;
- }
-
- reqver = INFO_VERSION(inpkt->rm_vn_mode);
-
- /*
- * Get the appropriate procedure list to search.
- */
- if (inpkt->implementation == IMPL_UNIV)
- proc = univ_codes;
- else if ((inpkt->implementation == IMPL_XNTPD) ||
- (inpkt->implementation == IMPL_XNTPD_OLD))
- proc = ntp_codes;
- else {
- req_ack(srcadr, inter, inpkt, INFO_ERR_IMPL);
- return;
- }
-
- /*
- * Search the list for the request codes. If it isn't one
- * we know, return an error.
- */
- while (proc->request_code != NO_REQUEST) {
- if (proc->request_code == (short) inpkt->request)
- break;
- proc++;
- }
- if (proc->request_code == NO_REQUEST) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_REQ);
- return;
- }
-
-#ifdef DEBUG
- if (debug > 3)
- printf("found request in tables\n");
-#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
- * a time stamp in the appropriate field. The time stamp
- * must be within INFO_TS_MAXSKEW of the receive
- * time stamp.
- */
- if (proc->needs_auth && sys_authenticate) {
- l_fp ftmp;
- double dtemp;
-
- if (rbufp->recv_length < (int)((REQ_LEN_HDR +
- (INFO_ITEMSIZE(inpkt->mbz_itemsize) *
- INFO_NITEMS(inpkt->err_nitems))
- + sizeof(struct req_pkt_tail)))) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- }
- tailinpkt = (struct req_pkt_tail *)((char *)&rbufp->recv_pkt +
- rbufp->recv_length - sizeof(struct req_pkt_tail));
-
- /*
- * If this guy is restricted from doing this, don't let him
- * If wrong key was used, or packet doesn't have mac, return.
- */
- if (!INFO_IS_AUTH(inpkt->auth_seq) || info_auth_keyid == 0
- || ntohl(tailinpkt->keyid) != info_auth_keyid) {
-#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));
- 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;
- }
- if (rbufp->recv_length > REQ_LEN_MAC) {
-#ifdef DEBUG
- if (debug > 4)
- printf("bad pkt length %d\n",
- rbufp->recv_length);
-#endif
- msyslog(LOG_ERR, "process_private: bad pkt length %d",
- rbufp->recv_length);
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
- if (!mod_okay || !authhavekey(info_auth_keyid)) {
-#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;
- }
-
- /*
- * calculate absolute time difference between xmit time stamp
- * and receive time stamp. If too large, too bad.
- */
- NTOHL_FP(&tailinpkt->tstamp, &ftmp);
- L_SUB(&ftmp, &rbufp->recv_time);
- LFPTOD(&ftmp, dtemp);
- if (fabs(dtemp) >= INFO_TS_MAXSKEW) {
- /*
- * 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;
- }
-
- /*
- * So far so good. See if decryption works out okay.
- */
- 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;
- }
- }
-
-#ifdef DEBUG
- if (debug > 3)
- printf("process_private: all okay, into handler\n");
-#endif
-
- /*
- * Packet is okay. Call the handler to send him data.
- */
- (proc->handler)(srcadr, inter, inpkt);
-}
-
-
-/*
- * peer_list - send a list of the peers
- */
-static void
-peer_list(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- 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,
- v6sizeof(struct info_peer_list));
- for (i = 0; i < HASH_SIZE && ip != 0; i++) {
- pp = peer_hash[i];
- while (pp != 0 && ip != 0) {
- 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();
-}
-
-
-/*
- * peer_list_sum - return extended peer list
- */
-static void
-peer_list_sum(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_peer_summary *ips;
- 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,
- v6sizeof(struct info_peer_summary));
- for (i = 0; i < HASH_SIZE && ips != 0; i++) {
- pp = peer_hash[i];
- while (pp != 0 && ips != 0) {
-#ifdef DEBUG
- if (debug > 3)
- printf("sum: got one\n");
-#endif
- /*
- * 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();
- }
- }
- flush_pkt();
-}
-
-
-/*
- * peer_info - send information for one or more peers
- */
-static void
-peer_info (
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_peer_list *ipl;
- register struct peer *pp;
- register struct info_peer *ip;
- register int items;
- register int i, j;
- struct sockaddr_storage addr;
- extern struct peer *sys_peer;
- l_fp ltmp;
-
- memset((char *)&addr, 0, sizeof addr);
- items = INFO_NITEMS(inpkt->err_nitems);
- ipl = (struct info_peer_list *) inpkt->data;
-
- ip = (struct info_peer *)prepare_pkt(srcadr, inter, inpkt,
- v6sizeof(struct info_peer));
- while (items-- > 0 && ip != 0) {
- 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;
- 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)
- ip->flags |= INFO_FLAG_SYSPEER;
- if (pp->flags & FLAG_CONFIG)
- ip->flags |= INFO_FLAG_CONFIG;
- if (pp->flags & FLAG_REFCLOCK)
- ip->flags |= INFO_FLAG_REFCLOCK;
- if (pp->flags & FLAG_AUTHENABLE)
- ip->flags |= INFO_FLAG_AUTHENABLE;
- if (pp->flags & FLAG_PREFER)
- ip->flags |= INFO_FLAG_PREFER;
- if (pp->flags & FLAG_BURST)
- ip->flags |= INFO_FLAG_BURST;
- 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->leap = pp->leap;
- ip->hmode = pp->hmode;
- ip->keyid = pp->keyid;
- ip->stratum = pp->stratum;
- ip->ppoll = pp->ppoll;
- ip->hpoll = pp->hpoll;
- ip->precision = pp->precision;
- ip->version = pp->version;
- ip->reach = pp->reach;
- ip->unreach = (u_char) pp->unreach;
- ip->flash = (u_char)pp->flash;
- ip->flash2 = (u_short) pp->flash;
- ip->estbdelay = HTONS_FP(DTOFP(pp->estbdelay));
- ip->ttl = pp->ttl;
- ip->associd = htons(pp->associd);
- ip->rootdelay = HTONS_FP(DTOUFP(pp->rootdelay));
- ip->rootdispersion = HTONS_FP(DTOUFP(pp->rootdispersion));
- ip->refid = pp->refid;
- HTONL_FP(&pp->reftime, &ip->reftime);
- HTONL_FP(&pp->org, &ip->org);
- HTONL_FP(&pp->rec, &ip->rec);
- HTONL_FP(&pp->xmt, &ip->xmt);
- j = pp->filter_nextpt - 1;
- for (i = 0; i < NTP_SHIFT; i++, j--) {
- if (j < 0)
- j = NTP_SHIFT-1;
- 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] = (u_char)((pp->filter_nextpt+NTP_SHIFT-1)
- - pp->filter_order[i]);
- if (ip->order[i] >= NTP_SHIFT)
- ip->order[i] -= NTP_SHIFT;
- }
- DTOLFP(pp->offset, &ltmp);
- HTONL_FP(&ltmp, &ip->offset);
- ip->delay = HTONS_FP(DTOFP(pp->delay));
- ip->dispersion = HTONS_FP(DTOUFP(SQRT(pp->disp)));
- ip->selectdisp = HTONS_FP(DTOUFP(SQRT(pp->jitter)));
- ip = (struct info_peer *)more_pkt();
- }
- flush_pkt();
-}
-
-
-/*
- * peer_stats - send statistics for one or more peers
- */
-static void
-peer_stats (
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_peer_list *ipl;
- register struct peer *pp;
- register struct info_peer_stats *ip;
- register int items;
- struct sockaddr_storage addr;
- extern struct peer *sys_peer;
-
- 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,
- v6sizeof(struct info_peer_stats));
- while (items-- > 0 && ip != 0) {
- 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;
- 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)
- ip->flags |= INFO_FLAG_SYSPEER;
- if (pp->flags & FLAG_CONFIG)
- ip->flags |= INFO_FLAG_CONFIG;
- if (pp->flags & FLAG_REFCLOCK)
- ip->flags |= INFO_FLAG_REFCLOCK;
- if (pp->flags & FLAG_AUTHENABLE)
- ip->flags |= INFO_FLAG_AUTHENABLE;
- if (pp->flags & FLAG_PREFER)
- ip->flags |= INFO_FLAG_PREFER;
- if (pp->flags & FLAG_BURST)
- ip->flags |= INFO_FLAG_BURST;
- 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->timereceived = htonl((u_int32)(current_time - pp->timereceived));
- ip->timetosend = htonl(pp->nextdate - current_time);
- ip->timereachable = htonl((u_int32)(current_time - pp->timereachable));
- ip->sent = htonl((u_int32)(pp->sent));
- ip->processed = htonl((u_int32)(pp->processed));
- ip->badauth = htonl((u_int32)(pp->badauth));
- ip->bogusorg = htonl((u_int32)(pp->bogusorg));
- ip->oldpkt = htonl((u_int32)(pp->oldpkt));
- ip->seldisp = htonl((u_int32)(pp->seldisptoolarge));
- ip->selbroken = htonl((u_int32)(pp->selbroken));
- ip->candidate = pp->status;
- ip = (struct info_peer_stats *)more_pkt();
- }
- flush_pkt();
-}
-
-
-/*
- * sys_info - return system info
- */
-static void
-sys_info(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_sys *is;
-
- /*
- * Importations from the protocol module
- */
- extern u_char sys_leap;
- extern u_char sys_stratum;
- extern s_char sys_precision;
- extern double sys_rootdelay;
- extern double sys_rootdispersion;
- extern u_int32 sys_refid;
- extern l_fp sys_reftime;
- extern u_char sys_poll;
- extern struct peer *sys_peer;
- extern int sys_bclient;
- extern double sys_bdelay;
- extern l_fp sys_authdelay;
- extern double clock_stability;
- extern double sys_jitter;
-
- is = (struct info_sys *)prepare_pkt(srcadr, inter, inpkt,
- v6sizeof(struct info_sys));
-
- if (sys_peer != 0) {
- 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;
- is->rootdelay = htonl(DTOFP(sys_rootdelay));
- is->rootdispersion = htonl(DTOUFP(sys_rootdispersion));
- is->frequency = htonl(DTOFP(sys_jitter));
- is->stability = htonl(DTOUFP(clock_stability * 1e6));
- is->refid = sys_refid;
- HTONL_FP(&sys_reftime, &is->reftime);
-
- is->poll = sys_poll;
-
- is->flags = 0;
- if (sys_authenticate)
- is->flags |= INFO_FLAG_AUTHENTICATE;
- if (sys_bclient)
- is->flags |= INFO_FLAG_BCLIENT;
-#ifdef REFCLOCK
- if (cal_enable)
- is->flags |= INFO_FLAG_CAL;
-#endif /* REFCLOCK */
- if (kern_enable)
- is->flags |= INFO_FLAG_KERNEL;
- if (mon_enabled != MON_OFF)
- is->flags |= INFO_FLAG_MONITOR;
- if (ntp_enable)
- is->flags |= INFO_FLAG_NTP;
- if (pps_enable)
- is->flags |= INFO_FLAG_PPS_SYNC;
- if (stats_control)
- is->flags |= INFO_FLAG_FILEGEN;
- is->bdelay = HTONS_FP(DTOFP(sys_bdelay));
- HTONL_UF(sys_authdelay.l_f, &is->authdelay);
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-/*
- * sys_stats - return system statistics
- */
-static void
-sys_stats(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_sys_stats *ss;
-
- /*
- * Importations from the protocol module
- */
- ss = (struct info_sys_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_sys_stats));
- ss->timeup = htonl((u_int32)current_time);
- ss->timereset = htonl((u_int32)(current_time - sys_stattime));
- 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);
- ss->badlength = htonl((u_int32)sys_badlength);
- 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();
-}
-
-
-/*
- * mem_stats - return memory statistics
- */
-static void
-mem_stats(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_mem_stats *ms;
- register int i;
-
- /*
- * Importations from the peer module
- */
- extern int peer_hash_count[HASH_SIZE];
- extern int peer_free_count;
- extern u_long peer_timereset;
- extern u_long findpeer_calls;
- extern u_long peer_allocations;
- extern u_long peer_demobilizations;
- extern int total_peer_structs;
-
- ms = (struct info_mem_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_mem_stats));
-
- ms->timereset = htonl((u_int32)(current_time - peer_timereset));
- ms->totalpeermem = htons((u_short)total_peer_structs);
- ms->freepeermem = htons((u_short)peer_free_count);
- ms->findpeer_calls = htonl((u_int32)findpeer_calls);
- ms->allocations = htonl((u_int32)peer_allocations);
- ms->demobilizations = htonl((u_int32)peer_demobilizations);
-
- for (i = 0; i < HASH_SIZE; i++) {
- if (peer_hash_count[i] > 255)
- ms->hashcount[i] = 255;
- else
- ms->hashcount[i] = (u_char)peer_hash_count[i];
- }
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-/*
- * io_stats - return io statistics
- */
-static void
-io_stats(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_io_stats *io;
-
- /*
- * Importations from the io module
- */
- extern u_long io_timereset;
-
- io = (struct info_io_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_io_stats));
-
- io->timereset = htonl((u_int32)(current_time - io_timereset));
- io->totalrecvbufs = htons((u_short) total_recvbuffs());
- io->freerecvbufs = htons((u_short) free_recvbuffs());
- io->fullrecvbufs = htons((u_short) full_recvbuffs());
- io->lowwater = htons((u_short) lowater_additions());
- io->dropped = htonl((u_int32)packets_dropped);
- io->ignored = htonl((u_int32)packets_ignored);
- io->received = htonl((u_int32)packets_received);
- io->sent = htonl((u_int32)packets_sent);
- io->notsent = htonl((u_int32)packets_notsent);
- io->interrupts = htonl((u_int32)handler_calls);
- io->int_received = htonl((u_int32)handler_pkts);
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-/*
- * timer_stats - return timer statistics
- */
-static void
-timer_stats(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_timer_stats *ts;
-
- /*
- * Importations from the timer module
- */
- extern u_long timer_timereset;
- extern u_long timer_overflows;
- extern u_long timer_xmtcalls;
-
- ts = (struct info_timer_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_timer_stats));
-
- ts->timereset = htonl((u_int32)(current_time - timer_timereset));
- ts->alarms = htonl((u_int32)alarm_overflow);
- ts->overflows = htonl((u_int32)timer_overflows);
- ts->xmtcalls = htonl((u_int32)timer_xmtcalls);
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-/*
- * loop_info - return the current state of the loop filter
- */
-static void
-loop_info(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_loop *li;
- l_fp ltmp;
-
- /*
- * Importations from the loop filter module
- */
- extern double last_offset;
- extern double drift_comp;
- extern int tc_counter;
- extern u_long last_time;
-
- li = (struct info_loop *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_loop));
-
- DTOLFP(last_offset, &ltmp);
- HTONL_FP(&ltmp, &li->last_offset);
- DTOLFP(drift_comp * 1e6, &ltmp);
- HTONL_FP(&ltmp, &li->drift_comp);
- li->compliance = htonl((u_int32)(tc_counter));
- li->watchdog_timer = htonl((u_int32)(current_time - last_time));
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-/*
- * do_conf - add a peer to the configuration list
- */
-static void
-do_conf(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- int items;
- 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.
- */
- 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 (((temp_cp.version) > NTP_VERSION)
- || ((temp_cp.version) < NTP_OLDVERSION))
- fl = 1;
- if (temp_cp.hmode != MODE_ACTIVE
- && temp_cp.hmode != MODE_CLIENT
- && temp_cp.hmode != MODE_BROADCAST)
- fl = 1;
- if (temp_cp.flags & ~(CONF_FLAG_AUTHENABLE | CONF_FLAG_PREFER
- | CONF_FLAG_BURST | CONF_FLAG_SKEY))
- fl = 1;
- cp = (struct conf_peer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
- }
-
- if (fl) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- /*
- * Looks okay, try it out
- */
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_peer *)inpkt->data;
-
- 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(&tmp_clock) &&
-#endif
- 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
-
- /* XXX W2DO? minpoll/maxpoll arguments ??? */
- 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;
- }
- 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_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_dns_assoc *dp;
- register int items;
- struct sockaddr_in peeraddr;
-
- /*
- * Do a check of everything to see that it looks
- * okay. If not, complain about it. Note we are
- * very picky here.
- */
- items = INFO_NITEMS(inpkt->err_nitems);
- dp = (struct info_dns_assoc *)inpkt->data;
-
- /*
- * Looks okay, try it out
- */
- items = INFO_NITEMS(inpkt->err_nitems);
- dp = (struct info_dns_assoc *)inpkt->data;
- memset((char *)&peeraddr, 0, sizeof(struct sockaddr_in));
- peeraddr.sin_family = AF_INET;
- peeraddr.sin_port = htons(NTP_PORT);
-
- /*
- * Make sure the address is valid
- */
- if (
-#ifdef REFCLOCK
- !ISREFCLOCKADR(&peeraddr) &&
-#endif
- ISBADADR(&peeraddr)) {
-#ifdef REFCLOCK
- msyslog(LOG_ERR, "dns_a: !ISREFCLOCK && ISBADADR");
-#else
- msyslog(LOG_ERR, "dns_a: ISBADADR");
-#endif
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- while (items-- > 0) {
- associd_t associd;
- size_t hnl;
- struct peer *peer;
- int bogon = 0;
-
- associd = dp->associd;
- peer = findpeerbyassoc(associd);
- if (peer == 0 || peer->flags & FLAG_REFCLOCK) {
- msyslog(LOG_ERR, "dns_a: %s",
- (peer == 0)
- ? "peer == 0"
- : "peer->flags & FLAG_REFCLOCK");
- ++bogon;
- }
- peeraddr.sin_addr.s_addr = dp->peeraddr;
- for (hnl = 0; dp->hostname[hnl] && hnl < sizeof dp->hostname; ++hnl) ;
- if (hnl >= sizeof dp->hostname) {
- msyslog(LOG_ERR, "dns_a: hnl (%ld) >= %ld",
- (long)hnl, (long)sizeof dp->hostname);
- ++bogon;
- }
-
- msyslog(LOG_INFO, "dns_a: <%s> for %s, AssocID %d, bogon %d",
- dp->hostname,
- stoa((struct sockaddr_storage *)&peeraddr), associd,
- bogon);
-
- if (bogon) {
- /* If it didn't work */
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- } else {
-#if 0
-#ifdef PUBKEY
- crypto_public(peer, dp->hostname);
-#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_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_storage peeraddr;
- int bad, found;
-
- /*
- * This is a bit unstructured, but I like to be careful.
- * We check to see that every peer exists and is actually
- * configured. If so, we remove them. If not, we return
- * an error.
- */
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
-
- bad = 0;
- while (items-- > 0 && !bad) {
- 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)
- break;
- if (peer->flags & FLAG_CONFIG)
- found = 1;
- }
- if (!found)
- bad = 1;
- cp = (struct conf_unpeer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
- }
-
- if (bad) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
-
- /*
- * Now do it in earnest.
- */
-
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
- while (items-- > 0) {
- 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 = (struct conf_unpeer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
- }
-
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * set_sys_flag - set system flags
- */
-static void
-set_sys_flag(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- setclr_flags(srcadr, inter, inpkt, 1);
-}
-
-
-/*
- * clr_sys_flag - clear system flags
- */
-static void
-clr_sys_flag(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- setclr_flags(srcadr, inter, inpkt, 0);
-}
-
-
-/*
- * setclr_flags - do the grunge work of flag setting/clearing
- */
-static void
-setclr_flags(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt,
- u_long set
- )
-{
- register u_int flags;
-
- if (INFO_NITEMS(inpkt->err_nitems) > 1) {
- msyslog(LOG_ERR, "setclr_flags: err_nitems > 1");
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- flags = ((struct conf_sys_flags *)inpkt->data)->flags;
-
- if (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)) {
- msyslog(LOG_ERR, "setclr_flags: extra flags: %#x",
- 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));
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- if (flags & SYS_FLAG_BCLIENT)
- proto_config(PROTO_BROADCLIENT, set, 0., NULL);
- if (flags & SYS_FLAG_PPS)
- proto_config(PROTO_PPS, set, 0., NULL);
- if (flags & SYS_FLAG_NTP)
- proto_config(PROTO_NTP, set, 0., NULL);
- if (flags & SYS_FLAG_KERNEL)
- proto_config(PROTO_KERNEL, set, 0., NULL);
- if (flags & SYS_FLAG_MONITOR)
- proto_config(PROTO_MONITOR, set, 0., NULL);
- if (flags & SYS_FLAG_FILEGEN)
- proto_config(PROTO_FILEGEN, set, 0., NULL);
- if (flags & SYS_FLAG_AUTH)
- proto_config(PROTO_AUTHENTICATE, set, 0., NULL);
- if (flags & SYS_FLAG_CAL)
- proto_config(PROTO_CAL, set, 0., NULL);
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * list_restrict - return the restrict list
- */
-static void
-list_restrict(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_restrict *ir;
- register struct restrictlist *rl;
- register struct restrictlist6 *rl6;
-
-#ifdef DEBUG
- if (debug > 2)
- printf("wants restrict list summary\n");
-#endif
-
- ir = (struct info_restrict *)prepare_pkt(srcadr, inter, inpkt,
- 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();
-}
-
-
-
-/*
- * do_resaddflags - add flags to a restrict entry (or create one)
- */
-static void
-do_resaddflags(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_restrict(srcadr, inter, inpkt, RESTRICT_FLAGS);
-}
-
-
-
-/*
- * do_ressubflags - remove flags from a restrict entry
- */
-static void
-do_ressubflags(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_restrict(srcadr, inter, inpkt, RESTRICT_UNFLAG);
-}
-
-
-/*
- * do_unrestrict - remove a restrict entry from the list
- */
-static void
-do_unrestrict(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_restrict(srcadr, inter, inpkt, RESTRICT_REMOVE);
-}
-
-
-
-
-
-/*
- * do_restrict - do the dirty stuff of dealing with restrictions
- */
-static void
-do_restrict(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt,
- int op
- )
-{
- register struct conf_restrict *cr;
- register int items;
- struct sockaddr_storage matchaddr;
- struct sockaddr_storage matchmask;
- int bad;
-
- /*
- * Do a check of the flags to make sure that only
- * the NTPPORT flag is set, if any. If not, complain
- * about it. Note we are very picky here.
- */
- items = INFO_NITEMS(inpkt->err_nitems);
- cr = (struct conf_restrict *)inpkt->data;
-
- bad = 0;
- while (items-- > 0 && !bad) {
- if (cr->mflags & ~(RESM_NTPONLY))
- bad |= 1;
- if (cr->flags & ~(RES_ALLFLAGS))
- bad |= 2;
- 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) {
- msyslog(LOG_ERR, "do_restrict: bad = %#x", bad);
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- /*
- * Looks okay, try it out
- */
- items = INFO_NITEMS(inpkt->err_nitems);
- cr = (struct conf_restrict *)inpkt->data;
- memset((char *)&matchaddr, 0, sizeof(struct sockaddr_storage));
- memset((char *)&matchmask, 0, sizeof(struct sockaddr_storage));
-
- while (items-- > 0) {
- 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++;
- }
-
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * mon_getlist - return monitor data
- */
-static void
-mon_getlist_0(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_monitor *im;
- register struct mon_data *md;
- extern struct mon_data mon_mru_list;
- extern int mon_enabled;
-
-#ifdef DEBUG
- if (debug > 2)
- printf("wants monitor 0 list\n");
-#endif
- if (!mon_enabled) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
- im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt,
- 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)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));
- 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;
- im = (struct info_monitor *)more_pkt();
- }
- flush_pkt();
-}
-
-/*
- * mon_getlist - return monitor data
- */
-static void
-mon_getlist_1(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_monitor_1 *im;
- register struct mon_data *md;
- extern struct mon_data mon_mru_list;
- extern int mon_enabled;
-
- if (!mon_enabled) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
- im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt,
- 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)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);
- 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;
- im->version = md->version;
- im = (struct info_monitor_1 *)more_pkt();
- }
- flush_pkt();
-}
-
-/*
- * Module entry points and the flags they correspond with
- */
-struct reset_entry {
- int flag; /* flag this corresponds to */
- void (*handler) P((void)); /* routine to handle request */
-};
-
-struct reset_entry reset_entries[] = {
- { RESET_FLAG_ALLPEERS, peer_all_reset },
- { RESET_FLAG_IO, io_clr_stats },
- { RESET_FLAG_SYS, proto_clr_stats },
- { RESET_FLAG_MEM, peer_clr_stats },
- { RESET_FLAG_TIMER, timer_clr_stats },
- { RESET_FLAG_AUTH, reset_auth_stats },
- { RESET_FLAG_CTL, ctl_clr_stats },
- { 0, 0 }
-};
-
-/*
- * reset_stats - reset statistic counters here and there
- */
-static void
-reset_stats(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- u_long flags;
- struct reset_entry *rent;
-
- if (INFO_NITEMS(inpkt->err_nitems) > 1) {
- msyslog(LOG_ERR, "reset_stats: err_nitems > 1");
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- flags = ((struct reset_flags *)inpkt->data)->flags;
-
- if (flags & ~RESET_ALLFLAGS) {
- msyslog(LOG_ERR, "reset_stats: reset leaves %#lx",
- flags & ~RESET_ALLFLAGS);
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- for (rent = reset_entries; rent->flag != 0; rent++) {
- if (flags & rent->flag)
- (rent->handler)();
- }
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * reset_peer - clear a peer's statistics
- */
-static void
-reset_peer(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct conf_unpeer *cp;
- register int items;
- register struct peer *peer;
- struct sockaddr_storage peeraddr;
- int bad;
-
- /*
- * We check first to see that every peer exists. If not,
- * we return an error.
- */
-
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
-
- bad = 0;
- while (items-- > 0 && !bad) {
- 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 = (struct conf_unpeer *)((char *)cp +
- INFO_ITEMSIZE(inpkt->mbz_itemsize));
- }
-
- if (bad) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
-
- /*
- * Now do it in earnest.
- */
-
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
- while (items-- > 0) {
- 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 = (struct conf_unpeer *)((char *)cp +
- INFO_ITEMSIZE(inpkt->mbz_itemsize));
- }
-
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * do_key_reread - reread the encryption key file
- */
-static void
-do_key_reread(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- rereadkeys();
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * trust_key - make one or more keys trusted
- */
-static void
-trust_key(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_trustkey(srcadr, inter, inpkt, 1);
-}
-
-
-/*
- * untrust_key - make one or more keys untrusted
- */
-static void
-untrust_key(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_trustkey(srcadr, inter, inpkt, 0);
-}
-
-
-/*
- * do_trustkey - make keys either trustable or untrustable
- */
-static void
-do_trustkey(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt,
- u_long trust
- )
-{
- register u_long *kp;
- register int items;
-
- items = INFO_NITEMS(inpkt->err_nitems);
- kp = (u_long *)inpkt->data;
- while (items-- > 0) {
- authtrust(*kp, trust);
- kp++;
- }
-
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-/*
- * get_auth_info - return some stats concerning the authentication module
- */
-static void
-get_auth_info(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_auth *ia;
-
- /*
- * Importations from the authentication module
- */
- extern u_long authnumkeys;
- extern int authnumfreekeys;
- extern u_long authkeylookups;
- extern u_long authkeynotfound;
- extern u_long authencryptions;
- extern u_long authdecryptions;
- extern u_long authkeyuncached;
- extern u_long authkeyexpired;
-
- ia = (struct info_auth *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_auth));
-
- ia->numkeys = htonl((u_int32)authnumkeys);
- ia->numfreekeys = htonl((u_int32)authnumfreekeys);
- ia->keylookups = htonl((u_int32)authkeylookups);
- ia->keynotfound = htonl((u_int32)authkeynotfound);
- ia->encryptions = htonl((u_int32)authencryptions);
- ia->decryptions = htonl((u_int32)authdecryptions);
- ia->keyuncached = htonl((u_int32)authkeyuncached);
- ia->expired = htonl((u_int32)authkeyexpired);
- ia->timereset = htonl((u_int32)(current_time - auth_timereset));
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-
-/*
- * reset_auth_stats - reset the authentication stat counters. Done here
- * to keep ntp-isms out of the authentication module
- */
-static void
-reset_auth_stats(void)
-{
- /*
- * Importations from the authentication module
- */
- extern u_long authkeylookups;
- extern u_long authkeynotfound;
- extern u_long authencryptions;
- extern u_long authdecryptions;
- extern u_long authkeyuncached;
-
- authkeylookups = 0;
- authkeynotfound = 0;
- authencryptions = 0;
- authdecryptions = 0;
- authkeyuncached = 0;
- auth_timereset = current_time;
-}
-
-
-/*
- * req_get_traps - return information about current trap holders
- */
-static void
-req_get_traps(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_trap *it;
- register struct ctl_trap *tr;
- register int i;
-
- /*
- * Imported from the control module
- */
- extern struct ctl_trap ctl_trap[];
- extern int num_ctl_traps;
-
- if (num_ctl_traps == 0) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
-
- it = (struct info_trap *)prepare_pkt(srcadr, inter, inpkt,
- v6sizeof(struct info_trap));
-
- for (i = 0, tr = ctl_trap; i < CTL_MAXTRAPS; i++, tr++) {
- if (tr->tr_flags & TRAP_INUSE) {
- 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));
- it->origtime = htonl((u_int32)(current_time - tr->tr_origtime));
- it->resets = htonl((u_int32)tr->tr_resets);
- it->flags = htonl((u_int32)tr->tr_flags);
- it = (struct info_trap *)more_pkt();
- }
- }
- flush_pkt();
-}
-
-
-/*
- * req_set_trap - configure a trap
- */
-static void
-req_set_trap(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_setclr_trap(srcadr, inter, inpkt, 1);
-}
-
-
-
-/*
- * req_clr_trap - unconfigure a trap
- */
-static void
-req_clr_trap(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- do_setclr_trap(srcadr, inter, inpkt, 0);
-}
-
-
-
-/*
- * do_setclr_trap - do the grunge work of (un)configuring a trap
- */
-static void
-do_setclr_trap(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt,
- int set
- )
-{
- register struct conf_trap *ct;
- register struct interface *linter;
- int res;
- struct sockaddr_storage laddr;
-
- /*
- * Prepare sockaddr_storage structure
- */
- memset((char *)&laddr, 0, sizeof laddr);
- laddr.ss_family = srcadr->ss_family;
- NSRCPORT(&laddr) = ntohs(NTP_PORT);
-
- /*
- * Restrict ourselves to one item only. This eliminates
- * the error reporting problem.
- */
- if (INFO_NITEMS(inpkt->err_nitems) > 1) {
- msyslog(LOG_ERR, "do_setclr_trap: err_nitems > 1");
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
- ct = (struct conf_trap *)inpkt->data;
-
- /*
- * Look for the local interface. If none, use the default.
- */
- if (ct->local_address == 0) {
- linter = any_interface;
- } else {
- 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);
- return;
- }
- }
-
- if (laddr.ss_family == AF_INET)
- GET_INADDR(laddr) = ct->trap_address;
- else
- GET_INADDR6(laddr) = ct->trap_address6;
- if (ct->trap_port != 0)
- NSRCPORT(&laddr) = ct->trap_port;
- else
- NSRCPORT(&laddr) = htons(TRAPPORT);
-
- if (set) {
- res = ctlsettrap(&laddr, linter, 0,
- INFO_VERSION(inpkt->rm_vn_mode));
- } else {
- res = ctlclrtrap(&laddr, linter, 0);
- }
-
- if (!res) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- } else {
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
- }
- return;
-}
-
-
-
-/*
- * set_request_keyid - set the keyid used to authenticate requests
- */
-static void
-set_request_keyid(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- keyid_t keyid;
-
- /*
- * Restrict ourselves to one item only.
- */
- if (INFO_NITEMS(inpkt->err_nitems) > 1) {
- msyslog(LOG_ERR, "set_request_keyid: err_nitems > 1");
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- keyid = ntohl(*((u_int32 *)(inpkt->data)));
- info_auth_keyid = keyid;
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-
-/*
- * set_control_keyid - set the keyid used to authenticate requests
- */
-static void
-set_control_keyid(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- keyid_t keyid;
- extern keyid_t ctl_auth_keyid;
-
- /*
- * Restrict ourselves to one item only.
- */
- if (INFO_NITEMS(inpkt->err_nitems) > 1) {
- msyslog(LOG_ERR, "set_control_keyid: err_nitems > 1");
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- keyid = ntohl(*((u_int32 *)(inpkt->data)));
- ctl_auth_keyid = keyid;
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-
-
-
-/*
- * get_ctl_stats - return some stats concerning the control message module
- */
-static void
-get_ctl_stats(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_control *ic;
-
- /*
- * Importations from the control module
- */
- extern u_long ctltimereset;
- extern u_long numctlreq;
- extern u_long numctlbadpkts;
- extern u_long numctlresponses;
- extern u_long numctlfrags;
- extern u_long numctlerrors;
- extern u_long numctltooshort;
- extern u_long numctlinputresp;
- extern u_long numctlinputfrag;
- extern u_long numctlinputerr;
- extern u_long numctlbadoffset;
- extern u_long numctlbadversion;
- extern u_long numctldatatooshort;
- extern u_long numctlbadop;
- extern u_long numasyncmsgs;
-
- ic = (struct info_control *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_control));
-
- ic->ctltimereset = htonl((u_int32)(current_time - ctltimereset));
- ic->numctlreq = htonl((u_int32)numctlreq);
- ic->numctlbadpkts = htonl((u_int32)numctlbadpkts);
- ic->numctlresponses = htonl((u_int32)numctlresponses);
- ic->numctlfrags = htonl((u_int32)numctlfrags);
- ic->numctlerrors = htonl((u_int32)numctlerrors);
- ic->numctltooshort = htonl((u_int32)numctltooshort);
- ic->numctlinputresp = htonl((u_int32)numctlinputresp);
- ic->numctlinputfrag = htonl((u_int32)numctlinputfrag);
- ic->numctlinputerr = htonl((u_int32)numctlinputerr);
- ic->numctlbadoffset = htonl((u_int32)numctlbadoffset);
- ic->numctlbadversion = htonl((u_int32)numctlbadversion);
- ic->numctldatatooshort = htonl((u_int32)numctldatatooshort);
- ic->numctlbadop = htonl((u_int32)numctlbadop);
- ic->numasyncmsgs = htonl((u_int32)numasyncmsgs);
-
- (void) more_pkt();
- flush_pkt();
-}
-
-
-#ifdef KERNEL_PLL
-/*
- * get_kernel_info - get kernel pll/pps information
- */
-static void
-get_kernel_info(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_kernel *ik;
- struct timex ntx;
-
- if (!pll_control) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
-
- memset((char *)&ntx, 0, sizeof(ntx));
- if (ntp_adjtime(&ntx) < 0)
- msyslog(LOG_ERR, "get_kernel_info: ntp_adjtime() failed: %m");
- ik = (struct info_kernel *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_kernel));
-
- /*
- * pll variables
- */
- ik->offset = htonl((u_int32)ntx.offset);
- ik->freq = htonl((u_int32)ntx.freq);
- ik->maxerror = htonl((u_int32)ntx.maxerror);
- ik->esterror = htonl((u_int32)ntx.esterror);
- ik->status = htons(ntx.status);
- ik->constant = htonl((u_int32)ntx.constant);
- ik->precision = htonl((u_int32)ntx.precision);
- ik->tolerance = htonl((u_int32)ntx.tolerance);
-
- /*
- * pps variables
- */
- ik->ppsfreq = htonl((u_int32)ntx.ppsfreq);
- ik->jitter = htonl((u_int32)ntx.jitter);
- ik->shift = htons(ntx.shift);
- ik->stabil = htonl((u_int32)ntx.stabil);
- ik->jitcnt = htonl((u_int32)ntx.jitcnt);
- ik->calcnt = htonl((u_int32)ntx.calcnt);
- ik->errcnt = htonl((u_int32)ntx.errcnt);
- ik->stbcnt = htonl((u_int32)ntx.stbcnt);
-
- (void) more_pkt();
- flush_pkt();
-}
-#endif /* KERNEL_PLL */
-
-
-#ifdef REFCLOCK
-/*
- * get_clock_info - get info about a clock
- */
-static void
-get_clock_info(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct info_clock *ic;
- register u_int32 *clkaddr;
- register int items;
- struct refclockstat clock_stat;
- struct sockaddr_storage addr;
- struct sockaddr_in tmp_clock;
- l_fp ltmp;
-
- memset((char *)&addr, 0, sizeof addr);
- 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;
-
- ic = (struct info_clock *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_clock));
-
- while (items-- > 0) {
- 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;
- }
-
- clock_stat.kv_list = (struct ctl_var *)0;
-
- refclock_control(&addr, (struct refclockstat *)0, &clock_stat);
-
- ic->clockadr = tmp_clock.sin_addr.s_addr;
- ic->type = clock_stat.type;
- ic->flags = clock_stat.flags;
- ic->lastevent = clock_stat.lastevent;
- ic->currentstatus = clock_stat.currentstatus;
- ic->polls = htonl((u_int32)clock_stat.polls);
- ic->noresponse = htonl((u_int32)clock_stat.noresponse);
- ic->badformat = htonl((u_int32)clock_stat.badformat);
- ic->baddata = htonl((u_int32)clock_stat.baddata);
- ic->timestarted = htonl((u_int32)clock_stat.timereset);
- DTOLFP(clock_stat.fudgetime1, &ltmp);
- HTONL_FP(&ltmp, &ic->fudgetime1);
- 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);
-
- free_varlist(clock_stat.kv_list);
-
- ic = (struct info_clock *)more_pkt();
- }
- flush_pkt();
-}
-
-
-
-/*
- * set_clock_fudge - get a clock's fudge factors
- */
-static void
-set_clock_fudge(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register struct conf_fudge *cf;
- register int items;
- struct refclockstat clock_stat;
- 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);
- items = INFO_NITEMS(inpkt->err_nitems);
- cf = (struct conf_fudge *) inpkt->data;
-
- while (items-- > 0) {
- 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;
- }
-
- switch(ntohl(cf->which)) {
- case FUDGE_TIME1:
- NTOHL_FP(&cf->fudgetime, &ltmp);
- LFPTOD(&ltmp, clock_stat.fudgetime1);
- clock_stat.haveflags = CLK_HAVETIME1;
- break;
- case FUDGE_TIME2:
- NTOHL_FP(&cf->fudgetime, &ltmp);
- LFPTOD(&ltmp, clock_stat.fudgetime2);
- clock_stat.haveflags = CLK_HAVETIME2;
- break;
- case FUDGE_VAL1:
- clock_stat.fudgeval1 = ntohl(cf->fudgeval_flags);
- clock_stat.haveflags = CLK_HAVEVAL1;
- break;
- case FUDGE_VAL2:
- clock_stat.fudgeval2 = ntohl(cf->fudgeval_flags);
- clock_stat.haveflags = CLK_HAVEVAL2;
- break;
- case FUDGE_FLAGS:
- clock_stat.flags = (u_char) (ntohl(cf->fudgeval_flags) & 0xf);
- clock_stat.haveflags =
- (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4);
- break;
- default:
- msyslog(LOG_ERR, "set_clock_fudge: default!");
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
- return;
- }
-
- refclock_control(&addr, &clock_stat, (struct refclockstat *)0);
- }
-
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
-}
-#endif
-
-#ifdef REFCLOCK
-/*
- * get_clkbug_info - get debugging info about a clock
- */
-static void
-get_clkbug_info(
- struct sockaddr_storage *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
- )
-{
- register int i;
- register struct info_clkbug *ic;
- register u_int32 *clkaddr;
- register int items;
- struct refclockbug bug;
- struct sockaddr_storage addr;
- struct sockaddr_in tmp_clock;
-
- memset((char *)&addr, 0, sizeof addr);
- 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;
-
- ic = (struct info_clkbug *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_clkbug));
-
- while (items-- > 0) {
- 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;
- }
-
- memset((char *)&bug, 0, sizeof bug);
- refclock_buginfo(&addr, &bug);
- if (bug.nvalues == 0 && bug.ntimes == 0) {
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
-
- ic->clockadr = tmp_clock.sin_addr.s_addr;
- i = bug.nvalues;
- if (i > NUMCBUGVALUES)
- i = NUMCBUGVALUES;
- ic->nvalues = (u_char)i;
- ic->svalues = htons((u_short) (bug.svalues & ((1<<i)-1)));
- while (--i >= 0)
- ic->values[i] = htonl(bug.values[i]);
-
- i = bug.ntimes;
- if (i > NUMCBUGTIMES)
- i = NUMCBUGTIMES;
- ic->ntimes = (u_char)i;
- ic->stimes = htonl(bug.stimes);
- while (--i >= 0) {
- HTONL_FP(&bug.times[i], &ic->times[i]);
- }
-
- ic = (struct info_clkbug *)more_pkt();
- }
- flush_pkt();
-}
-#endif
diff --git a/contrib/ntp/ntpd/ntp_restrict.c b/contrib/ntp/ntpd/ntp_restrict.c
deleted file mode 100644
index ede4225..0000000
--- a/contrib/ntp/ntpd/ntp_restrict.c
+++ /dev/null
@@ -1,586 +0,0 @@
-/*
- * ntp_restrict.c - determine host restrictions
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "ntpd.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-
-/*
- * This code keeps a simple address-and-mask list of hosts we want
- * 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
- * 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.
- *
- * 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.
- */
-/*
- * 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
- * initially, and add INCRESLIST entries to the free list whenever
- * we run out.
- */
-#define INITRESLIST 10
-#define INCRESLIST 5
-
-#define RES_AVG 8. /* interpacket averaging factor */
-
-/*
- * The restriction list
- */
-struct restrictlist *restrictlist;
-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;
-
-/*
- * Parameters of the RES_LIMITED restriction option.
- */
-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)
- */
-static u_long res_limited_refcnt;
-static u_long res_limited_refcnt6;
-
-/*
- * Our initial allocation of lists entries.
- */
-static struct restrictlist resinit[INITRESLIST];
-static struct restrictlist6 resinit6[INITRESLIST];
-
-/*
- * init_restrict - initialize the restriction data structures
- */
-void
-init_restrict(void)
-{
- register int i;
-
- /*
- * 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.
- */
- 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
- */
- res_calls = 0;
- res_found = 0;
- res_not_found = 0;
-
- /*
- * set default values for RES_LIMIT functionality
- */
- res_limited_refcnt = 0;
- res_limited_refcnt6 = 0;
-}
-
-
-/*
- * restrictions - return restrictions for this host
- */
-int
-restrictions(
- struct sockaddr_storage *srcadr
- )
-{
- 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++;
- 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);
-
- /*
- * 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;
-
- /*
- * 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++;
- 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;
- }
- }
- 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 (flags);
-}
-
-
-/*
- * hack_restrict - add/subtract/manipulate entries on the restrict list
- */
-void
-hack_restrict(
- int op,
- struct sockaddr_storage *resaddr,
- struct sockaddr_storage *resmask,
- int mflags,
- int flags
- )
-{
- 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 == 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;
- }
- }
- 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;
- }
- }
- }
-
- /*
- * In case the above wasn't clear :-), either rl now points
- * at the entry this call refers to, or rl is zero and rlprev
- * points to the entry prior to where this one should go in
- * the sort.
- */
-
- /*
- * Switch based on operation
- */
- 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;
- }
-
- rl = resfree;
- resfree = rl->next;
- numresfree--;
-
- 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);
- }
- 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);
- }
- memset((char *)rl, 0,
- sizeof(struct restrictlist));
-
- rl->next = resfree;
- resfree = rl;
- numresfree++;
- }
- break;
-
- default:
- 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:
- break;
- }
- }
-}
diff --git a/contrib/ntp/ntpd/ntp_timer.c b/contrib/ntp/ntpd/ntp_timer.c
deleted file mode 100644
index 6f0f18b..0000000
--- a/contrib/ntp/ntpd/ntp_timer.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * ntp_timer.c - event timer support routines
- */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <signal.h>
-#ifdef HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if defined(HAVE_IO_COMPLETION_PORT)
-# include "ntp_iocompletionport.h"
-# include "ntp_timer.h"
-#endif
-
-/*
- * These routines provide support for the event timer. The timer is
- * implemented by an interrupt routine which sets a flag once every
- * 2**EVENT_TIMEOUT seconds (currently 4), and a timer routine which
- * is called when the mainline code gets around to seeing the flag.
- * The timer routine dispatches the clock adjustment code if its time
- * has come, then searches the timer queue for expiries which are
- * dispatched to the transmit procedure. Finally, we call the hourly
- * procedure to do cleanup and print a message.
- */
-
-/*
- * Alarm flag. The mainline code imports this.
- */
-volatile int alarm_flag;
-
-/*
- * The counters
- */
-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 OPENSSL
-static u_long revoke_timer; /* keys revoke timer */
-u_char sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
-#endif /* OPENSSL */
-
-/*
- * Statistics counter for the interested.
- */
-volatile u_long alarm_overflow;
-
-#define MINUTE 60
-#define HOUR (60*60)
-
-u_long current_time;
-
-/*
- * Stats. Number of overflows and number of calls to transmit().
- */
-u_long timer_timereset;
-u_long timer_overflows;
-u_long timer_xmtcalls;
-
-#if defined(VMS)
-static int vmstimer[2]; /* time for next timer AST */
-static int vmsinc[2]; /* timer increment */
-#endif /* VMS */
-
-#if defined SYS_WINNT
-static HANDLE WaitableTimerHandle = NULL;
-#else
-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
- */
-void
-init_timer(void)
-{
-# if defined SYS_WINNT & !defined(SYS_CYGWIN32)
- HANDLE hToken;
- TOKEN_PRIVILEGES tkp;
-# endif /* SYS_WINNT */
-
- /*
- * Initialize...
- */
- alarm_flag = 0;
- alarm_overflow = 0;
- adjust_timer = 1;
- hourly_timer = HOUR;
- huffpuff_timer = 0;
- current_time = 0;
- timer_overflows = 0;
- timer_xmtcalls = 0;
- timer_timereset = 0;
-
-#if !defined(SYS_WINNT)
- /*
- * Set up the alarm interrupt. The first comes 2**EVENT_TIMEOUT
- * seconds from now and they continue on every 2**EVENT_TIMEOUT
- * seconds.
- */
-# if !defined(VMS)
-# if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME)
- if (timer_create (CLOCK_REALTIME, NULL, &ntpd_timerid) ==
-# ifdef SYS_VXWORKS
- ERROR
-# else
- -1
-# endif
- )
- {
- fprintf (stderr, "timer create FAILED\n");
- exit (0);
- }
- (void) signal_no_reset(SIGALRM, alarming);
- itimer.it_interval.tv_sec = itimer.it_value.tv_sec = (1<<EVENT_TIMEOUT);
- itimer.it_interval.tv_nsec = itimer.it_value.tv_nsec = 0;
- timer_settime(ntpd_timerid, 0 /*!TIMER_ABSTIME*/, &itimer, NULL);
-# else
- (void) signal_no_reset(SIGALRM, alarming);
- itimer.it_interval.tv_sec = itimer.it_value.tv_sec = (1<<EVENT_TIMEOUT);
- itimer.it_interval.tv_usec = itimer.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
-# endif
-# else /* VMS */
- vmsinc[0] = 10000000; /* 1 sec */
- vmsinc[1] = 0;
- lib$emul(&(1<<EVENT_TIMEOUT), &vmsinc, &0, &vmsinc);
-
- sys$gettim(&vmstimer); /* that's "now" as abstime */
-
- lib$addx(&vmsinc, &vmstimer, &vmstimer);
- sys$setimr(0, &vmstimer, alarming, alarming, 0);
-# endif /* VMS */
-#else /* SYS_WINNT */
- _tzset();
-
- /*
- * Get privileges needed for fiddling with the clock
- */
-
- /* get the current process token handle */
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
- msyslog(LOG_ERR, "OpenProcessToken failed: %m");
- exit(1);
- }
- /* get the LUID for system-time privilege. */
- LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1; /* one privilege to set */
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- /* get set-time privilege for this process. */
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES) NULL, 0);
- /* cannot test return value of AdjustTokenPrivileges. */
- if (GetLastError() != ERROR_SUCCESS) {
- msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
- }
-
- /*
- * Set up timer interrupts for every 2**EVENT_TIMEOUT seconds
- * Under Windows/NT,
- */
-
- WaitableTimerHandle = CreateWaitableTimer(NULL, FALSE, NULL);
- if (WaitableTimerHandle == NULL) {
- msyslog(LOG_ERR, "CreateWaitableTimer failed: %m");
- exit(1);
- }
- else {
- DWORD Period = (1<<EVENT_TIMEOUT) * 1000;
- LARGE_INTEGER DueTime;
- DueTime.QuadPart = Period * 10000i64;
- if (!SetWaitableTimer(WaitableTimerHandle, &DueTime, Period, NULL, NULL, FALSE) != NO_ERROR) {
- msyslog(LOG_ERR, "SetWaitableTimer failed: %m");
- exit(1);
- }
- }
-
-#endif /* SYS_WINNT */
-}
-
-#if defined(SYS_WINNT)
-extern HANDLE
-get_timer_handle(void)
-{
- return WaitableTimerHandle;
-}
-#endif
-
-/*
- * timer - dispatch anyone who needs to be
- */
-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);
-
- /*
- * Adjustment timeout first.
- */
- if (adjust_timer <= current_time) {
- adjust_timer += 1;
- adj_host_clock();
- kod_proto();
- }
-
- /*
- * Now dispatch any peers whose event timer has expired. Be careful
- * here, since the peer structure might go away as the result of
- * the call.
- */
- for (n = 0; n < HASH_SIZE; n++) {
- for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
- next_peer = peer->next;
- if (peer->action && peer->nextaction <= current_time)
- peer->action(peer);
- if (peer->nextdate <= current_time) {
-#ifdef REFCLOCK
- if (peer->flags & FLAG_REFCLOCK)
- refclock_transmit(peer);
- else
- transmit(peer);
-#else /* REFCLOCK */
- transmit(peer);
-#endif /* REFCLOCK */
- }
- }
- }
-
- /*
- * Garbage collect expired keys.
- */
- if (keys_timer <= current_time) {
- keys_timer += MINUTE;
- auth_agekeys();
- }
-
- /*
- * Huff-n'-puff filter
- */
- if (huffpuff_timer <= current_time) {
- huffpuff_timer += HUFFPUFF;
- huffpuff();
- }
-
-#ifdef OPENSSL
- /*
- * Garbage collect old keys and generate new private value
- */
- if (revoke_timer <= current_time) {
- 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("timer: %s\n", statstr);
-#endif
- }
-#endif /* OPENSSL */
-
- /*
- * Finally, call the hourly routine.
- */
- if (hourly_timer <= current_time) {
- hourly_timer += HOUR;
- hourly_stats();
- }
-}
-
-
-#ifndef SYS_WINNT
-/*
- * alarming - tell the world we've been alarmed
- */
-static RETSIGTYPE
-alarming(
- int sig
- )
-{
-#if !defined(VMS)
- if (initializing)
- return;
- if (alarm_flag)
- alarm_overflow++;
- else
- alarm_flag++;
-#else /* VMS AST routine */
- if (!initializing) {
- if (alarm_flag) alarm_overflow++;
- else alarm_flag = 1; /* increment is no good */
- }
- lib$addx(&vmsinc,&vmstimer,&vmstimer);
- sys$setimr(0,&vmstimer,alarming,alarming,0);
-#endif /* VMS */
-}
-#endif /* SYS_WINNT */
-
-
-/*
- * timer_clr_stats - clear timer module stat counters
- */
-void
-timer_clr_stats(void)
-{
- timer_overflows = 0;
- timer_xmtcalls = 0;
- timer_timereset = current_time;
-}
-
diff --git a/contrib/ntp/ntpd/ntp_util.c b/contrib/ntp/ntpd/ntp_util.c
deleted file mode 100644
index 135f9b3..0000000
--- a/contrib/ntp/ntpd/ntp_util.c
+++ /dev/null
@@ -1,797 +0,0 @@
-/*
- * ntp_util.c - stuff I didn't have any other place for
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_filegen.h"
-#include "ntp_if.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-
-#ifdef HAVE_IEEEFP_H
-# include <ieeefp.h>
-#endif
-#ifdef HAVE_MATH_H
-# include <math.h>
-#endif
-
-#ifdef DOSYNCTODR
-#if !defined(VMS)
-#include <sys/resource.h>
-#endif /* VMS */
-#endif
-
-#if defined(VMS)
-#include <descrip.h>
-#endif /* VMS */
-
-/*
- * 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.
- */
-/*
- * Name of the keys file
- */
-static char *key_file_name;
-
-/*
- * The name of the drift_comp file and the temporary.
- */
-static char *stats_drift_file;
-static char *stats_temp_file;
-
-/*
- * Statistics file stuff
- */
-#ifndef NTP_VAR
-#ifndef SYS_WINNT
-#define NTP_VAR "/var/NTP/" /* NOTE the trailing '/' */
-#else
-#define NTP_VAR "c:\\var\\ntp\\" /* NOTE the trailing '\\' */
-#endif /* SYS_WINNT */
-#endif
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 256
-#endif
-
-static char statsdir[MAXPATHLEN] = NTP_VAR;
-
-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
- * so that ntpdc can turn off stats when the file system fills up.
- */
-int stats_control;
-
-/*
- * init_util - initialize the utilities
- */
-void
-init_util(void)
-{
- stats_drift_file = 0;
- stats_temp_file = 0;
- key_file_name = 0;
-
-#define PEERNAME "peerstats"
-#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);
- strcpy(peerstats.basename, PEERNAME);
- peerstats.id = 0;
- peerstats.type = FILEGEN_DAY;
- peerstats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
- filegen_register("peerstats", &peerstats);
-
- loopstats.fp = NULL;
- loopstats.prefix = &statsdir[0];
- loopstats.basename = (char*)emalloc(strlen(LOOPNAME)+1);
- strcpy(loopstats.basename, LOOPNAME);
- loopstats.id = 0;
- loopstats.type = FILEGEN_DAY;
- loopstats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
- filegen_register("loopstats", &loopstats);
-
- clockstats.fp = NULL;
- clockstats.prefix = &statsdir[0];
- clockstats.basename = (char*)emalloc(strlen(CLOCKNAME)+1);
- strcpy(clockstats.basename, CLOCKNAME);
- clockstats.id = 0;
- clockstats.type = FILEGEN_DAY;
- clockstats.flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
- filegen_register("clockstats", &clockstats);
-
- rawstats.fp = NULL;
- rawstats.prefix = &statsdir[0];
- rawstats.basename = (char*)emalloc(strlen(RAWNAME)+1);
- strcpy(rawstats.basename, RAWNAME);
- rawstats.id = 0;
- rawstats.type = FILEGEN_DAY;
- 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 */
-}
-
-
-/*
- * hourly_stats - print some interesting stats
- */
-void
-hourly_stats(void)
-{
- FILE *fp;
-
-#ifdef DOSYNCTODR
- struct timeval tv;
-#if !defined(VMS)
- int prio_set;
-#endif
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- int o_prio;
-
- /*
- * Sometimes having a Sun can be a drag.
- *
- * The kernel variable dosynctodr controls whether the system's
- * soft clock is kept in sync with the battery clock. If it
- * is zero, then the soft clock is not synced, and the battery
- * clock is simply left to rot. That means that when the system
- * reboots, the battery clock (which has probably gone wacky)
- * sets the soft clock. That means ntpd starts off with a very
- * confused idea of what time it is. It then takes a large
- * amount of time to figure out just how wacky the battery clock
- * has made things drift, etc, etc. The solution is to make the
- * battery clock sync up to system time. The way to do THAT is
- * to simply set the time of day to the current time of day, but
- * as quickly as possible. This may, or may not be a sensible
- * thing to do.
- *
- * CAVEAT: settimeofday() steps the sun clock by about 800 us,
- * so setting DOSYNCTODR seems a bad idea in the
- * case of us resolution
- */
-
-#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.
- */
- errno = 0;
- prio_set = 0;
- o_prio = getpriority(PRIO_PROCESS,0); /* Save setting */
-
- /*
- * (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.
- */
- if ((errno == 0) && (setpriority(PRIO_PROCESS,0,-20) == 0))
- prio_set = 1; /* overdrive */
-#endif /* VMS */
-#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 */
- 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 */
-#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);
-
-
- record_sys_stats();
- if (stats_drift_file != 0) {
- if ((fp = fopen(stats_temp_file, "w")) == NULL) {
- msyslog(LOG_ERR, "can't open %s: %m",
- stats_temp_file);
- return;
- }
- fprintf(fp, "%.3f\n", drift_comp * 1e6);
- (void)fclose(fp);
- /* atomic */
-#ifdef SYS_WINNT
- (void) _unlink(stats_drift_file); /* rename semantics differ under NT */
-#endif /* SYS_WINNT */
-
-#ifndef NO_RENAME
- (void) rename(stats_temp_file, stats_drift_file);
-#else
- /* we have no rename NFS of ftp in use*/
- if ((fp = fopen(stats_drift_file, "w")) == NULL) {
- msyslog(LOG_ERR, "can't open %s: %m",
- stats_drift_file);
- return;
- }
-
-#endif
-
-#if defined(VMS)
- /* PURGE */
- {
- $DESCRIPTOR(oldvers,";-1");
- struct dsc$descriptor driftdsc = {
- strlen(stats_drift_file),0,0,stats_drift_file };
-
- while(lib$delete_file(&oldvers,&driftdsc) & 1) ;
- }
-#endif
- }
-}
-
-
-/*
- * stats_config - configure the stats operation
- */
-void
-stats_config(
- int item,
- char *invalue /* only one type so far */
- )
-{
- FILE *fp;
- char *value;
- double old_drift;
- int len;
-
- /*
- * 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)) {
- switch(item) {
- case STATS_FREQ_FILE:
- strcpy(parameter,"STATS_FREQ_FILE");
- break;
- case STATS_STATSDIR:
- strcpy(parameter,"STATS_STATSDIR");
- break;
- case STATS_PID_FILE:
- strcpy(parameter,"STATS_PID_FILE");
- break;
- default:
- strcpy(parameter,"UNKNOWN");
- break;
- }
- value = invalue;
-
- msyslog(LOG_ERR,
- "ExpandEnvironmentStrings(%s) failed: %m\n", parameter);
- } else {
- value = newvalue;
- }
-#else
- value = invalue;
-#endif /* SYS_WINNT */
-
- switch(item) {
- case STATS_FREQ_FILE:
- if (stats_drift_file != 0) {
- (void) free(stats_drift_file);
- (void) free(stats_temp_file);
- stats_drift_file = 0;
- stats_temp_file = 0;
- }
-
- if (value == 0 || (len = strlen(value)) == 0)
- break;
-
- stats_drift_file = (char*)emalloc((u_int)(len + 1));
-#if !defined(VMS)
- stats_temp_file = (char*)emalloc((u_int)(len +
- sizeof(".TEMP")));
-#else
- 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"));
-#else
- memmove(stats_temp_file + len, "-TEMP",
- sizeof("-TEMP"));
-#endif /* VMS */
-
- /*
- * 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, "Frequency format error in %s",
- stats_drift_file);
- loop_config(LOOP_DRIFTCOMP, 1e9);
- fclose(fp);
- break;
- }
- fclose(fp);
- msyslog(LOG_INFO,
- "frequency initialized %.3f PPM from %s",
- old_drift, stats_drift_file);
- loop_config(LOOP_DRIFTCOMP, old_drift / 1e6);
- break;
-
- case STATS_STATSDIR:
- if (strlen(value) >= sizeof(statsdir)) {
- msyslog(LOG_ERR,
- "value for statsdir too long (>%d, sigh)",
- (int)sizeof(statsdir)-1);
- } else {
- l_fp now;
-
- get_systime(&now);
- strcpy(statsdir,value);
- if(peerstats.prefix == &statsdir[0] &&
- peerstats.fp != NULL) {
- fclose(peerstats.fp);
- peerstats.fp = NULL;
- filegen_setup(&peerstats, now.l_ui);
- }
- if(loopstats.prefix == &statsdir[0] &&
- loopstats.fp != NULL) {
- fclose(loopstats.fp);
- loopstats.fp = NULL;
- filegen_setup(&loopstats, now.l_ui);
- }
- if(clockstats.prefix == &statsdir[0] &&
- clockstats.fp != NULL) {
- fclose(clockstats.fp);
- clockstats.fp = NULL;
- filegen_setup(&clockstats, now.l_ui);
- }
- if(rawstats.prefix == &statsdir[0] &&
- rawstats.fp != NULL) {
- fclose(rawstats.fp);
- 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;
-
- case STATS_PID_FILE:
- if ((fp = fopen(value, "w")) == NULL) {
- msyslog(LOG_ERR, "Can't open %s: %m", value);
- break;
- }
- fprintf(fp, "%d", (int) getpid());
- fclose(fp);;
- break;
-
- default:
- /* oh well */
- break;
- }
-}
-
-/*
- * record_peer_stats - write peer statistics to file
- *
- * file format:
- * day (mjd)
- * time (s past UTC midnight)
- * peer (ip address)
- * peer status word (hex)
- * peer offset (s)
- * peer delay (s)
- * peer error bound (s)
- * peer error (s)
-*/
-void
-record_peer_stats(
- struct sockaddr_storage *addr,
- int status,
- double offset,
- double delay,
- double dispersion,
- double skew
- )
-{
- l_fp now;
- u_long day;
-
- if (!stats_control)
- return;
-
- 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 %s %s %x %.9f %.9f %.9f %.9f\n",
- day, ulfptoa(&now, 3), stoa(addr), status, offset,
- delay, dispersion, skew);
- fflush(peerstats.fp);
- }
-}
-/*
- * record_loop_stats - write loop filter statistics to file
- *
- * file format:
- * day (mjd)
- * time (s past midnight)
- * offset (s)
- * frequency (approx ppm)
- * time constant (log base 2)
- */
-void
-record_loop_stats(
- double offset,
- double freq,
- double jitter,
- double stability,
- int spoll
- )
-{
- l_fp now;
- u_long day;
-
- if (!stats_control)
- return;
-
- 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 %s %.9f %.6f %.9f %.6f %d\n",
- day, ulfptoa(&now, 3), offset, freq * 1e6, jitter,
- stability * 1e6, spoll);
- fflush(loopstats.fp);
- }
-}
-
-/*
- * record_clock_stats - write clock statistics to file
- *
- * file format:
- * day (mjd)
- * time (s past midnight)
- * peer (ip address)
- * text message
- */
-void
-record_clock_stats(
- struct sockaddr_storage *addr,
- const char *text
- )
-{
- l_fp now;
- u_long day;
-
- if (!stats_control)
- return;
-
- 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 %s %s %s\n",
- day, ulfptoa(&now, 3), stoa(addr), text);
- fflush(clockstats.fp);
- }
-}
-
-/*
- * record_raw_stats - write raw timestamps to file
- *
- *
- * file format
- * time (s past midnight)
- * peer ip address
- * local ip address
- * t1 t2 t3 t4 timestamps
- */
-void
-record_raw_stats(
- struct sockaddr_storage *srcadr,
- struct sockaddr_storage *dstadr,
- l_fp *t1,
- l_fp *t2,
- l_fp *t3,
- l_fp *t4
- )
-{
- l_fp now;
- u_long day;
-
- if (!stats_control)
- return;
-
- 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 %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
- */
-void
-getauthkeys(
- char *keyfile
- )
-{
- int len;
-
- len = strlen(keyfile);
- if (len == 0)
- return;
-
- if (key_file_name != 0) {
- if (len > (int)strlen(key_file_name)) {
- (void) free(key_file_name);
- key_file_name = 0;
- }
- }
-
- if (key_file_name == 0) {
-#ifndef SYS_WINNT
- key_file_name = (char*)emalloc((u_int) (len + 1));
-#else
- key_file_name = (char*)emalloc((u_int) (MAXPATHLEN));
-#endif
- }
-#ifndef SYS_WINNT
- memmove(key_file_name, keyfile, (unsigned)(len+1));
-#else
- if (!ExpandEnvironmentStrings(keyfile, key_file_name, MAXPATHLEN))
- {
- msyslog(LOG_ERR,
- "ExpandEnvironmentStrings(KEY_FILE) failed: %m\n");
- }
-#endif /* SYS_WINNT */
-
- authreadkeys(key_file_name);
-}
-
-
-/*
- * rereadkeys - read the authentication key file over again.
- */
-void
-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
deleted file mode 100644
index 0b05253..0000000
--- a/contrib/ntp/ntpd/ntpd.c
+++ /dev/null
@@ -1,1274 +0,0 @@
-/*
- * ntpd.c - main program for the fixed point NTP daemon
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_stdlib.h"
-
-#ifdef SIM
-#include "ntpsim.h"
-#endif
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#include <stdio.h>
-#ifndef SYS_WINNT
-# if !defined(VMS) /*wjm*/
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# endif /* VMS */
-# ifdef HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-# else
-# include <signal.h>
-# endif
-# ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-# endif /* HAVE_SYS_IOCTL_H */
-# ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-# endif /* HAVE_SYS_RESOURCE_H */
-#else
-# include <signal.h>
-# include <process.h>
-# include <io.h>
-# include "../libntp/log.h"
-# include <clockstuff.h>
-# include <crtdbg.h>
-#endif /* SYS_WINNT */
-#if defined(HAVE_RTPRIO)
-# ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-# endif
-# ifdef HAVE_SYS_LOCK_H
-# include <sys/lock.h>
-# endif
-# include <sys/rtprio.h>
-#else
-# ifdef HAVE_PLOCK
-# ifdef HAVE_SYS_LOCK_H
-# include <sys/lock.h>
-# endif
-# endif
-#endif
-#if defined(HAVE_SCHED_SETSCHEDULER)
-# ifdef HAVE_SCHED_H
-# include <sched.h>
-# else
-# ifdef HAVE_SYS_SCHED_H
-# include <sys/sched.h>
-# endif
-# endif
-#endif
-#if defined(HAVE_SYS_MMAN_H)
-# include <sys/mman.h>
-#endif
-
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#ifdef SYS_DOMAINOS
-# include <apollo/base.h>
-#endif /* SYS_DOMAINOS */
-
-#include "recvbuff.h"
-#include "ntp_cmdargs.h"
-
-#if 0 /* HMS: I don't think we need this. 961223 */
-#ifdef LOCK_PROCESS
-# ifdef SYS_SOLARIS
-# include <sys/mman.h>
-# else
-# include <sys/lock.h>
-# endif
-#endif
-#endif
-
-#ifdef _AIX
-# include <ulimit.h>
-#endif /* _AIX */
-
-#ifdef SCO5_CLOCK
-# include <sys/ci/ciioctl.h>
-#endif
-
-#ifdef HAVE_CLOCKCTL
-# include <ctype.h>
-# include <grp.h>
-# include <pwd.h>
-#endif
-
-/*
- * Signals we catch for debugging. If not debugging we ignore them.
- */
-#define MOREDEBUGSIG SIGUSR1
-#define LESSDEBUGSIG SIGUSR2
-
-/*
- * Signals which terminate us gracefully.
- */
-#ifndef SYS_WINNT
-# define SIGDIE1 SIGHUP
-# define SIGDIE3 SIGQUIT
-# define SIGDIE2 SIGINT
-# define SIGDIE4 SIGTERM
-#endif /* SYS_WINNT */
-
-#if defined SYS_WINNT
-/* 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 */
-
-/*
- * Scheduling priority we run at
- */
-#define NTPD_PRIO (-12)
-
-int priority_done = 2; /* 0 - Set priority */
- /* 1 - priority is OK where it is */
- /* 2 - Don't set priority */
- /* 1 and 2 are pretty much the same */
-
-/*
- * Debugging flag
- */
-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.
- */
-int initializing;
-
-/*
- * Version declaration
- */
-extern const char *Version;
-
-int was_alarmed;
-
-#ifdef DECL_SYSCALL
-/*
- * We put this here, since the argument profile is syscall-specific
- */
-extern int syscall P((int, ...));
-#endif /* DECL_SYSCALL */
-
-
-#ifdef SIGDIE2
-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 */
-
-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
-int
-main(
- int argc,
- char *argv[]
- )
-{
- return ntpdmain(argc, argv);
-}
-#endif
-#endif /* SIM */
-
-#ifdef _AIX
-/*
- * OK. AIX is different than solaris in how it implements plock().
- * If you do NOT adjust the stack limit, you will get the MAXIMUM
- * stack size allocated and PINNED with you program. To check the
- * value, use ulimit -a.
- *
- * To fix this, we create an automatic variable and set our stack limit
- * to that PLUS 32KB of extra space (we need some headroom).
- *
- * This subroutine gets the stack address.
- *
- * Grover Davidson and Matt Ladendorf
- *
- */
-static char *
-get_aix_stack(void)
-{
- char ch;
- return (&ch);
-}
-
-/*
- * Signal handler for SIGDANGER.
- */
-static void
-catch_danger(int signo)
-{
- msyslog(LOG_INFO, "ntpd: setpgid(): %m");
- /* Make the system believe we'll free something, but don't do it! */
- return;
-}
-#endif /* _AIX */
-
-/*
- * Set the process priority
- */
-static void
-set_process_priority(void)
-{
-
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_DEBUG, "set_process_priority: %s: priority_done is <%d>",
- ((priority_done)
- ? "Leave priority alone"
- : "Attempt to set priority"
- ),
- priority_done);
-#endif /* DEBUG */
-
-#ifdef SYS_WINNT
- priority_done += NT_set_process_priority();
-#endif
-
-#if defined(HAVE_SCHED_SETSCHEDULER)
- if (!priority_done) {
- extern int config_priority_override, config_priority;
- int pmax, pmin;
- struct sched_param sched;
-
- pmax = sched_get_priority_max(SCHED_FIFO);
- sched.sched_priority = pmax;
- if ( config_priority_override ) {
- pmin = sched_get_priority_min(SCHED_FIFO);
- if ( config_priority > pmax )
- sched.sched_priority = pmax;
- else if ( config_priority < pmin )
- sched.sched_priority = pmin;
- else
- sched.sched_priority = config_priority;
- }
- if ( sched_setscheduler(0, SCHED_FIFO, &sched) == -1 )
- msyslog(LOG_ERR, "sched_setscheduler(): %m");
- else
- ++priority_done;
- }
-#endif /* HAVE_SCHED_SETSCHEDULER */
-#if defined(HAVE_RTPRIO)
-# ifdef RTP_SET
- if (!priority_done) {
- struct rtprio srtp;
-
- srtp.type = RTP_PRIO_REALTIME; /* was: RTP_PRIO_NORMAL */
- srtp.prio = 0; /* 0 (hi) -> RTP_PRIO_MAX (31,lo) */
-
- if (rtprio(RTP_SET, getpid(), &srtp) < 0)
- msyslog(LOG_ERR, "rtprio() error: %m");
- else
- ++priority_done;
- }
-# else /* not RTP_SET */
- if (!priority_done) {
- if (rtprio(0, 120) < 0)
- msyslog(LOG_ERR, "rtprio() error: %m");
- else
- ++priority_done;
- }
-# endif /* not RTP_SET */
-#endif /* HAVE_RTPRIO */
-#if defined(NTPD_PRIO) && NTPD_PRIO != 0
-# ifdef HAVE_ATT_NICE
- if (!priority_done) {
- errno = 0;
- if (-1 == nice (NTPD_PRIO) && errno != 0)
- msyslog(LOG_ERR, "nice() error: %m");
- else
- ++priority_done;
- }
-# endif /* HAVE_ATT_NICE */
-# ifdef HAVE_BSD_NICE
- if (!priority_done) {
- if (-1 == setpriority(PRIO_PROCESS, 0, NTPD_PRIO))
- msyslog(LOG_ERR, "setpriority() error: %m");
- else
- ++priority_done;
- }
-# endif /* HAVE_BSD_NICE */
-#endif /* NTPD_PRIO && NTPD_PRIO != 0 */
- if (!priority_done)
- msyslog(LOG_ERR, "set_process_priority: No way found to improve our priority");
-}
-
-
-/*
- * Main program. Initialize us, disconnect us from the tty if necessary,
- * and loop waiting for I/O and/or timer expiries.
- */
-int
-ntpdmain(
- int argc,
- char *argv[]
- )
-{
- l_fp now;
- char *cp;
- struct recvbuf *rbuflist;
- struct recvbuf *rbuf;
-#ifdef _AIX /* HMS: ifdef SIGDANGER? */
- struct sigaction sa;
-#endif
-
- initializing = 1; /* mark that we are initializing */
- debug = 0; /* no debugging by default */
- nofork = 0; /* will fork by default */
-
-#ifdef HAVE_UMASK
- {
- mode_t uv;
-
- uv = umask(0);
- if(uv)
- (void) umask(uv);
- else
- (void) umask(022);
- }
-#endif
-
-#if defined(HAVE_GETUID) && !defined(MPE) /* MPE lacks the concept of root */
- {
- uid_t uid;
-
- uid = getuid();
- if (uid)
- {
- msyslog(LOG_ERR, "ntpd: must be run as root, not uid %ld", (long)uid);
- exit(1);
- }
- }
-#endif
-
-#ifdef SYS_WINNT
- /* Set the Event-ID message-file name. */
- if (!GetModuleFileName(NULL, szMsgPath, sizeof(szMsgPath))) {
- msyslog(LOG_ERR, "GetModuleFileName(PGM_EXE_FILE) failed: %m\n");
- exit(1);
- }
- addSourceToRegistry("NTP", szMsgPath);
-#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));
-
-#if !defined(VMS)
-# ifndef NODETACH
- /*
- * Detach us from the terminal. May need an #ifndef GIZMO.
- */
-# ifdef DEBUG
- if (!debug && !nofork)
-# else /* DEBUG */
- if (!nofork)
-# endif /* DEBUG */
- {
-# ifndef SYS_WINNT
-# ifdef HAVE_DAEMON
- daemon(0, 0);
-# else /* not HAVE_DAEMON */
- if (fork()) /* HMS: What about a -1? */
- exit(0);
-
- {
-#if !defined(F_CLOSEM)
- u_long s;
- 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 (fcntl(0, F_CLOSEM, 0) == -1)
- msyslog(LOG_ERR, "ntpd: failed to close open files(): %m");
-#else /* not F_CLOSEM */
-
-# if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
- max_fd = sysconf(_SC_OPEN_MAX);
-# else /* HAVE_SYSCONF && _SC_OPEN_MAX */
- max_fd = getdtablesize();
-# endif /* HAVE_SYSCONF && _SC_OPEN_MAX */
- for (s = 0; s < max_fd; s++)
- (void) close((int)s);
-#endif /* not F_CLOSEM */
- (void) open("/", 0);
- (void) dup2(0, 1);
- (void) dup2(0, 2);
-#ifdef SYS_DOMAINOS
- {
- uid_$t puid;
- status_$t st;
-
- proc2_$who_am_i(&puid);
- proc2_$make_server(&puid, &st);
- }
-#endif /* SYS_DOMAINOS */
-#if defined(HAVE_SETPGID) || defined(HAVE_SETSID)
-# ifdef HAVE_SETSID
- if (setsid() == (pid_t)-1)
- msyslog(LOG_ERR, "ntpd: setsid(): %m");
-# else
- if (setpgid(0, 0) == -1)
- msyslog(LOG_ERR, "ntpd: setpgid(): %m");
-# endif
-#else /* HAVE_SETPGID || HAVE_SETSID */
- {
-# if defined(TIOCNOTTY)
- int fid;
-
- fid = open("/dev/tty", 2);
- if (fid >= 0)
- {
- (void) ioctl(fid, (u_long) TIOCNOTTY, (char *) 0);
- (void) close(fid);
- }
-# endif /* defined(TIOCNOTTY) */
-# ifdef HAVE_SETPGRP_0
- (void) setpgrp();
-# else /* HAVE_SETPGRP_0 */
- (void) setpgrp(0, getpid());
-# endif /* HAVE_SETPGRP_0 */
- }
-#endif /* HAVE_SETPGID || HAVE_SETSID */
-#ifdef _AIX
- /* Don't get killed by low-on-memory signal. */
- sa.sa_handler = catch_danger;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART;
-
- (void) sigaction(SIGDANGER, &sa, NULL);
-#endif /* _AIX */
- }
-# endif /* not HAVE_DAEMON */
-# else /* SYS_WINNT */
-
- {
- 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);
- }
- }
- else {
- service_main(argc, argv);
- return 0;
- }
- }
-# endif /* SYS_WINNT */
- }
-# endif /* NODETACH */
-# if defined(SYS_WINNT) && !defined(NODETACH)
- else
- service_main(argc, argv);
- return 0; /* must return a value */
-} /* end main */
-
-/*
- * If this runs as a service under NT, the main thread will block at
- * StartServiceCtrlDispatcher() and another thread will be started by the
- * Service Control Dispatcher which will begin execution at the routine
- * specified in that call (viz. service_main)
- */
-void
-service_main(
- DWORD argc,
- LPTSTR *argv
- )
-{
- char *cp;
- struct recvbuf *rbuflist;
- struct recvbuf *rbuf;
-
- if(!debug && NoWinService == FALSE)
- {
- /* register our service control handler */
- sshStatusHandle = RegisterServiceCtrlHandler( TEXT("NetworkTimeProtocol"),
- (LPHANDLER_FUNCTION)service_ctrl);
- if(sshStatusHandle == 0)
- {
- msyslog(LOG_ERR, "RegisterServiceCtrlHandler failed: %m");
- return;
- }
-
- /* report pending status to Service Control Manager */
- ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
- ssStatus.dwCurrentState = SERVICE_START_PENDING;
- ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
- ssStatus.dwWin32ExitCode = NO_ERROR;
- ssStatus.dwServiceSpecificExitCode = 0;
- ssStatus.dwCheckPoint = 1;
- ssStatus.dwWaitHint = 5000;
- if (!SetServiceStatus(sshStatusHandle, &ssStatus))
- {
- msyslog(LOG_ERR, "SetServiceStatus: %m");
- ssStatus.dwCurrentState = SERVICE_STOPPED;
- SetServiceStatus(sshStatusHandle, &ssStatus);
- return;
- }
-
- } /* debug */
-# endif /* defined(SYS_WINNT) && !defined(NODETACH) */
-#endif /* VMS */
-
- /*
- * Logging. This may actually work on the gizmo board. Find a name
- * to log with by using the basename of argv[0]
- */
- cp = strrchr(argv[0], '/');
- if (cp == 0)
- cp = argv[0];
- else
- cp++;
-
- debug = 0; /* will be immediately re-initialized 8-( */
- getstartup(argc, argv); /* startup configuration, catch logfile this time */
-
-#if !defined(VMS)
-
-# ifndef LOG_DAEMON
- openlog(cp, LOG_PID);
-# else /* LOG_DAEMON */
-
-# ifndef LOG_NTP
-# define LOG_NTP LOG_DAEMON
-# endif
- openlog(cp, LOG_PID | LOG_NDELAY, LOG_NTP);
-# ifdef DEBUG
- if (debug)
- setlogmask(LOG_UPTO(LOG_DEBUG));
- else
-# endif /* DEBUG */
- setlogmask(LOG_UPTO(LOG_DEBUG)); /* @@@ was INFO */
-# endif /* LOG_DAEMON */
-#endif /* !SYS_WINNT && !VMS */
-
- NLOG(NLOG_SYSINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "%s", Version);
-
-#ifdef SYS_WINNT
- /* GMS 1/18/1997
- * TODO: lock the process in memory using SetProcessWorkingSetSize() and VirtualLock() functions
- *
- process_handle = GetCurrentProcess();
- if (SetProcessWorkingSetSize(process_handle, 2097152 , 4194304 ) == TRUE) {
- if (VirtualLock(0 , 4194304) == FALSE)
- msyslog(LOG_ERR, "VirtualLock() failed: %m");
- } else {
- msyslog(LOG_ERR, "SetProcessWorkingSetSize() failed: %m");
- }
- */
-#endif /* SYS_WINNT */
-
-#ifdef SCO5_CLOCK
- /*
- * SCO OpenServer's system clock offers much more precise timekeeping
- * on the base CPU than the other CPUs (for multiprocessor systems),
- * so we must lock to the base CPU.
- */
- {
- int fd = open("/dev/at1", O_RDONLY);
- if (fd >= 0) {
- int zero = 0;
- if (ioctl(fd, ACPU_LOCK, &zero) < 0)
- msyslog(LOG_ERR, "cannot lock to base CPU: %m\n");
- close( fd );
- } /* else ...
- * If we can't open the device, this probably just isn't
- * a multiprocessor system, so we're A-OK.
- */
- }
-#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
- */
- if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0)
- msyslog(LOG_ERR, "mlockall(): %m");
-#else /* not (HAVE_MLOCKALL && MCL_CURRENT && MCL_FUTURE) */
-# ifdef HAVE_PLOCK
-# ifdef PROCLOCK
-# ifdef _AIX
- /*
- * set the stack limit for AIX for plock().
- * see get_aix_stack for more info.
- */
- if (ulimit(SET_STACKLIM, (get_aix_stack() - 8*4096)) < 0)
- {
- msyslog(LOG_ERR,"Cannot adjust stack limit for plock on AIX: %m");
- }
-# endif /* _AIX */
- /*
- * lock the process into memory
- */
- if (plock(PROCLOCK) < 0)
- msyslog(LOG_ERR, "plock(PROCLOCK): %m");
-# else /* not PROCLOCK */
-# ifdef TXTLOCK
- /*
- * Lock text into ram
- */
- if (plock(TXTLOCK) < 0)
- msyslog(LOG_ERR, "plock(TXTLOCK) error: %m");
-# else /* not TXTLOCK */
- msyslog(LOG_ERR, "plock() - don't know what to lock!");
-# endif /* not TXTLOCK */
-# endif /* not PROCLOCK */
-# endif /* HAVE_PLOCK */
-#endif /* not (HAVE_MLOCKALL && MCL_CURRENT && MCL_FUTURE) */
-
- /*
- * Set up signals we pay attention to locally.
- */
-#ifdef SIGDIE1
- (void) signal_no_reset(SIGDIE1, finish);
-#endif /* SIGDIE1 */
-#ifdef SIGDIE2
- (void) signal_no_reset(SIGDIE2, finish);
-#endif /* SIGDIE2 */
-#ifdef SIGDIE3
- (void) signal_no_reset(SIGDIE3, finish);
-#endif /* SIGDIE3 */
-#ifdef SIGDIE4
- (void) signal_no_reset(SIGDIE4, finish);
-#endif /* SIGDIE4 */
-
-#ifdef SIGBUS
- (void) signal_no_reset(SIGBUS, finish);
-#endif /* SIGBUS */
-
-#if !defined(SYS_WINNT) && !defined(VMS)
-# ifdef DEBUG
- (void) signal_no_reset(MOREDEBUGSIG, moredebug);
- (void) signal_no_reset(LESSDEBUGSIG, lessdebug);
-# else
- (void) signal_no_reset(MOREDEBUGSIG, no_debug);
- (void) signal_no_reset(LESSDEBUGSIG, no_debug);
-# endif /* DEBUG */
-#endif /* !SYS_WINNT && !VMS */
-
- /*
- * Set up signals we should never pay attention to.
- */
-#if defined SIGPIPE
- (void) signal_no_reset(SIGPIPE, SIG_IGN);
-#endif /* SIGPIPE */
-
-#if defined SYS_WINNT
- if (!SetConsoleCtrlHandler(OnConsoleEvent, TRUE)) {
- msyslog(LOG_ERR, "Can't set console control handler: %m");
- }
-#endif
-
- /*
- * Call the init_ routines to initialize the data structures.
- */
-#if defined (HAVE_IO_COMPLETION_PORT)
- init_io_completion_port();
- init_winnt_time();
-#endif
- init_auth();
- init_util();
- init_restrict();
- init_mon();
- init_timer();
- init_lib();
- init_random();
- init_request();
- init_control();
- init_peer();
-#ifdef REFCLOCK
- init_refclock();
-#endif
- set_process_priority();
- init_proto(); /* Call at high priority */
- init_io();
- init_loopfilter();
- mon_start(MON_ON); /* monitor on by default now */
- /* turn off in config if unwanted */
-
- /*
- * Get configuration. This (including argument list parsing) is
- * done in a separate module since this will definitely be different
- * for the gizmo board. While at it, save the host name for later
- * along with the length. The crypto needs this.
- */
-#ifdef DEBUG
- debug = 0;
-#endif
- getconfig(argc, argv);
-#ifdef OPENSSL
- crypto_setup();
-#endif /* OPENSSL */
- initializing = 0;
-
-#if defined(SYS_WINNT) && !defined(NODETACH)
-# if defined(DEBUG)
- 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;
- }
- }
-# 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
- */
- report_event(EVNT_SYSRESTART, (struct peer *)0);
-
- /*
- * Use select() on all on all input fd's for unlimited
- * time. select() will terminate on SIGALARM or on the
- * reception of input. Using select() means we can't do
- * robust signal handling and we get a potential race
- * between checking for alarms and doing the select().
- * Mostly harmless, I think.
- */
- /* On VMS, I suspect that select() can't be interrupted
- * by a "signal" either, so I take the easy way out and
- * have select() time out after one second.
- * System clock updates really aren't time-critical,
- * and - lacking a hardware reference clock - I have
- * yet to learn about anything else that is.
- */
-#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();
-
- for (;;) {
- DWORD Index = WaitForMultipleObjectsEx(sizeof(WaitHandles)/sizeof(WaitHandles[0]), WaitHandles, FALSE, 1000, TRUE);
- switch (Index) {
- case WAIT_OBJECT_0 + 0 : /* exit request */
- exit(0);
- break;
-
- case WAIT_OBJECT_0 + 1 : /* timer */
- timer();
- break;
-
- case WAIT_OBJECT_0 + 2 : /* Io event */
-# ifdef DEBUG
- if ( debug > 3 )
- {
- printf( "IoEvent occurred\n" );
- }
-# endif
- break;
-
- 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 */
-
-#else /* normal I/O */
-
- was_alarmed = 0;
- rbuflist = (struct recvbuf *)0;
- for (;;)
- {
-# if !defined(HAVE_SIGNALED_IO)
- extern fd_set activefds;
- extern int maxactivefd;
-
- fd_set rdfdes;
- int nfound;
-# elif defined(HAVE_SIGNALED_IO)
- block_io_and_alarm();
-# endif
-
- rbuflist = getrecvbufs(); /* get received buffers */
- if (alarm_flag) /* alarmed? */
- {
- was_alarmed = 1;
- alarm_flag = 0;
- }
-
- if (!was_alarmed && rbuflist == (struct recvbuf *)0)
- {
- /*
- * Nothing to do. Wait for something.
- */
-# ifndef HAVE_SIGNALED_IO
- rdfdes = activefds;
-# if defined(VMS) || defined(SYS_VXWORKS)
- /* make select() wake up after one second */
- {
- struct timeval t1;
-
- t1.tv_sec = 1; t1.tv_usec = 0;
- nfound = select(maxactivefd+1, &rdfdes, (fd_set *)0,
- (fd_set *)0, &t1);
- }
-# else
- nfound = select(maxactivefd+1, &rdfdes, (fd_set *)0,
- (fd_set *)0, (struct timeval *)0);
-# endif /* VMS */
- if (nfound > 0)
- {
- l_fp ts;
-
- get_systime(&ts);
-
- (void)input_handler(&ts);
- }
- else if (nfound == -1 && errno != EINTR)
- msyslog(LOG_ERR, "select() error: %m");
-# ifdef DEBUG
- else if (debug > 2)
- msyslog(LOG_DEBUG, "select(): nfound=%d, error: %m", nfound);
-# endif /* DEBUG */
-# else /* HAVE_SIGNALED_IO */
-
- wait_for_signal();
-# endif /* HAVE_SIGNALED_IO */
- if (alarm_flag) /* alarmed? */
- {
- was_alarmed = 1;
- alarm_flag = 0;
- }
- rbuflist = getrecvbufs(); /* get received buffers */
- }
-# ifdef HAVE_SIGNALED_IO
- unblock_io_and_alarm();
-# endif /* HAVE_SIGNALED_IO */
-
- /*
- * Out here, signals are unblocked. Call timer routine
- * to process expiry.
- */
- if (was_alarmed)
- {
- timer();
- was_alarmed = 0;
- }
-
-#endif /* HAVE_IO_COMPLETION_PORT */
- /*
- * Call the data procedure to handle each received
- * packet.
- */
- while (rbuflist != (struct recvbuf *)0)
- {
- rbuf = rbuflist;
- rbuflist = rbuf->next;
- (rbuf->receiver)(rbuf);
- freerecvbuf(rbuf);
- }
-#if defined DEBUG && defined SYS_WINNT
- if (debug > 4)
- printf("getrecvbufs: %ld handler interrupts, %ld frames\n",
- handler_calls, handler_pkts);
-#endif
-
- /*
- * Go around again
- */
- }
-#ifndef SYS_WINNT
- exit(1); /* unreachable */
-#endif
-#ifndef SYS_WINNT
- return 1; /* DEC OSF cc braindamage */
-#endif
-}
-
-
-#ifdef SIGDIE2
-/*
- * finish - exit gracefully
- */
-static RETSIGTYPE
-finish(
- int sig
- )
-{
-
- msyslog(LOG_NOTICE, "ntpd exiting on signal %d", sig);
-
- switch (sig)
- {
-# ifdef SIGBUS
- case SIGBUS:
- printf("\nfinish(SIGBUS)\n");
- exit(0);
-# endif
- case 0: /* Should never happen... */
- return;
- default:
- exit(0);
- }
-}
-#endif /* SIGDIE2 */
-
-
-#ifdef DEBUG
-#ifndef SYS_WINNT
-/*
- * moredebug - increase debugging verbosity
- */
-static RETSIGTYPE
-moredebug(
- int sig
- )
-{
- int saved_errno = errno;
-
- if (debug < 255)
- {
- debug++;
- msyslog(LOG_DEBUG, "debug raised to %d", debug);
- }
- errno = saved_errno;
-}
-
-/*
- * lessdebug - decrease debugging verbosity
- */
-static RETSIGTYPE
-lessdebug(
- int sig
- )
-{
- int saved_errno = errno;
-
- if (debug > 0)
- {
- debug--;
- msyslog(LOG_DEBUG, "debug lowered to %d", debug);
- }
- errno = saved_errno;
-}
-#endif
-#else /* not DEBUG */
-#ifndef SYS_WINNT/*
- * no_debug - We don't do the debug here.
- */
-static RETSIGTYPE
-no_debug(
- int sig
- )
-{
- int saved_errno = errno;
-
- msyslog(LOG_DEBUG, "ntpd not compiled for debugging (signal %d)", sig);
- errno = saved_errno;
-}
-#endif /* not SYS_WINNT */
-#endif /* not DEBUG */
-
-#ifdef SYS_WINNT
-/* service_ctrl - control handler for NTP service
- * signals the service_main routine of start/stop requests
- * from the control panel or other applications making
- * win32API calls
- */
-void
-service_ctrl(
- DWORD dwCtrlCode
- )
-{
- DWORD dwState = SERVICE_RUNNING;
-
- /* Handle the requested control code */
- switch(dwCtrlCode)
- {
- case SERVICE_CONTROL_PAUSE:
- /* see no reason to support this */
- break;
-
- case SERVICE_CONTROL_CONTINUE:
- /* see no reason to support this */
- break;
-
- case SERVICE_CONTROL_STOP:
- dwState = SERVICE_STOP_PENDING;
- /*
- * Report the status, specifying the checkpoint and waithint,
- * before setting the termination event.
- */
- ssStatus.dwCurrentState = dwState;
- ssStatus.dwWin32ExitCode = NO_ERROR;
- ssStatus.dwWaitHint = 3000;
- if (!SetServiceStatus(sshStatusHandle, &ssStatus))
- {
- msyslog(LOG_ERR, "SetServiceStatus: %m");
- }
- if (WaitHandles[0] != NULL) {
- SetEvent(WaitHandles[0]);
- }
- return;
-
- case SERVICE_CONTROL_INTERROGATE:
- /* Update the service status */
- break;
-
- default:
- /* invalid control code */
- break;
-
- }
-
- ssStatus.dwCurrentState = dwState;
- ssStatus.dwWin32ExitCode = NO_ERROR;
- if (!SetServiceStatus(sshStatusHandle, &ssStatus))
- {
- msyslog(LOG_ERR, "SetServiceStatus: %m");
- }
-}
-
-static BOOL WINAPI
-OnConsoleEvent(
- DWORD dwCtrlType
- )
-{
- switch (dwCtrlType) {
- case CTRL_BREAK_EVENT :
- if (debug > 0) {
- debug <<= 1;
- }
- else {
- debug = 1;
- }
- if (debug > 8) {
- debug = 0;
- }
- printf("debug level %d\n", debug);
- break ;
-
- case CTRL_C_EVENT :
- case CTRL_CLOSE_EVENT :
- case CTRL_SHUTDOWN_EVENT :
- if (WaitHandles[0] != NULL) {
- SetEvent(WaitHandles[0]);
- }
- break;
-
- default :
- return FALSE;
-
-
- }
- return TRUE;;
-}
-
-
-/*
- * NT version of exit() - all calls to exit() should be routed to
- * this function.
- */
-void
-service_exit(
- int status
- )
-{
- if (!debug) { /* did not become a service, simply exit */
- /* service mode, need to have the service_main routine
- * register with the service control manager that the
- * service has stopped running, before exiting
- */
- ssStatus.dwCurrentState = SERVICE_STOPPED;
- SetServiceStatus(sshStatusHandle, &ssStatus);
-
- }
- uninit_io_completion_port();
- reset_winnt_time();
-
-# if defined _MSC_VER
- _CrtDumpMemoryLeaks();
-# endif
-#undef exit
- exit(status);
-}
-
-#endif /* SYS_WINNT */
diff --git a/contrib/ntp/ntpd/ntpsim.c b/contrib/ntp/ntpd/ntpsim.c
deleted file mode 100644
index 3fbae17..0000000
--- a/contrib/ntp/ntpd/ntpsim.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * 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
deleted file mode 100644
index d26ceed..0000000
--- a/contrib/ntp/ntpd/refclock_acts.c
+++ /dev/null
@@ -1,984 +0,0 @@
-/*
- * refclock_acts - clock driver for the NIST/PTB Automated Computer Time
- * Service aka Amalgamated Containerized Trash Service (ACTS)
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && (defined(CLOCK_ACTS) || defined(CLOCK_PTBACTS))
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-#include "ntp_control.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
-/* MUST BE AFTER LAST #include <config.h> !!! */
-
-#if defined(CLOCK_ACTS) && defined(CLOCK_PTBACTS)
-# if defined(KEEPPTBACTS)
-# undef CLOCK_ACTS
-# else /* not KEEPPTBACTS */
-# undef CLOCK_PTBACTS
-# endif /* not KEEPPTBACTS */
-#endif /* CLOCK_ACTS && CLOCK_PTBACTS */
-
-/*
- * 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 is
- * designed primarily for use as a backup 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.
- *
- * The ACTS is located at NIST Boulder, CO, telephone 303 494 4774. A
- * toll call from a residence telephone in Newark, DE, costs between 14
- * and 27 cents, depending on time of day, and from a campus telephone
- * between 3 and 4 cents, although it is not clear what carrier and time
- * of day discounts apply in this case. 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.
- *
- * 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.
- *
- * The driver can operate in either of three modes, as determined by
- * the mode parameter in the server configuration command. In mode 0
- * (automatic) the driver operates continuously at intervals depending
- * on the prediction error, as measured by the driver, usually in the
- * order of several hours. In mode 1 (backup) the driver is enabled in
- * automatic mode only when no other source of synchronization is
- * available and when more than MAXOUTAGE (3600 s) have elapsed since
- * last synchronized by other sources. In mode 2 (manual) the driver
- * operates only when enabled using a fudge flags switch, as described
- * below.
- *
- * 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 modem setup string is hard-coded in
- * the driver and may require changes for nonstandard modems or special
- * circumstances.
- *
- * Further information can be found in the README.refclock file in the
- * ntp - Version 3 distribution.
- *
- * Fudge Factors
- *
- * Ordinarily, the propagation time correction is computed automatically
- * by ACTS and the driver. When this is not possible or erratic due to
- * individual modem characteristics, the fudge flag2 switch should be
- * set to disable the ACTS echo-delay scheme. In any case, the fudge
- * time1 parameter can be used to adjust the propagation delay as
- * required.
- *
- * The ACTS call interval is determined in one of three ways. In manual
- * mode a call is initiated by setting fudge flag1 using ntpdc, either
- * manually or via a cron job. In AUTO mode this flag is set by the peer
- * timer, which is controlled by the sys_poll variable in response to
- * measured errors. In backup mode the driver is ordinarily asleep, but
- * awakes (in auto mode) if all other synchronization sources are lost.
- * In either auto or backup modes, the call interval increases as long
- * as the measured errors do not exceed the value of the fudge time2
- * parameter.
- *
- * When the fudge flag1 is set, the ACTS calling program is activated.
- * This program dials each number listed in the phones command of the
- * configuration file in turn. If a call attempt fails, the next number
- * in the list is dialed. The fudge flag1 and counter are reset and the
- * calling program terminated if (a) a valid clock update has been
- * determined, (b) no more numbers remain in the list, (c) a device
- * fault or timeout occurs or (d) fudge flag1 is reset manually using
- * ntpdc.
- *
- * In automatic and backup modes, the driver determines the call
- * interval using a procedure depending on the measured prediction
- * error and the fudge time2 parameter. If the error exceeds time2 for a
- * number of times depending on the current interval, the interval is
- * decreased, but not less than about 1000 s. If the error is less than
- * time2 for some number of times, the interval is increased, but not
- * more than about 18 h. With the default value of zero for fudge time2,
- * the interval will increase from 1000 s to the 4000-8000-s range, in
- * which the expected accuracy should be in the 1-2-ms range. Setting
- * fudge time2 to a large value, like 0.1 s, may result in errors of
- * that order, but increase the call interval to the maximum. The exact
- * value for each configuration will depend on the modem and operating
- * system involved, so some experimentation may be necessary.
- */
-
-/*
- * DESCRIPTION OF THE AUTOMATED COMPUTER TELEPHONE SERVICE (ACTS)
- * (reformatted from ACTS on-line computer help information)
- *
- * The following is transmitted (at 1200 baud) following completion of
- * the telephone connection.
- *
- * National Institute of Standards and Technology
- * Telephone Time Service, Generator 3B
- * Enter question mark "?" for HELP
- * D L D
- * MJD YR MO DA H M S ST S UT1 msADV <OTM>
- * 47999 90-04-18 21:39:15 50 0 +.1 045.0 UTC(NIST) *
- * 47999 90-04-18 21:39:16 50 0 +.1 045.0 UTC(NIST) *
- * 47999 90-04-18 21:39:17 50 0 +.1 045.0 UTC(NIST) *
- * 47999 90-04-18 21:39:18 50 0 +.1 045.0 UTC(NIST) *
- * 47999 90-04-18 21:39:19 50 0 +.1 037.6 UTC(NIST) #
- * 47999 90-04-18 21:39:20 50 0 +.1 037.6 UTC(NIST) #
- * etc..etc...etc.......
- *
- * UTC = Universal Time Coordinated, the official world time referred to
- * the zero meridian.
- *
- * DST Daylight savings time characters, valid for the continental
- * U.S., are set as follows:
- *
- * 00 We are on standard time (ST).
- * 01-49 Now on DST, go to ST when your local time is 2:00 am and
- * the count is 01. The count is decremented daily at 00
- * (UTC).
- * 50 We are on DST.
- * 51-99 Now on ST, go to DST when your local time is 2:00 am and
- * the count is 51. The count is decremented daily at 00
- * (UTC).
- *
- * The two DST characters provide up to 48 days advance notice of a
- * change in time. The count remains at 00 or 50 at other times.
- *
- * LS Leap second flag is set to "1" to indicate that a leap second is
- * to be added as 23:59:60 (UTC) on the last day of the current UTC
- * month. The LS flag will be reset to "0" starting with 23:59:60
- * (UTC). The flag will remain on for the entire month before the
- * second is added. Leap seconds are added as needed at the end of
- * any month. Usually June and/or December are chosen.
- *
- * The leap second flag will be set to a "2" to indicate that a
- * leap second is to be deleted at 23:59:58--00:00:00 on the last
- * day of the current month. (This latter provision is included per
- * international recommendation, however it is not likely to be
- * required in the near future.)
- *
- * DUT1 Approximate difference between earth rotation time (UT1) and
- * UTC, in steps of 0.1 second: DUT1 = UT1 - UTC.
- *
- * MJD Modified Julian Date, often used to tag certain scientific data.
- *
- * The full time format is sent at 1200 baud, 8 bit, 1 stop, no parity.
- * The format at 300 Baud is also 8 bit, 1 stop, no parity. At 300 Baud
- * the MJD and DUT1 values are deleted and the time is transmitted only
- * on even seconds.
- *
- * Maximum on line time will be 56 seconds. If all lines are busy at any
- * time, the oldest call will be terminated if it has been on line more
- * than 28 seconds, otherwise, the call that first reaches 28 seconds
- * will be terminated.
- *
- * Current time is valid at the "on-time" marker (OTM), either "*" or
- * "#". The nominal on-time marker (*) will be transmitted 45 ms early
- * to account for the 8 ms required to send 1 character at 1200 Baud,
- * plus an additional 7 ms for delay from NIST to the user, and
- * approximately 30 ms "scrambler" delay inherent in 1200 Baud modems.
- * If the caller echoes all characters, NIST will measure the round trip
- * delay and advance the on-time marker so that the midpoint of the stop
- * bit arrives at the user on time. The amount of msADV will reflect the
- * actual required advance in milliseconds and the OTM will be a "#".
- *
- * (The NIST system requires 4 or 5 consecutive delay measurements which
- * are consistent before switching from "*" to "#". If the user has a
- * 1200 Baud modem with the same internal delay as that used by NIST,
- * then the "#" OTM should arrive at the user within +-2 ms of the
- * correct time.
- *
- * However, NIST has studied different brands of 1200 Baud modems and
- * found internal delays from 24 ms to 40 ms and offsets of the "#" OTM
- * of +-10 ms. For many computer users, +-10 ms accuracy should be more
- * than adequate since many computer internal clocks can only be set
- * with granularity of 20 to 50 ms. In any case, the repeatability of
- * the offset for the "#" OTM should be within +-2 ms, if the dial-up
- * path is reciprocal and the user doesn't change the brand or model of
- * modem used.
- *
- * This should be true even if the dial-up path on one day is a land-
- * line of less than 40 ms (one way) and on the next day is a satellite
- * link of 260 to 300 ms. In the rare event that the path is one way by
- * satellite and the other way by land line with a round trip
- * measurement in the range of 90 to 260 ms, the OTM will remain a "*"
- * indicating 45 ms advance.
- *
- * For user comments write:
- * NIST-ACTS
- * Time and Frequency Division
- * Mail Stop 847
- * 325 Broadway
- * Boulder, CO 80303
- *
- * Software for setting (PC)DOS compatable machines is available on a
- * 360-kbyte diskette for $35.00 from: NIST Office of Standard Reference
- * Materials B311-Chemistry Bldg, NIST, Gaithersburg, MD, 20899, (301)
- * 975-6776
- *
- * PTB timecode service (+49 531 512038)
- * The Physikalisch-Technische Bundesanstalt (Germany)
- * also supports a modem time service
- * as the data formats are very similar this driver can also be compiled for
- * utilizing the PTB time code service.
- *
- * Data format
- * 0000000000111111111122222222223333333333444444444455555555556666666666777777777 7
- * 0123456789012345678901234567890123456789012345678901234567890123456789012345678 9
- * 1995-01-23 20:58:51 MEZ 10402303260219950123195849740+40000500 *
- * A B C D EF G H IJ K L M N O P Q R S T U V W XY Z<CR><LF>
- *
- * A year
- * B month
- * C day
- * D hour
- * E : normally
- * A for DST to ST switch first hour
- * B for DST to ST switch second hour if not marked in H
- * F minute
- * G second
- * H timezone
- * I day of week
- * J week of year
- * K day of year
- * L month for next ST/DST changes
- * M day
- * N hour
- * O UTC year
- * P UTC month
- * Q UTC day
- * R UTC hour
- * S UTC minute
- * T modified julian day (MJD)
- * U DUT1
- * V direction and month if leap second
- * W signal delay (assumed/measured)
- * X sequence number for additional text line in Y
- * Y additional text
- * Z on time marker (* - assumed delay / # measured delay)
- * <CR>!<LF> ! is second change !
- *
- * This format is also used by the National Physical Laboratory (NPL)'s
- * TRUETIME service in the UK. In this case the timezone field is
- * UTC+0 or UTC+1 for standard and daylight saving time. The phone
- * number for this service (a premium rate number) is 0891 516 333.
- * It is not clear whether the echo check is implemented.
- *
- * For more detail, see http://www.npl.co.uk/npl/cetm/taf/truetime.html.
- */
-
-/*
- * Interface definitions
- */
-#define SPEED232 B1200 /* uart speed (1200 cowardly baud) */
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#ifdef CLOCK_ACTS
-# define REFID "ACTS" /* reference ID */
-# define DESCRIPTION "NIST Automated Computer Time Service" /* WRU */
-# define LENCODE 50 /* length of valid timecode string */
-# define DEVICE "/dev/acts%d" /* device name and unit */
-# define REF_ENTRY refclock_acts
-#else /* not CLOCK_ACTS */
-# define REFID "TPTB" /* reference ID */
-# define DESCRIPTION "PTB Automated Computer Time Service"
-# define LENCODE 78 /* length of valid timecode string */
-# define DEVICE "/dev/ptb%d" /* device name and unit */
-# define REF_ENTRY refclock_ptb
-#endif /* not CLOCK_ACTS */
-#define MODE_AUTO 0 /* automatic mode */
-#define MODE_BACKUP 1 /* backup mode */
-#define MODE_MANUAL 2 /* manual mode */
-
-#define MSGCNT 10 /* we need this many ACTS messages */
-#define SMAX 80 /* max token string length */
-#define ACTS_MINPOLL 10 /* log2 min poll interval (1024 s) */
-#define ACTS_MAXPOLL 18 /* log2 max poll interval (16384 s) */
-#define MAXOUTAGE 3600 /* max before ACTS kicks in (s) */
-
-/*
- * Modem control strings. These may have to be changed for some modems.
- *
- * AT command prefix
- * B1 initiate call negotiation using Bell 212A
- * &C1 enable carrier detect
- * &D2 hang up and return to command mode on DTR transition
- * E0 modem command echo disabled
- * l1 set modem speaker volume to low level
- * M1 speaker enabled untill carrier detect
- * Q0 return result codes
- * V1 return result codes as English words
- */
-#define MODEM_SETUP "ATB1&C1&D2E0L1M1Q0V1" /* modem setup */
-#define MODEM_HANGUP "ATH" /* modem disconnect */
-
-/*
- * Timeouts
- */
-#define IDLE 60 /* idle timeout (s) */
-#define WAIT 2 /* wait timeout (s) */
-#define ANSWER 30 /* answer timeout (s) */
-#define CONNECT 10 /* connect timeout (s) */
-#define TIMECODE 15 /* timecode timeout (s) */
-
-/*
- * Tables to compute the ddd of year form icky dd/mm timecode. Viva la
- * leap.
- */
-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};
-
-/*
- * Unit control structure
- */
-struct actsunit {
- int pollcnt; /* poll message counter */
- int state; /* the first one was Delaware */
- int run; /* call program run switch */
- int msgcnt; /* count of ACTS messages received */
- long redial; /* interval to next automatic call */
- double msADV; /* millisecond advance of last message */
-};
-
-/*
- * Function prototypes
- */
-static int acts_start P((int, struct peer *));
-static void acts_shutdown P((int, struct peer *));
-static void acts_receive P((struct recvbuf *));
-static void acts_poll P((int, struct peer *));
-static void acts_timeout P((struct peer *));
-static void acts_disc P((struct peer *));
-static int acts_write P((struct peer *, const char *));
-
-/*
- * Transfer vector (conditional structure name)
- */
-struct refclock REF_ENTRY = {
- acts_start, /* start up driver */
- acts_shutdown, /* shut down driver */
- acts_poll, /* transmit poll message */
- noentry, /* not used (old acts_control) */
- noentry, /* not used (old acts_init) */
- noentry, /* not used (old acts_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * acts_start - open the devices and initialize data for processing
- */
-
-static int
-acts_start (
- int unit,
- struct peer *peer
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
- int dtr = TIOCM_DTR;
-
- /*
- * Open serial port. Use ACTS line discipline, if available. It
- * pumps a timestamp into the data stream at every on-time
- * character '*' found. Note: the port must have modem control
- * or deep pockets for the phone bill. HP-UX 9.03 users should
- * have very deep pockets.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_ACTS)))
- return (0);
- if (ioctl(fd, TIOCMBIS, (char *)&dtr) < 0) {
- msyslog(LOG_ERR, "clock %s ACTS no modem control",
- ntoa(&peer->srcadr));
- return (0);
- }
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct actsunit *)
- emalloc(sizeof(struct actsunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct actsunit));
- pp = peer->procptr;
- pp->io.clock_recv = acts_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- peer->minpoll = ACTS_MINPOLL;
- peer->maxpoll = ACTS_MAXPOLL;
- peer->sstclktype = CTL_SST_TS_TELEPHONE;
-
- /*
- * Initialize modem and kill DTR. We skedaddle if this comes
- * bum.
- */
- if (!acts_write(peer, MODEM_SETUP)) {
- (void) close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Set up the driver timeout
- */
- peer->nextdate = current_time + WAIT;
- return (1);
-}
-
-
-/*
- * acts_shutdown - shut down the clock
- */
-static void
-acts_shutdown (
- int unit,
- struct peer *peer
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * acts_receive - receive data from the serial interface
- */
-static void
-acts_receive (
- struct recvbuf *rbufp
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- char str[SMAX];
- int i;
- char hangup = '%'; /* ACTS hangup */
- int day; /* day of the month */
- int month; /* month of the year */
- u_long mjd; /* Modified Julian Day */
- double dut1; /* DUT adjustment */
- double msADV; /* ACTS transmit advance (ms) */
- char flag; /* calibration flag */
-#ifndef CLOCK_PTBACTS
- char utc[10]; /* this is NIST and you're not */
- u_int dst; /* daylight/standard time indicator */
- u_int leap; /* leap-second indicator */
-#else
- char leapdir; /* leap direction */
- u_int leapmonth; /* month of leap */
-#endif
- /*
- * Initialize pointers and read the timecode and timestamp. If
- * the OK modem status code, leave it where folks can find it.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
- &pp->lastrec);
- if (pp->lencode == 0) {
- if (strcmp(pp->a_lastcode, "OK") == 0)
- pp->lencode = 2;
- return;
- }
-#ifdef DEBUG
- if (debug)
- printf("acts: state %d timecode %d %*s\n", up->state,
- pp->lencode, pp->lencode, pp->a_lastcode);
-#endif
-
- switch (up->state) {
-
- case 0:
-
- /*
- * State 0. We are not expecting anything. Probably
- * modem disconnect noise. Go back to sleep.
- */
- return;
-
- case 1:
-
- /*
- * State 1. We are waiting for the call to be answered.
- * All we care about here is CONNECT as the first token
- * in the string. If the modem signals BUSY, ERROR, NO
- * ANSWER, NO CARRIER or NO DIALTONE, we immediately
- * hang up the phone. If CONNECT doesn't happen after
- * ANSWER seconds, hang up the phone. If everything is
- * okay, start the connect timeout and slide into state
- * 2.
- */
- if( strcmp(pp->a_lastcode, " ") == 0) {
- acts_disc(peer);
- return;
- }
- if( strcmp(sys_phone[0],"DIRECT") != 0 ) {
- (void)strncpy(str, strtok(pp->a_lastcode, " "), SMAX);
- if (strcmp(str, "BUSY") == 0 || strcmp(str, "ERROR") ==
- 0 || strcmp(str, "NO") == 0) {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s ACTS modem status %s",
- ntoa(&peer->srcadr), pp->a_lastcode);
- acts_disc(peer);
- } else if (strcmp(str, "CONNECT") == 0) {
- peer->nextdate = current_time + CONNECT;
- up->msgcnt = 0;
- up->state++;
- }
- } else {
- (void) strncpy(str,"CONNECT",7);
- peer->nextdate = current_time + CONNECT;
- up->msgcnt = 0;
- up->state++;
- }
- return;
-
- case 2:
-
- /*
- * State 2. The call has been answered and we are
- * waiting for the first ACTS message. If this doesn't
- * happen within the timecode timeout, hang up the
- * phone. We probably got a wrong number or ACTS is
- * down.
- */
- peer->nextdate = current_time + TIMECODE;
- up->state++;
- }
-
- /*
- * Real yucky things here. Ignore everything except timecode
- * messages, as determined by the message length. We told the
- * terminal routines to end the line with '*' and the line
- * discipline to strike a timestamp on that character. However,
- * when the ACTS echo-delay scheme works, the '*' eventually
- * becomes a '#'. In this case the message is ended by the <CR>
- * that comes about 200 ms after the '#' and the '#' cannot be
- * echoed at the proper time. But, this may not be a lose, since
- * we already have good data from prior messages and only need
- * the millisecond advance calculated by ACTS. So, if the
- * message is long enough and has an on-time character at the
- * right place, we consider the message (but not neccesarily the
- * timestmap) to be valid.
- */
- if (pp->lencode != LENCODE)
- return;
-
-#ifndef CLOCK_PTBACTS
- /*
- * We apparently have a valid timecode message, so dismember it
- * with sscan(). This routine does a good job in spotting syntax
- * errors without becoming overly pedantic.
- *
- * D L D
- * MJD YR MO DA H M S ST S UT1 msADV OTM
- * 47222 88-03-02 21:39:15 83 0 +.3 045.0 UTC(NBS) *
- */
- if (sscanf(pp->a_lastcode,
- "%5ld %2d-%2d-%2d %2d:%2d:%2d %2d %1d %3lf %5lf %s %c",
- &mjd, &pp->year, &month, &day, &pp->hour, &pp->minute,
- &pp->second, &dst, &leap, &dut1, &msADV, utc, &flag) != 13) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-#else
- /*
- * Data format
- * 0000000000111111111122222222223333333333444444444455555555556666666666777777777 7
- * 0123456789012345678901234567890123456789012345678901234567890123456789012345678 9
- * 1995-01-23 20:58:51 MEZ 10402303260219950123195849740+40000500 *
- */
- if (sscanf(pp->a_lastcode,
- "%*4d-%*2d-%*2d %*2d:%*2d:%2d %*5c%*12c%4d%2d%2d%2d%2d%5ld%2lf%c%2d%3lf%*15c%c",
- &pp->second, &pp->year, &month, &day, &pp->hour, &pp->minute, &mjd, &dut1, &leapdir, &leapmonth, &msADV, &flag) != 12) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-#endif
- /*
- * Some modems can't be trusted (the Practical Peripherals
- * 9600SA comes to mind) and, even if they manage to unstick
- * ACTS, the millisecond advance is wrong, so we use CLK_FLAG2
- * to disable echoes, if neccessary.
- */
- if ((flag == '*' || flag == '#') && !(pp->sloppyclockflag &
- CLK_FLAG2))
- (void)write(pp->io.fd, &flag, 1);
-
- /*
- * The ACTS timecode format croaks in 2000. Life is short.
- * Would only the timecode mavens resist the urge to express months
- * of the year and days of the month in favor of days of the year.
- */
- if (month < 1 || month > 12 || day < 1) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Depending on the driver, at this point we have a two-digit year
- * or a four-digit year. Make sure we have a four-digit year.
- */
- if ( pp->year < YEAR_PIVOT ) pp->year += 100; /* Y2KFixes */
- if ( pp->year < YEAR_BREAK ) pp->year += 1900; /* Y2KFixes */
- if ( !isleap_4(pp->year) ) { /* Y2KFixes */
- if (day > day1tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++)
- day += day1tab[i];
- } else {
- if (day > day2tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++)
- day += day2tab[i];
- }
- pp->day = day;
-
-#ifndef CLOCK_PTBACTS
- if (leap == 1)
- pp->leap = LEAP_ADDSECOND;
- else if (pp->leap == 2)
- pp->leap = LEAP_DELSECOND;
-#else
- if (leapmonth == month) {
- if (leapdir == '+')
- pp->leap = LEAP_ADDSECOND;
- else if (leapdir == '-')
- pp->leap = LEAP_DELSECOND;
- }
-#endif
-
- /*
- * Colossal hack here. We process each sample in a trimmed-mean
- * filter and determine the reference clock offset and
- * dispersion. The fudge time1 value is added to each sample as
- * received. If we collect MSGCNT samples before the '#' on-time
- * character, we use the results of the filter as is. If the '#'
- * is found before that, the adjusted msADV is used to correct
- * the propagation delay.
- */
- up->msgcnt++;
- if (flag == '#') {
- pp->offset += (msADV - up->msADV) * 1000 * 1e-6;
- } else {
- up->msADV = msADV;
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- } else if (up->msgcnt < MSGCNT)
- return;
- }
-
- /*
- * We have a filtered sample offset ready for peer processing.
- * 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. Finaly, we unhook the
- * timeout, arm for the next call, fold the tent and go home.
- * The little dance with the '%' character is an undocumented
- * ACTS feature that hangs up the phone real quick without
- * waiting for carrier loss or long-space disconnect, but we do
- * these clumsy things anyway.
- */
- 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);
- up->state = 0;
- acts_disc(peer);
-}
-
-
-/*
- * acts_poll - called by the transmit routine
- */
-static void
-acts_poll (
- int unit,
- struct peer *peer
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
-
- /*
- * If the driver is running, we set the enable flag (fudge
- * flag1), which causes the driver timeout routine to initiate a
- * call to ACTS. If not, the enable flag can be set using
- * ntpdc. If this is the sustem peer, then follow the system
- * poll interval.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
-
- if (up->run) {
- pp->sloppyclockflag |= CLK_FLAG1;
- if (peer == sys_peer)
- peer->hpoll = sys_poll;
- else
- peer->hpoll = peer->minpoll;
- }
- acts_timeout (peer);
- return;
-}
-
-
-/*
- * acts_timeout - called by the timer interrupt
- */
-static void
-acts_timeout (
- struct peer *peer
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
- int dtr = TIOCM_DTR;
-
- /*
- * If a timeout occurs in other than state 0, the call has
- * failed. If in state 0, we just see if there is other work to
- * do.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- if (up->state) {
- acts_disc(peer);
- return;
- }
- switch (peer->ttl) {
-
- /*
- * In manual mode the ACTS calling program is activated
- * by the ntpdc program using the enable flag (fudge
- * flag1), either manually or by a cron job.
- */
- case MODE_MANUAL:
- up->run = 0;
- break;
-
- /*
- * In automatic mode the ACTS calling program runs
- * continuously at intervals determined by the sys_poll
- * variable.
- */
- case MODE_AUTO:
- if (!up->run)
- pp->sloppyclockflag |= CLK_FLAG1;
- up->run = 1;
- break;
-
- /*
- * In backup mode the ACTS calling program is disabled,
- * unless no system peer has been selected for MAXOUTAGE
- * (3600 s). Once enabled, it runs until some other NTP
- * peer shows up.
- */
- case MODE_BACKUP:
- if (!up->run && sys_peer == 0) {
- if (current_time - last_time > MAXOUTAGE) {
- up->run = 1;
- peer->hpoll = peer->minpoll;
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s ACTS backup started ",
- ntoa(&peer->srcadr));
- }
- } else if (up->run && sys_peer->sstclktype != CTL_SST_TS_TELEPHONE) {
- peer->hpoll = peer->minpoll;
- up->run = 0;
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s ACTS backup stopped",
- ntoa(&peer->srcadr));
- }
- break;
-
- default:
- msyslog(LOG_ERR,
- "clock %s ACTS invalid mode", ntoa(&peer->srcadr));
- }
-
- /*
- * The fudge flag1 is used as an enable/disable; if set either
- * by the code or via ntpdc, the ACTS calling program is
- * started; if reset, the phones stop ringing.
- */
- if (!(pp->sloppyclockflag & CLK_FLAG1)) {
- up->pollcnt = 0;
- peer->nextdate = current_time + IDLE;
- return;
- }
-
- /*
- * Initiate a call to the ACTS service. If we wind up here in
- * other than state 0, a successful call could not be completed
- * within minpoll seconds. We advance to the next modem dial
- * string. If none are left, we log a notice and clear the
- * enable flag. For future enhancement: call the site RP and
- * leave an obscene message in his voicemail.
- */
- if (sys_phone[up->pollcnt][0] == '\0') {
- refclock_report(peer, CEVNT_TIMEOUT);
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s ACTS calling program terminated",
- ntoa(&peer->srcadr));
- pp->sloppyclockflag &= ~CLK_FLAG1;
-#ifdef DEBUG
- if (debug)
- printf("acts: calling program terminated\n");
-#endif
- up->pollcnt = 0;
- peer->nextdate = current_time + IDLE;
- return;
- }
-
- /*
- * Raise DTR, call ACTS and start the answer timeout. We think
- * it strange if the OK status has not been received from the
- * modem, but plow ahead anyway.
- */
- if (strcmp(pp->a_lastcode, "OK") != 0)
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "clock %s ACTS no modem status",
- ntoa(&peer->srcadr));
- (void)ioctl(pp->io.fd, TIOCMBIS, (char *)&dtr);
- (void)acts_write(peer, sys_phone[up->pollcnt]);
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "clock %s ACTS calling %s\n",
- ntoa(&peer->srcadr), sys_phone[up->pollcnt]);
- up->state = 1;
- up->pollcnt++;
- pp->polls++;
- peer->nextdate = current_time + ANSWER;
- return;
-}
-
-
-/*
- * acts_disc - disconnect the call and wait for the ruckus to cool
- */
-static void
-acts_disc (
- struct peer *peer
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
- int dtr = TIOCM_DTR;
-
- /*
- * We should never get here other than in state 0, unless a call
- * has timed out. We drop DTR, which will reliably get the modem
- * off the air, even while ACTS is hammering away full tilt.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- (void)ioctl(pp->io.fd, TIOCMBIC, (char *)&dtr);
- if (up->state > 0) {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "clock %s ACTS call failed %d",
- ntoa(&peer->srcadr), up->state);
-#ifdef DEBUG
- if (debug)
- printf("acts: call failed %d\n", up->state);
-#endif
- up->state = 0;
- }
- peer->nextdate = current_time + WAIT;
-}
-
-
-/*
- * acts_write - write a message to the serial port
- */
-static int
-acts_write (
- struct peer *peer,
- const char *str
- )
-{
- register struct actsunit *up;
- struct refclockproc *pp;
- int len;
- int code;
- char cr = '\r';
-
- /*
- * Not much to do here, other than send the message, handle
- * debug and report faults.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- len = strlen(str);
-#ifdef DEBUG
- if (debug)
- printf("acts: state %d send %d %s\n", up->state, len,
- str);
-#endif
- code = write(pp->io.fd, str, (unsigned)len) == len;
- code &= write(pp->io.fd, &cr, 1) == 1;
- if (!code)
- refclock_report(peer, CEVNT_FAULT);
- return (code);
-}
-
-#else
-int refclock_acts_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_arbiter.c b/contrib/ntp/ntpd/refclock_arbiter.c
deleted file mode 100644
index cf5f92f..0000000
--- a/contrib/ntp/ntpd/refclock_arbiter.c
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
- * refclock_arbiter - clock driver for Arbiter 1088A/B Satellite
- * Controlled Clock
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_ARBITER)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * 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.
- *
- * 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 (D0 command) and the
- * broadcast mode set to operate in UTC (BU command).
- *
- * The timecode format supported by this driver is selected by the poll
- * sequence "B5", which initiates a line in the following format to be
- * repeated once per second until turned off by the "B0" poll sequence.
- *
- * Format B5 (24 ASCII printing characters):
- *
- * <cr><lf>i yy ddd hh:mm:ss.000bbb
- *
- * on-time = <cr>
- * 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
- *
- * 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.
- * The time quality character is encoded in IEEE P1344 standard:
- *
- * Format TQ (IEEE P1344 estimated worst-case time quality)
- *
- * 0 clock locked, maximum accuracy
- * F clock failure, time not reliable
- * 4 clock unlocked, accuracy < 1 us
- * 5 clock unlocked, accuracy < 10 us
- * 6 clock unlocked, accuracy < 100 us
- * 7 clock unlocked, accuracy < 1 ms
- * 8 clock unlocked, accuracy < 10 ms
- * 9 clock unlocked, accuracy < 100 ms
- * A clock unlocked, accuracy < 1 s
- * B clock unlocked, accuracy < 10 s
- *
- * The status string is encoded as follows:
- *
- * Format SR (25 ASCII printing characters)
- *
- * 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
- *
- * If flag4 is set, an additional line consisting of the receiver
- * latitude (LA), longitude (LO) and elevation (LH) (meters) is written
- * to this file. If channel B is enabled for deviation mode and connected
- * to a 1-PPS signal, the last two numbers on the line are the deviation
- * and standard deviation averaged over the last 15 seconds.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/gps%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS " /* reference ID */
-#define DESCRIPTION "Arbiter 1088A/B GPS Receiver" /* WRU */
-
-#define LENARB 24 /* format B5 timecode length */
-#define MAXSTA 30 /* max length of status string */
-#define MAXPOS 70 /* max length of position string */
-
-/*
- * ARB unit control structure
- */
-struct arbunit {
- l_fp laststamp; /* last receive timestamp */
- int tcswitch; /* timecode switch/counter */
- char qualchar; /* IEEE P1344 quality (TQ command) */
- char status[MAXSTA]; /* receiver status (SR command) */
- char latlon[MAXPOS]; /* receiver position (lat/lon/alt) */
-};
-
-/*
- * Function prototypes
- */
-static int arb_start P((int, struct peer *));
-static void arb_shutdown P((int, struct peer *));
-static void arb_receive P((struct recvbuf *));
-static void arb_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_arbiter = {
- arb_start, /* start up driver */
- arb_shutdown, /* shut down driver */
- arb_poll, /* transmit poll message */
- noentry, /* not used (old arb_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old arb_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * arb_start - open the devices and initialize data for processing
- */
-static int
-arb_start(
- int unit,
- struct peer *peer
- )
-{
- register struct arbunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct arbunit *)emalloc(sizeof(struct arbunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct arbunit));
- pp = peer->procptr;
- pp->io.clock_recv = arb_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- write(pp->io.fd, "B0", 2);
- return (1);
-}
-
-
-/*
- * arb_shutdown - shut down the clock
- */
-static void
-arb_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct arbunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct arbunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * arb_receive - receive data from the serial interface
- */
-static void
-arb_receive(
- struct recvbuf *rbufp
- )
-{
- register struct arbunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- l_fp trtmp;
- int temp;
- u_char syncchar; /* synchronization indicator */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct arbunit *)pp->unitptr;
- temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-
- /*
- * Note we get a buffer and timestamp for both a <cr> and <lf>,
- * but only the <cr> timestamp is retained. The program first
- * sends a TQ and expects the echo followed by the time quality
- * character. It then sends a B5 starting the timecode broadcast
- * and expects the echo followed some time later by the on-time
- * character <cr> and then the <lf> beginning the timecode
- * itself. Finally, at the <cr> beginning the next timecode at
- * the next second, the program sends a B0 shutting down the
- * timecode broadcast.
- *
- * If flag4 is set, the program snatches the latitude, longitude
- * and elevation and writes it to the clockstats file.
- */
- if (temp == 0)
- return;
- pp->lastrec = up->laststamp;
- up->laststamp = trtmp;
- if (temp < 3)
- return;
- if (up->tcswitch == 0) {
-
- /*
- * Collect statistics. If nothing is recogized, just
- * ignore; sometimes the clock doesn't stop spewing
- * timecodes for awhile after the B0 commant.
- */
- if (!strncmp(pp->a_lastcode, "TQ", 2)) {
- up->qualchar = pp->a_lastcode[2];
- write(pp->io.fd, "SR", 2);
- } else if (!strncmp(pp->a_lastcode, "SR", 2)) {
- strcpy(up->status, pp->a_lastcode + 2);
- if (pp->sloppyclockflag & CLK_FLAG4)
- write(pp->io.fd, "LA", 2);
- else {
- write(pp->io.fd, "B5", 2);
- up->tcswitch++;
- }
- } else if (!strncmp(pp->a_lastcode, "LA", 2)) {
- strcpy(up->latlon, pp->a_lastcode + 2);
- write(pp->io.fd, "LO", 2);
- } else if (!strncmp(pp->a_lastcode, "LO", 2)) {
- strcat(up->latlon, " ");
- strcat(up->latlon, pp->a_lastcode + 2);
- write(pp->io.fd, "LH", 2);
- } else if (!strncmp(pp->a_lastcode, "LH", 2)) {
- strcat(up->latlon, " ");
- strcat(up->latlon, pp->a_lastcode + 2);
- write(pp->io.fd, "DB", 2);
- } else if (!strncmp(pp->a_lastcode, "DB", 2)) {
- strcat(up->latlon, " ");
- strcat(up->latlon, pp->a_lastcode + 2);
- record_clock_stats(&peer->srcadr, up->latlon);
- write(pp->io.fd, "B5", 2);
- up->tcswitch++;
- }
- return;
- }
- pp->lencode = temp;
-
- /*
- * We get down to business, check the timecode format and decode
- * its contents. If the timecode has valid length, but not in
- * proper format, we declare bad format and exit. If the
- * timecode has invalid length, which sometimes occurs when the
- * B0 amputates the broadcast, we just quietly steal away. Note
- * that the time quality character and receiver status string is
- * tacked on the end for clockstats display.
- */
- if (pp->lencode == LENARB) {
- /*
- * Timecode format B5: "i yy ddd hh:mm:ss.000 "
- */
- pp->a_lastcode[LENARB - 2] = up->qualchar;
- strcat(pp->a_lastcode, up->status);
- syncchar = ' ';
- if (sscanf(pp->a_lastcode, "%c%2d %3d %2d:%2d:%2d",
- &syncchar, &pp->year, &pp->day, &pp->hour,
- &pp->minute, &pp->second) != 6) {
- refclock_report(peer, CEVNT_BADREPLY);
- write(pp->io.fd, "B0", 2);
- return;
- }
- } else {
- write(pp->io.fd, "B0", 2);
- return;
- }
- up->tcswitch++;
-
- /*
- * We decode the clock dispersion from the time quality
- * character.
- */
- switch (up->qualchar) {
-
- case '0': /* locked, max accuracy */
- pp->disp = 1e-7;
- break;
-
- case '4': /* unlock accuracy < 1 us */
- pp->disp = 1e-6;
- break;
-
- case '5': /* unlock accuracy < 10 us */
- pp->disp = 1e-5;
- break;
-
- case '6': /* unlock accuracy < 100 us */
- pp->disp = 1e-4;
- break;
-
- case '7': /* unlock accuracy < 1 ms */
- pp->disp = .001;
- break;
-
- case '8': /* unlock accuracy < 10 ms */
- pp->disp = .01;
- break;
-
- case '9': /* unlock accuracy < 100 ms */
- pp->disp = .1;
- break;
-
- case 'A': /* unlock accuracy < 1 s */
- pp->disp = 1;
- break;
-
- case 'B': /* unlock accuracy < 10 s */
- pp->disp = 10;
- break;
-
- case 'F': /* clock failure */
- pp->disp = MAXDISPERSE;
- refclock_report(peer, CEVNT_FAULT);
- write(pp->io.fd, "B0", 2);
- return;
-
- default:
- pp->disp = MAXDISPERSE;
- refclock_report(peer, CEVNT_BADREPLY);
- write(pp->io.fd, "B0", 2);
- return;
- }
- if (syncchar != ' ')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
-#ifdef DEBUG
- if (debug)
- printf("arbiter: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
- if (up->tcswitch >= NSTAGE)
- write(pp->io.fd, "B0", 2);
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp))
- refclock_report(peer, CEVNT_BADTIME);
-}
-
-
-/*
- * arb_poll - called by the transmit procedure
- */
-static void
-arb_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct arbunit *up;
- struct refclockproc *pp;
-
- /*
- * Time to poll the clock. The Arbiter clock responds to a "B5"
- * by returning a timecode in the format specified above.
- * Transmission occurs once per second, unless turned off by a
- * "B0". 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 nothing is
- * heard from the clock for two polls, declare a timeout and
- * keep going.
- */
- pp = peer->procptr;
- up = (struct arbunit *)pp->unitptr;
- up->tcswitch = 0;
- if (write(pp->io.fd, "TQ", 2) != 2) {
- refclock_report(peer, CEVNT_FAULT);
- } else
- pp->polls++;
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-}
-
-#else
-int refclock_arbiter_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_arc.c b/contrib/ntp/ntpd/refclock_arc.c
deleted file mode 100644
index f556da6..0000000
--- a/contrib/ntp/ntpd/refclock_arc.c
+++ /dev/null
@@ -1,1529 +0,0 @@
-/*
- * refclock_arc - clock driver for ARCRON MSF/DCF/WWVB receivers
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_ARCRON_MSF)
-static const char arc_version[] = { "V1.3 2003/02/21" };
-
-/* 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. */
-#endif
-
-#ifndef ARCRON_NOT_MULTIPLE_SAMPLES
-#define ARCRON_MULTIPLE_SAMPLES 1 /* Use all timestamp bytes as samples. */
-#endif
-
-#ifndef ARCRON_NOT_LEAPSECOND_KEEN
-#ifndef ARCRON_LEAPSECOND_KEEN
-#undef ARCRON_LEAPSECOND_KEEN /* Respond quickly to leap seconds: doesn't work yet. */
-#endif
-#endif
-
-/*
-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.
-
-Orginally developed and used with ntp3-5.85 by Derek Mulcahy.
-
-Built against ntp3-5.90 on Solaris 2.5 using gcc 2.7.2.
-
-This code may be freely copied and used and incorporated in other
-systems providing the disclaimer and notice of authorship are
-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.
-
-It works (after a fashion) on both Solaris-1 and Solaris-2.
-
-I am currently using ntp3-5.85. I have been running the code for
-about 7 months without any problems. Even coped with the change to BST!
-
-I had to do some funky things to read from the clock because it uses the
-power from the receive lines to drive the transmit lines. This makes the
-code look a bit stupid but it works. I also had to put in some delays to
-allow for the turnaround time from receive to transmit. These delays
-are between characters when requesting a time stamp so that shouldn't affect
-the results too drastically.
-
-...
-
-The bottom line is that it works but could easily be improved. You are
-free to do what you will with the code. I haven't been able to determine
-how good the clock is. I think that this requires a known good clock
-to compare it against.
-
--------------------------------------------------------------------------------
-
-Damon's notes for adjustments:
-
-MAJOR CHANGES SINCE V1.0
-========================
- 1) Removal of pollcnt variable that made the clock go permanently
- off-line once two time polls failed to gain responses.
-
- 2) Avoiding (at least on Solaris-2) terminal becoming the controlling
- terminal of the process when we do a low-level open().
-
- 3) Additional logic (conditional on ARCRON_LEAPSECOND_KEEN being
- defined) to try to resync quickly after a potential leap-second
- insertion or deletion.
-
- 4) Code significantly slimmer at run-time than V1.0.
-
-
-GENERAL
-=======
-
- 1) The C preprocessor symbol to have the clock built has been changed
- from ARC to ARCRON_MSF to CLOCK_ARCRON_MSF to minimise the
- possiblity of clashes with other symbols in the future.
-
- 2) PRECISION should be -4/-5 (63ms/31ms) for the following reasons:
-
- a) The ARC documentation claims the internal clock is (only)
- accurate to about 20ms relative to Rugby (plus there must be
- noticable drift and delay in the ms range due to transmission
- delays and changing atmospheric effects). This clock is not
- designed for ms accuracy as NTP has spoilt us all to expect.
-
- b) The clock oscillator looks like a simple uncompensated quartz
- crystal of the sort used in digital watches (ie 32768Hz) which
- can have large temperature coefficients and drifts; it is not
- clear if this oscillator is properly disciplined to the MSF
- transmission, but as the default is to resync only once per
- *day*, we can imagine that it is not, and is free-running. We
- can minimise drift by resyncing more often (at the cost of
- reduced battery life), but drift/wander may still be
- significant.
-
- c) Note that the bit time of 3.3ms adds to the potential error in
- the the clock timestamp, since the bit clock of the serial link
- may effectively be free-running with respect to the host clock
- and the MSF clock. Actually, the error is probably 1/16th of
- the above, since the input data is probably sampled at at least
- 16x the bit rate.
-
- By keeping the clock marked as not very precise, it will have a
- fairly large dispersion, and thus will tend to be used as a
- `backup' time source and sanity checker, which this clock is
- probably ideal for. For an isolated network without other time
- sources, this clock can probably be expected to provide *much*
- better than 1s accuracy, which will be fine.
-
- By default, PRECISION is set to -4, but experience, especially at a
- particular geographic location with a particular clock, may allow
- this to be altered to -5. (Note that skews of +/- 10ms are to be
- expected from the clock from time-to-time.) This improvement of
- reported precision can be instigated by setting flag3 to 1, though
- the PRECISION will revert to the normal value while the clock
- signal quality is unknown whatever the flag3 setting.
-
- IN ANY CASE, BE SURE TO SET AN APPROPRIATE FUDGE FACTOR TO REMOVE
- ANY RESIDUAL SKEW, eg:
-
- server 127.127.27.0 # ARCRON MSF radio clock unit 0.
- # Fudge timestamps by about 20ms.
- fudge 127.127.27.0 time1 0.020
-
- You will need to observe your system's behaviour, assuming you have
- some other NTP source to compare it with, to work out what the
- fudge factor should be. For my Sun SS1 running SunOS 4.1.3_U1 with
- my MSF clock with my distance from the MSF transmitter, +20ms
- seemed about right, after some observation.
-
- 3) REFID has been made "MSFa" to reflect the MSF time source and the
- ARCRON receiver.
-
- 4) DEFAULT_RESYNC_TIME is the time in seconds (by default) before
- forcing a resync since the last attempt. This is picked to give a
- little less than an hour between resyncs and to try to avoid
- clashing with any regular event at a regular time-past-the-hour
- which might cause systematic errors.
-
- The INITIAL_RESYNC_DELAY is to avoid bothering the clock and
- running down its batteries unnecesarily if ntpd is going to crash
- or be killed or reconfigured quickly. If ARCRON_KEEN is defined
- then this period is long enough for (with normal polling rates)
- enough time samples to have been taken to allow ntpd to sync to
- the clock before the interruption for the clock to resync to MSF.
- This avoids ntpd syncing to another peer first and then
- almost immediately hopping to the MSF clock.
-
- The RETRY_RESYNC_TIME is used before rescheduling a resync after a
- resync failed to reveal a statisfatory signal quality (too low or
- unknown).
-
- 5) The clock seems quite jittery, so I have increased the
- median-filter size from the typical (previous) value of 3. I
- discard up to half the results in the filter. It looks like maybe
- 1 sample in 10 or so (maybe less) is a spike, so allow the median
- filter to discard at least 10% of its entries or 1 entry, whichever
- is greater.
-
- 6) Sleeping *before* each character sent to the unit to allow required
- inter-character time but without introducting jitter and delay in
- handling the response if possible.
-
- 7) If the flag ARCRON_KEEN is defined, take time samples whenever
- possible, even while resyncing, etc. We rely, in this case, on the
- clock always giving us a reasonable time or else telling us in the
- status byte at the end of the timestamp that it failed to sync to
- MSF---thus we should never end up syncing to completely the wrong
- time.
-
- 8) If the flag ARCRON_OWN_FILTER is defined, use own versions of
- refclock median-filter routines to get round small bug in 3-5.90
- code which does not return the median offset. XXX Removed this
- bit due NTP Version 4 upgrade - dlm.
-
- 9) We would appear to have a year-2000 problem with this clock since
- it returns only the two least-significant digits of the year. But
- ntpd ignores the year and uses the local-system year instead, so
- this is in fact not a problem. Nevertheless, we attempt to do a
- sensible thing with the dates, wrapping them into a 100-year
- window.
-
- 10)Logs stats information that can be used by Derek's Tcl/Tk utility
- to show the status of the clock.
-
- 11)The clock documentation insists that the number of bits per
- character to be sent to the clock, and sent by it, is 11, including
- one start bit and two stop bits. The data format is either 7+even
- or 8+none.
-
-
-TO-DO LIST
-==========
-
- * Eliminate use of scanf(), and maybe sprintf().
-
- * Allow user setting of resync interval to trade battery life for
- accuracy; maybe could be done via fudge factor or unit number.
-
- * Possibly note the time since the last resync of the MSF clock to
- MSF as the age of the last reference timestamp, ie trust the
- clock's oscillator not very much...
-
- * Add very slow auto-adjustment up to a value of +/- time2 to correct
- for long-term errors in the clock value (time2 defaults to 0 so the
- correction would be disabled by default).
-
- * Consider trying to use the tty_clk/ppsclock support.
-
- * Possibly use average or maximum signal quality reported during
- resync, rather than just the last one, which may be atypical.
-
-*/
-
-
-/* Notes for HKW Elektronik GmBH Radio clock driver */
-/* Author Lyndon David, Sentinet Ltd, Feb 1997 */
-/* These notes seem also to apply usefully to the ARCRON clock. */
-
-/* The HKW clock module is a radio receiver tuned into the Rugby */
-/* MSF time signal tranmitted on 60 kHz. The clock module connects */
-/* to the computer via a serial line and transmits the time encoded */
-/* in 15 bytes at 300 baud 7 bits two stop bits even parity */
-
-/* Clock communications, from the datasheet */
-/* All characters sent to the clock are echoed back to the controlling */
-/* device. */
-/* Transmit time/date information */
-/* syntax ASCII o<cr> */
-/* Character o may be replaced if neccesary by a character whose code */
-/* contains the lowest four bits f(hex) eg */
-/* syntax binary: xxxx1111 00001101 */
-
-/* DHD note:
-You have to wait for character echo + 10ms before sending next character.
-*/
-
-/* The clock replies to this command with a sequence of 15 characters */
-/* which contain the complete time and a final <cr> making 16 characters */
-/* in total. */
-/* The RC computer clock will not reply immediately to this command because */
-/* the start bit edge of the first reply character marks the beginning of */
-/* the second. So the RC Computer Clock will reply to this command at the */
-/* start of the next second */
-/* The characters have the following meaning */
-/* 1. hours tens */
-/* 2. hours units */
-/* 3. minutes tens */
-/* 4. minutes units */
-/* 5. seconds tens */
-/* 6. seconds units */
-/* 7. day of week 1-monday 7-sunday */
-/* 8. day of month tens */
-/* 9. day of month units */
-/* 10. month tens */
-/* 11. month units */
-/* 12. year tens */
-/* 13. year units */
-/* 14. BST/UTC status */
-/* bit 7 parity */
-/* bit 6 always 0 */
-/* bit 5 always 1 */
-/* bit 4 always 1 */
-/* bit 3 always 0 */
-/* bit 2 =1 if UTC is in effect, complementary to the BST bit */
-/* bit 1 =1 if BST is in effect, according to the BST bit */
-/* bit 0 BST/UTC change impending bit=1 in case of change impending */
-/* 15. status */
-/* bit 7 parity */
-/* bit 6 always 0 */
-/* bit 5 always 1 */
-/* bit 4 always 1 */
-/* bit 3 =1 if low battery is detected */
-/* bit 2 =1 if the very last reception attempt failed and a valid */
-/* time information already exists (bit0=1) */
-/* =0 if the last reception attempt was successful */
-/* bit 1 =1 if at least one reception since 2:30 am was successful */
-/* =0 if no reception attempt since 2:30 am was successful */
-/* bit 0 =1 if the RC Computer Clock contains valid time information */
-/* This bit is zero after reset and one after the first */
-/* successful reception attempt */
-
-/* DHD note:
-Also note g<cr> command which confirms that a resync is in progress, and
-if so what signal quality (0--5) is available.
-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>
-#include <ctype.h>
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-
-/*
- * This driver supports the ARCRON MSF/DCF/WWVB Radio Controlled Clock
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/arc%d" /* Device name and unit. */
-#define SPEED B300 /* UART speed (300 baud) */
-#define PRECISION (-4) /* Precision (~63 ms). */
-#define HIGHPRECISION (-5) /* If things are going well... */
-#define REFID "MSFa" /* Reference ID. */
-#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"
-
-#ifdef PRE_NTP420
-#define MODE ttlmax
-#else
-#define MODE ttl
-#endif
-
-#define LENARC 16 /* Format `o' timecode length. */
-
-#define BITSPERCHAR 11 /* Bits per character. */
-#define BITTIME 0x0DA740E /* Time for 1 bit at 300bps. */
-#define CHARTIME10 0x8888888 /* Time for 10-bit char at 300bps. */
-#define CHARTIME11 0x962FC96 /* Time for 11-bit char at 300bps. */
-#define CHARTIME /* Time for char at 300bps. */ \
-( (BITSPERCHAR == 11) ? CHARTIME11 : ( (BITSPERCHAR == 10) ? CHARTIME10 : \
- (BITSPERCHAR * BITTIME) ) )
-
- /* Allow for UART to accept char half-way through final stop bit. */
-#define INITIALOFFSET (u_int32)(-BITTIME/2)
-
- /*
- charoffsets[x] is the time after the start of the second that byte
- x (with the first byte being byte 1) is received by the UART,
- assuming that the initial edge of the start bit of the first byte
- is on-time. The values are represented as the fractional part of
- an l_fp.
-
- We store enough values to have the offset of each byte including
- the trailing \r, on the assumption that the bytes follow one
- another without gaps.
- */
- static const u_int32 charoffsets[LENARC+1] = {
-#if BITSPERCHAR == 11 /* Usual case. */
- /* Offsets computed as accurately as possible... */
- 0,
- INITIALOFFSET + 0x0962fc96, /* 1 chars, 11 bits */
- INITIALOFFSET + 0x12c5f92c, /* 2 chars, 22 bits */
- INITIALOFFSET + 0x1c28f5c3, /* 3 chars, 33 bits */
- INITIALOFFSET + 0x258bf259, /* 4 chars, 44 bits */
- INITIALOFFSET + 0x2eeeeeef, /* 5 chars, 55 bits */
- INITIALOFFSET + 0x3851eb85, /* 6 chars, 66 bits */
- INITIALOFFSET + 0x41b4e81b, /* 7 chars, 77 bits */
- INITIALOFFSET + 0x4b17e4b1, /* 8 chars, 88 bits */
- INITIALOFFSET + 0x547ae148, /* 9 chars, 99 bits */
- INITIALOFFSET + 0x5dddddde, /* 10 chars, 110 bits */
- INITIALOFFSET + 0x6740da74, /* 11 chars, 121 bits */
- INITIALOFFSET + 0x70a3d70a, /* 12 chars, 132 bits */
- INITIALOFFSET + 0x7a06d3a0, /* 13 chars, 143 bits */
- INITIALOFFSET + 0x8369d037, /* 14 chars, 154 bits */
- INITIALOFFSET + 0x8ccccccd, /* 15 chars, 165 bits */
- INITIALOFFSET + 0x962fc963 /* 16 chars, 176 bits */
-#else
- /* Offsets computed with a small rounding error... */
- 0,
- INITIALOFFSET + 1 * CHARTIME,
- INITIALOFFSET + 2 * CHARTIME,
- INITIALOFFSET + 3 * CHARTIME,
- INITIALOFFSET + 4 * CHARTIME,
- INITIALOFFSET + 5 * CHARTIME,
- INITIALOFFSET + 6 * CHARTIME,
- INITIALOFFSET + 7 * CHARTIME,
- INITIALOFFSET + 8 * CHARTIME,
- INITIALOFFSET + 9 * CHARTIME,
- INITIALOFFSET + 10 * CHARTIME,
- INITIALOFFSET + 11 * CHARTIME,
- INITIALOFFSET + 12 * CHARTIME,
- INITIALOFFSET + 13 * CHARTIME,
- INITIALOFFSET + 14 * CHARTIME,
- INITIALOFFSET + 15 * CHARTIME,
- INITIALOFFSET + 16 * CHARTIME
-#endif
- };
-
-#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
-#define INITIAL_RESYNC_DELAY 500 /* Delay before first resync. */
-#else
-#define INITIAL_RESYNC_DELAY 50 /* Delay before first resync. */
-#endif
-
- static const int moff[12] =
-{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
-/* Flags for a raw open() of the clock serial device. */
-#ifdef O_NOCTTY /* Good, we can avoid tty becoming controlling tty. */
-#define OPEN_FLAGS (O_RDWR | O_NOCTTY)
-#else /* Oh well, it may not matter... */
-#define OPEN_FLAGS (O_RDWR)
-#endif
-
-
-/* Length of queue of command bytes to be sent. */
-#define CMDQUEUELEN 4 /* Enough for two cmds + each \r. */
-/* Queue tick time; interval in seconds between chars taken off queue. */
-/* Must be >= 2 to allow o\r response to come back uninterrupted. */
-#define QUEUETICK 2 /* Allow o\r reply to finish. */
-
-/*
- * ARC unit control structure
- */
-struct arcunit {
- l_fp lastrec; /* Time tag for the receive time (system). */
- int status; /* Clock status. */
-
- 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. */
-
- /* In the outgoing queue, cmdqueue[0] is next to be sent. */
- char cmdqueue[CMDQUEUELEN+1]; /* Queue of outgoing commands + \0. */
-
- 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.
-
- Set whenever we receive a valid time sample in the first hour of
- the first day of the first/seventh months.
-
- Outside the special hour this value is unconditionally set
- to zero by the receive routine.
-
- On finding itself in this timeslot, as long as the value is
- non-negative, the receive routine sets it to a positive value to
- indicate a resync to MSF should be performed.
-
- In the poll routine, if this value is positive and we are not
- already resyncing (eg from a sync that started just before
- midnight), start resyncing and set this value negative to
- indicate that a leap-triggered resync has been started. Having
- set this negative prevents the receive routine setting it
- positive and thus prevents multiple resyncs during the witching
- hour.
- */
-static int possible_leap = 0; /* No resync required by default. */
-#endif
-
-#if 0
-static void dummy_event_handler P((struct peer *));
-static void arc_event_handler P((struct peer *));
-#endif /* 0 */
-
-#define QUALITY_UNKNOWN -1 /* Indicates unknown clock quality. */
-#define MIN_CLOCK_QUALITY 0 /* Min quality clock will return. */
-#define MIN_CLOCK_QUALITY_OK 3 /* Min quality for OK reception. */
-#define MAX_CLOCK_QUALITY 5 /* Max quality clock will return. */
-
-/*
- * Function prototypes
- */
-static int arc_start P((int, struct peer *));
-static void arc_shutdown P((int, struct peer *));
-static void arc_receive P((struct recvbuf *));
-static void arc_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_arc = {
- arc_start, /* start up driver */
- arc_shutdown, /* shut down driver */
- arc_poll, /* transmit poll message */
- noentry, /* not used (old arc_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old arc_buginfo) */
- NOFLAGS /* not used */
-};
-
-/* Queue us up for the next tick. */
-#define ENQUEUE(up) \
- do { \
- peer->nextaction = current_time + QUEUETICK; \
- } while(0)
-
-/* Placeholder event handler---does nothing safely---soaks up loose tick. */
-static void
-dummy_event_handler(
- struct peer *peer
- )
-{
-#ifdef DEBUG
- if(debug) { printf("arc: dummy_event_handler() called.\n"); }
-#endif
-}
-
-/*
-Normal event handler.
-
-Take first character off queue and send to clock if not a null.
-
-Shift characters down and put a null on the end.
-
-We assume that there is no parallelism so no race condition, but even
-if there is nothing bad will happen except that we might send some bad
-data to the clock once in a while.
-*/
-static void
-arc_event_handler(
- struct peer *peer
- )
-{
- struct refclockproc *pp = peer->procptr;
- register struct arcunit *up = (struct arcunit *)pp->unitptr;
- int i;
- char c;
-#ifdef DEBUG
- if(debug > 2) { printf("arc: arc_event_handler() called.\n"); }
-#endif
-
- c = up->cmdqueue[0]; /* Next char to be sent. */
- /* Shift down characters, shifting trailing \0 in at end. */
- for(i = 0; i < CMDQUEUELEN; ++i)
- { up->cmdqueue[i] = up->cmdqueue[i+1]; }
-
- /* Don't send '\0' characters. */
- if(c != '\0') {
- if(write(pp->io.fd, &c, 1) != 1) {
- msyslog(LOG_NOTICE, "ARCRON: write to fd %d failed", pp->io.fd);
- }
-#ifdef DEBUG
- else if(debug) { printf("arc: sent `%2.2x', fd %d.\n", c, pp->io.fd); }
-#endif
- }
-
- ENQUEUE(up);
-}
-
-/*
- * arc_start - open the devices and initialize data for processing
- */
-static int
-arc_start(
- int unit,
- struct peer *peer
- )
-{
- register struct arcunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-#ifdef HAVE_TERMIOS
- struct termios arg;
-#endif
-
- msyslog(LOG_NOTICE, "ARCRON: %s: opening unit %d", arc_version, unit);
-#ifdef DEBUG
- if(debug) {
- printf("arc: %s: attempt to open unit %d.\n", arc_version, unit);
- }
-#endif
-
- /* Prevent a ridiculous device number causing overflow of device[]. */
- if((unit < 0) || (unit > 255)) { return(0); }
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED, LDISC_CLK)))
- return(0);
-#ifdef DEBUG
- if(debug) { printf("arc: unit %d using open().\n", unit); }
-#endif
- fd = open(device, OPEN_FLAGS);
- if(fd < 0) {
-#ifdef DEBUG
- if(debug) { printf("arc: failed [open()] to open %s.\n", device); }
-#endif
- return(0);
- }
-
- fcntl(fd, F_SETFL, 0); /* clear the descriptor flags */
-#ifdef DEBUG
- if(debug)
- { printf("arc: opened RS232 port with file descriptor %d.\n", fd); }
-#endif
-
-#ifdef HAVE_TERMIOS
-
- arg.c_iflag = IGNBRK | ISTRIP;
- arg.c_oflag = 0;
- arg.c_cflag = B300 | CS8 | CREAD | CLOCAL | CSTOPB;
- arg.c_lflag = 0;
- arg.c_cc[VMIN] = 1;
- arg.c_cc[VTIME] = 0;
-
- tcsetattr(fd, TCSANOW, &arg);
-
-#else
-
- msyslog(LOG_ERR, "ARCRON: termios not supported in this driver");
- (void)close(fd);
-
- return 0;
-
-#endif
-
- up = (struct arcunit *) emalloc(sizeof(struct arcunit));
- if(!up) { (void) close(fd); return(0); }
- /* Set structure to all zeros... */
- memset((char *)up, 0, sizeof(struct arcunit));
- pp = peer->procptr;
- pp->io.clock_recv = arc_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if(!io_addclock(&pp->io)) { (void) close(fd); free(up); return(0); }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- peer->stratum = 2; /* Default to stratum 2 not 0. */
- pp->clockdesc = DESCRIPTION;
- 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;
-
-#if 0 /* Not needed because of zeroing of arcunit structure... */
- up->resyncing = 0; /* Not resyncing yet. */
- up->saved_flags = 0; /* Default is all flags off. */
- /* Clear send buffer out... */
- {
- int i;
- for(i = CMDQUEUELEN; i >= 0; --i) { up->cmdqueue[i] = '\0'; }
- }
-#endif
-
-#ifdef ARCRON_KEEN
- up->quality = QUALITY_UNKNOWN; /* Trust the clock immediately. */
-#else
- up->quality = MIN_CLOCK_QUALITY;/* Don't trust the clock yet. */
-#endif
-
- peer->action = arc_event_handler;
-
- ENQUEUE(up);
-
- return(1);
-}
-
-
-/*
- * arc_shutdown - shut down the clock
- */
-static void
-arc_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct arcunit *up;
- struct refclockproc *pp;
-
- peer->action = dummy_event_handler;
-
- pp = peer->procptr;
- up = (struct arcunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-/*
-Compute space left in output buffer.
-*/
-static int
-space_left(
- register struct arcunit *up
- )
-{
- int spaceleft;
-
- /* Compute space left in buffer after any pending output. */
- for(spaceleft = 0; spaceleft < CMDQUEUELEN; ++spaceleft)
- { if(up->cmdqueue[CMDQUEUELEN - 1 - spaceleft] != '\0') { break; } }
- return(spaceleft);
-}
-
-/*
-Send command by copying into command buffer as far forward as possible,
-after any pending output.
-
-Indicate an error by returning 0 if there is not space for the command.
-*/
-static int
-send_slow(
- register struct arcunit *up,
- int fd,
- const char *s
- )
-{
- int sl = strlen(s);
- int spaceleft = space_left(up);
-
-#ifdef DEBUG
- if(debug > 1) { printf("arc: spaceleft = %d.\n", spaceleft); }
-#endif
- if(spaceleft < sl) { /* Should not normally happen... */
-#ifdef DEBUG
- msyslog(LOG_NOTICE, "ARCRON: send-buffer overrun (%d/%d)",
- sl, spaceleft);
-#endif
- return(0); /* FAILED! */
- }
-
- /* Copy in the command to be sent. */
- while(*s) { up->cmdqueue[CMDQUEUELEN - spaceleft--] = *s++; }
-
- return(1);
-}
-
-
-/* Macro indicating action we will take for different quality values. */
-#define quality_action(q) \
-(((q) == QUALITY_UNKNOWN) ? "UNKNOWN, will use clock anyway" : \
- (((q) < MIN_CLOCK_QUALITY_OK) ? "TOO POOR, will not use clock" : \
- "OK, will use clock"))
-
- /*
- * arc_receive - receive data from the serial interface
- */
- static void
-arc_receive(
- struct recvbuf *rbufp
- )
-{
- register struct arcunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- char c;
- 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
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct arcunit *)pp->unitptr;
-
-
- /*
- If the command buffer is empty, and we are resyncing, insert a
- g\r quality request into it to poll for signal quality again.
- */
- if((up->resyncing) && (space_left(up) == CMDQUEUELEN)) {
-#ifdef DEBUG
- if(debug > 1) { printf("arc: inserting signal-quality poll.\n"); }
-#endif
- send_slow(up, pp->io.fd, "g\r");
- }
-
- /*
- The `arc_last_offset' is the offset in lastcode[] of the last byte
- received, and which we assume actually received the input
- timestamp.
-
- (When we get round to using tty_clk and it is available, we
- assume that we will receive the whole timecode with the
- trailing \r, and that that \r will be timestamped. But this
- assumption also works if receive the characters one-by-one.)
- */
- arc_last_offset = pp->lencode+rbufp->recv_length - 1;
-
- /*
- We catch a timestamp iff:
-
- * The command code is `o' for a timestamp.
-
- * If ARCRON_MULTIPLE_SAMPLES is undefined then we must have
- exactly char in the buffer (the command code) so that we
- only sample the first character of the timecode as our
- `on-time' character.
-
- * The first character in the buffer is not the echoed `\r'
- from the `o` command (so if we are to timestamp an `\r' it
- must not be first in the receive buffer with lencode==1.
- (Even if we had other characters following it, we probably
- would have a premature timestamp on the '\r'.)
-
- * We have received at least one character (I cannot imagine
- how it could be otherwise, but anyway...).
- */
- c = rbufp->recv_buffer[0];
- if((pp->a_lastcode[0] == 'o') &&
-#ifndef ARCRON_MULTIPLE_SAMPLES
- (pp->lencode == 1) &&
-#endif
- ((pp->lencode != 1) || (c != '\r')) &&
- (arc_last_offset >= 1)) {
- /* Note that the timestamp should be corrected if >1 char rcvd. */
- l_fp timestamp;
- timestamp = rbufp->recv_time;
-#ifdef DEBUG
- if(debug) { /* Show \r as `R', other non-printing char as `?'. */
- printf("arc: stamp -->%c<-- (%d chars rcvd)\n",
- ((c == '\r') ? 'R' : (isgraph((int)c) ? c : '?')),
- rbufp->recv_length);
- }
-#endif
-
- /*
- Now correct timestamp by offset of last byte received---we
- subtract from the receive time the delay implied by the
- extra characters received.
-
- Reject the input if the resulting code is too long, but
- allow for the trailing \r, normally not used but a good
- handle for tty_clk or somesuch kernel timestamper.
- */
- if(arc_last_offset > LENARC) {
-#ifdef DEBUG
- if(debug) {
- printf("arc: input code too long (%d cf %d); rejected.\n",
- arc_last_offset, LENARC);
- }
-#endif
- pp->lencode = 0;
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- L_SUBUF(&timestamp, charoffsets[arc_last_offset]);
-#ifdef DEBUG
- if(debug > 1) {
- printf(
- "arc: %s%d char(s) rcvd, the last for lastcode[%d]; -%sms offset applied.\n",
- ((rbufp->recv_length > 1) ? "*** " : ""),
- rbufp->recv_length,
- arc_last_offset,
- mfptoms((unsigned long)0,
- charoffsets[arc_last_offset],
- 1));
- }
-#endif
-
-#ifdef ARCRON_MULTIPLE_SAMPLES
- /*
- If taking multiple samples, capture the current adjusted
- sample iff:
-
- * No timestamp has yet been captured (it is zero), OR
-
- * This adjusted timestamp is earlier than the one already
- captured, on the grounds that this one suffered less
- delay in being delivered to us and is more accurate.
-
- */
- if(L_ISZERO(&(up->lastrec)) ||
- L_ISGEQ(&(up->lastrec), &timestamp))
-#endif
- {
-#ifdef DEBUG
- if(debug > 1) {
- printf("arc: system timestamp captured.\n");
-#ifdef ARCRON_MULTIPLE_SAMPLES
- if(!L_ISZERO(&(up->lastrec))) {
- l_fp diff;
- diff = up->lastrec;
- L_SUB(&diff, &timestamp);
- printf("arc: adjusted timestamp by -%sms.\n",
- mfptoms(diff.l_i, diff.l_f, 3));
- }
-#endif
- }
-#endif
- up->lastrec = timestamp;
- }
-
- }
-
- /* Just in case we still have lots of rubbish in the buffer... */
- /* ...and to avoid the same timestamp being reused by mistake, */
- /* eg on receipt of the \r coming in on its own after the */
- /* timecode. */
- if(pp->lencode >= LENARC) {
-#ifdef DEBUG
- if(debug && (rbufp->recv_buffer[0] != '\r'))
- { printf("arc: rubbish in pp->a_lastcode[].\n"); }
-#endif
- pp->lencode = 0;
- return;
- }
-
- /* Append input to code buffer, avoiding overflow. */
- for(i = 0; i < rbufp->recv_length; i++) {
- if(pp->lencode >= LENARC) { break; } /* Avoid overflow... */
- c = rbufp->recv_buffer[i];
-
- /* Drop trailing '\r's and drop `h' command echo totally. */
- if(c != '\r' && c != 'h') { pp->a_lastcode[pp->lencode++] = c; }
-
- /*
- If we've just put an `o' in the lastcode[0], clear the
- timestamp in anticipation of a timecode arriving soon.
-
- We would expect to get to process this before any of the
- timecode arrives.
- */
- if((c == 'o') && (pp->lencode == 1)) {
- L_CLR(&(up->lastrec));
-#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') {
- int r, q;
-
- if(pp->lencode < 3) { return; } /* Need more data... */
- r = (pp->a_lastcode[1] & 0x7f); /* Strip parity. */
- q = (pp->a_lastcode[2] & 0x7f); /* Strip parity. */
- if(((q & 0x70) != 0x30) || ((q & 0xf) > MAX_CLOCK_QUALITY) ||
- ((r & 0x70) != 0x30)) {
- /* Badly formatted response. */
-#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. */
- 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 (%d).\n", quality_average, (q & 0xf)); }
-#endif
- } else if( /* (r == '2') && */ up->resyncing) {
- up->quality = quality_average;
-#ifdef DEBUG
- if(debug)
- {
- printf("arc: sync finished, signal quality %d: %s\n",
- up->quality,
- quality_action(up->quality));
- }
-#endif
- msyslog(LOG_NOTICE,
- "ARCRON: sync finished, signal quality %d: %s",
- 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. */
- if((up->quality == QUALITY_UNKNOWN) ||
- (up->quality < MIN_CLOCK_QUALITY_OK))
- { up->next_resync = current_time + RETRY_RESYNC_TIME; }
-#endif
- }
- pp->lencode = 0;
- return;
- }
-
- /* Stop now if this is not a timecode message. */
- if(pp->a_lastcode[0] != 'o') {
- pp->lencode = 0;
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /* If we don't have enough data, wait for more... */
- if(pp->lencode < LENARC) { return; }
-
-
- /* WE HAVE NOW COLLECTED ONE TIMESTAMP (phew)... */
-#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 DEBUG
- if(debug) { printf("arc: FAILED TO GET SYSTEM TIMESTAMP\n"); }
-#endif
- pp->lencode = 0;
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- /*
- Append a mark of the clock's received signal quality for the
- benefit of Derek Mulcahy's Tcl/Tk utility (we map the `unknown'
- quality value to `6' for his s/w) and terminate the string for
- sure. This should not go off the buffer end.
- */
- pp->a_lastcode[pp->lencode] = ((up->quality == QUALITY_UNKNOWN) ?
- '6' : ('0' + up->quality));
- pp->a_lastcode[pp->lencode + 1] = '\0'; /* Terminate for printf(). */
-
-#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, &flags, &status);
-
- /* Validate format and numbers. */
- if(n != 9) {
-#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;
- }
- /*
- Validate received values at least enough to prevent internal
- array-bounds problems, etc.
- */
- if((pp->hour < 0) || (pp->hour > 23) ||
- (pp->minute < 0) || (pp->minute > 59) ||
- (pp->second < 0) || (pp->second > 60) /*Allow for leap seconds.*/ ||
- (wday < 1) || (wday > 7) ||
- (pp->day < 1) || (pp->day > 31) ||
- (month < 1) || (month > 12) ||
- (pp->year < 0) || (pp->year > 99)) {
- /* Data out of range. */
- pp->lencode = 0;
- 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! */
- /* Attempt to wrap 2-digit date into sensible window. */
- if(pp->year < YEAR_PIVOT) { pp->year += 100; } /* Y2KFixes */
- pp->year += 1900; /* use full four-digit year */ /* Y2KFixes */
- /*
- Attempt to do the right thing by screaming that the code will
- soon break when we get to the end of its useful life. What a
- hero I am... PLEASE FIX LEAP-YEAR AND WRAP CODE IN 209X!
- */
- if(pp->year >= YEAR_PIVOT+2000-2 ) { /* Y2KFixes */
- /*This should get attention B^> */
- msyslog(LOG_NOTICE,
- "ARCRON: fix me! EITHER YOUR DATE IS BADLY WRONG or else I will break soon!");
- }
-#ifdef DEBUG
- if(debug) {
- 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, flags, status);
- }
-#endif
-
- /*
- The status value tested for is not strictly supported by the
- clock spec since the value of bit 2 (0x4) is claimed to be
- undefined for MSF, yet does seem to indicate if the last resync
- was successful or not.
- */
- pp->leap = LEAP_NOWARNING;
- status &= 0x7;
- if(status == 0x3) {
- if(status != up->status)
- { msyslog(LOG_NOTICE, "ARCRON: signal acquired"); }
- } else {
- if(status != up->status) {
- 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;
-
- 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;
- }
- }
- }
- }
-
- 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 (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 DEBUG
- msyslog(LOG_NOTICE, "ARCRON: flags enabled: %s%s%s%s",
- ((pp->sloppyclockflag & CLK_FLAG1) ? "1" : "."),
- ((pp->sloppyclockflag & CLK_FLAG2) ? "2" : "."),
- ((pp->sloppyclockflag & CLK_FLAG3) ? "3" : "."),
- ((pp->sloppyclockflag & CLK_FLAG4) ? "4" : "."));
- /* Note effects of flags changing... */
- if(debug) {
- printf("arc: PRECISION = %d.\n", peer->precision);
- }
-#endif
- up->saved_flags = pp->sloppyclockflag;
- }
-
- /* Note time of last believable timestamp. */
- pp->lastrec = up->lastrec;
-
-#ifdef ARCRON_LEAPSECOND_KEEN
- /* Find out if a leap-second might just have happened...
- (ie is this the first hour of the first day of Jan or Jul?)
- */
- if((pp->hour == 0) &&
- (pp->day == 1) &&
- ((month == 1) || (month == 7))) {
- if(possible_leap >= 0) {
- /* A leap may have happened, and no resync has started yet...*/
- possible_leap = 1;
- }
- } else {
- /* Definitely not leap-second territory... */
- possible_leap = 0;
- }
-#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);
-}
-
-
-/* request_time() sends a time request to the clock with given peer. */
-/* This automatically reports a fault if necessary. */
-/* No data should be sent after this until arc_poll() returns. */
-static void request_time P((int, struct peer *));
-static void
-request_time(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp = peer->procptr;
- register struct arcunit *up = (struct arcunit *)pp->unitptr;
-#ifdef DEBUG
- if(debug) { printf("arc: unit %d: requesting time.\n", unit); }
-#endif
- if (!send_slow(up, pp->io.fd, "o\r")) {
-#ifdef DEBUG
- if (debug) {
- printf("arc: unit %d: problem sending", unit);
- }
-#endif
- pp->lencode = 0;
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
- pp->polls++;
-}
-
-/*
- * arc_poll - called by the transmit procedure
- */
-static void
-arc_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct arcunit *up;
- struct refclockproc *pp;
- int resync_needed; /* Should we start a resync? */
-
- 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. */
- tcflush(pp->io.fd, TCIFLUSH);
-#endif
-
- /* Resync if our next scheduled resync time is here or has passed. */
- resync_needed = ( !(pp->sloppyclockflag & CLK_FLAG2) &&
- (up->next_resync <= current_time) );
-
-#ifdef ARCRON_LEAPSECOND_KEEN
- /*
- Try to catch a potential leap-second insertion or deletion quickly.
-
- In addition to the normal NTP fun of clocks that don't report
- leap-seconds spooking their hosts, this clock does not even
- sample the radio sugnal the whole time, so may miss a
- leap-second insertion or deletion for up to a whole sample
- time.
-
- To try to minimise this effect, if in the first few minutes of
- the day immediately following a leap-second-insertion point
- (ie in the first hour of the first day of the first and sixth
- months), and if the last resync was in the previous day, and a
- resync is not already in progress, resync the clock
- immediately.
-
- */
- if((possible_leap > 0) && /* Must be 00:XX 01/0{1,7}/XXXX. */
- (!up->resyncing)) { /* No resync in progress yet. */
- resync_needed = 1;
- possible_leap = -1; /* Prevent multiple resyncs. */
- msyslog(LOG_NOTICE,"ARCRON: unit %d: checking for leap second",unit);
- }
-#endif
-
- /* Do a resync if required... */
- if(resync_needed) {
- /* First, reset quality value to `unknown' so we can detect */
- /* when a quality message has been responded to by this */
- /* being set to some other value. */
- up->quality = QUALITY_UNKNOWN;
-
- /* Note that we are resyncing... */
- up->resyncing = 1;
-
- /* Now actually send the resync command and an immediate poll. */
-#ifdef DEBUG
- if(debug) { printf("arc: sending resync command (h\\r).\n"); }
-#endif
- msyslog(LOG_NOTICE, "ARCRON: unit %d: sending resync command", unit);
- send_slow(up, pp->io.fd, "h\r");
-
- /* Schedule our next resync... */
- up->next_resync = current_time + DEFAULT_RESYNC_TIME;
-
- /* Drop through to request time if appropriate. */
- }
-
- /* If clock quality is too poor to trust, indicate a fault. */
- /* If quality is QUALITY_UNKNOWN and ARCRON_KEEN is defined,*/
- /* we'll cross our fingers and just hope that the thing */
- /* synced so quickly we did not catch it---we'll */
- /* double-check the clock is OK elsewhere. */
- if(
-#ifdef ARCRON_KEEN
- (up->quality != QUALITY_UNKNOWN) &&
-#else
- (up->quality == QUALITY_UNKNOWN) ||
-#endif
- (up->quality < MIN_CLOCK_QUALITY_OK)) {
-#ifdef DEBUG
- if(debug) {
- printf("arc: clock quality %d too poor.\n", up->quality);
- }
-#endif
- pp->lencode = 0;
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
- /* This is the normal case: request a timestamp. */
- request_time(unit, peer);
-}
-
-#else
-int refclock_arc_bs;
-#endif
diff --git a/contrib/ntp/ntpd/refclock_as2201.c b/contrib/ntp/ntpd/refclock_as2201.c
deleted file mode 100644
index f04d417b..0000000
--- a/contrib/ntp/ntpd/refclock_as2201.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * refclock_as2201 - clock driver for the Austron 2201A GPS
- * Timing Receiver
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_AS2201)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * This driver supports the Austron 2200A/2201A GPS Receiver with
- * Buffered RS-232-C Interface Module. Note that the original 2200/2201
- * receivers will not work reliably with this driver, since the older
- * design cannot accept input commands at any reasonable data rate.
- *
- * The program sends a "*toc\r" to the radio and expects a response of
- * the form "yy:ddd:hh:mm:ss.mmm\r" where yy = year of century, ddd =
- * day of year, hh:mm:ss = second of day and mmm = millisecond of
- * second. Then, it sends statistics commands to the radio and expects
- * a multi-line reply showing the corresponding statistics or other
- * selected data. Statistics commands are sent in order as determined by
- * a vector of commands; these might have to be changed with different
- * radio options. If flag4 of the fudge configuration command is set to
- * 1, the statistics data are written to the clockstats file for later
- * processing.
- *
- * In order for this code to work, the radio must be placed in non-
- * interactive mode using the "off" command and with a single <cr>
- * response using the "term cr" command. The setting of the "echo"
- * and "df" commands does not matter. The radio should select UTC
- * timescale using the "ts utc" command.
- *
- * There are two modes of operation for this driver. The first with
- * default configuration is used with stock kernels and serial-line
- * drivers and works with almost any machine. In this mode the driver
- * assumes the radio captures a timestamp upon receipt of the "*" that
- * begins the driver query. Accuracies in this mode are in the order of
- * a millisecond or two and the receiver can be connected to only one
- * host.
- *
- * The second mode of operation can be used for SunOS kernels that have
- * been modified with the ppsclock streams module included in this
- * distribution. The mode is enabled if flag3 of the fudge configuration
- * command has been set to 1. In this mode a precise timestamp is
- * available using a gadget box and 1-pps signal from the receiver. This
- * improves the accuracy to the order of a few tens of microseconds. In
- * addition, the serial output and 1-pps signal can be bussed to more
- * than one hosts, but only one of them should be connected to the
- * radio input data line.
- */
-
-/*
- * GPS Definitions
- */
-#define SMAX 200 /* statistics buffer length */
-#define DEVICE "/dev/gps%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS\0" /* reference ID */
-#define DESCRIPTION "Austron 2201A GPS Receiver" /* WRU */
-
-#define LENTOC 19 /* yy:ddd:hh:mm:ss.mmm timecode lngth */
-
-/*
- * AS2201 unit control structure.
- */
-struct as2201unit {
- char *lastptr; /* statistics buffer pointer */
- char stats[SMAX]; /* statistics buffer */
- int linect; /* count of lines remaining */
- int index; /* current statistics command */
-};
-
-/*
- * Radio commands to extract statitistics
- *
- * A command consists of an ASCII string terminated by a <cr> (\r). The
- * command list consist of a sequence of commands terminated by a null
- * string ("\0"). One command from the list is sent immediately
- * following each received timecode (*toc\r command) and the ASCII
- * strings received from the radio are saved along with the timecode in
- * the clockstats file. Subsequent commands are sent at each timecode,
- * with the last one in the list followed by the first one. The data
- * received from the radio consist of ASCII strings, each terminated by
- * a <cr> (\r) character. The number of strings for each command is
- * specified as the first line of output as an ASCII-encode number. Note
- * that the ETF command requires the Input Buffer Module and the LORAN
- * commands require the LORAN Assist Module. However, if these modules
- * are not installed, the radio and this driver will continue to operate
- * successfuly, but no data will be captured for these commands.
- */
-static char stat_command[][30] = {
- "ITF\r", /* internal time/frequency */
- "ETF\r", /* external time/frequency */
- "LORAN ENSEMBLE\r", /* GPS/LORAN ensemble statistics */
- "LORAN TDATA\r", /* LORAN signal data */
- "ID;OPT;VER\r", /* model; options; software version */
-
- "ITF\r", /* internal time/frequency */
- "ETF\r", /* external time/frequency */
- "LORAN ENSEMBLE\r", /* GPS/LORAN ensemble statistics */
- "TRSTAT\r", /* satellite tracking status */
- "POS;PPS;PPSOFF\r", /* position, pps source, offsets */
-
- "ITF\r", /* internal time/frequency */
- "ETF\r", /* external time/frequency */
- "LORAN ENSEMBLE\r", /* GPS/LORAN ensemble statistics */
- "LORAN TDATA\r", /* LORAN signal data */
- "UTC\r", /* UTC leap info */
-
- "ITF\r", /* internal time/frequency */
- "ETF\r", /* external time/frequency */
- "LORAN ENSEMBLE\r", /* GPS/LORAN ensemble statistics */
- "TRSTAT\r", /* satellite tracking status */
- "OSC;ET;TEMP\r", /* osc type; tune volts; oven temp */
- "\0" /* end of table */
-};
-
-/*
- * Function prototypes
- */
-static int as2201_start P((int, struct peer *));
-static void as2201_shutdown P((int, struct peer *));
-static void as2201_receive P((struct recvbuf *));
-static void as2201_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_as2201 = {
- as2201_start, /* start up driver */
- as2201_shutdown, /* shut down driver */
- as2201_poll, /* transmit poll message */
- noentry, /* not used (old as2201_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old as2201_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * as2201_start - open the devices and initialize data for processing
- */
-static int
-as2201_start(
- int unit,
- struct peer *peer
- )
-{
- register struct as2201unit *up;
- struct refclockproc *pp;
- int fd;
- char gpsdev[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(gpsdev, DEVICE, unit);
- if (!(fd = refclock_open(gpsdev, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct as2201unit *)
- emalloc(sizeof(struct as2201unit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct as2201unit));
- pp = peer->procptr;
- pp->io.clock_recv = as2201_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- peer->burst = NSTAGE;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->lastptr = up->stats;
- up->index = 0;
- return (1);
-}
-
-
-/*
- * as2201_shutdown - shut down the clock
- */
-static void
-as2201_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct as2201unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct as2201unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * as2201__receive - receive data from the serial interface
- */
-static void
-as2201_receive(
- struct recvbuf *rbufp
- )
-{
- register struct as2201unit *up;
- struct refclockproc *pp;
- struct peer *peer;
- l_fp trtmp;
-
- /*
- * Initialize pointers and read the timecode and timestamp.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct as2201unit *)pp->unitptr;
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-#ifdef DEBUG
- if (debug)
- printf("gps: timecode %d %d %s\n",
- up->linect, pp->lencode, pp->a_lastcode);
-#endif
- if (pp->lencode == 0)
- return;
-
- /*
- * If linect is greater than zero, we must be in the middle of a
- * statistics operation, so simply tack the received data at the
- * end of the statistics string. If not, we could either have
- * just received the timecode itself or a decimal number
- * indicating the number of following lines of the statistics
- * reply. In the former case, write the accumulated statistics
- * data to the clockstats file and continue onward to process
- * the timecode; in the later case, save the number of lines and
- * quietly return.
- */
- if (pp->sloppyclockflag & CLK_FLAG2)
- pp->lastrec = trtmp;
- if (up->linect > 0) {
- up->linect--;
- if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2)
- return;
- *up->lastptr++ = ' ';
- (void)strcpy(up->lastptr, pp->a_lastcode);
- up->lastptr += pp->lencode;
- return;
- } else {
- if (pp->lencode == 1) {
- up->linect = atoi(pp->a_lastcode);
- return;
- } else {
- record_clock_stats(&peer->srcadr, up->stats);
-#ifdef DEBUG
- if (debug)
- printf("gps: stat %s\n", up->stats);
-#endif
- }
- }
- up->lastptr = up->stats;
- *up->lastptr = '\0';
-
- /*
- * 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.
- */
- if (pp->lencode < LENTOC) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Timecode format: "yy:ddd:hh:mm:ss.mmm"
- */
- 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).
- */
- if (pp->a_lastcode[2] != ':')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /*
- * If CLK_FLAG4 is set, initialize the statistics buffer and
- * send the next command. If not, simply write the timecode to
- * the clockstats file.
- */
- (void)strcpy(up->lastptr, pp->a_lastcode);
- up->lastptr += pp->lencode;
- if (pp->sloppyclockflag & CLK_FLAG4) {
- *up->lastptr++ = ' ';
- (void)strcpy(up->lastptr, stat_command[up->index]);
- up->lastptr += strlen(stat_command[up->index]);
- up->lastptr--;
- *up->lastptr = '\0';
- (void)write(pp->io.fd, stat_command[up->index],
- strlen(stat_command[up->index]));
- up->index++;
- if (*stat_command[up->index] == '\0')
- up->index = 0;
- }
-}
-
-
-/*
- * as2201_poll - called by the transmit procedure
- *
- * We go to great pains to avoid changing state here, since there may be
- * more than one eavesdropper receiving the same timecode.
- */
-static void
-as2201_poll(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
-
- /*
- * Send a "\r*toc\r" to get things going. We go to great pains
- * to avoid changing state, since there may be more than one
- * eavesdropper watching the radio.
- */
- pp = peer->procptr;
- if (write(pp->io.fd, "\r*toc\r", 6) != 6) {
- refclock_report(peer, CEVNT_FAULT);
- } else {
- pp->polls++;
- if (!(pp->sloppyclockflag & CLK_FLAG2))
- get_systime(&pp->lastrec);
- }
- if (peer->burst > 0)
- return;
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- refclock_receive(peer);
- peer->burst = NSTAGE;
-}
-
-#else
-int refclock_as2201_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_atom.c b/contrib/ntp/ntpd/refclock_atom.c
deleted file mode 100644
index 51153ae..0000000
--- a/contrib/ntp/ntpd/refclock_atom.c
+++ /dev/null
@@ -1,504 +0,0 @@
-
-/*
- * refclock_atom - clock driver for 1-pps signals
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#if defined(REFCLOCK) && defined(CLOCK_ATOM)
-
-#ifdef HAVE_PPSAPI
-# ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
-# else
-# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
-# endif
-# endif
-#endif /* HAVE_PPSAPI */
-
-/*
- * This driver furnishes an interface for pulse-per-second (PPS) signals
- * produced by a cesium clock, timing receiver or related equipment. It
- * can be used to remove accumulated jitter and retime a secondary
- * server when synchronized to a primary server over a congested, wide-
- * area network and before redistributing the time to local clients.
- *
- * Before this driver becomes active, the local clock must be set to
- * within +-500 ms by another means, such as a radio clock or NTP
- * itself. There are two ways to connect the PPS signal, normally at TTL
- * levels, to the computer. One is to shift to EIA levels and connect to
- * pin 8 (DCD) of a serial port. This requires a level converter and
- * may require a one-shot flipflop to lengthen the pulse. The other is
- * to connect the PPS signal directly to pin 10 (ACK) of a PC paralell
- * port. These methods are architecture dependent.
- *
- * Both methods require a modified device driver and kernel interface
- * compatible with the Pulse-per-Second API for Unix-like Operating
- * Systems, Version 1.0, RFC-2783 (PPSAPI). Implementations are
- * available for FreeBSD, Linux, SunOS, Solaris and Alpha. However, at
- * present only the Alpha implementation provides the full generality of
- * the API with multiple PPS drivers and multiple handles per driver.
- *
- * In many configurations a single port is used for the radio timecode
- * and PPS signal. In order to provide for this configuration and others
- * involving dedicated multiple serial/parallel ports, the driver first
- * attempts to open the device /dev/pps%d, where %d is the unit number.
- * If this fails, the driver attempts to open the device specified by
- * the pps configuration command. If a port is to be shared, the pps
- * command must be placed before the radio device(s) and the radio
- * device(s) must be placed before the PPS driver(s) in the
- * configuration file.
- *
- * This driver normally uses the PLL/FLL clock discipline implemented in
- * the ntpd code. If kernel support is available, the kernel PLL/FLL
- * clock discipline is used instead. The default configuration is not to
- * use the kernel PPS discipline, if present. The kernel PPS discipline
- * can be enabled using the pps command.
- *
- * Fudge Factors
- *
- * There are no special fudge factors other than the generic. The fudge
- * time1 parameter can be used to compensate for miscellaneous device
- * driver and OS delays.
- */
-/*
- * Interface definitions
- */
-#ifdef HAVE_PPSAPI
-#define DEVICE "/dev/pps%d" /* device name and unit */
-#endif /* HAVE_PPSAPI */
-
-#define PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "PPS\0" /* reference ID */
-#define DESCRIPTION "PPS Clock Discipline" /* WRU */
-#define NANOSECOND 1000000000 /* one second (ns) */
-#define RANGEGATE 500000 /* range gate (ns) */
-#define ASTAGE 8 /* filter stages */
-
-static struct peer *pps_peer; /* atom driver for PPS sources */
-
-#ifdef HAVE_PPSAPI
-/*
- * PPS unit control structure
- */
-struct ppsunit {
- struct timespec ts; /* last timestamp */
- int fddev; /* pps device descriptor */
- pps_params_t pps_params; /* pps parameters */
- pps_info_t pps_info; /* last pps data */
- pps_handle_t handle; /* pps handlebars */
-};
-#endif /* HAVE_PPSAPI */
-
-/*
- * Function prototypes
- */
-static int atom_start P((int, struct peer *));
-static void atom_poll P((int, struct peer *));
-#ifdef HAVE_PPSAPI
-static void atom_shutdown P((int, struct peer *));
-static void atom_control P((int, struct refclockstat *, struct
- refclockstat *, struct peer *));
-static int atom_pps P((struct peer *));
-static int atom_ppsapi P((struct peer *, int, int));
-#endif /* HAVE_PPSAPI */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_atom = {
- atom_start, /* start up driver */
-#ifdef HAVE_PPSAPI
- atom_shutdown, /* shut down driver */
-#else
- noentry, /* shut down driver */
-#endif /* HAVE_PPSAPI */
- atom_poll, /* transmit poll message */
-#ifdef HAVE_PPSAPI
- atom_control, /* fudge control */
-#else
- noentry, /* fudge control */
-#endif /* HAVE_PPSAPI */
- noentry, /* initialize driver */
- noentry, /* not used (old atom_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * atom_start - initialize data for processing
- */
-static int
-atom_start(
- int unit, /* unit number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
-#ifdef HAVE_PPSAPI
- register struct ppsunit *up;
- char device[80];
-#endif /* HAVE_PPSAPI */
-
- /*
- * Allocate and initialize unit structure
- */
- pps_peer = peer;
- pp = peer->procptr;
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- pp->stratum = STRATUM_UNSPEC;
- memcpy((char *)&pp->refid, REFID, 4);
- peer->burst = ASTAGE;
-#ifdef HAVE_PPSAPI
- up = emalloc(sizeof(struct ppsunit));
- memset(up, 0, sizeof(struct ppsunit));
- pp->unitptr = (caddr_t)up;
-
- /*
- * Open PPS device. If this fails and some driver has already
- * opened the associated radio device, fdpps has the file
- * descriptor for it.
- */
- sprintf(device, DEVICE, unit);
- up->fddev = open(device, O_RDWR, 0777);
- if (up->fddev <= 0 && fdpps > 0) {
- strcpy(device, pps_device);
- up->fddev = fdpps;
- }
- if (up->fddev <= 0) {
- msyslog(LOG_ERR,
- "refclock_atom: %s: %m", device);
- return (0);
- }
-
- /*
- * Light off the PPSAPI interface. If this PPS device is shared
- * with the radio device, take the default options from the pps
- * command. This is for legacy purposes.
- */
- if (time_pps_create(up->fddev, &up->handle) < 0) {
- msyslog(LOG_ERR,
- "refclock_atom: time_pps_create failed: %m");
- return (0);
- }
- return (atom_ppsapi(peer, 0, 0));
-#else /* HAVE_PPSAPI */
- return (1);
-#endif /* HAVE_PPSAPI */
-}
-
-
-#ifdef HAVE_PPSAPI
-/*
- * atom_control - fudge control
- */
-static void
-atom_control(
- int unit, /* unit (not used */
- struct refclockstat *in, /* input parameters (not uded) */
- struct refclockstat *out, /* output parameters (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
- atom_ppsapi(peer, pp->sloppyclockflag & CLK_FLAG2,
- pp->sloppyclockflag & CLK_FLAG3);
-}
-
-
-/*
- * Initialize PPSAPI
- */
-int
-atom_ppsapi(
- struct peer *peer, /* peer structure pointer */
- int enb_clear, /* clear enable */
- int enb_hardpps /* hardpps enable */
- )
-{
- struct refclockproc *pp;
- register struct ppsunit *up;
- int capability;
-
- pp = peer->procptr;
- up = (struct ppsunit *)pp->unitptr;
- if (time_pps_getcap(up->handle, &capability) < 0) {
- msyslog(LOG_ERR,
- "refclock_atom: time_pps_getcap failed: %m");
- return (0);
- }
- memset(&up->pps_params, 0, sizeof(pps_params_t));
- if (enb_clear)
- up->pps_params.mode = capability & PPS_CAPTURECLEAR;
- else
- up->pps_params.mode = capability & PPS_CAPTUREASSERT;
- if (!up->pps_params.mode) {
- msyslog(LOG_ERR,
- "refclock_atom: invalid capture edge %d",
- enb_clear);
- return (0);
- }
- up->pps_params.mode |= PPS_TSFMT_TSPEC;
- if (time_pps_setparams(up->handle, &up->pps_params) < 0) {
- msyslog(LOG_ERR,
- "refclock_atom: time_pps_setparams failed: %m");
- return (0);
- }
- if (enb_hardpps) {
- if (time_pps_kcbind(up->handle, PPS_KC_HARDPPS,
- up->pps_params.mode & ~PPS_TSFMT_TSPEC,
- PPS_TSFMT_TSPEC) < 0) {
- msyslog(LOG_ERR,
- "refclock_atom: time_pps_kcbind failed: %m");
- return (0);
- }
- pps_enable = 1;
- }
-#if DEBUG
- if (debug) {
- time_pps_getparams(up->handle, &up->pps_params);
- printf(
- "refclock_ppsapi: fd %d capability 0x%x version %d mode 0x%x kern %d\n",
- up->fddev, capability, up->pps_params.api_version,
- up->pps_params.mode, enb_hardpps);
- }
-#endif
- return (1);
-}
-
-
-/*
- * atom_shutdown - shut down the clock
- */
-static void
-atom_shutdown(
- int unit, /* unit number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- register struct ppsunit *up;
-
- pp = peer->procptr;
- up = (struct ppsunit *)pp->unitptr;
- if (up->fddev > 0)
- close(up->fddev);
- if (up->handle != 0)
- time_pps_destroy(up->handle);
- if (pps_peer == peer)
- pps_peer = 0;
- free(up);
-}
-
-
-/*
- * atom_pps - receive data from the PPSAPI interface
- *
- * This routine is called once per second when the PPSAPI interface is
- * present. It snatches the PPS timestamp from the kernel and saves the
- * sign-extended fraction in a circular buffer for processing at the
- * next poll event.
- */
-static int
-atom_pps(
- struct peer *peer /* peer structure pointer */
- )
-{
- register struct ppsunit *up;
- struct refclockproc *pp;
- pps_info_t pps_info;
- struct timespec timeout, ts;
- double dtemp;
-
- /*
- * Convert the timespec nanoseconds field to signed double and
- * save in the median filter. for billboards. No harm is done if
- * previous data are overwritten. If the discipline comes bum or
- * the data grow stale, just forget it. A range gate rejects new
- * samples if less than a jiggle time from the next second.
- */
- pp = peer->procptr;
- up = (struct ppsunit *)pp->unitptr;
- if (up->handle == 0)
- return (-1);
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
- memcpy(&pps_info, &up->pps_info, sizeof(pps_info_t));
- if (time_pps_fetch(up->handle, PPS_TSFMT_TSPEC, &up->pps_info,
- &timeout) < 0)
- return (-1);
- if (up->pps_params.mode & PPS_CAPTUREASSERT) {
- if (pps_info.assert_sequence ==
- up->pps_info.assert_sequence)
- return (1);
- ts = up->pps_info.assert_timestamp;
- } else if (up->pps_params.mode & PPS_CAPTURECLEAR) {
- if (pps_info.clear_sequence ==
- up->pps_info.clear_sequence)
- return (1);
- ts = up->pps_info.clear_timestamp;
- } else {
- return (-1);
- }
- if (!((ts.tv_sec == up->ts.tv_sec && ts.tv_nsec -
- up->ts.tv_nsec > NANOSECOND - RANGEGATE) ||
- (ts.tv_sec - up->ts.tv_sec == 1 && ts.tv_nsec -
- up->ts.tv_nsec < RANGEGATE))) {
- up->ts = ts;
- return (1);
- }
- up->ts = ts;
- pp->lastrec.l_ui = ts.tv_sec + JAN_1970;
- dtemp = ts.tv_nsec * FRAC / 1e9;
- if (dtemp >= FRAC)
- pp->lastrec.l_ui++;
- pp->lastrec.l_uf = (u_int32)dtemp;
- if (ts.tv_nsec > NANOSECOND / 2)
- ts.tv_nsec -= NANOSECOND;
- dtemp = -(double)ts.tv_nsec / NANOSECOND;
- SAMPLE(dtemp + pp->fudgetime1);
-#ifdef DEBUG
- if (debug > 1)
- printf("atom_pps %f %f\n", dtemp, pp->fudgetime1);
-#endif
- return (0);
-}
-#endif /* HAVE_PPSAPI */
-
-
-/*
- * pps_sample - receive PPS data from some other clock driver
- *
- * This routine is called once per second when the external clock driver
- * processes PPS information. It processes the PPS timestamp and saves
- * the sign-extended fraction in a circular buffer for processing at the
- * next poll event. This works only for a single PPS device.
- */
-int
-pps_sample(
- l_fp *offset /* PPS offset */
- )
-{
- register struct peer *peer;
- struct refclockproc *pp;
- l_fp lftmp;
- double doffset;
-
- peer = pps_peer;
- if (peer == 0) /* nobody home */
- return (1);
- pp = peer->procptr;
-
- /*
- * Convert the timeval to l_fp and save for billboards. Sign-
- * extend the fraction and stash in the buffer. No harm is done
- * if previous data are overwritten. If the discipline comes bum
- * or the data grow stale, just forget it.
- */
- pp->lastrec = *offset;
- L_CLR(&lftmp);
- L_ADDF(&lftmp, pp->lastrec.l_f);
- LFPTOD(&lftmp, doffset);
- SAMPLE(-doffset + pp->fudgetime1);
- return (0);
-}
-
-/*
- * atom_poll - called by the transmit procedure
- *
- * This routine is called once per second when in burst mode to save PPS
- * sample offsets in the median filter. At the end of the burst period
- * the samples are processed as a heap and the clock filter updated.
- */
-static void
-atom_poll(
- int unit, /* unit number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
-#ifdef HAVE_PPSAPI
- int err;
-#endif /* HAVE_PPSAPI */
-
- /*
- * Accumulate samples in the median filter. If a noise sample,
- * return with no prejudice; if a protocol error, get mean;
- * otherwise, cool. At the end of each poll interval, do a
- * little bookeeping and process the surviving samples.
- */
- pp = peer->procptr;
- pp->polls++;
-#ifdef HAVE_PPSAPI
- err = atom_pps(peer);
- if (err < 0) {
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
-#endif /* HAVE_PPSAPI */
-
- /*
- * Valid time is returned only if the prefer peer has survived
- * the intersection algorithm and within clock_max of local time
- * and not too long ago. This ensures the PPS time is within
- * +-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, unless overriden by a fudge command.
- */
- if (peer->burst > 0)
- return;
- peer->leap = LEAP_NOTINSYNC;
- if (pp->codeproc == pp->coderecv) {
- refclock_report(peer, CEVNT_TIMEOUT);
- peer->burst = ASTAGE;
- return;
-
- } else if (sys_prefer == NULL) {
- pp->codeproc = pp->coderecv;
- peer->burst = ASTAGE;
- return;
-
- } else if (fabs(sys_prefer->offset) > clock_max) {
- pp->codeproc = pp->coderecv;
- peer->burst = ASTAGE;
- return;
- }
- 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 = addr2refid(&sys_prefer->srcadr);
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- peer->burst = ASTAGE;
-}
-#else
-int refclock_atom_bs;
-int
-pps_sample(
- l_fp *offset /* PPS offset */
- )
-{
- return 1;
-}
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_bancomm.c b/contrib/ntp/ntpd/refclock_bancomm.c
deleted file mode 100644
index a63be44..0000000
--- a/contrib/ntp/ntpd/refclock_bancomm.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/* refclock_bancomm.c - clock driver for the Datum/Bancomm bc635VME
- * Time and Frequency Processor. It requires the BANCOMM bc635VME/
- * bc350VXI Time and Frequency Processor Module Driver for SunOS4.x
- * and SunOS5.x UNIX Systems. It has been tested on a UltraSparc
- * IIi-cEngine running Solaris 2.6.
- *
- * Author(s): Ganesh Ramasivan & Gary Cliff, Computing Devices Canada,
- * Ottawa, Canada
- *
- * Date: July 1999
- *
- * Note(s): The refclock type has been defined as 16.
- *
- * This program has been modelled after the Bancomm driver
- * originally written by R. Schmidt of Time Service, U.S.
- * Naval Observatory for a HP-UX machine. Since the original
- * authors no longer plan to maintain this code, all
- * references to the HP-UX vme2 driver subsystem bave been
- * removed. Functions vme_report_event(), vme_receive(),
- * vme_control() and vme_buginfo() have been deleted because
- * they are no longer being used.
- *
- * The time on the bc635 TFP must be set to GMT due to the
- * fact that NTP makes use of GMT for all its calculations.
- *
- * Installation of the Datum/Bancomm driver creates the
- * device file /dev/btfp0
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_BANC)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-
-/* STUFF BY RES */
-struct btfp_time /* Structure for reading 5 time words */
- /* in one ioctl(2) operation. */
-{
- unsigned short btfp_time[5]; /* Time words 0,1,2,3, and 4. (16bit)*/
-};
-
-/* SunOS5 ioctl commands definitions.*/
-#define BTFPIOC ( 'b'<< 8 )
-#define IOCIO( l, n ) ( BTFPIOC | n )
-#define IOCIOR( l, n, s ) ( BTFPIOC | n )
-#define IOCIORN( l, n, s ) ( BTFPIOC | n )
-#define IOCIOWN( l, n, s ) ( BTFPIOC | n )
-
-/***** Simple ioctl commands *****/
-#define RUNLOCK IOCIOR(b, 19, int ) /* Release Capture Lockout */
-#define RCR0 IOCIOR(b, 22, int ) /* Read control register zero.*/
-#define WCR0 IOCIOWN(b, 23, int) /* Write control register zero*/
-
-/***** Compound ioctl commands *****/
-
-/* Read all 5 time words in one call. */
-#define READTIME IOCIORN(b, 32, sizeof( struct btfp_time ))
-#define VMEFD "/dev/btfp0"
-
-struct vmedate { /* structure returned by get_vmetime.c */
- unsigned short year;
- unsigned short day;
- unsigned short hr;
- unsigned short mn;
- unsigned short sec;
- unsigned long frac;
- unsigned short status;
-};
-
-/* END OF STUFF FROM RES */
-
-/*
- * VME interface parameters.
- */
-#define VMEPRECISION (-21) /* precision assumed (1 us) */
-#define USNOREFID "BTFP" /* or whatever */
-#define VMEREFID "BTFP" /* reference id */
-#define VMEDESCRIPTION "Bancomm bc635 TFP" /* who we are */
-#define VMEHSREFID 0x7f7f1000 /* 127.127.16.00 refid hi strata */
-/* clock type 16 is used here */
-#define GMT 0 /* hour offset from Greenwich */
-
-/*
- * Imported from ntp_timer module
- */
-extern u_long current_time; /* current time(s) */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * VME unit control structure.
- * Changes made to vmeunit structure. Most members are now available in the
- * new refclockproc structure in ntp_refclock.h - 07/99 - Ganesh Ramasivan
- */
-struct vmeunit {
- struct vmedate vmedata; /* data returned from vme read */
- u_long lasttime; /* last time clock heard from */
-};
-
-/*
- * Function prototypes
- */
-static void vme_init (void);
-static int vme_start (int, struct peer *);
-static void vme_shutdown (int, struct peer *);
-static void vme_receive (struct recvbuf *);
-static void vme_poll (int unit, struct peer *);
-struct vmedate *get_datumtime(struct vmedate *);
-
-/*
- * Transfer vector
- */
-struct refclock refclock_bancomm = {
- vme_start, /* start up driver */
- vme_shutdown, /* shut down driver */
- vme_poll, /* transmit poll message */
- noentry, /* not used (old vme_control) */
- noentry, /* initialize driver */
- noentry, /* not used (old vme_buginfo) */
- NOFLAGS /* not used */
-};
-
-int fd_vme; /* file descriptor for ioctls */
-int regvalue;
-
-
-/*
- * vme_start - open the VME device and initialize data for processing
- */
-static int
-vme_start(
- int unit,
- struct peer *peer
- )
-{
- register struct vmeunit *vme;
- struct refclockproc *pp;
- int dummy;
- char vmedev[20];
-
- /*
- * Open VME device
- */
-#ifdef DEBUG
-
- printf("Opening DATUM VME DEVICE \n");
-#endif
- if ( (fd_vme = open(VMEFD, O_RDWR)) < 0) {
- msyslog(LOG_ERR, "vme_start: failed open of %s: %m", vmedev);
- return (0);
- }
- else { /* Release capture lockout in case it was set from before. */
- if( ioctl( fd_vme, RUNLOCK, &dummy ) )
- msyslog(LOG_ERR, "vme_start: RUNLOCK failed %m");
-
- regvalue = 0; /* More esoteric stuff to do... */
- if( ioctl( fd_vme, WCR0, &regvalue ) )
- msyslog(LOG_ERR, "vme_start: WCR0 failed %m");
- }
-
- /*
- * Allocate unit structure
- */
- vme = (struct vmeunit *)emalloc(sizeof(struct vmeunit));
- bzero((char *)vme, sizeof(struct vmeunit));
-
-
- /*
- * Set up the structures
- */
- pp = peer->procptr;
- pp->unitptr = (caddr_t) vme;
- pp->timestarted = current_time;
-
- pp->io.clock_recv = vme_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd_vme;
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success. Note that root delay and root dispersion are
- * always zero for this clock.
- */
- peer->precision = VMEPRECISION;
- memcpy(&pp->refid, USNOREFID,4);
- return (1);
-}
-
-
-/*
- * vme_shutdown - shut down a VME clock
- */
-static void
-vme_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct vmeunit *vme;
- struct refclockproc *pp;
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- pp = peer->procptr;
- vme = (struct vmeunit *)pp->unitptr;
- io_closeclock(&pp->io);
- pp->unitptr = NULL;
- free(vme);
-}
-
-
-/*
- * vme_receive - receive data from the VME device.
- *
- * Note: This interface would be interrupt-driven. We don't use that
- * now, but include a dummy routine for possible future adventures.
- */
-static void
-vme_receive(
- struct recvbuf *rbufp
- )
-{
-}
-
-
-/*
- * vme_poll - called by the transmit procedure
- */
-static void
-vme_poll(
- int unit,
- struct peer *peer
- )
-{
- struct vmedate *tptr;
- struct vmeunit *vme;
- struct refclockproc *pp;
- time_t tloc;
- struct tm *tadr;
-
- pp = peer->procptr;
- vme = (struct vmeunit *)pp->unitptr; /* Here is the structure */
-
- tptr = &vme->vmedata;
- if ((tptr = get_datumtime(tptr)) == NULL ) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- get_systime(&pp->lastrec);
- pp->polls++;
- vme->lasttime = current_time;
-
- /*
- * Get VME time and convert to timestamp format.
- * The year must come from the system clock.
- */
-
- time(&tloc);
- tadr = gmtime(&tloc);
- tptr->year = (unsigned short)(tadr->tm_year + 1900);
-
-
- sprintf(pp->a_lastcode,
- "%3.3d %2.2d:%2.2d:%2.2d.%.6ld %1d",
- tptr->day,
- tptr->hr,
- tptr->mn,
- tptr->sec,
- tptr->frac,
- tptr->status);
-
- pp->lencode = (u_short) strlen(pp->a_lastcode);
-
- pp->day = tptr->day;
- pp->hour = tptr->hr;
- pp->minute = tptr->mn;
- pp->second = tptr->sec;
- pp->usec = tptr->frac;
-
-#ifdef DEBUG
- if (debug)
- printf("pp: %3d %02d:%02d:%02d.%06ld %1x\n",
- pp->day, pp->hour, pp->minute, pp->second,
- pp->usec, tptr->status);
-#endif
- if (tptr->status ) { /* Status 0 is locked to ref., 1 is not */
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present. If an error in conversion to internal
- * format is found, the program declares bad data and exits.
- * Note that this code does not yet know how to do the years and
- * relies on the clock-calendar chip for sanity.
- */
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-}
-
-struct vmedate *
-get_datumtime(struct vmedate *time_vme)
-{
- unsigned short status;
- char cbuf[7];
- struct btfp_time vts;
-
- if ( time_vme == (struct vmedate *)NULL) {
- time_vme = (struct vmedate *)malloc(sizeof(struct vmedate ));
- }
-
- if( ioctl(fd_vme, READTIME, &vts))
- msyslog(LOG_ERR, "get_datumtime error: %m");
-
- /* if you want to actually check the validity of these registers, do a
- define of CHECK above this. I didn't find it necessary. - RES
- */
-
-#ifdef CHECK
-
- /* Get day */
- sprintf(cbuf,"%3.3x", ((vts.btfp_time[ 0 ] & 0x000f) <<8) +
- ((vts.btfp_time[ 1 ] & 0xff00) >> 8));
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]) && isdigit(cbuf[2]) )
- time_vme->day = (unsigned short)atoi(cbuf);
- else
- time_vme->day = (unsigned short) 0;
-
- /* Get hour */
- sprintf(cbuf,"%2.2x", vts.btfp_time[ 1 ] & 0x00ff);
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]))
- time_vme->hr = (unsigned short)atoi(cbuf);
- else
- time_vme->hr = (unsigned short) 0;
-
- /* Get minutes */
- sprintf(cbuf,"%2.2x", (vts.btfp_time[ 2 ] & 0xff00) >>8);
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]))
- time_vme->mn = (unsigned short)atoi(cbuf);
- else
- time_vme->mn = (unsigned short) 0;
-
- /* Get seconds */
- sprintf(cbuf,"%2.2x", vts.btfp_time[ 2 ] & 0x00ff);
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]))
- time_vme->sec = (unsigned short)atoi(cbuf);
- else
- time_vme->sec = (unsigned short) 0;
-
- /* Get microseconds. Yes, we ignore the 0.1 microsecond digit so we can
- use the TVTOTSF function later on...*/
-
- sprintf(cbuf,"%4.4x%2.2x", vts.btfp_time[ 3 ],
- vts.btfp_time[ 4 ]>>8);
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]) && isdigit(cbuf[2])
- && isdigit(cbuf[3]) && isdigit(cbuf[4]) && isdigit(cbuf[5]))
- time_vme->frac = (u_long) atoi(cbuf);
- else
- time_vme->frac = (u_long) 0;
-#else
-
- /* DONT CHECK just trust the card */
-
- /* Get day */
- sprintf(cbuf,"%3.3x", ((vts.btfp_time[ 0 ] & 0x000f) <<8) +
- ((vts.btfp_time[ 1 ] & 0xff00) >> 8));
- time_vme->day = (unsigned short)atoi(cbuf);
-
- /* Get hour */
- sprintf(cbuf,"%2.2x", vts.btfp_time[ 1 ] & 0x00ff);
-
- time_vme->hr = (unsigned short)atoi(cbuf);
-
- /* Get minutes */
- sprintf(cbuf,"%2.2x", (vts.btfp_time[ 2 ] & 0xff00) >>8);
- time_vme->mn = (unsigned short)atoi(cbuf);
-
- /* Get seconds */
- sprintf(cbuf,"%2.2x", vts.btfp_time[ 2 ] & 0x00ff);
- time_vme->sec = (unsigned short)atoi(cbuf);
-
- /* Get microseconds. Yes, we ignore the 0.1 microsecond digit so we can
- use the TVTOTSF function later on...*/
-
- sprintf(cbuf,"%4.4x%2.2x", vts.btfp_time[ 3 ],
- vts.btfp_time[ 4 ]>>8);
-
- time_vme->frac = (u_long) atoi(cbuf);
-
-#endif /* CHECK */
-
- /* Get status bit */
- status = (vts.btfp_time[0] & 0x0010) >>4;
- time_vme->status = status; /* Status=0 if locked to ref. */
- /* Status=1 if flywheeling */
- if (status) { /* lost lock ? */
- return ((void *)NULL);
- }
- else
- return (time_vme);
-}
-
-#else
-int refclock_bancomm_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_chronolog.c b/contrib/ntp/ntpd/refclock_chronolog.c
deleted file mode 100644
index a1d131e..0000000
--- a/contrib/ntp/ntpd/refclock_chronolog.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * refclock_chronolog - clock driver for Chronolog K-series WWVB receiver.
- */
-
-/*
- * Must interpolate back to local time. Very annoying.
- */
-#define GET_LOCALTIME
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_CHRONOLOG)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * This driver supports the Chronolog K-series WWVB receiver.
- *
- * Input format:
- *
- * Y YY/MM/DD<cr><lf>
- * Z hh:mm:ss<cr><lf>
- *
- * YY/MM/DD -- what you'd expect. This arrives a few seconds before the
- * timestamp.
- * hh:mm:ss -- what you'd expect. We take time on the <cr>.
- *
- * Our Chronolog writes time out at 2400 bps 8/N/1, but it can be configured
- * otherwise. The clock seems to appear every 60 seconds, which doesn't make
- * for good statistics collection.
- *
- * The original source of this module was the WWVB module.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/chronolog%d" /* device name and unit */
-#define SPEED232 B2400 /* uart speed (2400 baud) */
-#define PRECISION (-13) /* precision assumed (about 100 us) */
-#define REFID "chronolog" /* reference ID */
-#define DESCRIPTION "Chrono-log K" /* WRU */
-
-#define MONLIN 15 /* number of monitoring lines */
-
-/*
- * Chrono-log unit control structure
- */
-struct chronolog_unit {
- u_char tcswitch; /* timecode switch */
- l_fp laststamp; /* last receive timestamp */
- u_char lasthour; /* last hour (for monitor) */
- int year; /* Y2K-adjusted year */
- int day; /* day-of-month */
- int month; /* month-of-year */
-};
-
-/*
- * Function prototypes
- */
-static int chronolog_start P((int, struct peer *));
-static void chronolog_shutdown P((int, struct peer *));
-static void chronolog_receive P((struct recvbuf *));
-static void chronolog_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_chronolog = {
- chronolog_start, /* start up driver */
- chronolog_shutdown, /* shut down driver */
- chronolog_poll, /* poll the driver -- a nice fabrication */
- noentry, /* not used */
- noentry, /* not used */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-
-/*
- * chronolog_start - open the devices and initialize data for processing
- */
-static int
-chronolog_start(
- int unit,
- struct peer *peer
- )
-{
- register struct chronolog_unit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Don't bother with CLK line discipline, since
- * it's not available.
- */
- (void)sprintf(device, DEVICE, unit);
-#ifdef DEBUG
- if (debug)
- printf ("starting Chronolog with device %s\n",device);
-#endif
- if (!(fd = refclock_open(device, SPEED232, 0)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct chronolog_unit *)
- emalloc(sizeof(struct chronolog_unit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct chronolog_unit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = chronolog_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- return (1);
-}
-
-
-/*
- * chronolog_shutdown - shut down the clock
- */
-static void
-chronolog_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct chronolog_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct chronolog_unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * chronolog_receive - receive data from the serial interface
- */
-static void
-chronolog_receive(
- struct recvbuf *rbufp
- )
-{
- struct chronolog_unit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- l_fp trtmp; /* arrival timestamp */
- int hours; /* hour-of-day */
- int minutes; /* minutes-past-the-hour */
- int seconds; /* seconds */
- int temp; /* int temp */
- int got_good; /* got a good time flag */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct chronolog_unit *)pp->unitptr;
- temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-
- if (temp == 0) {
- if (up->tcswitch == 0) {
- up->tcswitch = 1;
- up->laststamp = trtmp;
- } else
- up->tcswitch = 0;
- return;
- }
- pp->lencode = temp;
- pp->lastrec = up->laststamp;
- up->laststamp = trtmp;
- up->tcswitch = 1;
-
-#ifdef DEBUG
- if (debug)
- printf("chronolog: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
-
- /*
- * We get down to business. Check the timecode format and decode
- * its contents. This code uses the first character to see whether
- * we're looking at a date or a time. We store data data across
- * calls since it is transmitted a few seconds ahead of the
- * timestamp.
- */
- got_good=0;
- if (sscanf(pp->a_lastcode, "Y %d/%d/%d", &up->year,&up->month,&up->day))
- {
- /*
- * Y2K convert the 2-digit year
- */
- up->year = up->year >= 69 ? up->year : up->year + 100;
- return;
- }
- if (sscanf(pp->a_lastcode,"Z %02d:%02d:%02d",
- &hours,&minutes,&seconds) == 3)
- {
-#ifdef GET_LOCALTIME
- struct tm local;
- struct tm *gmtp;
- time_t unixtime;
- int adjyear;
- int adjmon;
-
- /*
- * 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 = up->year;
- local.tm_mon = up->month-1;
- local.tm_mday = up->day;
- local.tm_hour = hours;
- local.tm_min = minutes;
- local.tm_sec = seconds;
- local.tm_isdst = -1;
-
- unixtime = mktime (&local);
- if ((gmtp = gmtime (&unixtime)) == NULL)
- {
- refclock_report (peer, CEVNT_FAULT);
- return;
- }
- adjyear = gmtp->tm_year+1900;
- adjmon = gmtp->tm_mon+1;
- pp->day = ymd2yd (adjyear, adjmon, gmtp->tm_mday);
- pp->hour = gmtp->tm_hour;
- pp->minute = gmtp->tm_min;
- pp->second = gmtp->tm_sec;
-#ifdef DEBUG
- if (debug)
- printf ("time is %04d/%02d/%02d %02d:%02d:%02d UTC\n",
- adjyear,adjmon,gmtp->tm_mday,pp->hour,pp->minute,
- pp->second);
-#endif
-
-#else
- /*
- * For more rational sites distributing UTC
- */
- pp->day = ymd2yd(year+1900,month,day);
- pp->hour = hours;
- pp->minute = minutes;
- pp->second = seconds;
-
-#endif
- got_good=1;
- }
-
- if (!got_good)
- return;
-
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- up->lasthour = pp->hour;
-}
-
-
-/*
- * chronolog_poll - called by the transmit procedure
- */
-static void
-chronolog_poll(
- int unit,
- struct peer *peer
- )
-{
- /*
- * Time to poll the clock. The Chrono-log clock is supposed to
- * respond to a 'T' by returning a timecode in the format(s)
- * specified above. Ours does (can?) not, but this seems to be
- * an installation-specific problem. This code is dyked out,
- * but may be re-enabled if anyone ever finds a Chrono-log that
- * actually listens to this command.
- */
-#if 0
- register struct chronolog_unit *up;
- struct refclockproc *pp;
- char pollchar;
-
- pp = peer->procptr;
- up = (struct chronolog_unit *)pp->unitptr;
- if (peer->burst == 0 && peer->reach == 0)
- refclock_report(peer, CEVNT_TIMEOUT);
- if (up->linect > 0)
- pollchar = 'R';
- else
- pollchar = 'T';
- if (write(pp->io.fd, &pollchar, 1) != 1)
- refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
-#endif
-}
-
-#else
-int refclock_chronolog_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_chu.c b/contrib/ntp/ntpd/refclock_chu.c
deleted file mode 100644
index e0c79e2..0000000
--- a/contrib/ntp/ntpd/refclock_chu.c
+++ /dev/null
@@ -1,1687 +0,0 @@
-/*
- * refclock_chu - clock driver for Canadian CHU time/frequency station
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_CHU)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <math.h>
-
-#ifdef HAVE_AUDIO
-#include "audio.h"
-#endif /* HAVE_AUDIO */
-
-#define ICOM 1 /* undefine to suppress ICOM code */
-
-#ifdef ICOM
-#include "icom.h"
-#endif /* ICOM */
-
-/*
- * Audio CHU demodulator/decoder
- *
- * This driver synchronizes the computer time using data encoded in
- * radio transmissions from Canadian time/frequency station CHU in
- * Ottawa, Ontario. 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 using this program as propagation conditions
- * change throughout the day and night.
- *
- * The driver receives, demodulates and decodes the radio signals when
- * 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.
- * Alternatively, the driver can be compiled to use the audio codec of
- * the Sun workstation or another with compatible audio drivers. In the
- * latter case, the driver implements the modem using DSP routines, so
- * the radio can be connected directly to either the microphone on line
- * input port. In either case, the driver decodes the data using a
- * maximum likelihood technique which exploits the considerable degree
- * of redundancy available to maximize accuracy and minimize errors.
- *
- * 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 bps 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.
- *
- * Format A bursts are sent at seconds 32 through 39 of the minute in
- * hex digits
- *
- * 6dddhhmmss6dddhhmmss
- *
- * The first ten digits encode a frame marker (6) followed by the day
- * (ddd), hour (hh in UTC), minute (mm) and the second (ss). Since
- * format A bursts are sent during the third decade of seconds the tens
- * digit of ss is always 3. The driver uses this to determine correct
- * burst synchronization. These digits are then repeated with the same
- * polarity.
- *
- * Format B bursts are sent at second 31 of the minute in hex digits
- *
- * xdyyyyttaaxdyyyyttaa
- *
- * The first ten digits encode a code (x described below) followed by
- * the DUT1 (d in deciseconds), Gregorian year (yyyy), difference TAI -
- * UTC (tt) and daylight time indicator (aa) peculiar to Canada. These
- * digits are then repeated with inverted polarity.
- *
- * The x is coded
- *
- * 1 Sign of DUT (0 = +)
- * 2 Leap second warning. One second will be added.
- * 4 Leap second warning. One second will be subtracted.
- * 8 Even parity bit for this nibble.
- *
- * 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 bps, 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 fudge time 1.
- *
- * Debugging aids
- *
- * 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 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
- *
- * where n is the number of characters in the burst (0-11), b the burst
- * distance (0-40), f the field alignment (-1, 0, 1), s the
- * synchronization distance (0-16), m the burst number (2-9) and code
- * the burst characters as received. Note that the hex digits in each
- * character are reversed, so the burst
- *
- * 10 38 0 16 9 06851292930685129293
- *
- * 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.
- *
- * When the audio driver is compiled, format A is preceded by
- * the current gain (0-255) and relative signal level (0-9999). The
- * receiver folume control should be set so that the gain is somewhere
- * near the middle of the range 0-255, which results in a signal level
- * near 1000.
- *
- * Following is format B:
- *
- * n b s code
- *
- * where n is the number of characters in the burst (0-11), b the burst
- * distance (0-40), s the synchronization distance (0-40) and code the
- * burst characters as received. Note that the hex digits in each
- * character are reversed and the last ten digits inverted, so the burst
- *
- * 11 40 1091891300ef6e76ecff
- *
- * 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.
- *
- * In addition to the above, the reference timecode is updated and
- * written to the clockstats file and debug score after the last burst
- * received in the minute. The format is
- *
- * qq yyyy ddd hh:mm:ss nn dd tt
- *
- * where qq are the error flags, as described below, yyyy is the year,
- * ddd the day, hh:mm:ss the time of day, nn the number of format A
- * bursts received during the previous minute, dd the decoding distance
- * and tt the number of timestamps. The error flags are cleared after
- * every update.
- *
- * Fudge factors
- *
- * 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.
- *
- * 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
- * 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
- * specifies a nonzero mode (ICOM ID select code). The C-IV speed is
- * 9600 bps if the high order 0x80 bit of the mode is zero and 1200 bps
- * if one. The C-IV trace is turned on if the debug level is greater
- * than one.
- */
-/*
- * Interface definitions
- */
-#define SPEED232 B300 /* uart speed (300 baud) */
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "CHU" /* reference ID */
-#define DEVICE "/dev/chu%d" /* device name and unit */
-#define SPEED232 B300 /* UART speed (300 baud) */
-#ifdef ICOM
-#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
-/*
- * Audio demodulator definitions
- */
-#define SECOND 8000 /* nominal sample rate (Hz) */
-#define BAUD 300 /* modulation rate (bps) */
-#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 */
-
-/*
- * Decoder definitions
- */
-#define CHAR (11. / 300.) /* character time (s) */
-#define FUDGE .185 /* offset to first stop bit (s) */
-#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 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 = */
-
-/*
- * Status bits (status)
- */
-#define RUNT 0x0001 /* runt burst */
-#define NOISE 0x0002 /* noise burst */
-#define BFRAME 0x0004 /* invalid format B frame sync */
-#define BFORMAT 0x0008 /* invalid format B data */
-#define AFRAME 0x0010 /* invalid format A frame sync */
-#define AFORMAT 0x0020 /* invalid format A data */
-#define DECODE 0x0040 /* invalid data decode */
-#define STAMP 0x0080 /* too few timestamps */
-#define AVALID 0x0100 /* valid A frame */
-#define BVALID 0x0200 /* valid B frame */
-#define INSYNC 0x0400 /* clock synchronized */
-
-/*
- * Alarm status bits (alarm)
- *
- * These alarms are set at the end of a minute in which at least one
- * burst was received. SYNERR is raised if the AFRAME or BFRAME status
- * bits are set during the minute, FMTERR is raised if the AFORMAT or
- * BFORMAT status bits are set, DECERR is raised if the DECODE status
- * bit is set and TSPERR is raised if the STAMP status bit is set.
- */
-#define SYNERR 0x01 /* frame sync error */
-#define FMTERR 0x02 /* data format error */
-#define DECERR 0x04 /* data decoding error */
-#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 */
- double dist; /* sample distance */
- int uart; /* decoded character */
-};
-#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
- */
-struct chuunit {
- u_char decode[20][16]; /* maximum likelihood decoding matrix */
- l_fp cstamp[BURST]; /* character timestamps */
- l_fp tstamp[MAXSTAGE]; /* timestamp samples */
- l_fp timestamp; /* current buffer timestamp */
- l_fp laststamp; /* last buffer timestamp */
- l_fp charstamp; /* character time as a l_fp */
- int errflg; /* error flags */
- int status; /* status bits */
- char ident[5]; /* station ID and channel */
-#ifdef ICOM
- int fd_icom; /* ICOM file descriptor */
- int chan; /* data channel */
- int achan; /* active channel */
- int dwell; /* dwell cycle */
- struct xmtr xmtr[NCHAN]; /* station metric */
-#endif /* ICOM */
-
- /*
- * Character burst variables
- */
- int cbuf[BURST]; /* character buffer */
- int ntstamp; /* number of timestamp samples */
- int ndx; /* buffer start index */
- int prevsec; /* previous burst second */
- int burdist; /* burst distance */
- int syndist; /* sync distance */
- int burstcnt; /* format A bursts this minute */
-
- /*
- * Format particulars
- */
- int leap; /* leap/dut code */
- int dut; /* UTC1 correction */
- int tai; /* TAI - UTC correction */
- int dst; /* Canadian DST code */
-
-#ifdef HAVE_AUDIO
- /*
- * Audio codec variables
- */
- int fd_audio; /* audio port file descriptor */
- double comp[SIZE]; /* decompanding table */
- int port; /* codec port */
- int gain; /* codec gain */
- int mongain; /* codec monitor gain */
- int clipcnt; /* sample clip count */
- int seccnt; /* second interval counter */
-
- /*
- * Modem variables
- */
- l_fp tick; /* audio sample increment */
- double bpf[9]; /* IIR bandpass filter */
- double disc[LAG]; /* discriminator shift register */
- double lpf[27]; /* FIR lowpass filter */
- double monitor; /* audio monitor */
- double maxsignal; /* signal level */
- int discptr; /* discriminator pointer */
-
- /*
- * Maximum likelihood UART variables
- */
- double baud; /* baud interval */
- struct surv surv[8]; /* UART survivor structures */
- int decptr; /* decode pointer */
- int dbrk; /* holdoff counter */
-#endif /* HAVE_AUDIO */
-};
-
-/*
- * Function prototypes
- */
-static int chu_start P((int, struct peer *));
-static void chu_shutdown P((int, struct peer *));
-static void chu_receive P((struct recvbuf *));
-static void chu_poll P((int, struct peer *));
-
-/*
- * More function prototypes
- */
-static void chu_decode P((struct peer *, int));
-static void chu_burst P((struct peer *));
-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 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_*=";
-
-#ifdef ICOM
-/*
- * 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 */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_chu = {
- chu_start, /* start up driver */
- chu_shutdown, /* shut down driver */
- chu_poll, /* transmit poll message */
- noentry, /* not used (old chu_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old chu_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * chu_start - open the devices and initialize data for processing
- */
-static int
-chu_start(
- int unit, /* instance number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct chuunit *up;
- struct refclockproc *pp;
- char device[20]; /* device name */
- int fd; /* file descriptor */
-#ifdef ICOM
- int temp;
-#endif /* ICOM */
-#ifdef HAVE_AUDIO
- int fd_audio; /* audio port file descriptor */
- int i; /* index */
- double step; /* codec adjustment */
-
- /*
- * Open audio device.
- */
- fd_audio = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
-#ifdef DEBUG
- if (fd_audio > 0 && debug)
- audio_show();
-#endif
-
- /*
- * Open serial port in raw mode.
- */
- if (fd_audio > 0) {
- fd = fd_audio;
- } else {
- sprintf(device, DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_RAW);
- }
-#else /* HAVE_AUDIO */
-
- /*
- * Open serial port in raw mode.
- */
- sprintf(device, DEVICE, unit);
- fd = refclock_open(device, SPEED232, LDISC_RAW);
-#endif /* HAVE_AUDIO */
- if (fd <= 0)
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct chuunit *)
- emalloc(sizeof(struct chuunit)))) {
- close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct chuunit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = chu_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- strcpy(up->ident, "CHU");
- memcpy(&peer->refid, up->ident, 4);
- DTOLFP(CHAR, &up->charstamp);
-#ifdef HAVE_AUDIO
-
- /*
- * The companded samples are encoded sign-magnitude. The table
- * contains all the 256 values in the interest of speed. We do
- * this even if the audio codec is not available. C'est la lazy.
- */
- up->fd_audio = fd_audio;
- up->gain = 127;
- up->comp[0] = up->comp[OFFSET] = 0.;
- up->comp[1] = 1; up->comp[OFFSET + 1] = -1.;
- up->comp[2] = 3; up->comp[OFFSET + 2] = -3.;
- step = 2.;
- for (i = 3; i < OFFSET; i++) {
- up->comp[i] = up->comp[i - 1] + step;
- up->comp[OFFSET + i] = -up->comp[i];
- if (i % 16 == 0)
- step *= 2.;
- }
- DTOLFP(1. / SECOND, &up->tick);
-#endif /* HAVE_AUDIO */
-#ifdef ICOM
- temp = 0;
-#ifdef DEBUG
- if (debug > 1)
- temp = P_TRACE;
-#endif
- if (peer->ttl > 0) {
- if (peer->ttl & 0x80)
- up->fd_icom = icom_init("/dev/icom", B1200,
- temp);
- else
- up->fd_icom = icom_init("/dev/icom", B9600,
- temp);
- }
- if (up->fd_icom > 0) {
- if (chu_newchan(peer, 0) != 0) {
- NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
- 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 */
- return (1);
-}
-
-
-/*
- * chu_shutdown - shut down the clock
- */
-static void
-chu_shutdown(
- int unit, /* instance number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct chuunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- 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
- */
-static void
-chu_receive(
- struct recvbuf *rbufp /* receive buffer structure pointer */
- )
-{
-#ifdef HAVE_AUDIO
- struct chuunit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * If the audio codec is warmed up, the buffer contains codec
- * samples which need to be demodulated and decoded into CHU
- * characters using the software UART. Otherwise, the buffer
- * contains CHU characters from the serial port, so the software
- * UART is bypassed. In this case the CPU will probably run a
- * few degrees cooler.
- */
- if (up->fd_audio > 0)
- chu_audio_receive(rbufp);
- else
- chu_serial_receive(rbufp);
-#else
- chu_serial_receive(rbufp);
-#endif /* HAVE_AUDIO */
-}
-
-
-#ifdef HAVE_AUDIO
-/*
- * chu_audio_receive - receive data from the audio device
- */
-static void
-chu_audio_receive(
- struct recvbuf *rbufp /* receive buffer structure pointer */
- )
-{
- struct chuunit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- 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;
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * 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;
- 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,
- * increase the gain a tad; if the clips are too high,
- * decrease a tad.
- */
- if (sample > MAXSIG) {
- sample = MAXSIG;
- up->clipcnt++;
- } else if (sample < -MAXSIG) {
- sample = -MAXSIG;
- up->clipcnt++;
- }
- chu_rf(peer, sample);
- L_ADD(&up->timestamp, &up->tick);
-
- /*
- * Once each second ride gain.
- */
- up->seccnt = (up->seccnt + 1) % SECOND;
- if (up->seccnt == 0) {
- pp->second = (pp->second + 1) % 60;
- chu_gain(peer);
- }
- }
-
- /*
- * 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)
- up->mongain = MONGAIN;
- else
- up->mongain = 0;
-}
-
-
-/*
- * chu_rf - filter and demodulate the FSK signal
- *
- * This routine implements a 300-baud Bell 103 modem with mark 2225 Hz
- * and space 2025 Hz. It uses a bandpass filter followed by a soft
- * limiter, FM discriminator and lowpass filter. A maximum likelihood
- * decoder samples the baseband signal at eight times the baud rate and
- * detects the start bit of each character.
- *
- * The filters are built for speed, which explains the rather clumsy
- * code. Hopefully, the compiler will efficiently implement the move-
- * and-muiltiply-and-add operations.
- */
-static void
-chu_rf(
- struct peer *peer, /* peer structure pointer */
- double sample /* analog sample */
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
- struct surv *sp;
-
- /*
- * Local variables
- */
- double signal; /* bandpass signal */
- double limit; /* limiter signal */
- double disc; /* discriminator signal */
- double lpf; /* lowpass signal */
- double span; /* UART signal span */
- double dist; /* UART signal distance */
- int i, j;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Bandpass filter. 4th-order elliptic, 500-Hz bandpass centered
- * at 2125 Hz. Passband ripple 0.3 dB, stopband ripple 50 dB.
- */
- signal = (up->bpf[8] = up->bpf[7]) * 5.844676e-01;
- signal += (up->bpf[7] = up->bpf[6]) * 4.884860e-01;
- signal += (up->bpf[6] = up->bpf[5]) * 2.704384e+00;
- signal += (up->bpf[5] = up->bpf[4]) * 1.645032e+00;
- signal += (up->bpf[4] = up->bpf[3]) * 4.644557e+00;
- signal += (up->bpf[3] = up->bpf[2]) * 1.879165e+00;
- signal += (up->bpf[2] = up->bpf[1]) * 3.522634e+00;
- signal += (up->bpf[1] = up->bpf[0]) * 7.315738e-01;
- up->bpf[0] = sample - signal;
- signal = up->bpf[0] * 6.176213e-03
- + up->bpf[1] * 3.156599e-03
- + up->bpf[2] * 7.567487e-03
- + up->bpf[3] * 4.344580e-03
- + up->bpf[4] * 1.190128e-02
- + up->bpf[5] * 4.344580e-03
- + up->bpf[6] * 7.567487e-03
- + up->bpf[7] * 3.156599e-03
- + up->bpf[8] * 6.176213e-03;
-
- up->monitor = signal / 4.; /* note monitor after filter */
-
- /*
- * Soft limiter/discriminator. The 11-sample discriminator lag
- * interval corresponds to three cycles of 2125 Hz, which
- * requires the sample frequency to be 2125 * 11 / 3 = 7791.7
- * Hz. The discriminator output varies +-0.5 interval for input
- * frequency 2025-2225 Hz. However, we don't get to sample at
- * this frequency, so the discriminator output is biased. Life
- * at 8000 Hz sucks.
- */
- limit = signal;
- if (limit > LIMIT)
- limit = LIMIT;
- else if (limit < -LIMIT)
- limit = -LIMIT;
- disc = up->disc[up->discptr] * -limit;
- up->disc[up->discptr] = limit;
- up->discptr = (up->discptr + 1 ) % LAG;
- if (disc >= 0)
- disc = SQRT(disc);
- else
- disc = -SQRT(-disc);
-
- /*
- * Lowpass filter. Raised cosine, Ts = 1 / 300, beta = 0.1.
- */
- lpf = (up->lpf[26] = up->lpf[25]) * 2.538771e-02;
- lpf += (up->lpf[25] = up->lpf[24]) * 1.084671e-01;
- lpf += (up->lpf[24] = up->lpf[23]) * 2.003159e-01;
- lpf += (up->lpf[23] = up->lpf[22]) * 2.985303e-01;
- lpf += (up->lpf[22] = up->lpf[21]) * 4.003697e-01;
- lpf += (up->lpf[21] = up->lpf[20]) * 5.028552e-01;
- lpf += (up->lpf[20] = up->lpf[19]) * 6.028795e-01;
- lpf += (up->lpf[19] = up->lpf[18]) * 6.973249e-01;
- lpf += (up->lpf[18] = up->lpf[17]) * 7.831828e-01;
- lpf += (up->lpf[17] = up->lpf[16]) * 8.576717e-01;
- lpf += (up->lpf[16] = up->lpf[15]) * 9.183463e-01;
- lpf += (up->lpf[15] = up->lpf[14]) * 9.631951e-01;
- lpf += (up->lpf[14] = up->lpf[13]) * 9.907208e-01;
- lpf += (up->lpf[13] = up->lpf[12]) * 1.000000e+00;
- lpf += (up->lpf[12] = up->lpf[11]) * 9.907208e-01;
- lpf += (up->lpf[11] = up->lpf[10]) * 9.631951e-01;
- lpf += (up->lpf[10] = up->lpf[9]) * 9.183463e-01;
- lpf += (up->lpf[9] = up->lpf[8]) * 8.576717e-01;
- lpf += (up->lpf[8] = up->lpf[7]) * 7.831828e-01;
- lpf += (up->lpf[7] = up->lpf[6]) * 6.973249e-01;
- lpf += (up->lpf[6] = up->lpf[5]) * 6.028795e-01;
- lpf += (up->lpf[5] = up->lpf[4]) * 5.028552e-01;
- lpf += (up->lpf[4] = up->lpf[3]) * 4.003697e-01;
- lpf += (up->lpf[3] = up->lpf[2]) * 2.985303e-01;
- lpf += (up->lpf[2] = up->lpf[1]) * 2.003159e-01;
- lpf += (up->lpf[1] = up->lpf[0]) * 1.084671e-01;
- lpf += up->lpf[0] = disc * 2.538771e-02;
-
- /*
- * Maximum likelihood decoder. The UART updates each of the
- * eight survivors and determines the span, slice level and
- * tentative decoded character. Valid 11-bit characters are
- * framed so that bit 1 and bit 11 (stop bits) are mark and bit
- * 2 (start bit) is space. When a valid character is found, the
- * survivor with maximum distance determines the final decoded
- * character.
- */
- up->baud += 1. / SECOND;
- if (up->baud > 1. / (BAUD * 8.)) {
- up->baud -= 1. / (BAUD * 8.);
- sp = &up->surv[up->decptr];
- span = sp->es_max - sp->es_min;
- up->maxsignal += (span - up->maxsignal) / 80.;
- if (up->dbrk > 0) {
- up->dbrk--;
- } else if ((sp->uart & 0x403) == 0x401 && span > 1000.)
- {
- dist = 0;
- j = 0;
- for (i = 0; i < 8; i++) {
- if (up->surv[i].dist > dist) {
- dist = up->surv[i].dist;
- j = i;
- }
- }
- chu_decode(peer, (up->surv[j].uart >> 2) &
- 0xff);
- up->dbrk = 80;
- }
- up->decptr = (up->decptr + 1) % 8;
- chu_uart(sp, -lpf * AGAIN);
- }
-}
-
-
-/*
- * chu_uart - maximum likelihood UART
- *
- * This routine updates a shift register holding the last 11 envelope
- * samples. It then computes the slice level and span over these samples
- * and determines the tentative data bits and distance. The calling
- * program selects over the last eight survivors the one with maximum
- * distance to determine the decoded character.
- */
-static void
-chu_uart(
- struct surv *sp, /* survivor structure pointer */
- double sample /* baseband signal */
- )
-{
- double es_max, es_min; /* max/min envelope */
- double slice; /* slice level */
- double dist; /* distance */
- double dtemp;
- int i;
-
- /*
- * Save the sample and shift right. At the same time, measure
- * the maximum and minimum over all eleven samples.
- */
- es_max = -1e6;
- es_min = 1e6;
- sp->shift[0] = sample;
- for (i = 11; i > 0; i--) {
- sp->shift[i] = sp->shift[i - 1];
- if (sp->shift[i] > es_max)
- es_max = sp->shift[i];
- if (sp->shift[i] < es_min)
- es_min = sp->shift[i];
- }
-
- /*
- * Determine the slice level midway beteen the maximum and
- * minimum and the span as the maximum less the minimum. Compute
- * the distance on the assumption the first and last bits must
- * be mark, the second space and the rest either mark or space.
- */
- slice = (es_max + es_min) / 2.;
- dist = 0;
- sp->uart = 0;
- for (i = 1; i < 12; i++) {
- sp->uart <<= 1;
- dtemp = sp->shift[i];
- if (dtemp > slice)
- sp->uart |= 0x1;
- if (i == 1 || i == 11) {
- dist += dtemp - es_min;
- } else if (i == 10) {
- dist += es_max - dtemp;
- } else {
- if (dtemp > slice)
- dist += dtemp - es_min;
- else
- dist += es_max - dtemp;
- }
- }
- sp->es_max = es_max;
- sp->es_min = es_min;
- sp->dist = dist / (11 * (es_max - es_min));
-}
-#endif /* HAVE_AUDIO */
-
-
-/*
- * chu_serial_receive - receive data from the serial device
- */
-static void
-chu_serial_receive(
- struct recvbuf *rbufp /* receive buffer structure pointer */
- )
-{
- struct chuunit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- u_char *dpt; /* receive buffer pointer */
-
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Initialize pointers and read the timecode and timestamp.
- */
- up->timestamp = rbufp->recv_time;
- dpt = (u_char *)&rbufp->recv_space;
- chu_decode(peer, *dpt);
-}
-
-
-/*
- * chu_decode - decode the character data
- */
-static void
-chu_decode(
- struct peer *peer, /* peer structure pointer */
- int hexhex /* data character */
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
-
- l_fp tstmp; /* timestamp temp */
- double dtemp;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * If the interval since the last character is greater than the
- * longest burst, process the last burst and start a new one. If
- * the interval is less than this but greater than two
- * characters, consider this a noise burst and reject it.
- */
- tstmp = up->timestamp;
- if (L_ISZERO(&up->laststamp))
- up->laststamp = up->timestamp;
- L_SUB(&tstmp, &up->laststamp);
- up->laststamp = up->timestamp;
- LFPTOD(&tstmp, dtemp);
- if (dtemp > BURST * CHAR) {
- chu_burst(peer);
- up->ndx = 0;
- } else if (dtemp > 2.5 * CHAR) {
- up->ndx = 0;
- }
-
- /*
- * Append the character to the current burst and append the
- * timestamp to the timestamp list.
- */
- if (up->ndx < BURST) {
- up->cbuf[up->ndx] = hexhex & 0xff;
- up->cstamp[up->ndx] = up->timestamp;
- up->ndx++;
-
- }
-}
-
-
-/*
- * chu_burst - search for valid burst format
- */
-static void
-chu_burst(
- struct peer *peer
- )
-{
- struct chuunit *up;
- struct refclockproc *pp;
-
- int i;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Correlate a block of five characters with the next block of
- * five characters. The burst distance is defined as the number
- * of bits that match in the two blocks for format A and that
- * match the inverse for format B.
- */
- if (up->ndx < MINCHAR) {
- up->status |= RUNT;
- return;
- }
- up->burdist = 0;
- for (i = 0; i < 5 && i < up->ndx - 5; i++)
- up->burdist += chu_dist(up->cbuf[i], up->cbuf[i + 5]);
-
- /*
- * If the burst distance is at least MINDIST, this must be a
- * format A burst; if the value is not greater than -MINDIST, it
- * must be a format B burst. If the B burst is perfect, we
- * believe it; otherwise, it is a noise burst and of no use to
- * anybody.
- */
- if (up->burdist >= MINDIST) {
- chu_a(peer, up->ndx);
- } else if (up->burdist <= -MINDIST) {
- chu_b(peer, up->ndx);
- } else {
- up->status |= NOISE;
- return;
- }
-
- /*
- * If this is a valid burst, wait a guard time of ten seconds to
- * allow for more bursts, then arm the poll update routine to
- * process the minute. Don't do this if this is called from the
- * timer interrupt routine.
- */
- if (peer->outdate != current_time)
- peer->nextdate = current_time + 10;
-}
-
-
-/*
- * chu_b - decode format B burst
- */
-static void
-chu_b(
- struct peer *peer,
- int nchar
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
-
- u_char code[11]; /* decoded timecode */
- char tbuf[80]; /* trace buffer */
- l_fp offset; /* timestamp offset */
- int i;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * 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. 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]);
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(&peer->srcadr, tbuf);
-#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
-#endif
- if (up->burdist > -40) {
- up->status |= BFRAME;
- return;
- }
- up->status |= BVALID;
-
- /*
- * Convert the burst data to internal format. If this succeeds,
- * save the timestamps for later.
- */
- for (i = 0; i < 5; i++) {
- code[2 * i] = hexchar[up->cbuf[i] & 0xf];
- code[2 * i + 1] = hexchar[(up->cbuf[i] >>
- 4) & 0xf];
- }
- if (sscanf((char *)code, "%1x%1d%4d%2d%2x", &up->leap, &up->dut,
- &pp->year, &up->tai, &up->dst) != 5) {
- up->status |= BFORMAT;
- return;
- }
- if (up->leap & 0x8)
- up->dut = -up->dut;
- offset.l_ui = 31;
- offset.l_f = 0;
- for (i = 0; i < nchar && i < 10; i++) {
- up->tstamp[up->ntstamp] = up->cstamp[i];
- L_SUB(&up->tstamp[up->ntstamp], &offset);
- L_ADD(&offset, &up->charstamp);
- if (up->ntstamp < MAXSTAGE)
- up->ntstamp++;
- }
-}
-
-
-/*
- * chu_a - decode format A burst
- */
-static void
-chu_a(
- struct peer *peer,
- int nchar
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
-
- char tbuf[80]; /* trace buffer */
- l_fp offset; /* timestamp offset */
- int val; /* distance */
- int temp;
- int i, j, k;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Determine correct burst phase. There are three cases
- * corresponding to in-phase, one character early or one
- * character late. These cases are distinguished by the position
- * of the framing digits x6 at positions 0 and 5 and x3 at
- * positions 4 and 9. The correct phase is when the distance
- * relative to the framing digits is maximum. The burst is valid
- * only if the maximum distance is at least MINSYNC.
- */
- up->syndist = k = 0;
- val = -16;
- for (i = -1; i < 2; i++) {
- temp = up->cbuf[i + 4] & 0xf;
- if (i >= 0)
- temp |= (up->cbuf[i] & 0xf) << 4;
- val = chu_dist(temp, 0x63);
- temp = (up->cbuf[i + 5] & 0xf) << 4;
- if (i + 9 < nchar)
- temp |= up->cbuf[i + 9] & 0xf;
- val += chu_dist(temp, 0x63);
- if (val > up->syndist) {
- up->syndist = val;
- k = i;
- }
- }
- temp = (up->cbuf[k + 4] >> 4) & 0xf;
- if (temp > 9 || k + 9 >= nchar || temp != ((up->cbuf[k + 9] >>
- 4) & 0xf))
- temp = 0;
-#ifdef HAVE_AUDIO
- if (up->fd_audio)
- sprintf(tbuf, "chuA %04x %4.0f %2d %2d %2d %2d %1d ",
- up->status, up->maxsignal, nchar, up->burdist, k,
- up->syndist, temp);
- else
- sprintf(tbuf, "chuA %04x %2d %2d %2d %2d %1d ",
- up->status, nchar, up->burdist, k, up->syndist,
- temp);
-
-#else
- sprintf(tbuf, "chuA %04x %2d %2d %2d %2d %1d ", up->status,
- nchar, up->burdist, k, up->syndist, temp);
-#endif /* HAVE_AUDIO */
- for (i = 0; i < nchar; i++)
- sprintf(&tbuf[strlen(tbuf)], "%02x",
- up->cbuf[i]);
- if (pp->sloppyclockflag & CLK_FLAG4)
- record_clock_stats(&peer->srcadr, tbuf);
-#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
-#endif
- if (up->syndist < MINSYNC) {
- up->status |= AFRAME;
- return;
- }
-
- /*
- * A valid burst requires the first seconds number to match the
- * last seconds number. If so, the burst timestamps are
- * corrected to the current minute and saved for later
- * processing. In addition, the seconds decode is advanced from
- * 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;
- if (k < 0)
- offset = up->charstamp;
- else if (k > 0)
- i = 1;
- for (; i < nchar && i < k + 10; i++) {
- up->tstamp[up->ntstamp] = up->cstamp[i];
- L_SUB(&up->tstamp[up->ntstamp], &offset);
- L_ADD(&offset, &up->charstamp);
- if (up->ntstamp < MAXSTAGE)
- up->ntstamp++;
- }
- while (temp > up->prevsec) {
- for (j = 15; j > 0; j--) {
- up->decode[9][j] = up->decode[9][j - 1];
- up->decode[19][j] =
- up->decode[19][j - 1];
- }
- up->decode[9][j] = up->decode[19][j] = 0;
- up->prevsec++;
- }
- }
- i = -(2 * k);
- for (j = 0; j < nchar; j++) {
- if (i < 0 || i > 19) {
- i += 2;
- continue;
- }
- up->decode[i][up->cbuf[j] & 0xf]++;
- i++;
- up->decode[i][(up->cbuf[j] >> 4) & 0xf]++;
- i++;
- }
- up->status |= AVALID;
- up->burstcnt++;
-}
-
-
-/*
- * chu_poll - called by the transmit procedure
- */
-static void
-chu_poll(
- int unit,
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
- l_fp offset;
- char synchar, qual, leapchar;
- 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 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. 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
- chu_newchan(peer, 0);
-#endif /* ICOM */
- return;
- }
- dtemp = chu_major(peer);
- qual = 0;
- if (up->status & (BFRAME | AFRAME))
- qual |= SYNERR;
- if (up->status & (BFORMAT | AFORMAT))
- qual |= FMTERR;
- if (up->status & DECODE)
- 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;
- synchar = '?';
- } else if (up->leap & 0x2) {
- pp->leap = LEAP_ADDSECOND;
- leapchar = 'L';
- } else if (up->leap & 0x4) {
- pp->leap = LEAP_DELSECOND;
- leapchar = 'l';
- } else {
- pp->leap = LEAP_NOWARNING;
- }
-#ifdef HAVE_AUDIO
- if (up->fd_audio)
- sprintf(pp->a_lastcode,
- "%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, dtemp, up->ntstamp);
- else
- sprintf(pp->a_lastcode,
- "%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, dtemp, up->ntstamp);
-#else
- sprintf(pp->a_lastcode,
- "%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,
- dtemp, up->ntstamp);
-#endif /* HAVE_AUDIO */
- pp->lencode = strlen(pp->a_lastcode);
-
- /*
- * 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 (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);
- } else if (pp->sloppyclockflag & CLK_FLAG4) {
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- }
-#ifdef DEBUG
- if (debug)
- 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);
- up->errflg = 0;
-}
-
-
-/*
- * chu_major - majority decoder
- */
-static double
-chu_major(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
-
- u_char code[11]; /* decoded timecode */
- int mindist; /* minimum distance */
- int val1, val2; /* maximum distance */
- int synchar; /* stray cat */
- int temp;
- int i, j, k;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Majority decoder. Each burst encodes two replications at each
- * digit position in the timecode. Each row of the decoding
- * matrix encodes the number of occurrences of each digit found
- * at the corresponding position. The maximum over all
- * 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.
- */
- mindist = 16;
- for (i = 0; i < 9; i++) {
- val1 = val2 = 0;
- k = 0;
- for (j = 0; j < 16; j++) {
- temp = up->decode[i][j] + up->decode[i + 10][j];
- if (temp > val1) {
- val2 = val1;
- val1 = temp;
- k = j;
- }
- }
- if (val1 == 0)
- code[i] = HEX_MISS;
- else if (val1 == val2)
- code[i] = HEX_HARD;
- else if (val1 <= up->burstcnt)
- code[i] = HEX_SOFT;
- else
- code[i] = k;
- if (val1 < mindist)
- mindist = val1;
- code[i] = hexchar[code[i]];
- }
- code[i] = 0;
-
- /*
- * 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 < MINBURST || mindist < up->burstcnt)
- up->status |= DECODE;
- if (up->ntstamp < MINSTAMP)
- up->status |= STAMP;
-
- /*
- * Compute the timecode timestamp from the days, hours and
- * minutes of the timecode. Use clocktime() for the aggregate
- * minutes and the minute offset computed from the burst
- * seconds. Note that this code relies on the filesystem time
- * for the years and does not use the years of the timecode.
- */
- if (sscanf((char *)code, "%1x%3d%2d%2d", &synchar, &pp->day,
- &pp->hour, &pp->minute) != 4) {
- up->status |= AFORMAT;
- return (0);
- }
- if (up->status & (DECODE | STAMP)) {
- up->errflg = CEVNT_BADREPLY;
- return (0);
- }
- return (mindist * 100. / (2. * up->burstcnt));
-}
-
-
-/*
- * chu_clear - clear decoding matrix
- */
-static void
-chu_clear(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
- int i, j;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Clear stuff for the minute.
- */
- up->ndx = up->prevsec = 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
- */
-static int
-chu_dist(
- int x, /* an octet of bits */
- int y /* another octet of bits */
- )
-{
- int val; /* bit count */
- int temp;
- int i;
-
- /*
- * The distance is determined as the weight of the exclusive OR
- * of the two arguments. The weight is determined by the number
- * of one bits in the result. Each one bit increases the weight,
- * while each zero bit decreases it.
- */
- temp = x ^ y;
- val = 0;
- for (i = 0; i < 8; i++) {
- if ((temp & 0x1) == 0)
- val++;
- else
- val--;
- temp >>= 1;
- }
- return (val);
-}
-
-
-#ifdef HAVE_AUDIO
-/*
- * chu_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
- * amplitude, so this crudity works just fine. The input port is set and
- * the error flag is cleared, mostly to be ornery.
- */
-static void
-chu_gain(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct chuunit *up;
-
- pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
-
- /*
- * Apparently, the codec uses only the high order bits of the
- * gain control field. Thus, it may take awhile for changes to
- * wiggle the hardware bits.
- */
- if (up->clipcnt == 0) {
- up->gain += 4;
- 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->mongain, up->port);
- up->clipcnt = 0;
-}
-#endif /* HAVE_AUDIO */
-
-
-#else
-int refclock_chu_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_conf.c b/contrib/ntp/ntpd/refclock_conf.c
deleted file mode 100644
index 8a424f0..0000000
--- a/contrib/ntp/ntpd/refclock_conf.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * refclock_conf.c - reference clock configuration
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "ntpd.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#ifdef REFCLOCK
-
-static struct refclock refclock_none = {
- noentry, noentry, noentry, noentry, noentry, noentry, NOFLAGS
-};
-
-#ifdef CLOCK_LOCAL
-extern struct refclock refclock_local;
-#else
-#define refclock_local refclock_none
-#endif
-
-#if defined(CLOCK_TRAK) && defined(PPS)
-extern struct refclock refclock_trak;
-#else
-#define refclock_trak refclock_none
-#endif
-
-#ifdef CLOCK_PST
-extern struct refclock refclock_pst;
-#else
-#define refclock_pst refclock_none
-#endif
-
-#ifdef CLOCK_CHU
-extern struct refclock refclock_chu;
-#else
-#define refclock_chu refclock_none
-#endif
-
-#ifdef CLOCK_WWV
-extern struct refclock refclock_wwv;
-#else
-#define refclock_wwv refclock_none
-#endif
-
-#ifdef CLOCK_SPECTRACOM
-extern struct refclock refclock_wwvb;
-#else
-#define refclock_wwvb refclock_none
-#endif
-
-#ifdef CLOCK_PARSE
-extern struct refclock refclock_parse;
-#else
-#define refclock_parse refclock_none
-#endif
-
-#if defined(CLOCK_MX4200) && defined(HAVE_PPSAPI)
-extern struct refclock refclock_mx4200;
-#else
-#define refclock_mx4200 refclock_none
-#endif
-
-#ifdef CLOCK_AS2201
-extern struct refclock refclock_as2201;
-#else
-#define refclock_as2201 refclock_none
-#endif
-
-#ifdef CLOCK_ARBITER
-extern struct refclock refclock_arbiter;
-#else
-#define refclock_arbiter refclock_none
-#endif
-
-#ifdef CLOCK_TPRO
-extern struct refclock refclock_tpro;
-#else
-#define refclock_tpro refclock_none
-#endif
-
-#ifdef CLOCK_LEITCH
-extern struct refclock refclock_leitch;
-#else
-#define refclock_leitch refclock_none
-#endif
-
-#ifdef CLOCK_IRIG
-extern struct refclock refclock_irig;
-#else
-#define refclock_irig refclock_none
-#endif
-
-#if defined(CLOCK_MSFEES) && defined(PPS)
-extern struct refclock refclock_msfees;
-#else
-#define refclock_msfees refclock_none
-#endif
-
-#ifdef CLOCK_BANC
-extern struct refclock refclock_bancomm;
-#else
-#define refclock_bancomm refclock_none
-#endif
-
-#ifdef CLOCK_TRUETIME
-extern struct refclock refclock_true;
-#else
-#define refclock_true refclock_none
-#endif
-
-#ifdef CLOCK_DATUM
-extern struct refclock refclock_datum;
-#else
-#define refclock_datum refclock_none
-#endif
-
-#ifdef CLOCK_ACTS
-extern struct refclock refclock_acts;
-#else
-#define refclock_acts refclock_none
-#endif
-
-#ifdef CLOCK_HEATH
-extern struct refclock refclock_heath;
-#else
-#define refclock_heath refclock_none
-#endif
-
-#ifdef CLOCK_NMEA
-extern struct refclock refclock_nmea;
-#else
-#define refclock_nmea refclock_none
-#endif
-
-#ifdef CLOCK_ATOM
-extern struct refclock refclock_atom;
-#else
-#define refclock_atom refclock_none
-#endif
-
-#ifdef CLOCK_PTBACTS
-extern struct refclock refclock_ptb;
-#else
-#define refclock_ptb refclock_none
-#endif
-
-#ifdef CLOCK_USNO
-extern struct refclock refclock_usno;
-#else
-#define refclock_usno refclock_none
-#endif
-
-#ifdef CLOCK_HPGPS
-extern struct refclock refclock_hpgps;
-#else
-#define refclock_hpgps refclock_none
-#endif
-
-#ifdef CLOCK_GPSVME
-extern struct refclock refclock_gpsvme;
-#else
-#define refclock_gpsvme refclock_none
-#endif
-
-#ifdef CLOCK_ARCRON_MSF
-extern struct refclock refclock_arc;
-#else
-#define refclock_arc refclock_none
-#endif
-
-#ifdef CLOCK_SHM
-extern struct refclock refclock_shm;
-#else
-#define refclock_shm refclock_none
-#endif
-
-#ifdef CLOCK_PALISADE
-extern struct refclock refclock_palisade;
-#else
-#define refclock_palisade refclock_none
-#endif
-
-#if defined(CLOCK_ONCORE) && defined(HAVE_PPSAPI)
-extern struct refclock refclock_oncore;
-#else
-#define refclock_oncore refclock_none
-#endif
-
-#if defined(CLOCK_JUPITER) && defined(HAVE_PPSAPI)
-extern struct refclock refclock_jupiter;
-#else
-#define refclock_jupiter refclock_none
-#endif
-
-#if defined(CLOCK_CHRONOLOG)
-extern struct refclock refclock_chronolog;
-#else
-#define refclock_chronolog refclock_none
-#endif
-
-#if defined(CLOCK_DUMBCLOCK)
-extern struct refclock refclock_dumbclock;
-#else
-#define refclock_dumbclock refclock_none
-#endif
-
-#ifdef CLOCK_ULINK
-extern struct refclock refclock_ulink;
-#else
-#define refclock_ulink refclock_none
-#endif
-
-#ifdef CLOCK_PCF
-extern struct refclock refclock_pcf;
-#else
-#define refclock_pcf refclock_none
-#endif
-
-#ifdef CLOCK_FG
-extern struct refclock refclock_fg;
-#else
-#define refclock_fg refclock_none
-#endif
-
-#ifdef CLOCK_HOPF_SERIAL
-extern struct refclock refclock_hopfser;
-#else
-#define refclock_hopfser refclock_none
-#endif
-
-#ifdef CLOCK_HOPF_PCI
-extern struct refclock refclock_hopfpci;
-#else
-#define refclock_hopfpci refclock_none
-#endif
-
-#ifdef CLOCK_JJY
-extern struct refclock refclock_jjy;
-#else
-#define refclock_jjy refclock_none
-#endif
-
-#ifdef CLOCK_TT560
-extern struct refclock refclock_tt560;
-#else
-#define refclock_tt560 refclock_none
-#endif
-
-#ifdef CLOCK_ZYFER
-extern struct refclock refclock_zyfer;
-#else
-#define refclock_zyfer refclock_none
-#endif
-
-#ifdef CLOCK_RIPENCC
-extern struct refclock refclock_ripencc;
-#else
-#define refclock_ripencc refclock_none
-#endif
-
-#ifdef CLOCK_NEOCLOCK4X
-extern struct refclock refclock_neoclock4x;
-#else
-#define refclock_neoclock4x refclock_none
-#endif
-
-/*
- * Order is clock_start(), clock_shutdown(), clock_poll(),
- * clock_control(), clock_init(), clock_buginfo, clock_flags;
- *
- * Types are defined in ntp.h. The index must match this.
- */
-struct refclock *refclock_conf[] = {
- &refclock_none, /* 0 REFCLK_NONE */
- &refclock_local, /* 1 REFCLK_LOCAL */
- &refclock_trak, /* 2 REFCLK_GPS_TRAK */
- &refclock_pst, /* 3 REFCLK_WWV_PST */
- &refclock_wwvb, /* 4 REFCLK_SPECTRACOM */
- &refclock_true, /* 5 REFCLK_TRUETIME */
- &refclock_irig, /* 6 REFCLK_IRIG_AUDIO */
- &refclock_chu, /* 7 REFCLK_CHU_AUDIO */
- &refclock_parse, /* 8 REFCLK_PARSE */
- &refclock_mx4200, /* 9 REFCLK_GPS_MX4200 */
- &refclock_as2201, /* 10 REFCLK_GPS_AS2201 */
- &refclock_arbiter, /* 11 REFCLK_GPS_ARBITER */
- &refclock_tpro, /* 12 REFCLK_IRIG_TPRO */
- &refclock_leitch, /* 13 REFCLK_ATOM_LEITCH */
- &refclock_msfees, /* 14 REFCLK_MSF_EES */
- &refclock_true, /* 15 alias for REFCLK_TRUETIME */
- &refclock_bancomm, /* 16 REFCLK_IRIG_BANCOMM */
- &refclock_datum, /* 17 REFCLK_GPS_DATUM */
- &refclock_acts, /* 18 REFCLK_NIST_ACTS */
- &refclock_heath, /* 19 REFCLK_WWV_HEATH */
- &refclock_nmea, /* 20 REFCLK_GPS_NMEA */
- &refclock_gpsvme, /* 21 REFCLK_GPS_VME */
- &refclock_atom, /* 22 REFCLK_ATOM_PPS */
- &refclock_ptb, /* 23 REFCLK_PTB_ACTS */
- &refclock_usno, /* 24 REFCLK_USNO */
- &refclock_true, /* 25 alias for REFCLK_TRUETIME */
- &refclock_hpgps, /* 26 REFCLK_GPS_HP */
- &refclock_arc, /* 27 REFCLK_ARCRON_MSF */
- &refclock_shm, /* 28 REFCLK_SHM */
- &refclock_palisade, /* 29 REFCLK_PALISADE */
- &refclock_oncore, /* 30 REFCLK_ONCORE */
- &refclock_jupiter, /* 31 REFCLK_GPS_JUPITER */
- &refclock_chronolog, /* 32 REFCLK_CHRONOLOG */
- &refclock_dumbclock, /* 33 REFCLK_DUMBCLOCK */
- &refclock_ulink, /* 34 REFCLOCK_ULINK */
- &refclock_pcf, /* 35 REFCLOCK_PCF */
- &refclock_wwv, /* 36 REFCLOCK_WWV_AUDIO */
- &refclock_fg, /* 37 REFCLOCK_FG */
- &refclock_hopfser, /* 38 REFCLK_HOPF_SERIAL */
- &refclock_hopfpci, /* 39 REFCLK_HOPF_PCI */
- &refclock_jjy, /* 40 REFCLK_JJY */
- &refclock_tt560, /* 41 REFCLK_TT560 */
- &refclock_zyfer, /* 42 REFCLK_ZYFER */
- &refclock_ripencc, /* 43 REFCLK_RIPENCC */
- &refclock_neoclock4x /* 44 REFCLK_NEOCLOCK4X */
-};
-
-u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *);
-
-#else
-int refclock_conf_bs;
-#endif
diff --git a/contrib/ntp/ntpd/refclock_datum.c b/contrib/ntp/ntpd/refclock_datum.c
deleted file mode 100644
index 82b7369..0000000
--- a/contrib/ntp/ntpd/refclock_datum.c
+++ /dev/null
@@ -1,869 +0,0 @@
-/*
-** refclock_datum - clock driver for the Datum Programmable Time Server
-**
-** Important note: This driver assumes that you have termios. If you have
-** a system that does not have termios, you will have to modify this driver.
-**
-** Sorry, I have only tested this driver on SUN and HP platforms.
-*/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_DATUM)
-
-/*
-** Include Files
-*/
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(WWVBCLK)
-#include <sys/clkdefs.h>
-#endif /* WWVBCLK */
-#endif /* STREAM */
-
-#include "ntp_stdlib.h"
-
-/*
-** This driver supports the Datum Programmable Time System (PTS) clock.
-** The clock works in very straight forward manner. When it receives a
-** time code request (e.g., the ascii string "//k/mn"), it responds with
-** a seven byte BCD time code. This clock only responds with a
-** time code after it first receives the "//k/mn" message. It does not
-** periodically send time codes back at some rate once it is started.
-** the returned time code can be broken down into the following fields.
-**
-** _______________________________
-** Bit Index | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
-** ===============================
-** byte 0: | - - - - | H D |
-** ===============================
-** byte 1: | T D | U D |
-** ===============================
-** byte 2: | - - | T H | U H |
-** ===============================
-** byte 3: | - | T M | U M |
-** ===============================
-** byte 4: | - | T S | U S |
-** ===============================
-** byte 5: | t S | h S |
-** ===============================
-** byte 6: | m S | - - - - |
-** ===============================
-**
-** In the table above:
-**
-** "-" means don't care
-** "H D", "T D", and "U D" means Hundreds, Tens, and Units of Days
-** "T H", and "UH" means Tens and Units of Hours
-** "T M", and "U M" means Tens and Units of Minutes
-** "T S", and "U S" means Tens and Units of Seconds
-** "t S", "h S", and "m S" means tenths, hundredths, and thousandths
-** of seconds
-**
-** The Datum PTS communicates throught the RS232 port on your machine.
-** Right now, it assumes that you have termios. This driver has been tested
-** on SUN and HP workstations. The Datum PTS supports various IRIG and
-** NASA input codes. This driver assumes that the name of the device is
-** /dev/datum. You will need to make a soft link to your RS232 device or
-** create a new driver to use this refclock.
-*/
-
-/*
-** Datum PTS defines
-*/
-
-/*
-** Note that if GMT is defined, then the Datum PTS must use Greenwich
-** time. Otherwise, this driver allows the Datum PTS to use the current
-** wall clock for its time. It determines the time zone offset by minimizing
-** the error after trying several time zone offsets. If the Datum PTS
-** time is Greenwich time and GMT is not defined, everything should still
-** work since the time zone will be found to be 0. What this really means
-** is that your system time (at least to start with) must be within the
-** correct time by less than +- 30 minutes. The default is for GMT to not
-** defined. If you really want to force GMT without the funny +- 30 minute
-** stuff then you must define (uncomment) GMT below.
-*/
-
-/*
-#define GMT
-#define DEBUG_DATUM_PTC
-#define LOG_TIME_ERRORS
-*/
-
-
-#define PRECISION (-10) /* precision assumed 1/1024 ms */
-#define REFID "DATM" /* reference id */
-#define DATUM_DISPERSION 0 /* fixed dispersion = 0 ms */
-#define DATUM_MAX_ERROR 0.100 /* limits on sigma squared */
-
-#define DATUM_MAX_ERROR2 (DATUM_MAX_ERROR*DATUM_MAX_ERROR)
-
-/*
-** The Datum PTS structure
-*/
-
-/*
-** I don't use a fixed array of MAXUNITS like everyone else just because
-** I don't like to program that way. Sorry if this bothers anyone. I assume
-** that you can use any id for your unit and I will search for it in a
-** dynamic array of units until I find it. I was worried that users might
-** enter a bad id in their configuration file (larger than MAXUNITS) and
-** besides, it is just cleaner not to have to assume that you have a fixed
-** number of anything in a program.
-*/
-
-struct datum_pts_unit {
- struct peer *peer; /* peer used by ntp */
- struct refclockio io; /* io structure used by ntp */
- int PTS_fd; /* file descriptor for PTS */
- u_int unit; /* id for unit */
- u_long timestarted; /* time started */
- l_fp lastrec; /* time tag for the receive time (system) */
- l_fp lastref; /* reference time (Datum time) */
- u_long yearstart; /* the year that this clock started */
- int coderecv; /* number of time codes received */
- int day; /* day */
- int hour; /* hour */
- int minute; /* minutes */
- int second; /* seconds */
- int msec; /* miliseconds */
- int usec; /* miliseconds */
- u_char leap; /* funny leap character code */
- char retbuf[8]; /* returned time from the datum pts */
- char nbytes; /* number of bytes received from datum pts */
- double sigma2; /* average squared error (roughly) */
- int tzoff; /* time zone offest from GMT */
-};
-
-/*
-** PTS static constant variables for internal use
-*/
-
-static char TIME_REQUEST[6]; /* request message sent to datum for time */
-static int nunits; /* number of active units */
-static struct datum_pts_unit
-**datum_pts_unit; /* dynamic array of datum PTS structures */
-
-/*
-** Callback function prototypes that ntpd needs to know about.
-*/
-
-static int datum_pts_start P((int, struct peer *));
-static void datum_pts_shutdown P((int, struct peer *));
-static void datum_pts_poll P((int, struct peer *));
-static void datum_pts_control P((int, struct refclockstat *,
- struct refclockstat *, struct peer *));
-static void datum_pts_init P((void));
-static void datum_pts_buginfo P((int, struct refclockbug *, struct peer *));
-
-/*
-** This is the call back function structure that ntpd actually uses for
-** this refclock.
-*/
-
-struct refclock refclock_datum = {
- datum_pts_start, /* start up a new Datum refclock */
- datum_pts_shutdown, /* shutdown a Datum refclock */
- datum_pts_poll, /* sends out the time request */
- datum_pts_control, /* not used */
- datum_pts_init, /* initialization (called first) */
- datum_pts_buginfo, /* not used */
- NOFLAGS /* we are not setting any special flags */
-};
-
-/*
-** The datum_pts_receive callback function is handled differently from the
-** rest. It is passed to the ntpd io data structure. Basically, every
-** 64 seconds, the datum_pts_poll() routine is called. It sends out the time
-** request message to the Datum Programmable Time System. Then, ntpd
-** waits on a select() call to receive data back. The datum_pts_receive()
-** function is called as data comes back. We expect a seven byte time
-** code to be returned but the datum_pts_receive() function may only get
-** a few bytes passed to it at a time. In other words, this routine may
-** get called by the io stuff in ntpd a few times before we get all seven
-** bytes. Once the last byte is received, we process it and then pass the
-** new time measurement to ntpd for updating the system time. For now,
-** there is no 3 state filtering done on the time measurements. The
-** jitter may be a little high but at least for its current use, it is not
-** a problem. We have tried to keep things as simple as possible. This
-** clock should not jitter more than 1 or 2 mseconds at the most once
-** things settle down. It is important to get the right drift calibrated
-** in the ntpd.drift file as well as getting the right tick set up right
-** using tickadj for SUNs. Tickadj is not used for the HP but you need to
-** remember to bring up the adjtime daemon because HP does not support
-** the adjtime() call.
-*/
-
-static void datum_pts_receive P((struct recvbuf *));
-
-/*......................................................................*/
-/* datum_pts_start - start up the datum PTS. This means open the */
-/* RS232 device and set up the data structure for my unit. */
-/*......................................................................*/
-
-static int
-datum_pts_start(
- int unit,
- struct peer *peer
- )
-{
- struct datum_pts_unit **temp_datum_pts_unit;
- struct datum_pts_unit *datum_pts;
-#ifdef HAVE_TERMIOS
- struct termios arg;
-#endif
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Starting Datum PTS unit %d\n", unit);
-#endif
-
- /*
- ** Create the memory for the new unit
- */
-
- temp_datum_pts_unit = (struct datum_pts_unit **)
- malloc((nunits+1)*sizeof(struct datum_pts_unit *));
- if (nunits > 0) memcpy(temp_datum_pts_unit, datum_pts_unit,
- nunits*sizeof(struct datum_pts_unit *));
- free(datum_pts_unit);
- datum_pts_unit = temp_datum_pts_unit;
- datum_pts_unit[nunits] = (struct datum_pts_unit *)
- malloc(sizeof(struct datum_pts_unit));
- datum_pts = datum_pts_unit[nunits];
-
- datum_pts->unit = unit; /* set my unit id */
- datum_pts->yearstart = 0; /* initialize the yearstart to 0 */
- datum_pts->sigma2 = 0.0; /* initialize the sigma2 to 0 */
-
- /*
- ** Open the Datum PTS device
- */
-
- datum_pts->PTS_fd = open("/dev/datum",O_RDWR);
-
- fcntl(datum_pts->PTS_fd, F_SETFL, 0); /* clear the descriptor flags */
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Opening RS232 port with file descriptor %d\n",
- datum_pts->PTS_fd);
-#endif
-
- /*
- ** Set up the RS232 terminal device information. Note that we assume that
- ** we have termios. This code has only been tested on SUNs and HPs. If your
- ** machine does not have termios this driver cannot be initialized. You can change this
- ** if you want by editing this source. Please give the changes back to the
- ** ntp folks so that it can become part of their regular distribution.
- */
-
-#ifdef HAVE_TERMIOS
-
- arg.c_iflag = IGNBRK;
- arg.c_oflag = 0;
- arg.c_cflag = B9600 | CS8 | CREAD | PARENB | CLOCAL;
- arg.c_lflag = 0;
- arg.c_cc[VMIN] = 0; /* start timeout timer right away (not used) */
- arg.c_cc[VTIME] = 30; /* 3 second timout on reads (not used) */
-
- tcsetattr(datum_pts->PTS_fd, TCSANOW, &arg);
-
-#else
-
- msyslog(LOG_ERR, "Datum_PTS: Termios not supported in this driver");
- (void)close(datum_pts->PTS_fd);
-
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
-
- return 0;
-
-#endif
-
- /*
- ** Initialize the ntpd IO structure
- */
-
- datum_pts->peer = peer;
- datum_pts->io.clock_recv = datum_pts_receive;
- datum_pts->io.srcclock = (caddr_t)datum_pts;
- datum_pts->io.datalen = 0;
- datum_pts->io.fd = datum_pts->PTS_fd;
-
- if (!io_addclock(&(datum_pts->io))) {
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Problem adding clock\n");
-#endif
-
- msyslog(LOG_ERR, "Datum_PTS: Problem adding clock");
- (void)close(datum_pts->PTS_fd);
-
- return 0;
- }
-
- /*
- ** Now add one to the number of units and return a successful code
- */
-
- nunits++;
- return 1;
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_shutdown - this routine shuts doen the device and */
-/* removes the memory for the unit. */
-/*......................................................................*/
-
-static void
-datum_pts_shutdown(
- int unit,
- struct peer *peer
- )
-{
- int i,j;
- struct datum_pts_unit **temp_datum_pts_unit;
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Shutdown Datum PTS\n");
-#endif
-
- msyslog(LOG_ERR, "Datum_PTS: Shutdown Datum PTS");
-
- /*
- ** First we have to find the right unit (i.e., the one with the same id).
- ** We do this by looping through the dynamic array of units intil we find
- ** it. Note, that I don't simply use an array with a maximimum number of
- ** Datum PTS units. Everything is completely dynamic.
- */
-
- for (i=0; i<nunits; i++) {
- if (datum_pts_unit[i]->unit == unit) {
-
- /*
- ** We found the unit so close the file descriptor and free up the memory used
- ** by the structure.
- */
-
- io_closeclock(&datum_pts_unit[i]->io);
- close(datum_pts_unit[i]->PTS_fd);
- free(datum_pts_unit[i]);
-
- /*
- ** Now clean up the datum_pts_unit dynamic array so that there are no holes.
- ** This may mean moving pointers around, etc., to keep things compact.
- */
-
- if (nunits > 1) {
-
- temp_datum_pts_unit = (struct datum_pts_unit **)
- malloc((nunits-1)*sizeof(struct datum_pts_unit *));
- if (i!= 0) memcpy(temp_datum_pts_unit, datum_pts_unit,
- i*sizeof(struct datum_pts_unit *));
-
- for (j=i+1; j<nunits; j++) {
- temp_datum_pts_unit[j-1] = datum_pts_unit[j];
- }
-
- free(datum_pts_unit);
- datum_pts_unit = temp_datum_pts_unit;
-
- }else{
-
- free(datum_pts_unit);
- datum_pts_unit = NULL;
-
- }
-
- return;
-
- }
- }
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Error, could not shut down unit %d\n",unit);
-#endif
-
- msyslog(LOG_ERR, "Datum_PTS: Could not shut down Datum PTS unit %d",unit);
-
-}
-
-/*......................................................................*/
-/* datum_pts_poll - this routine sends out the time request to the */
-/* Datum PTS device. The time will be passed back in the */
-/* datum_pts_receive() routine. */
-/*......................................................................*/
-
-static void
-datum_pts_poll(
- int unit,
- struct peer *peer
- )
-{
- int i;
- int unit_index;
- int error_code;
- struct datum_pts_unit *datum_pts;
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Poll Datum PTS\n");
-#endif
-
- /*
- ** Find the right unit and send out a time request once it is found.
- */
-
- unit_index = -1;
- for (i=0; i<nunits; i++) {
- if (datum_pts_unit[i]->unit == unit) {
- unit_index = i;
- datum_pts = datum_pts_unit[i];
- error_code = write(datum_pts->PTS_fd, TIME_REQUEST, 6);
- if (error_code != 6) perror("TIME_REQUEST");
- datum_pts->nbytes = 0;
- break;
- }
- }
-
- /*
- ** Print out an error message if we could not find the right unit.
- */
-
- if (unit_index == -1) {
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Error, could not poll unit %d\n",unit);
-#endif
-
- msyslog(LOG_ERR, "Datum_PTS: Could not poll unit %d",unit);
- return;
-
- }
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_control - not used */
-/*......................................................................*/
-
-static void
-datum_pts_control(
- int unit,
- struct refclockstat *in,
- struct refclockstat *out,
- struct peer *peer
- )
-{
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Control Datum PTS\n");
-#endif
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_init - initializes things for all possible Datum */
-/* time code generators that might be used. In practice, this is */
-/* only called once at the beginning before anything else is */
-/* called. */
-/*......................................................................*/
-
-static void
-datum_pts_init(void)
-{
-
- /* */
- /*...... open up the log file if we are debugging ......................*/
- /* */
-
- /*
- ** Open up the log file if we are debugging. For now, send data out to the
- ** screen (stdout).
- */
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Init Datum PTS\n");
-#endif
-
- /*
- ** Initialize the time request command string. This is the only message
- ** that we ever have to send to the Datum PTS (although others are defined).
- */
-
- memcpy(TIME_REQUEST, "//k/mn",6);
-
- /*
- ** Initialize the number of units to 0 and set the dynamic array of units to
- ** NULL since there are no units defined yet.
- */
-
- datum_pts_unit = NULL;
- nunits = 0;
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_buginfo - not used */
-/*......................................................................*/
-
-static void
-datum_pts_buginfo(
- int unit,
- register struct refclockbug *bug,
- register struct peer *peer
- )
-{
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Buginfo Datum PTS\n");
-#endif
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_receive - receive the time buffer that was read in */
-/* by the ntpd io handling routines. When 7 bytes have been */
-/* received (it may take several tries before all 7 bytes are */
-/* received), then the time code must be unpacked and sent to */
-/* the ntpd clock_receive() routine which causes the systems */
-/* clock to be updated (several layers down). */
-/*......................................................................*/
-
-static void
-datum_pts_receive(
- struct recvbuf *rbufp
- )
-{
- int i;
- l_fp tstmp;
- struct datum_pts_unit *datum_pts;
- char *dpt;
- int dpend;
- int tzoff;
- int timerr;
- double ftimerr, abserr;
-#ifdef DEBUG_DATUM_PTC
- double dispersion;
-#endif
- int goodtime;
- /*double doffset;*/
-
- /*
- ** Get the time code (maybe partial) message out of the rbufp buffer.
- */
-
- datum_pts = (struct datum_pts_unit *)rbufp->recv_srcclock;
- dpt = (char *)&rbufp->recv_space;
- dpend = rbufp->recv_length;
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Receive Datum PTS: %d bytes\n", dpend);
-#endif
-
- /* */
- /*...... save the ntp system time when the first byte is received ......*/
- /* */
-
- /*
- ** Save the ntp system time when the first byte is received. Note that
- ** because it may take several calls to this routine before all seven
- ** bytes of our return message are finally received by the io handlers in
- ** ntpd, we really do want to use the time tag when the first byte is
- ** received to reduce the jitter.
- */
-
- if (datum_pts->nbytes == 0) {
- datum_pts->lastrec = rbufp->recv_time;
- }
-
- /*
- ** Increment our count to the number of bytes received so far. Return if we
- ** haven't gotten all seven bytes yet.
- */
-
- for (i=0; i<dpend; i++) {
- datum_pts->retbuf[datum_pts->nbytes+i] = dpt[i];
- }
-
- datum_pts->nbytes += dpend;
-
- if (datum_pts->nbytes != 7) {
- return;
- }
-
- /*
- ** Convert the seven bytes received in our time buffer to day, hour, minute,
- ** second, and msecond values. The usec value is not used for anything
- ** currently. It is just the fractional part of the time stored in units
- ** of microseconds.
- */
-
- datum_pts->day = 100*(datum_pts->retbuf[0] & 0x0f) +
- 10*((datum_pts->retbuf[1] & 0xf0)>>4) +
- (datum_pts->retbuf[1] & 0x0f);
-
- datum_pts->hour = 10*((datum_pts->retbuf[2] & 0x30)>>4) +
- (datum_pts->retbuf[2] & 0x0f);
-
- datum_pts->minute = 10*((datum_pts->retbuf[3] & 0x70)>>4) +
- (datum_pts->retbuf[3] & 0x0f);
-
- datum_pts->second = 10*((datum_pts->retbuf[4] & 0x70)>>4) +
- (datum_pts->retbuf[4] & 0x0f);
-
- datum_pts->msec = 100*((datum_pts->retbuf[5] & 0xf0) >> 4) +
- 10*(datum_pts->retbuf[5] & 0x0f) +
- ((datum_pts->retbuf[6] & 0xf0)>>4);
-
- datum_pts->usec = 1000*datum_pts->msec;
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("day %d, hour %d, minute %d, second %d, msec %d\n",
- datum_pts->day,
- datum_pts->hour,
- datum_pts->minute,
- datum_pts->second,
- datum_pts->msec);
-#endif
-
- /*
- ** Get the GMT time zone offset. Note that GMT should be zero if the Datum
- ** reference time is using GMT as its time base. Otherwise we have to
- ** determine the offset if the Datum PTS is using time of day as its time
- ** base.
- */
-
- goodtime = 0; /* We are not sure about the time and offset yet */
-
-#ifdef GMT
-
- /*
- ** This is the case where the Datum PTS is using GMT so there is no time
- ** zone offset.
- */
-
- tzoff = 0; /* set time zone offset to 0 */
-
-#else
-
- /*
- ** This is the case where the Datum PTS is using regular time of day for its
- ** time so we must compute the time zone offset. The way we do it is kind of
- ** funny but it works. We loop through different time zones (0 to 24) and
- ** pick the one that gives the smallest error (+- one half hour). The time
- ** zone offset is stored in the datum_pts structure for future use. Normally,
- ** the clocktime() routine is only called once (unless the time zone offset
- ** changes due to daylight savings) since the goodtime flag is set when a
- ** good time is found (with a good offset). Note that even if the Datum
- ** PTS is using GMT, this mechanism will still work since it should come up
- ** with a value for tzoff = 0 (assuming that your system clock is within
- ** a half hour of the Datum time (even with time zone differences).
- */
-
- for (tzoff=0; tzoff<24; tzoff++) {
- if (clocktime( datum_pts->day,
- datum_pts->hour,
- datum_pts->minute,
- datum_pts->second,
- (tzoff + datum_pts->tzoff) % 24,
- datum_pts->lastrec.l_ui,
- &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
- printf("Time Zone (clocktime method) = %d, error = %d\n", tzoff, error);
-#endif
-
- if ((error < 1799) && (error > -1799)) {
- tzoff = (tzoff + datum_pts->tzoff) % 24;
- datum_pts->tzoff = tzoff;
- goodtime = 1;
-
-#ifdef DEBUG_DATUM_PTC
- printf("Time Zone found (clocktime method) = %d\n",tzoff);
-#endif
-
- break;
- }
-
- }
- }
-
-#endif
-
- /*
- ** Make sure that we have a good time from the Datum PTS. Clocktime() also
- ** sets yearstart and lastref.l_ui. We will have to set astref.l_uf (i.e.,
- ** the fraction of a second) stuff later.
- */
-
- if (!goodtime) {
-
- if (!clocktime( datum_pts->day,
- datum_pts->hour,
- datum_pts->minute,
- datum_pts->second,
- tzoff,
- datum_pts->lastrec.l_ui,
- &datum_pts->yearstart,
- &datum_pts->lastref.l_ui) ) {
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- {
- printf("Error: bad clocktime\n");
- printf("GMT %d, lastrec %d, yearstart %d, lastref %d\n",
- tzoff,
- datum_pts->lastrec.l_ui,
- datum_pts->yearstart,
- datum_pts->lastref.l_ui);
- }
-#endif
-
- msyslog(LOG_ERR, "Datum_PTS: Bad clocktime");
-
- return;
-
- }else{
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Good clocktime\n");
-#endif
-
- }
-
- }
-
- /*
- ** We have datum_pts->lastref.l_ui set (which is the integer part of the
- ** time. Now set the microseconds field.
- */
-
- TVUTOTSF(datum_pts->usec, datum_pts->lastref.l_uf);
-
- /*
- ** Compute the time correction as the difference between the reference
- ** time (i.e., the Datum time) minus the receive time (system time).
- */
-
- tstmp = datum_pts->lastref; /* tstmp is the datum ntp time */
- L_SUB(&tstmp, &datum_pts->lastrec); /* tstmp is now the correction */
- datum_pts->coderecv++; /* increment a counter */
-
-#ifdef DEBUG_DATUM_PTC
- dispersion = DATUM_DISPERSION; /* set the dispersion to 0 */
- ftimerr = dispersion;
- ftimerr /= (1024.0 * 64.0);
- if (debug)
- printf("dispersion = %d, %f\n", dispersion, ftimerr);
-#endif
-
- /*
- ** Pass the new time to ntpd through the refclock_receive function. Note
- ** that we are not trying to make any corrections due to the time it takes
- ** for the Datum PTS to send the message back. I am (erroneously) assuming
- ** that the time for the Datum PTS to send the time back to us is negligable.
- ** I suspect that this time delay may be as much as 15 ms or so (but probably
- ** less). For our needs at JPL, this kind of error is ok so it is not
- ** 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);
-
- /*
- ** Compute sigma squared (not used currently). Maybe later, this could be
- ** used for the dispersion estimate. The problem is that ntpd does not link
- ** in the math library so sqrt() is not available. Anyway, this is useful
- ** for debugging. Maybe later I will just use absolute values for the time
- ** error to come up with my dispersion estimate. Anyway, for now my dispersion
- ** is set to 0.
- */
-
- timerr = tstmp.l_ui<<20;
- timerr |= (tstmp.l_uf>>12) & 0x000fffff;
- ftimerr = timerr;
- ftimerr /= 1024*1024;
- abserr = ftimerr;
- if (ftimerr < 0.0) abserr = -ftimerr;
-
- if (datum_pts->sigma2 == 0.0) {
- if (abserr < DATUM_MAX_ERROR) {
- datum_pts->sigma2 = abserr*abserr;
- }else{
- datum_pts->sigma2 = DATUM_MAX_ERROR2;
- }
- }else{
- if (abserr < DATUM_MAX_ERROR) {
- datum_pts->sigma2 = 0.95*datum_pts->sigma2 + 0.05*abserr*abserr;
- }else{
- datum_pts->sigma2 = 0.95*datum_pts->sigma2 + 0.05*DATUM_MAX_ERROR2;
- }
- }
-
-#ifdef DEBUG_DATUM_PTC
- if (debug)
- printf("Time error = %f seconds\n", ftimerr);
-#endif
-
-#if defined(DEBUG_DATUM_PTC) || defined(LOG_TIME_ERRORS)
- if (debug)
- printf("PTS: day %d, hour %d, minute %d, second %d, msec %d, Time Error %f\n",
- datum_pts->day,
- datum_pts->hour,
- datum_pts->minute,
- datum_pts->second,
- datum_pts->msec,
- ftimerr);
-#endif
-
-}
-#else
-int refclock_datum_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_dumbclock.c b/contrib/ntp/ntpd/refclock_dumbclock.c
deleted file mode 100644
index 2788649..0000000
--- a/contrib/ntp/ntpd/refclock_dumbclock.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- * refclock_dumbclock - clock driver for a unknown time distribution system
- * that only provides hh:mm:ss (in local time, yet!).
- */
-
-/*
- * Must interpolate back to local time. Very annoying.
- */
-#define GET_LOCALTIME
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(SYS_WINNT)
-#undef close
-#define close closesocket
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_DUMBCLOCK)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * This driver supports a generic dumb clock that only outputs hh:mm:ss,
- * in local time, no less.
- *
- * Input format:
- *
- * hh:mm:ss <cr>
- *
- * hh:mm:ss -- what you'd expect, with a 24 hour clock. (Heck, that's the only
- * way it could get stupider.) We take time on the <cr>.
- *
- * The original source of this module was the WWVB module.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/dumbclock%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-13) /* precision assumed (about 100 us) */
-#define REFID "dumbclock" /* reference ID */
-#define DESCRIPTION "Dumb clock" /* WRU */
-
-
-/*
- * Insanity check. Since the time is local, we need to make sure that during midnight
- * transitions, we can convert back to Unix time. If the conversion results in some number
- * worse than this number of seconds away, assume the next day and retry.
- */
-#define INSANE_SECONDS 3600
-
-/*
- * Dumb clock control structure
- */
-struct dumbclock_unit {
- u_char tcswitch; /* timecode switch */
- l_fp laststamp; /* last receive timestamp */
- u_char lasthour; /* last hour (for monitor) */
- u_char linect; /* count ignored lines (for monitor */
- struct tm ymd; /* struct tm for y/m/d only */
-};
-
-/*
- * Function prototypes
- */
-static int dumbclock_start P((int, struct peer *));
-static void dumbclock_shutdown P((int, struct peer *));
-static void dumbclock_receive P((struct recvbuf *));
-#if 0
-static void dumbclock_poll P((int, struct peer *));
-#endif
-
-/*
- * Transfer vector
- */
-struct refclock refclock_dumbclock = {
- dumbclock_start, /* start up driver */
- dumbclock_shutdown, /* shut down driver */
- noentry, /* poll the driver -- a nice fabrication */
- noentry, /* not used */
- noentry, /* not used */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-
-/*
- * dumbclock_start - open the devices and initialize data for processing
- */
-static int
-dumbclock_start(
- int unit,
- struct peer *peer
- )
-{
- register struct dumbclock_unit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
- struct tm *tm_time_p;
- time_t now;
-
- /*
- * Open serial port. Don't bother with CLK line discipline, since
- * it's not available.
- */
- (void)sprintf(device, DEVICE, unit);
-#ifdef DEBUG
- if (debug)
- printf ("starting Dumbclock with device %s\n",device);
-#endif
- fd = refclock_open(device, SPEED232, 0);
- if (fd < 0)
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- up = (struct dumbclock_unit *)emalloc(sizeof(struct dumbclock_unit));
- if (up == NULL) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct dumbclock_unit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = dumbclock_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
-
-
- time(&now);
-#ifdef GET_LOCALTIME
- tm_time_p = localtime(&now);
-#else
- tm_time_p = gmtime(&now);
-#endif
- if (tm_time_p)
- {
- up->ymd = *tm_time_p;
- }
- else
- {
- return 0;
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- return (1);
-}
-
-
-/*
- * dumbclock_shutdown - shut down the clock
- */
-static void
-dumbclock_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct dumbclock_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct dumbclock_unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * dumbclock_receive - receive data from the serial interface
- */
-static void
-dumbclock_receive(
- struct recvbuf *rbufp
- )
-{
- struct dumbclock_unit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- l_fp trtmp; /* arrival timestamp */
- int hours; /* hour-of-day */
- int minutes; /* minutes-past-the-hour */
- int seconds; /* seconds */
- int temp; /* int temp */
- int got_good; /* got a good time flag */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct dumbclock_unit *)pp->unitptr;
- temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-
- if (temp == 0) {
- if (up->tcswitch == 0) {
- up->tcswitch = 1;
- up->laststamp = trtmp;
- } else
- up->tcswitch = 0;
- return;
- }
- pp->lencode = (u_short)temp;
- pp->lastrec = up->laststamp;
- up->laststamp = trtmp;
- up->tcswitch = 1;
-
-#ifdef DEBUG
- if (debug)
- printf("dumbclock: timecode %d %s\n",
- pp->lencode, pp->a_lastcode);
-#endif
-
- /*
- * We get down to business. Check the timecode format...
- */
- got_good=0;
- if (sscanf(pp->a_lastcode,"%02d:%02d:%02d",
- &hours,&minutes,&seconds) == 3)
- {
- struct tm *gmtp;
- struct tm *lt_p;
- time_t asserted_time; /* the SPM time based on the composite time+date */
- struct tm asserted_tm; /* the struct tm of the same */
- int adjyear;
- int adjmon;
- int reality_delta;
- time_t now;
-
-
- /*
- * Convert to GMT for sites that distribute localtime. This
- * means we have to figure out what day it is. Easier said
- * than done...
- */
-
- asserted_tm.tm_year = up->ymd.tm_year;
- asserted_tm.tm_mon = up->ymd.tm_mon;
- asserted_tm.tm_mday = up->ymd.tm_mday;
- asserted_tm.tm_hour = hours;
- asserted_tm.tm_min = minutes;
- asserted_tm.tm_sec = seconds;
- asserted_tm.tm_isdst = -1;
-
-#ifdef GET_LOCALTIME
- asserted_time = mktime (&asserted_tm);
- time(&now);
-#else
-#include "GMT unsupported for dumbclock!"
-#endif
- reality_delta = asserted_time - now;
-
- /*
- * We assume that if the time is grossly wrong, it's because we got the
- * year/month/day wrong.
- */
- if (reality_delta > INSANE_SECONDS)
- {
- asserted_time -= SECSPERDAY; /* local clock behind real time */
- }
- else if (-reality_delta > INSANE_SECONDS)
- {
- asserted_time += SECSPERDAY; /* local clock ahead of real time */
- }
- lt_p = localtime(&asserted_time);
- if (lt_p)
- {
- up->ymd = *lt_p;
- }
- else
- {
- refclock_report (peer, CEVNT_FAULT);
- return;
- }
-
- if ((gmtp = gmtime (&asserted_time)) == NULL)
- {
- refclock_report (peer, CEVNT_FAULT);
- return;
- }
- adjyear = gmtp->tm_year+1900;
- adjmon = gmtp->tm_mon+1;
- pp->day = ymd2yd (adjyear, adjmon, gmtp->tm_mday);
- pp->hour = gmtp->tm_hour;
- pp->minute = gmtp->tm_min;
- pp->second = gmtp->tm_sec;
-#ifdef DEBUG
- if (debug)
- printf ("time is %04d/%02d/%02d %02d:%02d:%02d UTC\n",
- adjyear,adjmon,gmtp->tm_mday,pp->hour,pp->minute,
- pp->second);
-#endif
-
- got_good=1;
- }
-
- if (!got_good)
- {
- if (up->linect > 0)
- up->linect--;
- else
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- up->lasthour = (u_char)pp->hour;
-}
-
-#if 0
-/*
- * dumbclock_poll - called by the transmit procedure
- */
-static void
-dumbclock_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct dumbclock_unit *up;
- struct refclockproc *pp;
- char pollchar;
-
- /*
- * Time to poll the clock. The Chrono-log clock is supposed to
- * respond to a 'T' by returning a timecode in the format(s)
- * specified above. Ours does (can?) not, but this seems to be
- * an installation-specific problem. This code is dyked out,
- * but may be re-enabled if anyone ever finds a Chrono-log that
- * actually listens to this command.
- */
-#if 0
- pp = peer->procptr;
- up = (struct dumbclock_unit *)pp->unitptr;
- if (peer->reach == 0)
- refclock_report(peer, CEVNT_TIMEOUT);
- if (up->linect > 0)
- pollchar = 'R';
- else
- pollchar = 'T';
- if (write(pp->io.fd, &pollchar, 1) != 1)
- refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
-#endif
-}
-#endif
-
-#else
-int refclock_dumbclock_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_fg.c b/contrib/ntp/ntpd/refclock_fg.c
deleted file mode 100644
index ebcf1b5..0000000
--- a/contrib/ntp/ntpd/refclock_fg.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * refclock_fg - clock driver for the Forum Graphic GPS datating station
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_FG)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/*
- * This driver supports the Forum Graphic GPS dating station.
- * More information about FG GPS is available on http://www.forumgraphic.com
- * Contact das@amt.ru for any question about this driver.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/fgclock%d"
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "GPS"
-#define DESCRIPTION "Forum Graphic GPS dating station"
-#define LENFG 26 /* timecode length */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-
-/*
- * Function prototypes
- */
-static int fg_init P((int));
-static int fg_start P((int, struct peer *));
-static void fg_shutdown P((int, struct peer *));
-static void fg_poll P((int, struct peer *));
-static void fg_receive P((struct recvbuf *));
-
-/*
- * Forum Graphic unit control structure
- */
-
-struct fgunit {
- int pollnum; /* Use peer.poll instead? */
- int status; /* Hug to check status information on GPS */
- int y2kwarn; /* Y2K bug */
-};
-
-/*
- * Queries definition
- */
-static char fginit[] = { 0x10, 0x48, 0x10, 0x0D, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-0, 0, 0, 0, 0, 0, 0, 0, 0 };
-static char fgdate[] = { 0x10, 0x44, 0x10, 0x0D, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-/*
- * Transfer vector
- */
-struct refclock refclock_fg = {
- fg_start, /* start up driver */
- fg_shutdown, /* shut down driver */
- fg_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-/*
- * fg_init - Initialization of FG GPS.
- */
-
-static int
-fg_init(
- int fd
- )
-{
- if (write(fd, fginit, LENFG) != LENFG)
- return 0;
-
- return (1);
-
-}
-
-/*
- * fg_start - open the device and initialize data for processing
- */
-static int
-fg_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct fgunit *up;
- int fd;
- char device[20];
-
-
- /*
- * Open device file for reading.
- */
- (void)sprintf(device, DEVICE, unit);
-
-#ifdef DEBUG
- if (debug)
- printf ("starting FG with device %s\n",device);
-#endif
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
-
- if (!(up = (struct fgunit *)
- emalloc(sizeof(struct fgunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct fgunit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = fg_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- return (0);
- }
-
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 3);
- up->pollnum = 0;
-
- /*
- * Setup dating station to use GPS receiver.
- * GPS receiver should work before this operation.
- */
- if(!fg_init(pp->io.fd))
- refclock_report(peer, CEVNT_FAULT);
-
- return (1);
-}
-
-
-/*
- * fg_shutdown - shut down the clock
- */
-static void
-fg_shutdown(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct fgunit *up;
-
- pp = peer->procptr;
- up = (struct fgunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * fg_poll - called by the transmit procedure
- */
-static void
-fg_poll(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
-
- /*
- * Time to poll the clock. The FG clock responds to a
- * "<DLE>D<DLE><CR>" 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.
- */
-
- if (write(pp->io.fd, fgdate, LENFG) != LENFG)
- refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
-
- if (peer->burst > 0)
- return;
- /*
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- */
- peer->burst = NSTAGE;
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
-
- return;
-
-}
-
-/*
- * fg_receive - receive data from the serial interface
- */
-static void
-fg_receive(
- struct recvbuf *rbufp
- )
-{
- struct refclockproc *pp;
- struct fgunit *up;
- struct peer *peer;
- char *bpt;
-
- /*
- * Initialize pointers and read the timecode and timestamp
- * We can't use gtlin function because we need bynary data in buf */
-
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct fgunit *)pp->unitptr;
-
- /*
- * Below hug to implement receiving of status information
- */
- if(!up->pollnum)
- {
- up->pollnum++;
- return;
- }
-
-
- if (rbufp->recv_length < (LENFG-2))
- {
- refclock_report(peer, CEVNT_BADREPLY);
- return; /* The reply is invalid discard it. */
- }
-
- /* Below I trying to find a correct reply in buffer.
- * Sometime GPS reply located in the beginnig of buffer,
- * sometime you can find it with some offset.
- */
-
- bpt = (char *)rbufp->recv_space.X_recv_buffer;
- while(*bpt != '')
- bpt++;
-
-#define BP2(x) ( bpt[x] & 15 )
-#define BP1(x) (( bpt[x] & 240 ) >> 4)
-
- pp->year = BP1(2)*10 + BP2(2);
-
- if(pp->year == 94)
- {
- refclock_report(peer, CEVNT_BADREPLY);
- if(!fg_init(pp->io.fd))
- refclock_report(peer, CEVNT_FAULT);
- return;
- /* GPS is just powered up. The date is invalid -
- discarding it. Initilize GPS one more time */
- /* Sorry - this driver will broken in 2094 ;) */
- }
-
- if (pp->year < 99)
- pp->year += 100;
-
- pp->year += 1900;
- pp->day = 100 * BP2(3) + 10 * BP1(4) + BP2(4);
-
-/*
- After Jan, 10 2000 Forum Graphic GPS receiver had a very strange
- benahour. It doubles day number for an hours in replys after 10:10:10 UTC
- and doubles min every hour at HH:10:ss for a minute.
- Hope it is a problem of my unit only and not a Y2K problem of FG GPS.
- Below small code to avoid such situation.
-*/
- if(up->y2kwarn > 10)
- pp->hour = BP1(6)*10 + BP2(6);
- else
- pp->hour = BP1(5)*10 + BP2(5);
-
- if((up->y2kwarn > 10) && (pp->hour == 10))
- {
- pp->minute = BP1(7)*10 + BP2(7);
- pp->second = BP1(8)*10 + BP2(8);
- 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->nsec = (BP1(8)*10 + BP2(8)) * 1000000;
- pp->nsec += BP1(9) * 1000;
- }
-
- if((pp->hour == 10) && (pp->minute == 10))
- {
- up->y2kwarn++;
- }
-
- sprintf(pp->a_lastcode, "%d %d %d %d %d", pp->year, pp->day, pp->hour, pp->minute, pp->second);
- pp->lencode = strlen(pp->a_lastcode);
- /*get_systime(&pp->lastrec);*/
-
-#ifdef DEBUG
- if (debug)
- printf ("fg: time is %04d/%03d %02d:%02d:%02d UTC\n",
- pp->year, pp->day, pp->hour, pp->minute, pp->second);
-#endif
-
- if (peer->stratum <= 1)
- peer->refid = pp->refid;
- pp->disp = (10e-6);
- pp->lastrec = rbufp->recv_time; /* Is it better than get_systime()? */
- /* pp->leap = LEAP_NOWARNING; */
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
-
- if (!refclock_process(pp))
- refclock_report(peer, CEVNT_BADTIME);
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- return;
-}
-
-
-#else
-int refclock_fg_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_gpsvme.c b/contrib/ntp/ntpd/refclock_gpsvme.c
deleted file mode 100644
index a7fcf5f..0000000
--- a/contrib/ntp/ntpd/refclock_gpsvme.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/*
- * refclock_gpsvme.c NTP clock driver for the TrueTime GPS-VME
- * R. Schmidt, Time Service, US Naval Obs. res@tuttle.usno.navy.mil
- *
- * The refclock type has been defined as 16 (until new id assigned).
- * These DEFS are included in the Makefile:
- * DEFS= -DHAVE_TERMIOS -DSYS_HPUX=9
- * DEFS_LOCAL= -DREFCLOCK
- * CLOCKDEFS= -DGPSVME
- * The file map_vme.c does the VME memory mapping, and includes vme_init().
- * map_vme.c is HP-UX specific, because HPUX cannot mmap() device files! Boo!
- * The file gps.h provides TrueTime register info.
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_GPSVME)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-
-#include "gps.h"
-#include "/etc/conf/h/io.h"
-
-/* GLOBAL STUFF BY RES */
-
-#include <time.h>
-
-#define PRIO 120 /* set the realtime priority */
-#define NREGS 7 /* number of registers we will use */
-
-extern int init_vme(); /* This is just a call to map_vme() */
- /* It doesn't have to be extern */
- /* the map_vme() call */
-extern unsigned short *greg[NREGS]; /* made extern to avoid being in both map_vme.c and this file */
-extern void *gps_base; /* mjb lmco 12/20/99 */
-
-extern caddr_t map_vme ();
-extern void unmap_vme(); /* Unmaps the VME space */
-
-struct vmedate { /* structure needed by ntp */
- unsigned short year; /* *tptr is a pointer to this */
- unsigned short doy;
- unsigned short hr;
- unsigned short mn;
- unsigned short sec;
- unsigned long frac;
- unsigned short status;
-};
-
-struct vmedate *get_gpsvme_time();
-struct vmedate * time_vme; /* added to emulate LM refclock_gpsvme
- (Made global per RES suggestion to fix mem leak DW lmco) mjb lmco 12/15/99 */
-
-/* END OF STUFF FROM RES */
-
-/*
- * Definitions
- */
-#define MAXUNITS 2 /* max number of VME units */
-#define BMAX 50 /* timecode buffer length */
-
-/*
- * VME interface parameters.
- */
-#define VMEPRECISION (-21) /* precision assumed (1 us) */
-#define USNOREFID "USNO\0" /* Or whatever? */
-#define VMEREFID "GPS" /* reference id */
-#define VMEDESCRIPTION "GPS" /* who we are */
-#define VMEHSREFID 0x7f7f1001 /* 127.127.16.01 refid hi strata */
-
-/* I'm using clock type 16 until one is assigned */
-/* This is set also in vme_control, below */
-
-
-#define GMT 0 /* hour offset from Greenwich */
-
-/*
- * VME unit control structure.
- */
-struct vmeunit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- struct vmedate vmedata; /* data returned from vme read */
- l_fp lastrec; /* last local time */
- l_fp lastref; /* last timecode time */
- char lastcode[BMAX]; /* last timecode received */
- u_short lencode; /* length of last timecode */
- u_long lasttime; /* last time clock heard from */
- u_short unit; /* unit number for this guy */
- u_short status; /* clock status */
- u_short lastevent; /* last clock event */
- u_short year; /* year of eternity */
- u_short day; /* day of year */
- u_short hour; /* hour of day */
- u_short minute; /* minute of hour */
- u_short second; /* seconds of minute */
- u_long usec; /* microsecond of second */
- u_long yearstart; /* start of current year */
- u_short leap; /* leap indicators */
- /*
- * Status tallies
- */
- u_long polls; /* polls sent */
- u_long noreply; /* no replies to polls */
- u_long coderecv; /* timecodes received */
- u_long badformat; /* bad format */
- u_long baddata; /* bad data */
- u_long timestarted; /* time we started this */
-};
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct vmeunit *vmeunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char sloppyclockflag[MAXUNITS];
-
-/*
- * Function prototypes
- */
-static void vme_init (void);
-static int vme_start (int, struct peer *);
-static void vme_shutdown (int, struct peer *);
-static void vme_report_event (struct vmeunit *, int);
-static void vme_receive (struct recvbuf *);
-static void vme_poll (int unit, struct peer *);
-static void vme_control (int, struct refclockstat *, struct refclockstat *, struct peer *);
-static void vme_buginfo (int, struct refclockbug *, struct peer *);
-
-/*
- * Transfer vector
- */
-struct refclock refclock_gpsvme = {
- vme_start, vme_shutdown, vme_poll,
- vme_control, vme_init, vme_buginfo, NOFLAGS
-};
-
-int fd_vme; /* file descriptor for ioctls */
-int regvalue;
-
-/*
- * vme_init - initialize internal vme driver data
- */
-static void
-vme_init(void)
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- /*
- bzero((char *)vmeunits, sizeof vmeunits);
- bzero((char *)unitinuse, sizeof unitinuse);
- */
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor[i].l_ui = 0;
- fudgefactor[i].l_uf = 0;
- stratumtouse[i] = 0;
- sloppyclockflag[i] = 0;
- }
-}
-
-/*
- * vme_start - open the VME device and initialize data for processing
- */
-static int
-vme_start(
- u_int unit,
- struct peer *peer
- )
-{
- register struct vmeunit *vme;
- register int i;
- int dummy;
- char vmedev[20];
-
- /*
- * Check configuration info.
- */
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "vme_start: unit %d invalid", unit);
- return (0);
- }
- if (unitinuse[unit]) {
- msyslog(LOG_ERR, "vme_start: unit %d in use", unit);
- return (0);
- }
-
- /*
- * Open VME device
- */
-#ifdef DEBUG
-
- printf("Opening VME DEVICE \n");
-#endif
- init_vme(); /* This is in the map_vme.c external file */
-
- /*
- * Allocate unit structure
- */
- if (vmeunits[unit] != 0) {
- vme = vmeunits[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && vmeunits[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- vme = vmeunits[i];
- vmeunits[i] = 0;
- } else {
- vme = (struct vmeunit *)
- emalloc(sizeof(struct vmeunit));
- time_vme = (struct vmedate *)malloc(sizeof(struct vmedate)); /* Added to emulate LM's refclock_gpsvme
- (added to fix mem lead DW lmco) mjb lmco 12/22/99 */
- }
- }
- bzero((char *)vme, sizeof(struct vmeunit));
- vmeunits[unit] = vme;
-
- /*
- * Set up the structures
- */
- vme->peer = peer;
- vme->unit = (u_short)unit;
- vme->timestarted = current_time;
-
- vme->io.clock_recv = vme_receive;
- vme->io.srcclock = (caddr_t)vme;
- vme->io.datalen = 0;
- vme->io.fd = fd_vme;
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = VMEPRECISION;
- peer->stratum = stratumtouse[unit];
- memcpy( (char *)&peer->refid, USNOREFID,4);
-
- /* peer->refid = htonl(VMEHSREFID); */
-
- unitinuse[unit] = 1;
- return (1);
-}
-
-
-/*
- * vme_shutdown - shut down a VME clock
- */
-static void
-vme_shutdown(
- int unit
- )
-{
- register struct vmeunit *vme;
-
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "vme_shutdown: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- msyslog(LOG_ERR, "vme_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- unmap_vme();
- vme = vmeunits[unit];
- io_closeclock(&vme->io);
- unitinuse[unit] = 0;
-}
-
-/*
- * vme_report_event - note the occurance of an event
- *
- * This routine presently just remembers the report and logs it, but
- * does nothing heroic for the trap handler.
- */
-static void
-vme_report_event(
- struct vmeunit *vme,
- int code
- )
-{
- struct peer *peer;
-
- peer = vme->peer;
- if (vme->status != (u_short)code) {
- vme->status = (u_short)code;
- if (code != CEVNT_NOMINAL)
- vme->lastevent = (u_short)code;
- msyslog(LOG_INFO,
- "clock %s event %x", ntoa(&peer->srcadr), code);
- }
-}
-
-
-/*
- * vme_receive - receive data from the VME device.
- *
- * Note: This interface would be interrupt-driven. We don't use that
- * now, but include a dummy routine for possible future adventures.
- */
-static void
-vme_receive(
- struct recvbuf *rbufp
- )
-{
-}
-
-/*
- * vme_poll - called by the transmit procedure
- */
-static void
-vme_poll(
- int unit,
- struct peer *peer
- )
-{
- struct vmedate *tptr;
- struct vmeunit *vme;
- l_fp tstmp;
- time_t tloc;
- struct tm *tadr;
- long ltemp;
-
-
-
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "vme_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- msyslog(LOG_ERR, "vme_poll: unit %d not in use", unit);
- return;
- }
- vme = vmeunits[unit]; /* Here is the structure */
- vme->polls++;
-
- tptr = &vme->vmedata;
-
- if ((tptr = get_gpsvme_time()) == NULL ) {
- vme_report_event(vme, CEVNT_BADREPLY);
- return;
- }
-
- get_systime(&vme->lastrec);
- vme->lasttime = current_time;
-
- /*
- * Get VME time and convert to timestamp format.
- * The year must come from the system clock.
- */
- /*
- time(&tloc);
- tadr = gmtime(&tloc);
- tptr->year = (unsigned short)(tadr->tm_year + 1900);
- */
-
- sprintf(vme->lastcode,
- "%3.3d %2.2d:%2.2d:%2.2d.%.6d %1d\0",
- tptr->doy, tptr->hr, tptr->mn,
- tptr->sec, tptr->frac, tptr->status);
-
- record_clock_stats(&(vme->peer->srcadr), vme->lastcode);
- vme->lencode = (u_short) strlen(vme->lastcode);
-
- vme->day = tptr->doy;
- vme->hour = tptr->hr;
- vme->minute = tptr->mn;
- vme->second = tptr->sec;
- 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->nsec, tptr->status);
-#endif
- if (tptr->status ) { /* Status 0 is locked to ref., 1 is not */
- vme_report_event(vme, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present. If an error in conversion to internal
- * format is found, the program declares bad data and exits.
- * Note that this code does not yet know how to do the years and
- * relies on the clock-calendar chip for sanity.
- */
- if (!clocktime(vme->day, vme->hour, vme->minute,
- vme->second, GMT, vme->lastrec.l_ui,
- &vme->yearstart, &vme->lastref.l_ui)) {
- vme->baddata++;
- vme_report_event(vme, CEVNT_BADTIME);
- msyslog(LOG_ERR, "refclock_gpsvme: bad data!!");
- return;
- }
- 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);
-}
-
-/*
- * vme_control - set fudge factors, return statistics2
- */
-static void
-vme_control(
- u_int unit,
- struct refclockstat *in,
- struct refclockstat *out,
- struct peer * peer
- )
-{
- register struct vmeunit *vme;
-
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "vme_control: unit %d invalid)", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- DTOLFP(in->fudgetime1, &fudgefactor[unit]); /* added mjb lmco 12/20/99 */
-
- if (in->haveflags & CLK_HAVEVAL1) {
- stratumtouse[unit] = (u_char)(in->fudgeval1 & 0xf);
- if (unitinuse[unit]) {
- struct peer *peer;
-
- /*
- * Should actually reselect clock, but
- * will wait for the next timecode
- */
- vme = vmeunits[unit];
- peer = vme->peer;
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
- memcpy( (char *)&peer->refid, USNOREFID,4);
- else
- peer->refid = htonl(VMEHSREFID);
- }
- }
- if (in->haveflags & CLK_HAVEFLAG1) {
- sloppyclockflag[unit] = in->flags & CLK_FLAG1;
- }
- }
-
- if (out != 0) {
- out->type = 16; /*set by RES SHOULD BE CHANGED */
- out->haveflags
- = CLK_HAVETIME1|CLK_HAVEVAL1|CLK_HAVEVAL2|CLK_HAVEFLAG1;
- out->clockdesc = VMEDESCRIPTION;
- LFPTOD(&fudgefactor[unit], out->fudgetime1); /* added mjb lmco 12/20/99 */
-
- out ->fudgetime2 = 0; /* should do what above was supposed to do mjb lmco 12/20/99 */
-
- out->fudgeval1 = (long)stratumtouse[unit]; /*changed from above LONG was not
- defined mjb lmco 12/15/99 */
-
- out->fudgeval2 = 0;
- out->flags = sloppyclockflag[unit];
- if (unitinuse[unit]) {
- vme = vmeunits[unit];
- out->lencode = vme->lencode;
- out->p_lastcode = vme->lastcode;
- out->timereset = current_time - vme->timestarted;
- out->polls = vme->polls;
- out->noresponse = vme->noreply;
- out->badformat = vme->badformat;
- out->baddata = vme->baddata;
- out->lastevent = vme->lastevent;
- out->currentstatus = vme->status;
- } else {
- out->lencode = 0;
- out->p_lastcode = "";
- out->polls = out->noresponse = 0;
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
- }
- }
-}
-
-/*
- * vme_buginfo - return clock dependent debugging info
- */
-static void
-vme_buginfo(
- int unit,
- register struct refclockbug *bug,
- struct peer * peer
- )
-{
- register struct vmeunit *vme;
-
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "vme_buginfo: unit %d invalid)", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- vme = vmeunits[unit];
-
- bug->nvalues = 11;
- bug->ntimes = 5;
- if (vme->lasttime != 0)
- bug->values[0] = current_time - vme->lasttime;
- else
- bug->values[0] = 0;
- bug->values[2] = (u_long)vme->year;
- bug->values[3] = (u_long)vme->day;
- 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->nsec;
- bug->values[9] = vme->yearstart;
- bug->stimes = 0x1c;
- bug->times[0] = vme->lastref;
- bug->times[1] = vme->lastrec;
-}
-/* -------------------------------------------------------*/
-/* get_gpsvme_time() */
-/* R. Schmidt, USNO, 1995 */
-/* It's ugly, but hey, it works and its free */
-
-#include "gps.h" /* defines for TrueTime GPS-VME */
-
-#define PBIAS 193 /* 193 microsecs to read the GPS experimentally found */
-
-struct vmedate *
-get_gpsvme_time(void)
-{
- extern struct vmedate *time_vme;
- unsigned short set, hr, min, sec, ums, hms, status;
- int ret;
- char ti[3];
-
- long tloc ;
- time_t mktime(),time();
- struct tm *gmtime(), *gmt;
- char *gpsmicro;
- gpsmicro = (char *) malloc(7);
-
- *greg = (unsigned short *)malloc(sizeof(short) * NREGS);
-
-
- /* reference the freeze command address general register 1 */
- set = *greg[0];
- /* read the registers : */
- /* get year */
- time_vme->year = (unsigned short) *greg[6];
- /* Get doy */
- time_vme->doy = (unsigned short) (*greg[5] & MASKDAY);
- /* Get hour */
- time_vme->hr = (unsigned short) ((*greg[4] & MASKHI) >>8);
- /* Get minutes */
- time_vme->mn = (unsigned short) (*greg[4] & MASKLO);
- /* Get seconds */
- time_vme->sec = (unsigned short) (*greg[3] & MASKHI) >>8;
- /* get microseconds in 2 parts and put together */
- ums = *greg[2];
- hms = *greg[3] & MASKLO;
-
- time_vme->status = (unsigned short) *greg[5] >>13;
-
- /* reference the unfreeze command address general register 1 */
- set = *greg[1];
-
- sprintf(gpsmicro,"%2.2x%4.4x\0", hms, ums);
- time_vme->frac = (u_long) gpsmicro;
-
- /* unmap_vme(); */
-
- if (!status) {
- return (NULL); /* fixed mjb lmco 12/20/99 */
- }
- else
- return (time_vme);
-}
-
-#else
-int refclock_gpsvme_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_heath.c b/contrib/ntp/ntpd/refclock_heath.c
deleted file mode 100644
index c16cef3..0000000
--- a/contrib/ntp/ntpd/refclock_heath.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * refclock_heath - clock driver for Heath GC-1000 and and GC-1000 II
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_HEATH)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* not HAVE_SYS_IOCTL_H */
-
-/*
- * 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.
- *
- * There are two GC-1000 versions supported by this driver. The original
- * GC-1000 with RS-232 output first appeared in 1983, but dissapeared
- * from the market a few years later. The GC-1000 II with RS-232 output
- * first appeared circa 1990, but apparently is no longer manufactured.
- * The two models differ considerably, both in interface and commands.
- * The GC-1000 has a pseudo-bipolar timecode output triggered by a RTS
- * transition. The timecode includes both the day of year and time of
- * day. The GC-1000 II has a true bipolar output and a complement of
- * single character commands. The timecode includes only the time of
- * day.
- *
- * GC-1000
- *
- * The internal DIPswitches should be set to operate in MANUAL mode. The
- * external DIPswitches should be set to GMT and 24-hour format.
- *
- * 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 TIOCMBIC and
- * TIOCMBIS ioctl system calls and TIOCM_RTS control bit. Present
- * restrictions require the use of a POSIX-compatible programming
- * interface, although other interfaces may work as well.
- *
- * A simple hardware modification to the clock can be made which
- * prevents the clock hearing the request to send (RTS) if the HI SPEC
- * lamp is out. Route the HISPEC signal to the tone decoder board pin
- * 19, from the display, pin 19. Isolate pin 19 of the decoder board
- * first, but maintain connection with pin 10. Also isolate pin 38 of
- * the CPU on the tone board, and use half an added 7400 to gate the
- * original signal to pin 38 with that from pin 19.
- *
- * The clock message consists of 23 ASCII printing characters in the
- * following format:
- *
- * hh:mm:ss.f AM dd/mm/yr<cr>
- *
- * hh:mm:ss.f = hours, minutes, seconds
- * f = deciseconds ('?' when out of spec)
- * AM/PM/bb = blank in 24-hour mode
- * dd/mm/yr = day, month, year
- *
- * The alarm condition is indicated by '?', rather than a digit, at f.
- * 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.
- *
- * GC-1000 II
- *
- * Commands consist of a single letter and are case sensitive. When
- * enterred in lower case, a description of the action performed is
- * displayed. When enterred in upper case the action is performed.
- * Following is a summary of descriptions as displayed by the clock:
- *
- * The clock responds with a command The 'A' command returns an ASCII
- * local time string: HH:MM:SS.T xx<CR>, where
- *
- * HH = hours
- * MM = minutes
- * SS = seconds
- * T = tenths-of-seconds
- * xx = 'AM', 'PM', or ' '
- * <CR> = carriage return
- *
- * The 'D' command returns 24 pairs of bytes containing the variable
- * divisor value at the end of each of the previous 24 hours. This
- * allows the timebase trimming process to be observed. UTC hour 00 is
- * always returned first. The first byte of each pair is the high byte
- * of (variable divisor * 16); the second byte is the low byte of
- * (variable divisor * 16). For example, the byte pair 3C 10 would be
- * returned for a divisor of 03C1 hex (961 decimal).
- *
- * The 'I' command returns: | TH | TL | ER | DH | DL | U1 | I1 | I2 | ,
- * where
- *
- * TH = minutes since timebase last trimmed (high byte)
- * TL = minutes since timebase last trimmed (low byte)
- * ER = last accumulated error in 1.25 ms increments
- * DH = high byte of (current variable divisor * 16)
- * DL = low byte of (current variable divisor * 16)
- * U1 = UT1 offset (/.1 s): | + | 4 | 2 | 1 | 0 | 0 | 0 | 0 |
- * I1 = information byte 1: | W | C | D | I | U | T | Z | 1 | ,
- * where
- *
- * W = set by WWV(H)
- * C = CAPTURE LED on
- * D = TRIM DN LED on
- * I = HI SPEC LED on
- * U = TRIM UP LED on
- * T = DST switch on
- * Z = UTC switch on
- * 1 = UT1 switch on
- *
- * I2 = information byte 2: | 8 | 8 | 4 | 2 | 1 | D | d | S | ,
- * where
- *
- * 8, 8, 4, 2, 1 = TIME ZONE switch settings
- * D = DST bit (#55) in last-received frame
- * d = DST bit (#2) in last-received frame
- * S = clock is in simulation mode
- *
- * The 'P' command returns 24 bytes containing the number of frames
- * received without error during UTC hours 00 through 23, providing an
- * indication of hourly propagation. These bytes are updated each hour
- * to reflect the previous 24 hour period. UTC hour 00 is always
- * returned first.
- *
- * The 'T' command returns the UTC time: | HH | MM | SS | T0 | , where
- * HH = tens-of-hours and hours (packed BCD)
- * MM = tens-of-minutes and minutes (packed BCD)
- * SS = tens-of-seconds and seconds (packed BCD)
- * T = tenths-of-seconds (BCD)
- *
- * Fudge Factors
- *
- * A fudge time1 value of .04 s appears to center the clock offset
- * residuals. The fudge time2 parameter is the local time offset east of
- * Greenwich, which depends on DST. Sorry about that, but the clock
- * gives no hint on what the DIPswitches say.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/heath%d" /* device name and unit */
-#define PRECISION (-4) /* precision assumed (about 100 ms) */
-#define REFID "WWV\0" /* reference ID */
-#define DESCRIPTION "Heath GC-1000 Most Accurate Clock" /* WRU */
-
-#define LENHEATH1 23 /* min timecode length */
-#define LENHEATH2 13 /* min timecode length */
-
-/*
- * Tables to compute the ddd of year form icky dd/mm timecode. Viva la
- * leap.
- */
-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};
-
-/*
- * Baud rate table. The GC-1000 supports 1200, 2400 and 4800; the
- * GC-1000 II supports only 9600.
- */
-static int speed[] = {B1200, B2400, B4800, B9600};
-
-/*
- * Function prototypes
- */
-static int heath_start P((int, struct peer *));
-static void heath_shutdown P((int, struct peer *));
-static void heath_receive P((struct recvbuf *));
-static void heath_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_heath = {
- heath_start, /* start up driver */
- heath_shutdown, /* shut down driver */
- heath_poll, /* transmit poll message */
- noentry, /* not used (old heath_control) */
- noentry, /* initialize driver */
- noentry, /* not used (old heath_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * heath_start - open the devices and initialize data for processing
- */
-static int
-heath_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, speed[peer->ttl & 0x3], 0)))
- return (0);
- pp = peer->procptr;
- pp->io.clock_recv = heath_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- peer->burst = NSTAGE;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- return (1);
-}
-
-
-/*
- * heath_shutdown - shut down the clock
- */
-static void
-heath_shutdown(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
- io_closeclock(&pp->io);
-}
-
-
-/*
- * heath_receive - receive data from the serial interface
- */
-static void
-heath_receive(
- struct recvbuf *rbufp
- )
-{
- struct refclockproc *pp;
- struct peer *peer;
- l_fp trtmp;
- int month, day;
- int i;
- char dsec, a[5];
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
- &trtmp);
-
- /*
- * 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.
- */
- switch (pp->lencode) {
-
- /*
- * GC-1000 timecode format: "hh:mm:ss.f AM mm/dd/yy"
- * GC-1000 II timecode format: "hh:mm:ss.f "
- */
- case LENHEATH1:
- if (sscanf(pp->a_lastcode,
- "%2d:%2d:%2d.%c%5c%2d/%2d/%2d", &pp->hour,
- &pp->minute, &pp->second, &dsec, a, &month, &day,
- &pp->year) != 8) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- break;
-
- /*
- * GC-1000 II timecode format: "hh:mm:ss.f "
- */
- case LENHEATH2:
- if (sscanf(pp->a_lastcode, "%2d:%2d:%2d.%c", &pp->hour,
- &pp->minute, &pp->second, &dsec) != 4) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- break;
-
- default:
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * We determine the day of the year from the DIPswitches. This
- * should be fixed, since somebody might forget to set them.
- * Someday this hazard will be fixed by a fiendish scheme that
- * looks at the timecode and year the radio shows, then computes
- * the residue of the seconds mod the seconds in a leap cycle.
- * If in the third year of that cycle and the third and later
- * months of that year, add one to the day. Then, correct the
- * timecode accordingly. Icky pooh. This bit of nonsense could
- * be avoided if the engineers had been required to write a
- * device driver before finalizing the timecode format.
- */
- if (month < 1 || month > 12 || day < 1) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- if (pp->year % 4) {
- if (day > day1tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++)
- day += day1tab[i];
- } else {
- if (day > day2tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++)
- day += day2tab[i];
- }
- pp->day = day;
-
- /*
- * Determine synchronization and last update
- */
- if (!isdigit((int)dsec))
- pp->leap = LEAP_NOTINSYNC;
- else {
- pp->nsec = (dsec - '0') * 100000000;
- pp->leap = LEAP_NOWARNING;
- }
- if (!refclock_process(pp))
- refclock_report(peer, CEVNT_BADTIME);
-}
-
-
-/*
- * heath_poll - called by the transmit procedure
- */
-static void
-heath_poll(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- int bits = TIOCM_RTS;
-
- /*
- * 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;
-
- /*
- * We toggle the RTS modem control lead (GC-1000) and sent a T
- * (GC-1000 II) to kick a timecode loose from the radio. This
- * code works only for POSIX and SYSV interfaces. With bsd you
- * are on your own. We take a timestamp between the up and down
- * edges to lengthen the pulse, which should be about 50 usec on
- * a Sun IPC. With hotshot CPUs, the pulse might get too short.
- * Later.
- */
- if (ioctl(pp->io.fd, TIOCMBIC, (char *)&bits) < 0)
- refclock_report(peer, CEVNT_FAULT);
- 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;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- 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
-int refclock_heath_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_hopfpci.c b/contrib/ntp/ntpd/refclock_hopfpci.c
deleted file mode 100644
index 1b02319..0000000
--- a/contrib/ntp/ntpd/refclock_hopfpci.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * refclock_hopfpci.c
- *
- * - clock driver for hopf 6039 PCI board (GPS or DCF77)
- * Bernd Altmeier altmeier@atlsoft.de
- *
- * latest source and further information can be found at:
- * http://www.ATLSoft.de/ntp
- *
- * In order to run this driver you have to install and test
- * the PCI-board driver for your system first.
- *
- * On Linux/UNIX
- *
- * The driver attempts to open the device /dev/hopf6039 .
- * 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.
- *
- * On Windows NT/2000
- *
- * The driver attempts to open the device by calling the function
- * "OpenHopfDevice()". 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.
- *
- *
- * Start 21.03.2000 Revision: 01.20
- * changes 22.12.2000 Revision: 01.40 flag1 = 1 sync even if Quarz
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_HOPF_PCI)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#undef fileno
-#include <ctype.h>
-#undef fileno
-
-#ifndef SYS_WINNT
-# include <sys/ipc.h>
-# include <sys/ioctl.h>
-# include <assert.h>
-# include <unistd.h>
-# include <stdio.h>
-# include "hopf6039.h"
-#else
-# include "hopf_PCI_io.h"
-#endif
-
-/*
- * hopfpci interface definitions
- */
-#define PRECISION (-10) /* precision assumed (1 ms) */
-#define REFID "hopf" /* reference ID */
-#define DESCRIPTION "hopf Elektronik PCI radio board"
-
-#define NSAMPLES 3 /* stages of median filter */
-#ifndef SYS_WINNT
-# define DEVICE "/dev/hopf6039" /* device name inode*/
-#else
-# define DEVICE "hopf6039" /* device name WinNT */
-#endif
-
-#define LEWAPWAR 0x20 /* leap second warning bit */
-
-#define HOPF_OPMODE 0xC0 /* operation mode mask */
-#define HOPF_INVALID 0x00 /* no time code available */
-#define HOPF_INTERNAL 0x40 /* internal clock */
-#define HOPF_RADIO 0x80 /* radio clock */
-#define HOPF_RADIOHP 0xC0 /* high precision radio clock */
-
-
-/*
- * hopfclock unit control structure.
- */
-struct hopfclock_unit {
- short unit; /* NTP refclock unit number */
- char leap_status; /* leap second flag */
-};
-int fd; /* file descr. */
-
-/*
- * Function prototypes
- */
-static int hopfpci_start (int, struct peer *);
-static void hopfpci_shutdown (int, struct peer *);
-static void hopfpci_poll (int unit, struct peer *);
-
-/*
- * Transfer vector
- */
-struct refclock refclock_hopfpci = {
- hopfpci_start, /* start up driver */
- hopfpci_shutdown, /* shut down driver */
- hopfpci_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-/*
- * hopfpci_start - attach to hopf PCI board 6039
- */
-static int
-hopfpci_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct hopfclock_unit *up;
-
- /*
- * Allocate and initialize unit structure
- */
- up = (struct hopfclock_unit *) emalloc(sizeof(struct hopfclock_unit));
-
- if (!(up)) {
- msyslog(LOG_ERR, "hopfPCIClock(%d) emalloc: %m",unit);
-#ifdef DEBUG
- printf("hopfPCIClock(%d) emalloc\n",unit);
-#endif
- return (0);
- }
- memset((char *)up, 0, sizeof(struct hopfclock_unit));
-
-#ifndef SYS_WINNT
-
- fd = open(DEVICE,O_RDWR); /* try to open hopf clock device */
-
-#else
- if (!OpenHopfDevice()){
- msyslog(LOG_ERR,"Start: %s unit: %d failed!",DEVICE,unit);
- return (0);
- }
-#endif
-
- pp = peer->procptr;
- pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = INVALID_SOCKET;
- pp->unitptr = (caddr_t)up;
-
- get_systime(&pp->lastrec);
-
- /*
- * Initialize miscellaneous peer variables
- */
- if (pp->unitptr!=0) {
- memcpy((char *)&pp->refid, REFID, 4);
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- up->leap_status = 0;
- up->unit = (short) unit;
- return (1);
- }
- else {
- return 0;
- }
-}
-
-
-/*
- * hopfpci_shutdown - shut down the clock
- */
-static void
-hopfpci_shutdown(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- register struct hopfpciTime *up;
-
- pp = peer->procptr;
- up = (struct hopfpciTime *)pp->unitptr;
-
-#ifndef SYS_WINNT
- close(fd);
-#else
- CloseHopfDevice();
-/* UnmapViewOfFile (up); */
-#endif
-}
-
-
-/*
- * hopfpci_poll - called by the transmit procedure
- */
-static void
-hopfpci_poll(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- register struct hopfpciTime *up;
- HOPFTIME m_time;
-
- pp = peer->procptr;
- up = (struct hopfpciTime *)pp->unitptr;
-
-#ifndef SYS_WINNT
- ioctl(fd,HOPF_CLOCK_GET_UTC,&m_time);
-#else
- GetHopfSystemTime(&m_time);
-#endif
- pp->polls++;
-
- pp->day = ymd2yd(m_time.wYear,m_time.wMonth,m_time.wDay);
- pp->hour = m_time.wHour;
- pp->minute = m_time.wMinute;
- pp->second = m_time.wSecond;
- 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.%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);
-
- /*
- * If clock has no valid status then report error and exit
- */
- if ((m_time.wStatus & HOPF_OPMODE) == HOPF_INVALID) { /* time ok? */
- refclock_report(peer, CEVNT_BADTIME);
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
-
- /*
- * Test if time is running on internal quarz
- * if CLK_FLAG1 is set, sychronize even if no radio operation
- */
-
- if ((m_time.wStatus & HOPF_OPMODE) == HOPF_INTERNAL){
- if ((pp->sloppyclockflag & CLK_FLAG1) == 0) {
- refclock_report(peer, CEVNT_BADTIME);
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
- }
-
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- return;
-}
-
-#else
-int refclock_hopfpci_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_hopfser.c b/contrib/ntp/ntpd/refclock_hopfser.c
deleted file mode 100644
index 1d27333..0000000
--- a/contrib/ntp/ntpd/refclock_hopfser.c
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- *
- * refclock_hopfser.c
- * - clock driver for hopf serial boards (GPS or DCF77)
- *
- * Date: 30.03.2000 Revision: 01.10
- *
- * latest source and further information can be found at:
- * http://www.ATLSoft.de/ntp
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#if defined(SYS_WINNT)
-#undef close
-#define close closesocket
-#endif
-
-#if defined(REFCLOCK) && (defined(CLOCK_HOPF_SERIAL))
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#if defined HAVE_SYS_MODEM_H
-# include <sys/modem.h>
-# define TIOCMSET MCSETA
-# define TIOCMGET MCGETA
-# define TIOCM_RTS MRTS
-#endif
-
-#ifdef HAVE_TERMIOS_H
-# ifdef TERMIOS_NEEDS__SVID3
-# define _SVID3
-# endif
-# include <termios.h>
-# ifdef TERMIOS_NEEDS__SVID3
-# undef _SVID3
-# endif
-#endif
-
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-
-/*
- * clock definitions
- */
-#define DESCRIPTION "hopf Elektronik serial clock" /* Long name */
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "hopf\0" /* reference ID */
-/*
- * I/O definitions
- */
-#define DEVICE "/dev/hopfclock%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-
-
-#define STX 0x02
-#define ETX 0x03
-#define CR 0x0c
-#define LF 0x0a
-
-/* parse states */
-#define REC_QUEUE_EMPTY 0
-#define REC_QUEUE_FULL 1
-
-#define HOPF_OPMODE 0x0C /* operation mode mask */
-#define HOPF_INVALID 0x00 /* no time code available */
-#define HOPF_INTERNAL 0x04 /* internal clock */
-#define HOPF_RADIO 0x08 /* radio clock */
-#define HOPF_RADIOHP 0x0C /* high precision radio clock */
-
-/*
- * hopfclock unit control structure.
- */
-struct hopfclock_unit {
- l_fp laststamp; /* last receive timestamp */
- short unit; /* NTP refclock unit number */
- u_long polled; /* flag to detect noreplies */
- char leap_status; /* leap second flag */
- int rpt_next;
-};
-
-/*
- * Function prototypes
- */
-
-static int hopfserial_start P((int, struct peer *));
-static void hopfserial_shutdown P((int, struct peer *));
-static void hopfserial_receive P((struct recvbuf *));
-static void hopfserial_poll P((int, struct peer *));
-/* static void hopfserial_io P((struct recvbuf *)); */
-/*
- * Transfer vector
- */
-struct refclock refclock_hopfser = {
- hopfserial_start, /* start up driver */
- hopfserial_shutdown, /* shut down driver */
- hopfserial_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-/*
- * hopfserial_start - open the devices and initialize data for processing
- */
-static int
-hopfserial_start (
- int unit,
- struct peer *peer
- )
-{
- register struct hopfclock_unit *up;
- struct refclockproc *pp;
- int fd;
- char gpsdev[20];
-
-#ifdef SYS_WINNT
- (void) sprintf(gpsdev, "COM%d:", unit);
-#else
- (void) sprintf(gpsdev, DEVICE, unit);
-#endif
- /* LDISC_STD, LDISC_RAW
- * Open serial port. Use CLK line discipline, if available.
- */
- fd = refclock_open(gpsdev, SPEED232, LDISC_CLK);
- if (fd <= 0) {
-#ifdef DEBUG
- printf("hopfSerialClock(%d) start: open %s failed\n", unit, gpsdev);
-#endif
- return 0;
- }
-
- msyslog(LOG_NOTICE, "hopfSerialClock(%d) fd: %d dev: %s", unit, fd,
- gpsdev);
-
- /*
- * Allocate and initialize unit structure
- */
- up = (struct hopfclock_unit *) emalloc(sizeof(struct hopfclock_unit));
-
- if (!(up)) {
- msyslog(LOG_ERR, "hopfSerialClock(%d) emalloc: %m",unit);
-#ifdef DEBUG
- printf("hopfSerialClock(%d) emalloc\n",unit);
-#endif
- (void) close(fd);
- return (0);
- }
-
- memset((char *)up, 0, sizeof(struct hopfclock_unit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = hopfserial_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
-#ifdef DEBUG
- printf("hopfSerialClock(%d) io_addclock\n",unit);
-#endif
- (void) close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- pp->clockdesc = DESCRIPTION;
- peer->precision = PRECISION;
- peer->burst = NSTAGE;
- memcpy((char *)&pp->refid, REFID, 4);
-
- up->leap_status = 0;
- up->unit = (short) unit;
-
- return (1);
-}
-
-
-/*
- * hopfserial_shutdown - shut down the clock
- */
-static void
-hopfserial_shutdown (
- int unit,
- struct peer *peer
- )
-{
- register struct hopfclock_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct hopfclock_unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-
-/*
- * hopfserial_receive - receive data from the serial interface
- */
-
-static void
-hopfserial_receive (
- struct recvbuf *rbufp
- )
-{
- struct hopfclock_unit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- int synch; /* synchhronization indicator */
- int DoW; /* Dow */
-
- int day, month; /* ddd conversion */
-
- /*
- * Initialize pointers and read the timecode and timestamp.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct hopfclock_unit *)pp->unitptr;
-
- if (up->rpt_next == 0 )
- return;
-
-
- up->rpt_next = 0; /* wait until next poll interval occur */
-
- pp->lencode = (u_short)refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &pp->lastrec);
-
- if (pp->lencode == 0)
- return;
-
- sscanf(pp->a_lastcode,
-#if 1
- "%1x%1x%2d%2d%2d%2d%2d%2d", /* ...cr,lf */
-#else
- "%*c%1x%1x%2d%2d%2d%2d%2d%2d", /* stx...cr,lf,etx */
-#endif
- &synch,
- &DoW,
- &pp->hour,
- &pp->minute,
- &pp->second,
- &day,
- &month,
- &pp->year);
-
-
- /*
- Validate received values at least enough to prevent internal
- array-bounds problems, etc.
- */
- if((pp->hour < 0) || (pp->hour > 23) ||
- (pp->minute < 0) || (pp->minute > 59) ||
- (pp->second < 0) || (pp->second > 60) /*Allow for leap seconds.*/ ||
- (day < 1) || (day > 31) ||
- (month < 1) || (month > 12) ||
- (pp->year < 0) || (pp->year > 99)) {
- /* Data out of range. */
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- /*
- some preparations
- */
- pp->day = ymd2yd(pp->year,month,day);
- pp->leap=0;
-
- /* Year-2000 check! */
- /* wrap 2-digit date into 4-digit */
-
- if(pp->year < YEAR_PIVOT) { pp->year += 100; } /* < 98 */
- pp->year += 1900;
-
- /* preparation for timecode ntpq rl command ! */
-
-#if 0
- wsprintf(pp->a_lastcode,
- "STATUS: %1X%1X, DATE: %02d.%02d.%04d TIME: %02d:%02d:%02d",
- synch,
- DoW,
- day,
- month,
- pp->year,
- pp->hour,
- pp->minute,
- pp->second);
-
- pp->lencode = strlen(pp->a_lastcode);
- if ((synch && 0xc) == 0 ){ /* time ok? */
- refclock_report(peer, CEVNT_BADTIME);
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
-#endif
- /*
- * If clock has no valid status then report error and exit
- */
- if ((synch & HOPF_OPMODE) == HOPF_INVALID ){ /* time ok? */
- refclock_report(peer, CEVNT_BADTIME);
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
-
- /*
- * Test if time is running on internal quarz
- * if CLK_FLAG1 is set, sychronize even if no radio operation
- */
-
- if ((synch & HOPF_OPMODE) == HOPF_INTERNAL){
- if ((pp->sloppyclockflag & CLK_FLAG1) == 0) {
- refclock_report(peer, CEVNT_BADTIME);
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
- }
-
-
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
-
-#if 0
- msyslog(LOG_ERR, " D:%x D:%d D:%d",synch,pp->minute,pp->second);
-#endif
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
- return;
-}
-
-
-/*
- * hopfserial_poll - called by the transmit procedure
- *
- */
-static void
-hopfserial_poll (
- int unit,
- struct peer *peer
- )
-{
- register struct hopfclock_unit *up;
- struct refclockproc *pp;
- pp = peer->procptr;
-
- up = (struct hopfclock_unit *)pp->unitptr;
-
- pp->polls++;
- up->rpt_next = 1;
-
-#if 0
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-#endif
-
- return;
-}
-
-#else
-int refclock_hopfser_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_hpgps.c b/contrib/ntp/ntpd/refclock_hpgps.c
deleted file mode 100644
index 7c801bb..0000000
--- a/contrib/ntp/ntpd/refclock_hpgps.c
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * refclock_hpgps - clock driver for HP 58503A GPS receiver
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_HPGPS)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/* Version 0.1 April 1, 1995
- * 0.2 April 25, 1995
- * tolerant of missing timecode response prompt and sends
- * clear status if prompt indicates error;
- * can use either local time or UTC from receiver;
- * can get receiver status screen via flag4
- *
- * WARNING!: This driver is UNDER CONSTRUCTION
- * Everything in here should be treated with suspicion.
- * If it looks wrong, it probably is.
- *
- * Comments and/or questions to: Dave Vitanye
- * Hewlett Packard Company
- * dave@scd.hp.com
- * (408) 553-2856
- *
- * Thanks to the author of the PST driver, which was the starting point for
- * this one.
- *
- * This driver supports the HP 58503A Time and Frequency Reference Receiver.
- * This receiver 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 usec. per day.
- *
- * The 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.
- *
- * The driver uses the poll sequence :PTIME:TCODE? to get a response from
- * the receiver. The receiver responds with a timecode string of ASCII
- * printing characters, followed by a <cr><lf>, followed by a prompt string
- * issued by the receiver, in the following format:
- * T#yyyymmddhhmmssMFLRVcc<cr><lf>scpi >
- *
- * The driver processes the response at the <cr> and <lf>, 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:
- *
- * scpi > T#yyyymmddhhmmssMFLRVcc<cr><lf>
- *
- * 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 <cr> 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
- *
- * This receiver also provides a 1PPS signal, but I haven't figured out
- * how to deal with any of the CLK or PPS stuff yet. Stay tuned.
- *
- */
-
-/*
- * Fudge Factors
- *
- * Fudge time1 is used to accomodate the timecode serial interface adjustment.
- * Fudge flag4 can be set to request a receiver status screen summary, which
- * is recorded in the clockstats file.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/hpgps%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "GPS\0" /* reference ID */
-#define DESCRIPTION "HP 58503A GPS Time and Frequency Reference Receiver"
-
-#define SMAX 23*80+1 /* for :SYSTEM:PRINT? status screen response */
-
-#define MTZONE 2 /* number of fields in timezone reply */
-#define MTCODET2 12 /* number of fields in timecode format T2 */
-#define NTCODET2 21 /* number of chars to checksum in format T2 */
-
-/*
- * Tables to compute the day of year from yyyymmdd timecode.
- * Viva la leap.
- */
-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};
-
-/*
- * Unit control structure
- */
-struct hpgpsunit {
- int pollcnt; /* poll message counter */
- int tzhour; /* timezone offset, hours */
- int tzminute; /* timezone offset, minutes */
- int linecnt; /* set for expected multiple line responses */
- char *lastptr; /* pointer to receiver response data */
- char statscrn[SMAX]; /* receiver status screen buffer */
-};
-
-/*
- * Function prototypes
- */
-static int hpgps_start P((int, struct peer *));
-static void hpgps_shutdown P((int, struct peer *));
-static void hpgps_receive P((struct recvbuf *));
-static void hpgps_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_hpgps = {
- hpgps_start, /* start up driver */
- hpgps_shutdown, /* shut down driver */
- hpgps_poll, /* transmit poll message */
- noentry, /* not used (old hpgps_control) */
- noentry, /* initialize driver */
- noentry, /* not used (old hpgps_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * hpgps_start - open the devices and initialize data for processing
- */
-static int
-hpgps_start(
- int unit,
- struct peer *peer
- )
-{
- register struct hpgpsunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct hpgpsunit *)
- emalloc(sizeof(struct hpgpsunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct hpgpsunit));
- pp = peer->procptr;
- pp->io.clock_recv = hpgps_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->tzhour = 0;
- up->tzminute = 0;
-
- *up->statscrn = '\0';
- up->lastptr = up->statscrn;
- up->pollcnt = 2;
-
- /*
- * Get the identifier string, which is logged but otherwise ignored,
- * and get the local timezone information
- */
- up->linecnt = 1;
- if (write(pp->io.fd, "*IDN?\r:PTIME:TZONE?\r", 20) != 20)
- refclock_report(peer, CEVNT_FAULT);
-
- return (1);
-}
-
-
-/*
- * hpgps_shutdown - shut down the clock
- */
-static void
-hpgps_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct hpgpsunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct hpgpsunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * hpgps_receive - receive data from the serial interface
- */
-static void
-hpgps_receive(
- struct recvbuf *rbufp
- )
-{
- register struct hpgpsunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- l_fp trtmp;
- char tcodechar1; /* identifies timecode format */
- char tcodechar2; /* identifies timecode format */
- char timequal; /* time figure of merit: 0-9 */
- char freqqual; /* frequency figure of merit: 0-3 */
- char leapchar; /* leapsecond: + or 0 or - */
- char servchar; /* request for service: 0 = no, 1 = yes */
- char syncchar; /* time info is invalid: 0 = no, 1 = yes */
- short expectedsm; /* expected timecode byte checksum */
- short tcodechksm; /* computed timecode byte checksum */
- int i,m,n;
- int month, day, lastday;
- char *tcp; /* timecode pointer (skips over the prompt) */
- char prompt[BMAX]; /* prompt in response from receiver */
-
- /*
- * Initialize pointers and read the receiver response
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct hpgpsunit *)pp->unitptr;
- *pp->a_lastcode = '\0';
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-
-#ifdef DEBUG
- if (debug)
- printf("hpgps: lencode: %d timecode:%s\n",
- pp->lencode, pp->a_lastcode);
-#endif
-
- /*
- * If there's no characters in the reply, we can quit now
- */
- if (pp->lencode == 0)
- return;
-
- /*
- * If linecnt is greater than zero, we are getting information only,
- * such as the receiver identification string or the receiver status
- * screen, so put the receiver response at the end of the status
- * screen buffer. When we have the last line, write the buffer to
- * the clockstats file and return without further processing.
- *
- * If linecnt is zero, we are expecting either the timezone
- * or a timecode. At this point, also write the response
- * to the clockstats file, and go on to process the prompt (if any),
- * timezone, or timecode and timestamp.
- */
-
-
- if (up->linecnt-- > 0) {
- if ((int)(pp->lencode + 2) <= (SMAX - (up->lastptr - up->statscrn))) {
- *up->lastptr++ = '\n';
- (void)strcpy(up->lastptr, pp->a_lastcode);
- up->lastptr += pp->lencode;
- }
- if (up->linecnt == 0)
- record_clock_stats(&peer->srcadr, up->statscrn);
-
- return;
- }
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- pp->lastrec = trtmp;
-
- up->lastptr = up->statscrn;
- *up->lastptr = '\0';
- up->pollcnt = 2;
-
- /*
- * We get down to business: get a prompt if one is there, issue
- * a clear status command if it contains an error indication.
- * Next, check for either the timezone reply or the timecode reply
- * and decode it. If we don't recognize the reply, or don't get the
- * proper number of decoded fields, or get an out of range timezone,
- * or if the timecode checksum is bad, then we declare bad format
- * and exit.
- *
- * Timezone format (including nominal prompt):
- * scpi > -H,-M<cr><lf>
- *
- * Timecode format (including nominal prompt):
- * scpi > T2yyyymmddhhmmssMFLRVcc<cr><lf>
- *
- */
-
- (void)strcpy(prompt,pp->a_lastcode);
- tcp = strrchr(pp->a_lastcode,'>');
- if (tcp == NULL)
- tcp = pp->a_lastcode;
- else
- tcp++;
- prompt[tcp - pp->a_lastcode] = '\0';
- while ((*tcp == ' ') || (*tcp == '\t')) tcp++;
-
- /*
- * deal with an error indication in the prompt here
- */
- if (strrchr(prompt,'E') > strrchr(prompt,'s')){
-#ifdef DEBUG
- if (debug)
- printf("hpgps: error indicated in prompt: %s\n", prompt);
-#endif
- if (write(pp->io.fd, "*CLS\r\r", 6) != 6)
- refclock_report(peer, CEVNT_FAULT);
- }
-
- /*
- * make sure we got a timezone or timecode format and
- * then process accordingly
- */
- m = sscanf(tcp,"%c%c", &tcodechar1, &tcodechar2);
-
- if (m != 2){
-#ifdef DEBUG
- if (debug)
- printf("hpgps: no format indicator\n");
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- switch (tcodechar1) {
-
- case '+':
- case '-':
- m = sscanf(tcp,"%d,%d", &up->tzhour, &up->tzminute);
- if (m != MTZONE) {
-#ifdef DEBUG
- if (debug)
- printf("hpgps: only %d fields recognized in timezone\n", m);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- if ((up->tzhour < -12) || (up->tzhour > 13) ||
- (up->tzminute < -59) || (up->tzminute > 59)){
-#ifdef DEBUG
- if (debug)
- printf("hpgps: timezone %d, %d out of range\n",
- up->tzhour, up->tzminute);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- return;
-
- case 'T':
- break;
-
- default:
-#ifdef DEBUG
- if (debug)
- printf("hpgps: unrecognized reply format %c%c\n",
- tcodechar1, tcodechar2);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- } /* end of tcodechar1 switch */
-
-
- switch (tcodechar2) {
-
- case '2':
- m = sscanf(tcp,"%*c%*c%4d%2d%2d%2d%2d%2d%c%c%c%c%c%2hx",
- &pp->year, &month, &day, &pp->hour, &pp->minute, &pp->second,
- &timequal, &freqqual, &leapchar, &servchar, &syncchar,
- &expectedsm);
- n = NTCODET2;
-
- if (m != MTCODET2){
-#ifdef DEBUG
- if (debug)
- printf("hpgps: only %d fields recognized in timecode\n", m);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- break;
-
- default:
-#ifdef DEBUG
- if (debug)
- printf("hpgps: unrecognized timecode format %c%c\n",
- tcodechar1, tcodechar2);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- } /* end of tcodechar2 format switch */
-
- /*
- * Compute and verify the checksum.
- * Characters are summed starting at tcodechar1, ending at just
- * before the expected checksum. Bail out if incorrect.
- */
- tcodechksm = 0;
- while (n-- > 0) tcodechksm += *tcp++;
- tcodechksm &= 0x00ff;
-
- if (tcodechksm != expectedsm) {
-#ifdef DEBUG
- if (debug)
- printf("hpgps: checksum %2hX doesn't match %2hX expected\n",
- tcodechksm, expectedsm);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Compute the day of year from the yyyymmdd format.
- */
- if (month < 1 || month > 12 || day < 1) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- if ( ! isleap_4(pp->year) ) { /* Y2KFixes */
- /* not a leap year */
- if (day > day1tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++) day += day1tab[i];
- lastday = 365;
- } else {
- /* a leap year */
- if (day > day2tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++) day += day2tab[i];
- lastday = 366;
- }
-
- /*
- * Deal with the timezone offset here. The receiver timecode is in
- * local time = UTC + :PTIME:TZONE, so SUBTRACT the timezone values.
- * For example, Pacific Standard Time is -8 hours , 0 minutes.
- * Deal with the underflows and overflows.
- */
- pp->minute -= up->tzminute;
- pp->hour -= up->tzhour;
-
- if (pp->minute < 0) {
- pp->minute += 60;
- pp->hour--;
- }
- if (pp->minute > 59) {
- pp->minute -= 60;
- pp->hour++;
- }
- if (pp->hour < 0) {
- pp->hour += 24;
- day--;
- if (day < 1) {
- pp->year--;
- if ( isleap_4(pp->year) ) /* Y2KFixes */
- day = 366;
- else
- day = 365;
- }
- }
-
- if (pp->hour > 23) {
- pp->hour -= 24;
- day++;
- if (day > lastday) {
- pp->year++;
- day = 1;
- }
- }
-
- pp->day = day;
-
- /*
- * Decode the MFLRV indicators.
- * NEED TO FIGURE OUT how to deal with the request for service,
- * time quality, and frequency quality indicators some day.
- */
- if (syncchar != '0') {
- pp->leap = LEAP_NOTINSYNC;
- }
- else {
- switch (leapchar) {
-
- case '+':
- pp->leap = LEAP_ADDSECOND;
- break;
-
- case '0':
- pp->leap = LEAP_NOWARNING;
- break;
-
- case '-':
- pp->leap = LEAP_DELSECOND;
- break;
-
- default:
-#ifdef DEBUG
- if (debug)
- printf("hpgps: unrecognized leap indicator: %c\n",
- leapchar);
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- return;
- } /* end of leapchar switch */
- }
-
- /*
- * Process the new sample in the median filter and determine the
- * reference clock offset and dispersion. 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 (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
-
- /*
- * If CLK_FLAG4 is set, ask for the status screen response.
- */
- if (pp->sloppyclockflag & CLK_FLAG4){
- up->linecnt = 22;
- if (write(pp->io.fd, ":SYSTEM:PRINT?\r", 15) != 15)
- refclock_report(peer, CEVNT_FAULT);
- }
-}
-
-
-/*
- * hpgps_poll - called by the transmit procedure
- */
-static void
-hpgps_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct hpgpsunit *up;
- struct refclockproc *pp;
-
- /*
- * Time to poll the clock. The HP 58503A responds to a
- * ":PTIME:TCODE?" 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.
- */
- pp = peer->procptr;
- up = (struct hpgpsunit *)pp->unitptr;
- if (up->pollcnt == 0)
- refclock_report(peer, CEVNT_TIMEOUT);
- else
- up->pollcnt--;
- if (write(pp->io.fd, ":PTIME:TCODE?\r", 14) != 14) {
- refclock_report(peer, CEVNT_FAULT);
- }
- else
- pp->polls++;
-}
-
-#else
-int refclock_hpgps_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_irig.c b/contrib/ntp/ntpd/refclock_irig.c
deleted file mode 100644
index 0b35368..0000000
--- a/contrib/ntp/ntpd/refclock_irig.c
+++ /dev/null
@@ -1,1049 +0,0 @@
-/*
- * refclock_irig - audio IRIG-B/E demodulator/decoder
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_IRIG)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <math.h>
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
-#include "audio.h"
-
-/*
- * Audio IRIG-B/E demodulator/decoder
- *
- * This driver receives, demodulates and decodes IRIG-B/E signals when
- * connected to the audio codec /dev/audio. The IRIG signal format is 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. The
- * driver automatically recognizes which format is in use.
- *
- * The program processes 8000-Hz mu-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.
- *
- * 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).
- *
- * The program performs a number of error checks to protect against
- * overdriven or underdriven input signal levels, incorrect signal
- * format or improper hardware configuration. Specifically, if any of
- * the following errors occur for a time measurement, the data are
- * rejected.
- *
- * o The peak carrier amplitude is less than DRPOUT (100). This usually
- * means dead IRIG signal source, broken cable or wrong input port.
- *
- * o The frequency error is greater than MAXFREQ +-250 PPM (.025%). This
- * usually means broken codec hardware or wrong codec configuration.
- *
- * 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
- * synchronization (signature control).
- *
- * o A data decoding error has occurred. This usually means wrong IRIG
- * signal format.
- *
- * o The current second of the day is not exactly one greater than the
- * previous one. This usually means a very noisy IRIG signal or
- * insufficient CPU resources.
- *
- * o An audio codec error (overrun) occurred. This usually means
- * insufficient CPU resources, as sometimes happens with Sun SPARC
- * IPCs when doing something useful.
- *
- * Note that additional checks are done elsewhere in the reference clock
- * interface routines.
- *
- * Debugging aids
- *
- * 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:
- *
- * 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.
- *
- * The first field contains 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 signal amplitude (0-8100), codec gain (0-255),
- * 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 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
- * audio codec would be useful in a single machine. More than one would
- * probably chew up too much CPU time anyway.
- *
- * Fudge factors
- *
- * 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. Fudgetime2 is used as a frequency vernier for
- * broken codec sample frequency.
- */
-/*
- * Interface definitions
- */
-#define DEVICE_AUDIO "/dev/audio" /* audio device name */
-#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 */
-#define SIZE 256 /* decompanding table size */
-#define CYCLE 8 /* samples per carrier cycle */
-#define SUBFLD 10 /* bits per subfield */
-#define FIELD 10 /* subfields per field */
-#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 filter delays
- */
-#define IRIG_B .0019 /* IRIG-B filter delay */
-#define IRIG_E .0019 /* IRIG-E filter delay */
-
-/*
- * Data bit definitions
- */
-#define BIT0 0 /* zero */
-#define BIT1 1 /* one */
-#define BITP 2 /* position identifier */
-
-/*
- * Error flags (up->errflg)
- */
-#define IRIG_ERR_AMP 0x01 /* low carrier amplitude */
-#define IRIG_ERR_FREQ 0x02 /* frequency tolerance exceeded */
-#define IRIG_ERR_MOD 0x04 /* low modulation index */
-#define IRIG_ERR_SYNCH 0x08 /* frame synch error */
-#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
- */
-struct irigunit {
- u_char timecode[21]; /* timecode string */
- l_fp timestamp; /* audio sample timestamp */
- l_fp tick; /* audio sample increment */
- double integ[BAUD]; /* baud integrator */
- double phase, freq; /* logical clock phase and frequency */
- double zxing; /* phase detector integrator */
- 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 */
- /*
- * 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 */
-
- /*
- * RF variables
- */
- double hpf[5]; /* IRIG-B filter shift register */
- double lpf[5]; /* IRIG-E filter shift register */
- double intmin, intmax; /* integrated envelope min and max */
- double envmax; /* peak amplitude */
- double envmin; /* noise amplitude */
- double maxsignal; /* integrated peak amplitude */
- double noise; /* integrated noise amplitude */
- double lastenv[CYCLE]; /* last cycle amplitudes */
- double lastint[CYCLE]; /* last integrated cycle amplitudes */
- double lastsig; /* last carrier sample */
- double fdelay; /* filter delay */
- int decim; /* sample decimation factor */
- int envphase; /* envelope phase */
- int envptr; /* envelope phase pointer */
- int carphase; /* carrier phase */
- int envsw; /* envelope state */
- int envxing; /* envelope slice crossing */
- int tc; /* time constant */
- int tcount; /* time constant counter */
- int badcnt; /* decimation interval counter */
-
- /*
- * Decoder variables
- */
- int pulse; /* cycle counter */
- int cycles; /* carrier cycles */
- int dcycles; /* data cycles */
- int xptr; /* translate table pointer */
- int lastbit; /* last code element length */
- int second; /* previous second */
- 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;
-};
-
-/*
- * Function prototypes
- */
-static int irig_start P((int, struct peer *));
-static void irig_shutdown P((int, struct peer *));
-static void irig_receive P((struct recvbuf *));
-static void irig_poll P((int, struct peer *));
-
-/*
- * More function prototypes
- */
-static void irig_base P((struct peer *, double));
-static void irig_rf P((struct peer *, double));
-static void irig_decode P((struct peer *, int));
-static void irig_gain P((struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_irig = {
- irig_start, /* start up driver */
- irig_shutdown, /* shut down driver */
- irig_poll, /* transmit poll message */
- noentry, /* not used (old irig_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old irig_buginfo) */
- NOFLAGS /* not used */
-};
-
-/*
- * 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 */
-};
-
-
-/*
- * irig_start - open the devices and initialize data for processing
- */
-static int
-irig_start(
- int unit, /* instance number (used for PCM) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-
- /*
- * Local variables
- */
- int fd; /* file descriptor */
- int i; /* index */
- double step; /* codec adjustment */
-
- /*
- * Open audio device
- */
- fd = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
- if (fd < 0)
- return (0);
-#ifdef DEBUG
- if (debug)
- audio_show();
-#endif
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct irigunit *)
- emalloc(sizeof(struct irigunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct irigunit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = irig_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void)close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->tc = MINTC;
- up->decim = 1;
- up->fdelay = IRIG_B;
- up->gain = 127;
-
- /*
- * The companded samples are encoded sign-magnitude. The table
- * contains all the 256 values in the interest of speed.
- */
- up->comp[0] = up->comp[OFFSET] = 0.;
- up->comp[1] = 1; up->comp[OFFSET + 1] = -1.;
- up->comp[2] = 3; up->comp[OFFSET + 2] = -3.;
- step = 2.;
- for (i = 3; i < OFFSET; i++) {
- up->comp[i] = up->comp[i - 1] + step;
- up->comp[OFFSET + i] = -up->comp[i];
- if (i % 16 == 0)
- step *= 2.;
- }
- DTOLFP(1. / SECOND, &up->tick);
- return (1);
-}
-
-
-/*
- * irig_shutdown - shut down the clock
- */
-static void
-irig_shutdown(
- int unit, /* instance number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * irig_receive - receive data from the audio device
- *
- * This routine reads input samples and adjusts the logical clock to
- * track the irig clock by dropping or duplicating codec samples.
- */
-static void
-irig_receive(
- struct recvbuf *rbufp /* receive buffer structure pointer */
- )
-{
- struct peer *peer;
- struct refclockproc *pp;
- struct irigunit *up;
-
- /*
- * Local variables
- */
- 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;
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
-
- /*
- * 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;
- 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,
- * increase the gain a tad; if the clips are too high,
- * decrease a tad.
- */
- if (sample > MAXSIG) {
- sample = MAXSIG;
- up->clipcnt++;
- } else if (sample < -MAXSIG) {
- sample = -MAXSIG;
- up->clipcnt++;
- }
-
- /*
- * 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) {
- up->phase += 1.;
- irig_rf(peer, sample);
- irig_rf(peer, sample);
- } else {
- irig_rf(peer, sample);
- }
- L_ADD(&up->timestamp, &up->tick);
-
- /*
- * Once each second, determine the IRIG format and gain.
- */
- up->seccnt = (up->seccnt + 1) % SECOND;
- if (up->seccnt == 0) {
- if (up->irig_b > up->irig_e) {
- up->decim = 1;
- up->fdelay = IRIG_B;
- } else {
- up->decim = 10;
- up->fdelay = IRIG_E;
- }
- irig_gain(peer);
- up->irig_b = up->irig_e = 0;
- }
- }
-
- /*
- * 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)
- up->mongain = MONGAIN;
- else
- up->mongain = 0;
-}
-
-/*
- * irig_rf - RF processing
- *
- * This routine filters the RF signal using a highpass filter for IRIG-B
- * and a lowpass filter for IRIG-E. In case of IRIG-E, the samples are
- * decimated by a factor of ten. The lowpass filter functions also as a
- * decimation filter in this case. Note that the codec filters function
- * as roofing filters to attenuate both the high and low ends of the
- * passband. IIR filter coefficients were determined using Matlab Signal
- * Processing Toolkit.
- */
-static void
-irig_rf(
- struct peer *peer, /* peer structure pointer */
- double sample /* current signal sample */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-
- /*
- * Local variables
- */
- double irig_b, irig_e; /* irig filter outputs */
-
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
-
- /*
- * IRIG-B filter. 4th-order elliptic, 800-Hz highpass, 0.3 dB
- * passband ripple, -50 dB stopband ripple, phase delay .0022
- * s)
- */
- irig_b = (up->hpf[4] = up->hpf[3]) * 2.322484e-01;
- irig_b += (up->hpf[3] = up->hpf[2]) * -1.103929e+00;
- irig_b += (up->hpf[2] = up->hpf[1]) * 2.351081e+00;
- irig_b += (up->hpf[1] = up->hpf[0]) * -2.335036e+00;
- up->hpf[0] = sample - irig_b;
- irig_b = up->hpf[0] * 4.335855e-01
- + up->hpf[1] * -1.695859e+00
- + up->hpf[2] * 2.525004e+00
- + up->hpf[3] * -1.695859e+00
- + up->hpf[4] * 4.335855e-01;
- up->irig_b += irig_b * irig_b;
-
- /*
- * IRIG-E filter. 4th-order elliptic, 130-Hz lowpass, 0.3 dB
- * passband ripple, -50 dB stopband ripple, phase delay .0219 s.
- */
- irig_e = (up->lpf[4] = up->lpf[3]) * 8.694604e-01;
- irig_e += (up->lpf[3] = up->lpf[2]) * -3.589893e+00;
- irig_e += (up->lpf[2] = up->lpf[1]) * 5.570154e+00;
- irig_e += (up->lpf[1] = up->lpf[0]) * -3.849667e+00;
- up->lpf[0] = sample - irig_e;
- irig_e = up->lpf[0] * 3.215696e-03
- + up->lpf[1] * -1.174951e-02
- + up->lpf[2] * 1.712074e-02
- + up->lpf[3] * -1.174951e-02
- + up->lpf[4] * 3.215696e-03;
- up->irig_e += irig_e * irig_e;
-
- /*
- * Decimate by a factor of either 1 (IRIG-B) or 10 (IRIG-E).
- */
- up->badcnt = (up->badcnt + 1) % up->decim;
- if (up->badcnt == 0) {
- if (up->decim == 1)
- irig_base(peer, irig_b);
- else
- irig_base(peer, irig_e);
- }
-}
-
-/*
- * irig_base - baseband processing
- *
- * This routine processes the baseband signal and demodulates the AM
- * carrier using a synchronous detector. It then synchronizes to the
- * data frame at the baud rate and decodes the data pulses.
- */
-static void
-irig_base(
- struct peer *peer, /* peer structure pointer */
- double sample /* current signal sample */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-
- /*
- * Local variables
- */
- double xxing; /* phase detector interpolated output */
- double lope; /* integrator output */
- double env; /* envelope detector output */
- double dtemp; /* double temp */
-
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
-
- /*
- * Synchronous baud integrator. Corresponding samples of current
- * and past baud intervals are integrated to refine the envelope
- * amplitude and phase estimate. We keep one cycle of both the
- * raw and integrated data for later use.
- */
- up->envphase = (up->envphase + 1) % BAUD;
- up->carphase = (up->carphase + 1) % CYCLE;
- up->integ[up->envphase] += (sample - up->integ[up->envphase]) /
- (5 * up->tc);
- lope = up->integ[up->envphase];
- up->lastenv[up->carphase] = sample;
- up->lastint[up->carphase] = lope;
-
- /*
- * Phase detector. Sample amplitudes are integrated over the
- * baud interval. Cycle phase is determined from these
- * amplitudes using an eight-sample cyclic buffer. A phase
- * change of 360 degrees produces an output change of one unit.
- */
- if (up->lastsig > 0 && lope <= 0) {
- xxing = lope / (up->lastsig - lope);
- up->zxing += (up->carphase - 4 + xxing) / CYCLE;
- }
- up->lastsig = lope;
-
- /*
- * Update signal/noise estimates and PLL phase/frequency.
- */
- if (up->envphase == 0) {
-
- /*
- * Update envelope signal and noise estimates and mess
- * with error bits.
- */
- up->maxsignal = up->intmax;
- up->noise = up->intmin;
- if (up->maxsignal < DRPOUT)
- up->errflg |= IRIG_ERR_AMP;
- if (up->maxsignal > 0)
- up->modndx = (up->intmax - up->intmin) /
- up->intmax;
- else
- up->modndx = 0;
- if (up->modndx < MODMIN)
- 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)) {
- up->tc = MINTC;
- up->tcount = 0;
- }
-
- /*
- * Update PLL phase and frequency. The PLL time constant
- * is set initially to stabilize the frequency within a
- * minute or two, then increases to the maximum. The
- * frequency is clamped so that the PLL capture range
- * cannot be exceeded.
- */
- dtemp = up->zxing * up->decim / BAUD;
- up->yxing = dtemp;
- up->zxing = 0.;
- up->phase += dtemp / up->tc;
- up->freq += dtemp / (4. * up->tc * up->tc);
- if (up->freq > MAXFREQ) {
- up->freq = MAXFREQ;
- up->errflg |= IRIG_ERR_FREQ;
- } else if (up->freq < -MAXFREQ) {
- up->freq = -MAXFREQ;
- up->errflg |= IRIG_ERR_FREQ;
- }
- }
-
- /*
- * Synchronous demodulator. There are eight samples in the cycle
- * and ten cycles in the baud interval. The amplitude of each
- * cycle is determined at the last sample in the cycle. The
- * beginning of the data pulse is determined from the integrated
- * samples, while the end of the pulse is determined from the
- * raw samples. The raw data bits are demodulated relative to
- * the slice level and left-shifted in the decoding register.
- */
- if (up->carphase != 7)
- return;
- env = (up->lastenv[2] - up->lastenv[6]) / 2.;
- lope = (up->lastint[2] - up->lastint[6]) / 2.;
- if (lope > up->intmax)
- up->intmax = lope;
- if (lope < up->intmin)
- up->intmin = lope;
-
- /*
- * Pulse code demodulator and reference timestamp. The decoder
- * looks for a sequence of ten bits; the first two bits must be
- * one, the last two bits must be zero. Frame synch is asserted
- * when three correct frames have been found.
- */
- up->pulse = (up->pulse + 1) % 10;
- if (up->pulse == 1)
- up->envmax = env;
- else if (up->pulse == 9)
- up->envmin = env;
- up->dcycles <<= 1;
- if (env >= (up->envmax + up->envmin) / 2.)
- up->dcycles |= 1;
- up->cycles <<= 1;
- if (lope >= (up->maxsignal + up->noise) / 2.)
- up->cycles |= 1;
- if ((up->cycles & 0x303c0f03) == 0x300c0300) {
- l_fp ltemp;
- int bitz;
-
- /*
- * The PLL time constant starts out small, in order to
- * sustain a frequency tolerance of 250 PPM. It
- * gradually increases as the loop settles down. Note
- * that small wiggles are not believed, unless they
- * persist for lots of samples.
- */
- if (up->pulse != 9)
- up->errflg |= IRIG_ERR_SYNCH;
- up->pulse = 9;
- 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->tcount = 0;
- up->envxing = up->envphase;
- } else {
- up->exing -= up->envxing - up->envphase;
- }
- } else {
- up->tcount = 0;
- up->envxing = up->envphase;
- }
-
- /*
- * Determine a reference timestamp, accounting for the
- * codec delay and filter delay. Note the timestamp is
- * for the previous frame, so we have to backtrack for
- * this plus the delay since the last carrier positive
- * zero crossing.
- */
- dtemp = up->decim * ((up->exing + BAUD) / SECOND + 1.) +
- up->fdelay;
- DTOLFP(dtemp, &ltemp);
- pp->lastrec = up->timestamp;
- L_SUB(&pp->lastrec, &ltemp);
-
- /*
- * The data bits are collected in ten-bit frames. The
- * first two and last two bits are determined by frame
- * sync and ignored here; the resulting patterns
- * represent zero (0-1 bits), one (2-4 bits) and
- * position identifier (5-6 bits). The remaining
- * patterns represent errors and are treated as zeros.
- */
- bitz = up->dcycles & 0xfc;
- switch(bitz) {
-
- case 0x00:
- case 0x80:
- irig_decode(peer, BIT0);
- break;
-
- case 0xc0:
- case 0xe0:
- case 0xf0:
- irig_decode(peer, BIT1);
- break;
-
- case 0xf8:
- case 0xfc:
- irig_decode(peer, BITP);
- break;
-
- default:
- irig_decode(peer, 0);
- up->errflg |= IRIG_ERR_DECODE;
- }
- }
-}
-
-
-/*
- * irig_decode - decode the data
- *
- * This routine assembles bits into digits, digits into subfields and
- * subfields into the timecode field. Bits can have values of zero, one
- * or position identifier. There are four bits per digit, two digits per
- * subfield and ten subfields per field. The last bit in every subfield
- * and the first bit in the first subfield are position identifiers.
- */
-static void
-irig_decode(
- struct peer *peer, /* peer structure pointer */
- int bit /* data bit (0, 1 or 2) */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-#ifdef IRIG_SUCKS
- int i;
-#endif /* IRIG_SUCKS */
-
- /*
- * Local variables
- */
- char syncchar; /* sync character (Spectracom) */
- char sbs[6]; /* binary seconds since 0h */
- char spare[2]; /* mulligan digits */
-
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
-
- /*
- * Assemble subfield bits.
- */
- up->bits <<= 1;
- if (bit == BIT1) {
- up->bits |= 1;
- } else if (bit == BITP && up->lastbit == BITP) {
-
- /*
- * Frame sync - two adjacent position identifiers.
- * Monitor the reference timestamp and wiggle the
- * clock, but only if no errors have occurred.
- */
- up->bitcnt = 1;
- up->fieldcnt = 0;
- up->lastbit = 0;
- if (up->errflg == 0) {
-#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);
-#else /* IRIG_SUCKS */
- pp->lastref = pp->lastrec;
- up->wuggle = pp->lastrec;
- refclock_process(pp);
-#endif /* IRIG_SUCKS */
- }
- up->errflg = 0;
- }
- up->bitcnt = (up->bitcnt + 1) % SUBFLD;
- if (up->bitcnt == 0) {
-
- /*
- * End of subfield. Encode two hexadecimal digits in
- * little-endian timecode field.
- */
- if (up->fieldcnt == 0)
- up->bits <<= 1;
- if (up->xptr < 2)
- up->xptr = 2 * FIELD;
- up->timecode[--up->xptr] = hexchar[(up->bits >> 5) &
- 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 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;
- else
- 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->second = pp->second;
- sprintf(pp->a_lastcode,
- "%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 (pp->sloppyclockflag & CLK_FLAG4) {
- record_clock_stats(&peer->srcadr,
- pp->a_lastcode);
-#ifdef DEBUG
- if (debug)
- printf("irig: %s\n",
- pp->a_lastcode);
-#endif /* DEBUG */
- }
- }
- }
- up->lastbit = bit;
-}
-
-
-/*
- * irig_poll - called by the transmit procedure
- *
- * 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(
- int unit, /* instance number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
-
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- 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 */
- }
- pp->polls++;
-
-}
-
-
-/*
- * irig_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
- * amplitude, so this crudity works just fine. The input port is set and
- * the error flag is cleared, mostly to be ornery.
- */
-static void
-irig_gain(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct irigunit *up;
-
- pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
-
- /*
- * Apparently, the codec uses only the high order bits of the
- * gain control field. Thus, it may take awhile for changes to
- * wiggle the hardware bits.
- */
- if (up->clipcnt == 0) {
- up->gain += 4;
- 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->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
deleted file mode 100644
index 2aa9d6a..0000000
--- a/contrib/ntp/ntpd/refclock_jjy.c
+++ /dev/null
@@ -1,710 +0,0 @@
-/*
- * refclock_jjy - clock driver for JJY receivers
- */
-
-/**********************************************************************/
-/* */
-/* Copyright (C) 2001, Takao Abe. All rights reserved. */
-/* */
-/* Permission to use, copy, modify, and distribute this software */
-/* and its documentation for any purpose is hereby granted */
-/* without fee, provided that the following conditions are met: */
-/* */
-/* One retains the entire copyright notice properly, and both the */
-/* copyright notice and this license. in the documentation and/or */
-/* other materials provided with the distribution. */
-/* */
-/* This software and the name of the author must not be used to */
-/* endorse or promote products derived from this software without */
-/* prior written permission. */
-/* */
-/* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESSED OR IMPLIED */
-/* WARRANTIES OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, THE */
-/* IMPLIED WARRANTIES OF MERCHANTABLILITY AND FITNESS FOR A */
-/* PARTICULAR PURPOSE. */
-/* IN NO EVENT SHALL THE AUTHOR TAKAO ABE BE LIABLE FOR ANY DIRECT, */
-/* INDIRECT, GENERAL, 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. */
-/* */
-/* This driver is developed in my private time, and is opened as */
-/* voluntary contributions for the NTP. */
-/* The manufacturer of the JJY receiver has not participated in */
-/* a development of this driver. */
-/* The manufacturer does not warrant anything about this driver, */
-/* and is not liable for anything about this driver. */
-/* */
-/**********************************************************************/
-/* */
-/* Author Takao Abe */
-/* Email abetakao@bea.hi-ho.ne.jp */
-/* Homepage http://www.bea.hi-ho.ne.jp/abetakao/ */
-/* */
-/**********************************************************************/
-/* */
-/* History */
-/* */
-/* 2001/07/15 */
-/* [New] Support the Tristate Ltd. JJY receiver */
-/* */
-/* 2001/08/04 */
-/* [Change] Log to clockstats even if bad reply */
-/* [Fix] PRECISION = (-3) (about 100 ms) */
-/* [Add] Support the C-DEX Co.Ltd. JJY receiver */
-/* 2001/12/04 */
-/* [Fix] C-DEX JST2000 ( fukusima@goto.info.waseda.ac.jp ) */
-/* */
-/**********************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_JJY)
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_tty.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/**********************************************************************/
-/* */
-/* The Tristate Ltd. JJY receiver JJY01 */
-/* */
-/* Command Response Remarks */
-/* ------------ ---------------------- --------------------- */
-/* date<CR><LF> YYYY/MM/DD XXX<CR><LF> */
-/* time<CR><LF> HH:MM:SS<CR><LF> */
-/* stim<CR><LF> HH:MM:SS<CR><LF> Reply at just second */
-/* */
-/* During synchronization after a receiver is turned on, */
-/* It replies the past time from 2000/01/01 00:00:00. */
-/* The function "refclock_process" checks the time and tells */
-/* as an insanity time. */
-/* */
-/**********************************************************************/
-/* */
-/* The C-DEX Co. Ltd. JJY receiver JST2000 */
-/* */
-/* Command Response Remarks */
-/* ------------ ---------------------- --------------------- */
-/* <ENQ>1J<ETX> <STX>JYYMMDD HHMMSSS<ETX> */
-/* */
-/**********************************************************************/
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/jjy%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define REFID "JJY" /* reference ID */
-#define DESCRIPTION "JJY Receiver"
-#define PRECISION (-3) /* precision assumed (about 100 ms) */
-
-/*
- * JJY unit control structure
- */
-struct jjyunit {
- char unittype ; /* UNITTYPE_XXXXXXXXXX */
- short version ;
- short linediscipline ; /* LDISC_CLK or LDISC_RAW */
- int linecount ;
- int lineerror ;
- int year, month, day, hour, minute, second, msecond ;
-/* LDISC_RAW only */
-#define MAX_LINECOUNT 8
-#define MAX_RAWBUF 64
- int lineexpect ;
- int charexpect [ MAX_LINECOUNT ] ;
- int charcount ;
- char rawbuf [ MAX_RAWBUF ] ;
-};
-
-#define UNITTYPE_TRISTATE_JJY01 1
-#define UNITTYPE_CDEX_JST2000 2
-
-/*
- * Function prototypes
- */
-static int jjy_start P((int, struct peer *));
-static void jjy_shutdown P((int, struct peer *));
-static void jjy_poll P((int, struct peer *));
-static void jjy_poll_tristate_jjy01 P((int, struct peer *));
-static void jjy_poll_cdex_jst2000 P((int, struct peer *));
-static void jjy_receive P((struct recvbuf *));
-static int jjy_receive_tristate_jjy01 P((struct recvbuf *));
-static int jjy_receive_cdex_jst2000 P((struct recvbuf *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_jjy = {
- jjy_start, /* start up driver */
- jjy_shutdown, /* shutdown driver */
- jjy_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* not used */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-/*
- * Start up driver return code
- */
-#define RC_START_SUCCESS 1
-#define RC_START_ERROR 0
-
-/*
- * Local constants definition
- */
-
-#define MAX_LOGTEXT 64
-
-
-/**************************************************************************************************/
-/* jjy_start - open the devices and initialize data for processing */
-/**************************************************************************************************/
-static int
-jjy_start ( int unit, struct peer *peer )
-{
-
- struct jjyunit *up ;
- struct refclockproc *pp ;
- int fd ;
- char *pDeviceName ;
- short iDiscipline ;
-
-#ifdef DEBUG
- if ( debug ) {
- printf ( "jjy_start (refclock_jjy.c) : %s mode=%d ", ntoa(&peer->srcadr), peer->ttl ) ;
- printf ( DEVICE, unit ) ;
- printf ( "\n" ) ;
- }
-#endif
- /*
- * Open serial port
- */
- if ( ! ( pDeviceName = (char*) emalloc ( strlen(DEVICE) + 10 ) ) ) {
- return RC_START_ERROR ;
- }
- sprintf ( pDeviceName, DEVICE, unit ) ;
-
- /*
- * peer->ttl is a mode number specified by "127.127.40.X mode N" in the ntp.conf
- */
- 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->ttl ) ;
- free ( (void*) pDeviceName ) ;
- return RC_START_ERROR ;
- }
-
- if ( ! ( fd = refclock_open ( pDeviceName, SPEED232, iDiscipline ) ) ) {
- free ( (void*) pDeviceName ) ;
- return RC_START_ERROR ;
- }
- free ( (void*) pDeviceName ) ;
-
- /*
- * Allocate and initialize unit structure
- */
- if ( ! ( up = (struct jjyunit *) emalloc (sizeof(struct jjyunit)) ) ) {
- close ( fd ) ;
- return RC_START_ERROR ;
- }
-
- memset ( (char*)up, 0, sizeof(struct jjyunit) ) ;
- up->linediscipline = iDiscipline ;
-
- /*
- * peer->ttl is a mode number specified by "127.127.40.X mode N" in the ntp.conf
- */
- switch ( peer->ttl ) {
- case 0 :
- /*
- * The mode 0 is a default clock type at this time.
- * But this will be change to auto-detect mode in the future.
- */
- case 1 :
- up->unittype = UNITTYPE_TRISTATE_JJY01 ;
- up->version = 100 ;
- up->lineexpect = 2 ;
- up->charexpect[0] = 14 ; /* YYYY/MM/DD WWW<CR><LF> */
- up->charexpect[1] = 8 ; /* HH:MM:SS<CR><LF> */
- break ;
- case 2 :
- up->unittype = UNITTYPE_CDEX_JST2000 ;
- up->lineexpect = 1 ;
- up->charexpect[0] = 15 ; /* <STX>JYYMMDD HHMMSSS<ETX> */
- break ;
- default :
- msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode",
- ntoa(&peer->srcadr), peer->ttl ) ;
- close ( fd ) ;
- free ( (void*) up ) ;
- return RC_START_ERROR ;
- }
-
- pp = peer->procptr ;
- pp->unitptr = (caddr_t) up ;
- pp->io.clock_recv = jjy_receive ;
- pp->io.srcclock = (caddr_t) peer ;
- pp->io.datalen = 0 ;
- pp->io.fd = fd ;
- if ( ! io_addclock(&pp->io) ) {
- close ( fd ) ;
- free ( (void*) up ) ;
- return RC_START_ERROR ;
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION ;
- peer->burst = 1 ;
- pp->clockdesc = DESCRIPTION ;
- memcpy ( (char*)&pp->refid, REFID, strlen(REFID) ) ;
-
- return RC_START_SUCCESS ;
-
-}
-
-
-/**************************************************************************************************/
-/* jjy_shutdown - shutdown the clock */
-/**************************************************************************************************/
-static void
-jjy_shutdown ( int unit, struct peer *peer )
-{
-
- struct jjyunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
- io_closeclock ( &pp->io ) ;
- free ( (void*) up ) ;
-
-}
-
-
-/**************************************************************************************************/
-/* jjy_receive - receive data from the serial interface */
-/**************************************************************************************************/
-static void
-jjy_receive ( struct recvbuf *rbufp )
-{
-
- struct jjyunit *up ;
- struct refclockproc *pp ;
- struct peer *peer;
-
- l_fp tRecvTimestamp; /* arrival timestamp */
- int rc ;
- char sLogText [ MAX_LOGTEXT ] ;
- int i, bCntrlChar ;
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *) rbufp->recv_srcclock ;
- pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
-
- /*
- * Get next input line
- */
- pp->lencode = refclock_gtlin ( rbufp, pp->a_lastcode, BMAX, &tRecvTimestamp ) ;
-
- if ( up->linediscipline == LDISC_RAW ) {
- /*
- * The reply with <STX> and <ETX> may give a blank line
- */
- if ( pp->lencode == 0 && up->charcount == 0 ) return ;
- /*
- * Copy received charaters to temporary buffer
- */
- for ( i = 0 ; i < pp->lencode && up->charcount < MAX_RAWBUF - 2 ; i ++ , up->charcount ++ ) {
- up->rawbuf[up->charcount] = pp->a_lastcode[i] ;
- }
- while ( up->charcount > 0 && up->rawbuf[0] < ' ' ) {
- for ( i = 0 ; i < up->charcount - 1 ; i ++ ) up->rawbuf[i] = up->rawbuf[i+1] ;
- up->charcount -- ;
- }
- bCntrlChar = 0 ;
- for ( i = 0 ; i < up->charcount ; i ++ ) {
- if ( up->rawbuf[i] < ' ' ) {
- bCntrlChar = 1 ;
- break ;
- }
- }
- if ( pp->lencode > 0 && up->linecount < up->lineexpect ) {
- if ( bCntrlChar == 0 && up->charcount < up->charexpect[up->linecount] ) return ;
- }
- up->rawbuf[up->charcount] = 0 ;
- } else {
- /*
- * The reply with <CR><LF> gives a blank line
- */
- if ( pp->lencode == 0 ) return ;
- }
- /*
- * We get down to business
- */
-
- pp->lastrec = tRecvTimestamp ;
-
- up->linecount ++ ;
-
- if ( up->lineerror != 0 ) return ;
-
- switch ( up->unittype ) {
-
- case UNITTYPE_TRISTATE_JJY01 :
- rc = jjy_receive_tristate_jjy01 ( rbufp ) ;
- break ;
-
- case UNITTYPE_CDEX_JST2000 :
- rc = jjy_receive_cdex_jst2000 ( rbufp ) ;
- break ;
-
- default :
- rc = 0 ;
- break ;
-
- }
-
- if ( up->linediscipline == LDISC_RAW ) {
- if ( up->linecount <= up->lineexpect && up->charcount > up->charexpect[up->linecount-1] ) {
- for ( i = 0 ; i < up->charcount - up->charexpect[up->linecount-1] ; i ++ ) {
- up->rawbuf[i] = up->rawbuf[i+up->charexpect[up->linecount-1]] ;
- }
- up->charcount -= up->charexpect[up->linecount-1] ;
- } else {
- up->charcount = 0 ;
- }
- }
-
- if ( rc == 0 ) return ;
-
- if ( up->lineerror != 0 ) {
- refclock_report ( peer, CEVNT_BADREPLY ) ;
- strcpy ( sLogText, "BAD REPLY [" ) ;
- if ( up->linediscipline == LDISC_RAW ) {
- strncat ( sLogText, up->rawbuf, MAX_LOGTEXT - strlen ( sLogText ) - 1 ) ;
- } else {
- strncat ( sLogText, pp->a_lastcode, MAX_LOGTEXT - strlen ( sLogText ) - 1 ) ;
- }
- sLogText[MAX_LOGTEXT-1] = 0 ;
- if ( strlen ( sLogText ) < MAX_LOGTEXT - 2 ) strcat ( sLogText, "]" ) ;
- record_clock_stats ( &peer->srcadr, sLogText ) ;
- return ;
- }
-
- pp->year = up->year ;
- pp->day = ymd2yd ( up->year, up->month, up->day ) ;
- pp->hour = up->hour ;
- pp->minute = up->minute ;
- pp->second = up->second ;
- pp->nsec = up->msecond * 1000000;
-
- /*
- * JST to UTC
- */
- pp->hour -= 9 ;
- if ( pp->hour < 0 ) {
- pp->hour += 24 ;
- pp->day -- ;
- if ( pp->day < 1 ) {
- pp->year -- ;
- pp->day = ymd2yd ( pp->year, 12, 31 ) ;
- }
- }
-#ifdef DEBUG
- if ( debug ) {
- printf ( "jjy_receive (refclock_jjy.c) : %04d/%02d/%02d %02d:%02d:%02d JST ",
- up->year, up->month, up->day, up->hour, up->minute, up->second ) ;
- printf ( "( %04d/%03d %02d:%02d:%02d UTC )\n",
- pp->year, pp->day, pp->hour, pp->minute, pp->second ) ;
- }
-#endif
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if ( ! refclock_process ( pp ) ) {
- refclock_report(peer, CEVNT_BADTIME);
- sprintf ( sLogText, "BAD TIME %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 ) ;
- return ;
- }
-
- sprintf ( sLogText, "%04d/%02d/%02d %02d:%02d:%02d JST",
- up->year, up->month, up->day, up->hour, up->minute, up->second ) ;
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats ( &peer->srcadr, sLogText ) ;
-}
-
-/**************************************************************************************************/
-
-static int
-jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
-{
-
- struct jjyunit *up ;
- struct refclockproc *pp ;
- struct peer *peer;
-
- char *pBuf ;
- int iLen ;
- int rc ;
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *) rbufp->recv_srcclock ;
- pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
-
- if ( up->linediscipline == LDISC_RAW ) {
- pBuf = up->rawbuf ;
- iLen = up->charcount ;
- } else {
- pBuf = pp->a_lastcode ;
- iLen = pp->lencode ;
- }
-
- switch ( up->linecount ) {
-
- case 1 : /* YYYY/MM/DD */
-
- if ( iLen < 10 ) {
- up->lineerror = 1 ;
- break ;
- }
- rc = sscanf ( pBuf, "%4d/%2d/%2d", &up->year, &up->month, &up->day ) ;
- if ( rc != 3 || up->year < 2000 || up->month < 1 || up->month > 12 || up->day < 1 || up->day > 31 ) {
- up->lineerror = 1 ;
- break ;
- }
- return 0 ;
-
- case 2 : /* HH:MM:SS */
-
- if ( iLen < 8 ) {
- up->lineerror = 1 ;
- break ;
- }
- rc = sscanf ( pBuf, "%2d:%2d:%2d", &up->hour, &up->minute, &up->second ) ;
- if ( rc != 3 || up->hour > 23 || up->minute > 59 || up->second > 60 ) {
- up->lineerror = 1 ;
- break ;
- }
- up->msecond = 0 ;
- if ( up->hour == 0 && up->minute == 0 && up->second <= 2 ) {
- /*
- * The command "date" and "time" ( or "stim" ) were sent to the JJY receiver continuously.
- * But the JJY receiver replies a date and time separately.
- * Just after midnight transtions, we ignore this time.
- */
- return 0 ;
- }
- break ;
-
- default : /* Unexpected reply */
-
- up->lineerror = 1 ;
- break ;
-
- }
-
- return 1 ;
-
-}
-
-/**************************************************************************************************/
-
-static int
-jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
-{
-
- struct jjyunit *up ;
- struct refclockproc *pp ;
- struct peer *peer;
-
- char *pBuf ;
- int iLen ;
- int rc ;
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *) rbufp->recv_srcclock ;
- pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
-
- if ( up->linediscipline == LDISC_RAW ) {
- pBuf = up->rawbuf ;
- iLen = up->charcount ;
- } else {
- pBuf = pp->a_lastcode ;
- iLen = pp->lencode ;
- }
-
- switch ( up->linecount ) {
-
- case 1 : /* JYYMMDD HHMMSSS */
-
- if ( iLen < 15 ) {
- up->lineerror = 1 ;
- break ;
- }
- rc = sscanf ( pBuf, "J%2d%2d%2d%*1d%2d%2d%2d%1d",
- &up->year, &up->month, &up->day, &up->hour, &up->minute, &up->second, &up->msecond ) ;
- if ( rc != 7 || up->month < 1 || up->month > 12 || up->day < 1 || up->day > 31
- || up->hour > 23 || up->minute > 59 || up->second > 60 ) {
- up->lineerror = 1 ;
- break ;
- }
- up->year += 2000 ;
- up->msecond *= 100 ;
- break ;
-
- default : /* Unexpected reply */
-
- up->lineerror = 1 ;
- break ;
-
- }
-
- return 1 ;
-
-}
-
-/**************************************************************************************************/
-/* jjy_poll - called by the transmit procedure */
-/**************************************************************************************************/
-static void
-jjy_poll ( int unit, struct peer *peer )
-{
-
- struct jjyunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct jjyunit *) pp->unitptr ;
-
- if ( pp->polls > 0 && up->linecount == 0 ) {
- /*
- * No reply for last command
- */
- refclock_report ( peer, CEVNT_TIMEOUT ) ;
- }
-
-#ifdef DEBUG
- if ( debug ) {
- printf ( "jjy_poll (refclock_jjy.c) : %ld\n", pp->polls ) ;
- }
-#endif
-
- pp->polls ++ ;
-
- up->linecount = 0 ;
- up->lineerror = 0 ;
- up->charcount = 0 ;
-
- switch ( up->unittype ) {
-
- case UNITTYPE_TRISTATE_JJY01 :
- jjy_poll_tristate_jjy01 ( unit, peer ) ;
- break ;
-
- case UNITTYPE_CDEX_JST2000 :
- jjy_poll_cdex_jst2000 ( unit, peer ) ;
- break ;
-
- default :
- break ;
-
- }
-
-}
-
-/**************************************************************************************************/
-
-static void
-jjy_poll_tristate_jjy01 ( int unit, struct peer *peer )
-{
-
- struct jjyunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct jjyunit *) pp->unitptr ;
-
- /*
- * Send "date<CR><LF>" command
- */
-
- if ( write ( pp->io.fd, "date\r\n",6 ) != 6 ) {
- refclock_report ( peer, CEVNT_FAULT ) ;
- }
-
- /*
- * Send "stim<CR><LF>" or "time<CR><LF>" command
- */
-
- if ( up->version >= 100 ) {
- if ( write ( pp->io.fd, "stim\r\n",6 ) != 6 ) {
- refclock_report ( peer, CEVNT_FAULT ) ;
- }
- } else {
- if ( write ( pp->io.fd, "time\r\n",6 ) != 6 ) {
- refclock_report ( peer, CEVNT_FAULT ) ;
- }
- }
-
-}
-
-/**************************************************************************************************/
-
-static void
-jjy_poll_cdex_jst2000 ( int unit, struct peer *peer )
-{
-
- struct refclockproc *pp;
-
- pp = peer->procptr;
-
- /*
- * Send "<ENQ>1J<ETX>" command
- */
-
- if ( write ( pp->io.fd, "\0051J\003", 4 ) != 4 ) {
- refclock_report ( peer, CEVNT_FAULT ) ;
- }
-
-}
-
-#else
-int refclock_jjy_bs ;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_jupiter.c b/contrib/ntp/ntpd/refclock_jupiter.c
deleted file mode 100644
index eff088b..0000000
--- a/contrib/ntp/ntpd/refclock_jupiter.c
+++ /dev/null
@@ -1,1140 +0,0 @@
-/*
- * 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
- * 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, Lawrence Berkeley Laboratory.
- * 4. The name of the University may not 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.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#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 <stdio.h>
-#include <ctype.h>
-
-#include "jupiter.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))
-#define putshort(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff))
-#else
-#define getshort(s) (s)
-#define putshort(s) (s)
-#endif
-
-/* XXX */
-#ifdef sun
-char *strerror(int);
-#endif
-
-/*
- * This driver supports the Rockwell Jupiter GPS Receiver board
- * adapted to precision timing applications. It requires the
- * ppsclock line discipline or streams module described in the
- * Line Disciplines and Streams Drivers page. It also requires a
- * gadget box and 1-PPS level converter, such as described in the
- * Pulse-per-second (PPS) Signal Interfacing page.
- *
- * It may work (with minor modifications) with other Rockwell GPS
- * receivers such as the CityTracker.
- */
-
-/*
- * GPS Definitions
- */
-#define DEVICE "/dev/gps%d" /* device name and unit */
-#define SPEED232 B9600 /* baud */
-
-/*
- * Radio interface parameters
- */
-#define PRECISION (-18) /* precision assumed (about 4 us) */
-#define REFID "GPS\0" /* reference id */
-#define DESCRIPTION "Rockwell Jupiter GPS Receiver" /* who we are */
-#define DEFFUDGETIME 0 /* default fudge time (ms) */
-
-/* Unix timestamp for the GPS epoch: January 6, 1980 */
-#define GPS_EPOCH 315964800
-
-/* Double short to unsigned int */
-#define DS2UI(p) ((getshort((p)[1]) << 16) | getshort((p)[0]))
-
-/* Double short to signed int */
-#define DS2I(p) ((getshort((p)[1]) << 16) | getshort((p)[0]))
-
-/* One week's worth of seconds */
-#define WEEKSECS (7 * 24 * 60 * 60)
-
-/*
- * Jupiter unit control structure.
- */
-struct instance {
- struct peer *peer; /* peer */
- u_int pollcnt; /* poll message counter */
- u_int polled; /* Hand in a time sample? */
-#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 */
- 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_char sloppyclockflag; /* fudge flags */
- u_short sbuf[512]; /* local input buffer */
- int ssize; /* space used in sbuf */
-};
-
-/*
- * Function prototypes
- */
-static void jupiter_canmsg P((struct instance *, u_int));
-static u_short jupiter_cksum P((u_short *, 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 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 *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_jupiter = {
- jupiter_start, /* start up driver */
- jupiter_shutdown, /* shut down driver */
- jupiter_poll, /* transmit poll message */
- jupiter_control, /* (clock control) */
- noentry, /* (clock init) */
- noentry, /* (clock buginfo) */
- NOFLAGS /* not used */
-};
-
-/*
- * jupiter_start - open the devices and initialize data for processing
- */
-static int
-jupiter_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct instance *instance;
- int fd = -1;
- char gpsdev[20];
-
- /*
- * Open serial port
- */
- (void)sprintf(gpsdev, DEVICE, unit);
- fd = refclock_open(gpsdev, SPEED232, LDISC_RAW);
- if (fd == 0) {
- jupiter_debug(peer, "jupiter_start", "open %s: %s",
- gpsdev, strerror(errno));
- return (0);
- }
-
- /* Allocate unit structure */
- if ((instance = (struct instance *)
- emalloc(sizeof(struct instance))) == NULL) {
- (void) close(fd);
- return (0);
- }
- 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;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(instance);
- return (0);
- }
- pp->unitptr = (caddr_t)instance;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- 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 */
- if (!jupiter_config(instance))
- goto clean_up;
-
- return (1);
-
-clean_up:
- jupiter_shutdown(unit, peer);
- pp->unitptr = 0;
- return (0);
-}
-
-/*
- * jupiter_shutdown - shut down the clock
- */
-static void
-jupiter_shutdown(int unit, struct peer *peer)
-{
- struct instance *instance;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- 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(instance);
-}
-
-/*
- * jupiter_config - Configure the receiver
- */
-static int
-jupiter_config(struct instance *instance)
-{
- jupiter_debug(instance->peer, "jupiter_config", "init receiver");
-
- /*
- * Initialize the unit variables
- */
- 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(instance, JUPITER_ALL);
-
- /* Request the receiver id so we can syslog the firmware version */
- jupiter_reqonemsg(instance, JUPITER_O_ID);
-
- /* Flag that this the id was requested (so we don't get called again) */
- instance->wantid = 1;
-
- /* Request perodic time mark pulse messages */
- jupiter_reqmsg(instance, JUPITER_O_PULSE, 1);
-
- /* Request perodic geodetic position status */
- jupiter_reqmsg(instance, JUPITER_O_GPOS, 1);
-
- /* Set application platform type */
- 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
- 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(int unit, struct peer *peer)
-{
- struct instance *instance;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- instance = (struct instance *)pp->unitptr;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
-
- /*
- * If we haven't had a response in a while, reset the receiver.
- */
- if (instance->pollcnt > 0) {
- instance->pollcnt--;
- } else {
- refclock_report(peer, CEVNT_TIMEOUT);
-
- /* Request the receiver id to trigger a reconfig */
- jupiter_reqonemsg(instance, JUPITER_O_ID);
- instance->wantid = 0;
- }
-
- /*
- * polled every 64 seconds. Ask jupiter_receive to hand in
- * a timestamp.
- */
- instance->polled = 1;
- pp->polls++;
-}
-
-/*
- * jupiter_control - fudge control
- */
-static void
-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 */
- )
-{
- struct refclockproc *pp;
- struct instance *instance;
- u_char sloppyclockflag;
-
- pp = peer->procptr;
- instance = (struct instance *)pp->unitptr;
-
- 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_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;
-
- /* 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(instance->sbuf) - instance->ssize)
- bpcnt = sizeof(instance->sbuf) - instance->ssize;
-
- /* Append to input buffer */
- 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;
-
- tstamp = rbufp->recv_time;
- hp = (struct jheader *)instance->sbuf;
- sp = (u_short *)(hp + 1);
- size = cc - sizeof(*hp);
- switch (getshort(hp->id)) {
-
- case JUPITER_O_PULSE:
- if (size != sizeof(struct jpulse)) {
- jupiter_debug(peer,
- "jupiter_receive", "pulse: len %d != %u",
- size, (int)sizeof(struct jpulse));
- refclock_report(peer, CEVNT_BADREPLY);
- break;
- }
-
- /*
- * There appears to be a firmware bug related
- * to the pulse message; in addition to the one
- * per second messages, we get an extra pulse
- * message once an hour (on the anniversary of
- * the cold start). It seems to come 200 ms
- * after the one requested. So if we've seen a
- * pulse message in the last 210 ms, we skip
- * this one.
- */
- 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(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 = instance->timecode;
- if ((cp = jupiter_parse_t(instance, sp)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive", "pulse: %s", cp);
- break;
- }
-
- /* Bail if we didn't get a pps timestamp */
- if (ppsret)
- break;
-
- /* Bail if we don't have the last timecode yet */
- if (last_timecode == 0)
- break;
-
- /* Add the new sample to a median filter */
- 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 (!instance->polled)
- break;
- instance->polled = 0;
-
- /*
- * It's a live one! Remember this time.
- */
-
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
-
- /*
- * If we get here - what we got from the clock is
- * OK, so say so
- */
- refclock_report(peer, CEVNT_NOMINAL);
-
- /*
- * We have succeeded in answering the poll.
- * Turn off the flag and return
- */
- 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",
- size, (int)sizeof(struct jid));
- refclock_report(peer, CEVNT_BADREPLY);
- break;
- }
- /*
- * If we got this message because the Jupiter
- * just powered instance, it needs to be reconfigured.
- */
- ip = (struct jid *)sp;
- jupiter_debug(peer,
- "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 (instance->wantid)
- instance->wantid = 0;
- else {
- jupiter_debug(peer,
- "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",
- getshort(hp->id));
- break;
- }
- instance->ssize -= cc;
- if (instance->ssize < 0) {
- fprintf(stderr, "jupiter_recv: negative ssize!\n");
- abort();
- } else if (instance->ssize > 0)
- memcpy(instance->sbuf, (u_char *)instance->sbuf + cc, instance->ssize);
- }
-}
-
-static char *
-jupiter_parse_t(struct instance *instance, u_short *sp)
-{
- struct tm *tm;
- char *cp;
- struct jpulse *jp;
- u_int32 sweek;
- time_t last_timecode;
- u_short flags;
-
- jp = (struct jpulse *)sp;
-
- /* The timecode is presented as seconds into the current GPS week */
- sweek = DS2UI(jp->sweek) % WEEKSECS;
-
- /*
- * If we don't know the current GPS week, calculate it from the
- * current time. (It's too bad they didn't include this
- * important value in the pulse message). We'd like to pick it
- * up from one of the other messages like gpos or chan but they
- * don't appear to be synchronous with time keeping and changes
- * too soon (something like 10 seconds before the new GPS
- * week).
- *
- * If we already know the current GPS week, increment it when
- * we wrap into a new week.
- */
- 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);
- }
-
- /*
- * See if the sweek stayed the same (this happens when there is
- * no pps pulse).
- *
- * Otherwise, look for time warps:
- *
- * - we have stored at least one lastsweek and
- * - the sweek didn't increase by one and
- * - we didn't wrap to a new GPS week
- *
- * Then we warped.
- */
- if (instance->lastsweek == sweek)
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "gps sweek not incrementing (%d)",
- 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 = instance->timecode;
- instance->timecode =
- GPS_EPOCH + (instance->gweek * WEEKSECS) + sweek;
-
- if (last_timecode == 0)
- /* XXX debugging */
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "UTC <none> (gweek/sweek %u/%u)",
- instance->gweek, sweek);
- else {
- /* XXX debugging */
- tm = gmtime(&last_timecode);
- cp = asctime(tm);
-
- 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) */
- 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;
- }
-
- flags = getshort(jp->flags);
-
- /* Toss if not designated "valid" by the gps */
- if ((flags & JUPITER_O_PULSE_VALID) == 0) {
- 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(instance->peer, CEVNT_BADTIME);
- return ("time mark not sync'ed to UTC");
- }
-
- return (NULL);
-}
-
-static char *
-jupiter_parse_gpos(struct instance *instance, u_short *sp)
-{
- struct jgpos *jg;
- time_t t;
- struct tm *tm;
- char *cp;
-
- jg = (struct jgpos *)sp;
-
- 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");
- }
-
- instance->gpos_gweek = jg->gweek;
- instance->gpos_sweek = DS2UI(jg->sweek);
- while(instance->gpos_sweek >= WEEKSECS) {
- instance->gpos_sweek -= WEEKSECS;
- ++instance->gpos_gweek;
- }
- instance->gweek = 0;
-
- t = GPS_EPOCH + (instance->gpos_gweek * WEEKSECS) + instance->gpos_sweek;
- tm = gmtime(&t);
- cp = asctime(tm);
-
- 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__) || defined(SYS_WINNT)
-static void
-jupiter_debug(struct peer *peer, char *function, char *fmt, ...)
-#else
-static void
-jupiter_debug(peer, function, fmt, va_alist)
- struct peer *peer;
- char *function;
- char *fmt;
-#endif /* __STDC__ */
-{
- char buffer[200];
- va_list ap;
-
-#if defined(__STDC__) || defined(SYS_WINNT)
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif /* __STDC__ */
- /*
- * 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(struct instance *instance, struct jheader *hp)
-{
- u_int len, size;
- int cc;
- u_short *sp;
- static char errstr[132];
-
- size = sizeof(*hp);
- hp->hsum = putshort(jupiter_cksum((u_short *)hp,
- (size / sizeof(u_short)) - 1));
- len = getshort(hp->len);
- if (len > 0) {
- sp = (u_short *)(hp + 1);
- sp[len] = putshort(jupiter_cksum(sp, len));
- size += (len + 1) * sizeof(u_short);
- }
-
- 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) {
- (void)sprintf(errstr, "short write (%d != %d)", cc, size);
- return (errstr);
- }
- return (NULL);
-}
-
-/* Request periodic message output */
-static struct {
- struct jheader jheader;
- struct jrequest jrequest;
-} reqmsg = {
- { putshort(JUPITER_SYNC), 0,
- putshort((sizeof(struct jrequest) / sizeof(u_short)) - 1),
- 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(struct instance *instance, u_int id,
- u_int interval)
-{
- 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(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,
- (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK | JUPITER_FLAG_DISC),
- 0
-};
-
-static void
-jupiter_canmsg(struct instance *instance, u_int id)
-{
- struct jheader *hp;
- char *cp;
-
- hp = &canmsg;
- hp->id = putshort(id);
- 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,
- (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK | JUPITER_FLAG_QUERY),
- 0
-};
-
-static void
-jupiter_reqonemsg(struct instance *instance, u_int id)
-{
- struct jheader *hp;
- char *cp;
-
- hp = &reqonemsg;
- hp->id = putshort(id);
- if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_reqonemsg", "%u: %s", id, cp);
-}
-
-/* Set the platform dynamics */
-static struct {
- struct jheader jheader;
- struct jplat jplat;
-} platmsg = {
- { putshort(JUPITER_SYNC), putshort(JUPITER_I_PLAT),
- putshort((sizeof(struct jplat) / sizeof(u_short)) - 1), 0,
- (u_char)putshort(JUPITER_FLAG_REQUEST | JUPITER_FLAG_NAK), 0 },
- { 0, 0, 0 }
-};
-
-static void
-jupiter_platform(struct instance *instance, u_int platform)
-{
- struct jheader *hp;
- struct jplat *pp;
- char *cp;
-
- hp = &platmsg.jheader;
- pp = &platmsg.jplat;
- pp->platform = putshort(platform);
- 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(u_short *sp, u_int len)
-{
- u_short sum, x;
-
- sum = 0;
- while (len-- > 0) {
- x = *sp++;
- sum += getshort(x);
- }
- return (~sum + 1);
-}
-
-/* Return the size of the next message (or zero if we don't have it all yet) */
-static int
-jupiter_recv(struct instance *instance)
-{
- 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 = instance->ssize;
- if (size < cc)
- return (0);
-
- /* Search for the sync short if missing */
- sp = instance->sbuf;
- hp = (struct jheader *)sp;
- if (getshort(hp->sync) != JUPITER_SYNC) {
- /* Wasn't at the front, sync up */
- jupiter_debug(instance->peer, "jupiter_recv", "syncing");
- bp = (u_char *)sp;
- n = size;
- while (n >= 2) {
- if (bp[0] != (JUPITER_SYNC & 0xff)) {
- /*
- jupiter_debug(instance->peer, "{0x%x}", bp[0]);
- */
- ++bp;
- --n;
- continue;
- }
- if (bp[1] == ((JUPITER_SYNC >> 8) & 0xff))
- break;
- /*
- jupiter_debug(instance->peer, "{0x%x 0x%x}", bp[0], bp[1]);
- */
- bp += 2;
- n -= 2;
- }
- /*
- jupiter_debug(instance->peer, "\n");
- */
- /* Shuffle data to front of input buffer */
- if (n > 0)
- memcpy(sp, bp, n);
- size = n;
- 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(instance->peer, "jupiter_recv", "bad header checksum!");
- /* This is drastic but checksum errors should be rare */
- instance->ssize = 0;
- return (0);
- }
-
- /* Check for a payload */
- len = getshort(hp->len);
- if (len > 0) {
- n = (len + 1) * sizeof(u_short);
- /* Not enough data yet */
- if (size < cc + n)
- return (0);
-
- /* Check payload checksum */
- sp = (u_short *)(hp + 1);
- if (jupiter_cksum(sp, len) != getshort(sp[len])) {
- jupiter_debug(instance->peer,
- "jupiter_recv", "bad payload checksum!");
- /* This is drastic but checksum errors should be rare */
- instance->ssize = 0;
- return (0);
- }
- cc += n;
- }
- return (cc);
-}
-
-#else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
-int refclock_jupiter_bs;
-#endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
diff --git a/contrib/ntp/ntpd/refclock_leitch.c b/contrib/ntp/ntpd/refclock_leitch.c
deleted file mode 100644
index d7cd9bb..0000000
--- a/contrib/ntp/ntpd/refclock_leitch.c
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * refclock_leitch - clock driver for the Leitch CSD-5300 Master Clock
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_LEITCH)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef STREAM
-#include <stropts.h>
-#if defined(LEITCHCLK)
-#include <sys/clkdefs.h>
-#endif /* LEITCHCLK */
-#endif /* STREAM */
-
-#include "ntp_stdlib.h"
-
-
-/*
- * Driver for Leitch CSD-5300 Master Clock System
- *
- * COMMANDS:
- * DATE: D <CR>
- * TIME: T <CR>
- * STATUS: S <CR>
- * LOOP: L <CR>
- *
- * FORMAT:
- * DATE: YYMMDD<CR>
- * TIME: <CR>/HHMMSS <CR>/HHMMSS <CR>/HHMMSS <CR>/
- * second bondaried on the stop bit of the <CR>
- * second boundaries at '/' above.
- * STATUS: G (good), D (diag fail), T (time not provided) or
- * P (last phone update failed)
- */
-#define MAXUNITS 1 /* max number of LEITCH units */
-#define LEITCHREFID "ATOM" /* reference id */
-#define LEITCH_DESCRIPTION "Leitch: CSD 5300 Master Clock System Driver"
-#define LEITCH232 "/dev/leitch%d" /* name of radio device */
-#define SPEED232 B300 /* uart speed (300 baud) */
-#define leitch_send(A,M) \
-if (debug) fprintf(stderr,"write leitch %s\n",M); \
-if ((write(A->leitchio.fd,M,sizeof(M)) < 0)) {\
- if (debug) \
- fprintf(stderr, "leitch_send: unit %d send failed\n", A->unit); \
- else \
- msyslog(LOG_ERR, "leitch_send: unit %d send failed %m",A->unit);}
-
-#define STATE_IDLE 0
-#define STATE_DATE 1
-#define STATE_TIME1 2
-#define STATE_TIME2 3
-#define STATE_TIME3 4
-
-/*
- * LEITCH unit control structure
- */
-struct leitchunit {
- struct peer *peer;
- struct refclockio leitchio;
- u_char unit;
- short year;
- short yearday;
- short month;
- short day;
- short hour;
- short second;
- short minute;
- short state;
- u_short fudge1;
- l_fp reftime1;
- l_fp reftime2;
- l_fp reftime3;
- l_fp codetime1;
- l_fp codetime2;
- l_fp codetime3;
- u_long yearstart;
-};
-
-/*
- * Function prototypes
- */
-static void leitch_init P((void));
-static int leitch_start P((int, struct peer *));
-static void leitch_shutdown P((int, struct peer *));
-static void leitch_poll P((int, struct peer *));
-static void leitch_control P((int, struct refclockstat *, struct refclockstat *, struct peer *));
-#define leitch_buginfo noentry
-static void leitch_receive P((struct recvbuf *));
-static void leitch_process P((struct leitchunit *));
-#if 0
-static void leitch_timeout P((struct peer *));
-#endif
-static int leitch_get_date P((struct recvbuf *, struct leitchunit *));
-static int leitch_get_time P((struct recvbuf *, struct leitchunit *, int));
-static int days_per_year P((int));
-
-static struct leitchunit leitchunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_int32 refid[MAXUNITS];
-
-static char days_in_month [] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-
-/*
- * Transfer vector
- */
-struct refclock refclock_leitch = {
- leitch_start, leitch_shutdown, leitch_poll,
- leitch_control, leitch_init, leitch_buginfo, NOFLAGS
-};
-
-/*
- * leitch_init - initialize internal leitch driver data
- */
-static void
-leitch_init(void)
-{
- int i;
-
- memset((char*)leitchunits, 0, sizeof(leitchunits));
- memset((char*)unitinuse, 0, sizeof(unitinuse));
- for (i = 0; i < MAXUNITS; i++)
- memcpy((char *)&refid[i], LEITCHREFID, 4);
-}
-
-/*
- * leitch_shutdown - shut down a LEITCH clock
- */
-static void
-leitch_shutdown(
- int unit,
- struct peer *peer
- )
-{
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_shutdown()\n");
-#endif
-}
-
-/*
- * leitch_poll - called by the transmit procedure
- */
-static void
-leitch_poll(
- int unit,
- struct peer *peer
- )
-{
- struct leitchunit *leitch;
-
- /* start the state machine rolling */
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_poll()\n");
-#endif
- if (unit > MAXUNITS) {
- /* XXXX syslog it */
- return;
- }
-
- leitch = &leitchunits[unit];
-
- if (leitch->state != STATE_IDLE) {
- /* reset and wait for next poll */
- /* XXXX syslog it */
- leitch->state = STATE_IDLE;
- } else {
- leitch_send(leitch,"D\r");
- leitch->state = STATE_DATE;
- }
-}
-
-static void
-leitch_control(
- int unit,
- struct refclockstat *in,
- struct refclockstat *out,
- struct peer *passed_peer
- )
-{
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR,
- "leitch_control: unit %d invalid", unit);
- return;
- }
-
- if (in) {
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = (&leitchunits[unit])->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out) {
- memset((char *)out, 0, sizeof (struct refclockstat));
- out->type = REFCLK_ATOM_LEITCH;
- out->haveflags = CLK_HAVEVAL1 | CLK_HAVEVAL2;
- out->fudgeval1 = (int32)stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->p_lastcode = "";
- out->clockdesc = LEITCH_DESCRIPTION;
- }
-}
-
-/*
- * leitch_start - open the LEITCH devices and initialize data for processing
- */
-static int
-leitch_start(
- int unit,
- struct peer *peer
- )
-{
- struct leitchunit *leitch;
- int fd232;
- char leitchdev[20];
-
- /*
- * Check configuration info.
- */
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "leitch_start: unit %d invalid", unit);
- return (0);
- }
-
- if (unitinuse[unit]) {
- msyslog(LOG_ERR, "leitch_start: unit %d in use", unit);
- return (0);
- }
-
- /*
- * Open serial port.
- */
- (void) sprintf(leitchdev, LEITCH232, unit);
- fd232 = open(leitchdev, O_RDWR, 0777);
- if (fd232 == -1) {
- msyslog(LOG_ERR,
- "leitch_start: open of %s: %m", leitchdev);
- return (0);
- }
-
- leitch = &leitchunits[unit];
- memset((char*)leitch, 0, sizeof(*leitch));
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, TCGETA): %m", leitchdev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, TCSETA): %m", leitchdev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The LEITCHCLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- */
- { struct termios ttyb, *ttyp;
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: tcgetattr(%s): %m", leitchdev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: tcsetattr(%s): %m", leitchdev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: tcflush(%s): %m", leitchdev);
- goto screwed;
- }
- }
-#endif /* HAVE_TERMIOS */
-#ifdef STREAM
-#if defined(LEITCHCLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, I_PUSH, clk): %m", leitchdev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, CLK_SETSTR): %m", leitchdev);
-#endif /* LEITCHCLK */
-#endif /* STREAM */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The LEITCHCLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(LEITCHCLK)
- int ldisc = CLKLDISC;
-#endif /* LEITCHCLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCGETP): %m", leitchdev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(LEITCHCLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* LEITCHCLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCSETP): %m", leitchdev);
- goto screwed;
- }
-#if defined(LEITCHCLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- msyslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCSETD): %m",leitchdev);
- goto screwed;
- }
-#endif /* LEITCHCLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Set up the structures
- */
- leitch->peer = peer;
- leitch->unit = unit;
- leitch->state = STATE_IDLE;
- leitch->fudge1 = 15; /* 15ms */
-
- leitch->leitchio.clock_recv = leitch_receive;
- leitch->leitchio.srcclock = (caddr_t) leitch;
- leitch->leitchio.datalen = 0;
- leitch->leitchio.fd = fd232;
- if (!io_addclock(&leitch->leitchio)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- return(1);
-
- /*
- * Something broke; abandon ship.
- */
- screwed:
- close(fd232);
- return(0);
-}
-
-/*
- * leitch_receive - receive data from the serial interface on a leitch
- * clock
- */
-static void
-leitch_receive(
- struct recvbuf *rbufp
- )
-{
- struct leitchunit *leitch = (struct leitchunit *)rbufp->recv_srcclock;
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_recieve(%*.*s)\n",
- rbufp->recv_length, rbufp->recv_length,
- rbufp->recv_buffer);
-#endif
- if (rbufp->recv_length != 7)
- return; /* The date is return with a trailing newline,
- discard it. */
-
- switch (leitch->state) {
- case STATE_IDLE: /* unexpected, discard and resync */
- return;
- case STATE_DATE:
- if (!leitch_get_date(rbufp,leitch)) {
- leitch->state = STATE_IDLE;
- break;
- }
- leitch_send(leitch,"T\r");
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%u\n",leitch->yearday);
-#endif
- leitch->state = STATE_TIME1;
- break;
- case STATE_TIME1:
- if (!leitch_get_time(rbufp,leitch,1)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 1, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime1.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
- leitch->reftime1.l_uf = 0;
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%lu\n", (u_long)leitch->reftime1.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime1.l_uf);
- leitch->codetime1 = rbufp->recv_time;
- leitch->state = STATE_TIME2;
- break;
- case STATE_TIME2:
- if (!leitch_get_time(rbufp,leitch,2)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 1, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime2.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%lu\n", (u_long)leitch->reftime2.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime2.l_uf);
- leitch->codetime2 = rbufp->recv_time;
- leitch->state = STATE_TIME3;
- break;
- case STATE_TIME3:
- if (!leitch_get_time(rbufp,leitch,3)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, GMT, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime3.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%lu\n", (u_long)leitch->reftime3.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime3.l_uf);
- leitch->codetime3 = rbufp->recv_time;
- leitch_process(leitch);
- leitch->state = STATE_IDLE;
- break;
- default:
- msyslog(LOG_ERR,
- "leitech_receive: invalid state %d unit %d",
- leitch->state, leitch->unit);
- }
-}
-
-/*
- * leitch_process - process a pile of samples from the clock
- *
- * This routine uses a three-stage median filter to calculate offset and
- * dispersion. reduce jitter. The dispersion is calculated as the span
- * of the filter (max - min), unless the quality character (format 2) is
- * non-blank, in which case the dispersion is calculated on the basis of
- * the inherent tolerance of the internal radio oscillator, which is
- * +-2e-5 according to the radio specifications.
- */
-static void
-leitch_process(
- struct leitchunit *leitch
- )
-{
- l_fp off;
- l_fp tmp_fp;
- /*double doffset;*/
-
- off = leitch->reftime1;
- L_SUB(&off,&leitch->codetime1);
- tmp_fp = leitch->reftime2;
- L_SUB(&tmp_fp,&leitch->codetime2);
- if (L_ISGEQ(&off,&tmp_fp))
- off = tmp_fp;
- tmp_fp = leitch->reftime3;
- L_SUB(&tmp_fp,&leitch->codetime3);
-
- if (L_ISGEQ(&off,&tmp_fp))
- off = tmp_fp;
- /*LFPTOD(&off, doffset);*/
- refclock_receive(leitch->peer);
-}
-
-/*
- * days_per_year
- */
-static int
-days_per_year(
- int year
- )
-{
- if (year%4) { /* not a potential leap year */
- return (365);
- } else {
- if (year % 100) { /* is a leap year */
- return (366);
- } else {
- if (year % 400) {
- return (365);
- } else {
- return (366);
- }
- }
- }
-}
-
-static int
-leitch_get_date(
- struct recvbuf *rbufp,
- struct leitchunit *leitch
- )
-{
- int i;
-
- if (rbufp->recv_length < 6)
- return(0);
-#undef BAD /* confict: defined as (-1) in AIX sys/param.h */
-#define BAD(A) (rbufp->recv_buffer[A] < '0') || (rbufp->recv_buffer[A] > '9')
- if (BAD(0)||BAD(1)||BAD(2)||BAD(3)||BAD(4)||BAD(5))
- return(0);
-#define ATOB(A) ((rbufp->recv_buffer[A])-'0')
- leitch->year = ATOB(0)*10 + ATOB(1);
- leitch->month = ATOB(2)*10 + ATOB(3);
- leitch->day = ATOB(4)*10 + ATOB(5);
-
- /* sanity checks */
- if (leitch->month > 12)
- return(0);
- if (leitch->day > days_in_month[leitch->month-1])
- return(0);
-
- /* calculate yearday */
- i = 0;
- leitch->yearday = leitch->day;
-
- while ( i < (leitch->month-1) )
- leitch->yearday += days_in_month[i++];
-
- if ((days_per_year((leitch->year>90?1900:2000)+leitch->year)==365) &&
- leitch->month > 2)
- leitch->yearday--;
-
- return(1);
-}
-
-/*
- * leitch_get_time
- */
-static int
-leitch_get_time(
- struct recvbuf *rbufp,
- struct leitchunit *leitch,
- int which
- )
-{
- if (BAD(0)||BAD(1)||BAD(2)||BAD(3)||BAD(4)||BAD(5))
- return(0);
- leitch->hour = ATOB(0)*10 +ATOB(1);
- leitch->minute = ATOB(2)*10 +ATOB(3);
- leitch->second = ATOB(4)*10 +ATOB(5);
-
- if ((leitch->hour > 23) || (leitch->minute > 60) ||
- (leitch->second > 60))
- return(0);
- return(1);
-}
-
-#else
-int refclock_leitch_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_local.c b/contrib/ntp/ntpd/refclock_local.c
deleted file mode 100644
index 3478f43..0000000
--- a/contrib/ntp/ntpd/refclock_local.c
+++ /dev/null
@@ -1,264 +0,0 @@
-
-/*
- * 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>
-#endif
-
-#ifdef REFCLOCK
-
-#include "ntpd.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef KERNEL_PLL
-#include "ntp_syscall.h"
-#endif
-
-/*
- * This is a hack to allow a machine to use its own system clock as a
- * reference clock, i.e., to free-run using no outside clock discipline
- * source. This is useful if you want to use NTP in an isolated
- * environment with no radio clock or NIST modem available. Pick a
- * machine that you figure has a good clock oscillator 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.
- *
- * Another application for this driver is if you want to use a
- * particular server's clock 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 higher stratum (say 5) to prevent the
- * server's stratum from falling below that.
- *
- * A third application for this driver is when an external discipline
- * source is available, such as the NIST "lockclock" 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. Exercise some caution with this, since there is no
- * easy way to telegraph via NTP that something might be wrong in the
- * discipline source itself. 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.
- *
- * THis driver includes provisions to telegraph synchronization state
- * and related variables by means of kernel variables with specially
- * modified kernels. This is done using the ntp_adjtime() syscall.
- * In the cases where another protocol or device synchronizes the local
- * host, the data given to the kernel can be slurped up by this driver
- * and distributed to clients by ordinary NTP messaging.
- *
- * 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 overriden 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. This behavior is intended for use when an external
- * discipline source controls the system clock.
- *
- * 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.
- *
- * 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.
- */
-/*
- * Local interface definitions
- */
-#define PRECISION (-7) /* about 10 ms precision */
-#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 */
-#define DISPERSION .01 /* default dispersion (10 ms) */
-
-/*
- * Imported from the timer module
- */
-extern u_long current_time;
-
-/*
- * Imported from ntp_proto
- */
-extern s_char sys_precision;
-
-#ifdef KERNEL_PLL
-/*
- * Imported from ntp_loopfilter
- */
-extern int pll_control; /* kernel pll control */
-extern int kern_enable; /* kernel pll enabled */
-extern int ext_enable; /* external clock enable */
-#endif /* KERNEL_PLL */
-
-/*
- * Function prototypes
- */
-static int local_start P((int, struct peer *));
-static void local_poll P((int, struct peer *));
-
-/*
- * Local variables
- */
-static u_long poll_time; /* last time polled */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_local = {
- local_start, /* start up driver */
- noentry, /* shut down driver (not used) */
- local_poll, /* transmit poll message */
- noentry, /* not used (old lcl_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old lcl_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * local_start - start up the clock
- */
-static int
-local_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = sys_precision;
- pp->leap = LEAP_NOTINSYNC;
- peer->stratum = STRATUM;
- pp->stratum = STRATUM;
- pp->clockdesc = DESCRIPTION;
- memcpy(&pp->refid, "INIT", 4);
- poll_time = current_time;
- return (1);
-}
-
-
-/*
- * 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(
- int unit,
- struct peer *peer
- )
-{
-#if defined(KERNEL_PLL) && defined(LOCKCLOCK)
- struct timex ntv;
-#endif /* KERNEL_PLL LOCKCLOCK */
- struct refclockproc *pp;
-
-#if defined(VMS) && defined(VMS_LOCALUNIT)
- if (unit == VMS_LOCALUNIT) {
- extern void vms_local_poll(struct peer *);
-
- vms_local_poll(peer);
- return;
- }
-#endif /* VMS && VMS_LOCALUNIT */
- pp = peer->procptr;
- pp->polls++;
-
- /*
- * Ramble through the usual filtering and grooming code, which
- * is essentially a no-op and included mostly for pretty
- * billboards. We allow a one-time time adjustment using fudge
- * time1 (s) and a continuous frequency adjustment using fudge
- * time 2 (ppm).
- */
- get_systime(&pp->lastrec);
- pp->fudgetime1 += pp->fudgetime2 * 1e-6 * (current_time -
- poll_time);
- poll_time = current_time;
- refclock_process_offset(pp, pp->lastrec, pp->lastrec,
- pp->fudgetime1);
-
- /*
- * If another process is disciplining the system clock, we set
- * the leap bits and quality indicators from the kernel.
- */
-#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_INS:
- pp->leap = LEAP_ADDSECOND;
- peer->stratum = pp->stratum;
- break;
-
- case TIME_DEL:
- pp->leap = LEAP_DELSECOND;
- peer->stratum = pp->stratum;
- break;
-
- default:
- pp->leap = LEAP_NOTINSYNC;
- peer->stratum = STRATUM_UNSPEC;
- }
- 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;
-}
-#else
-int refclock_local_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_msfees.c b/contrib/ntp/ntpd/refclock_msfees.c
deleted file mode 100644
index ebfb983..0000000
--- a/contrib/ntp/ntpd/refclock_msfees.c
+++ /dev/null
@@ -1,1455 +0,0 @@
-/* refclock_ees - clock driver for the EES M201 receiver */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_MSFEES) && defined(PPS)
-
-/* Currently REQUIRES STREAM and PPSCD. CLK and CBREAK modes
- * were removed as the code was overly hairy, they weren't in use
- * (hence probably didn't work). Still in RCS file at cl.cam.ac.uk
- */
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-
-#include <ctype.h>
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#if defined(STREAM)
-#include <stropts.h>
-#endif
-
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif
-
-#include "ntp_stdlib.h"
-
-/*
- fudgefactor = fudgetime1;
- os_delay = fudgetime2;
- offset_fudge = os_delay + fudgefactor + inherent_delay;
- stratumtouse = fudgeval1 & 0xf
- debug = fudgeval2;
- sloppyclockflag = flags & CLK_FLAG1;
- 1 log smoothing summary when processing sample
- 4 dump the buffer from the clock
- 8 EIOGETKD the last n uS time stamps
- if (flags & CLK_FLAG2 && unitinuse) ees->leaphold = 0;
- ees->dump_vals = flags & CLK_FLAG3;
- ees->usealldata = flags & CLK_FLAG4;
-
-
- bug->values[0] = (ees->lasttime) ? current_time - ees->lasttime : 0;
- bug->values[1] = (ees->clocklastgood)?current_time-ees->clocklastgood:0;
- bug->values[2] = (u_long)ees->status;
- bug->values[3] = (u_long)ees->lastevent;
- bug->values[4] = (u_long)ees->reason;
- bug->values[5] = (u_long)ees->nsamples;
- bug->values[6] = (u_long)ees->codestate;
- bug->values[7] = (u_long)ees->day;
- bug->values[8] = (u_long)ees->hour;
- bug->values[9] = (u_long)ees->minute;
- bug->values[10] = (u_long)ees->second;
- bug->values[11] = (u_long)ees->tz;
- bug->values[12] = ees->yearstart;
- bug->values[13] = (ees->leaphold > current_time) ?
- ees->leaphold - current_time : 0;
- bug->values[14] = inherent_delay[unit].l_uf;
- bug->values[15] = offset_fudge[unit].l_uf;
-
- bug->times[0] = ees->reftime;
- bug->times[1] = ees->arrvtime;
- bug->times[2] = ees->lastsampletime;
- bug->times[3] = ees->offset;
- bug->times[4] = ees->lowoffset;
- bug->times[5] = ees->highoffset;
- bug->times[6] = inherent_delay[unit];
- bug->times[8] = os_delay[unit];
- bug->times[7] = fudgefactor[unit];
- bug->times[9] = offset_fudge[unit];
- bug->times[10]= ees->yearstart, 0;
- */
-
-/* This should support the use of an EES M201 receiver with RS232
- * output (modified to transmit time once per second).
- *
- * For the format of the message sent by the clock, see the EESM_
- * definitions below.
- *
- * It appears to run free for an integral number of minutes, until the error
- * reaches 4mS, at which point it steps at second = 01.
- * It appears that sometimes it steps 4mS (say at 7 min interval),
- * then the next minute it decides that it was an error, so steps back.
- * 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 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,
- *
- * Can run in any one of:
- *
- * PPSCD PPS signal sets CD which interupts, and grabs the current TOD
- * (sun) *in the interupt code*, so as to avoid problems with
- * the STREAMS scheduling.
- *
- * It appears that it goes 16.5 uS slow each second, then every 4 mins it
- * generates no "00" second tick, and gains 3975 uS. Ho Hum ! (93/2/7)
- */
-
-/* Definitions */
-#ifndef MAXUNITS
-#define MAXUNITS 4 /* maximum number of EES units permitted */
-#endif
-
-#ifndef EES232
-#define EES232 "/dev/ees%d" /* Device to open to read the data */
-#endif
-
-/* Other constant stuff */
-#ifndef EESPRECISION
-#define EESPRECISION (-10) /* what the heck - 2**-10 = 1ms */
-#endif
-#ifndef EESREFID
-#define EESREFID "MSF\0" /* String to identify the clock */
-#endif
-#ifndef EESHSREFID
-#define EESHSREFID (0x7f7f0000 | ((REFCLK_MSF_EES) << 8)) /* Numeric refid */
-#endif
-
-/* Description of clock */
-#define EESDESCRIPTION "EES M201 MSF Receiver"
-
-/* Speed we run the clock port at. If this is changed the UARTDELAY
- * value should be recomputed to suit.
- */
-#ifndef SPEED232
-#define SPEED232 B9600 /* 9600 baud */
-#endif
-
-/* What is the inherent delay for this mode of working, i.e. when is the
- * data time stamped.
- */
-#define SAFETY_SHIFT 10 /* Split the shift to avoid overflow */
-#define BITS_TO_L_FP(bits, baud) \
-(((((bits)*2 +1) << (FRACTION_PREC-SAFETY_SHIFT)) / (2*baud)) << SAFETY_SHIFT)
-#define INH_DELAY_CBREAK BITS_TO_L_FP(119, 9600)
-#define INH_DELAY_PPS BITS_TO_L_FP( 0, 9600)
-
-#ifndef STREAM_PP1
-#define STREAM_PP1 "ppsclocd\0<-- patch space for module name1 -->"
-#endif
-#ifndef STREAM_PP2
-#define STREAM_PP2 "ppsclock\0<-- patch space for module name2 -->"
-#endif
-
- /* Offsets of the bytes of the serial line code. The clock gives
- * local time with a GMT/BST indication. The EESM_ definitions
- * give offsets into ees->lastcode.
- */
-#define EESM_CSEC 0 /* centiseconds - always zero in our clock */
-#define EESM_SEC 1 /* seconds in BCD */
-#define EESM_MIN 2 /* minutes in BCD */
-#define EESM_HOUR 3 /* hours in BCD */
-#define EESM_DAYWK 4 /* day of week (Sun = 0 etc) */
-#define EESM_DAY 5 /* day of month in BCD */
-#define EESM_MON 6 /* month in BCD */
-#define EESM_YEAR 7 /* year MOD 100 in BCD */
-#define EESM_LEAP 8 /* 0x0f if leap year, otherwise zero */
-#define EESM_BST 9 /* 0x03 if BST, 0x00 if GMT */
-#define EESM_MSFOK 10 /* 0x3f if radio good, otherwise zero */
- /* followed by a frame alignment byte (0xff) /
- / which is not put into the lastcode buffer*/
-
-/* Length of the serial time code, in characters. The first length
- * is less the frame alignment byte.
- */
-#define LENEESPRT (EESM_MSFOK+1)
-#define LENEESCODE (LENEESPRT+1)
-
- /* Code state. */
-#define EESCS_WAIT 0 /* waiting for start of timecode */
-#define EESCS_GOTSOME 1 /* have an incomplete time code buffered */
-
- /* Default fudge factor and character to receive */
-#define DEFFUDGETIME 0 /* Default user supplied fudge factor */
-#ifndef DEFOSTIME
-#define DEFOSTIME 0 /* Default OS delay -- passed by Make ? */
-#endif
-#define DEFINHTIME INH_DELAY_PPS /* inherent delay due to sample point*/
-
- /* Limits on things. Reduce the number of samples to SAMPLEREDUCE by median
- * elimination. If we're running with an accurate clock, chose the BESTSAMPLE
- * as the estimated offset, otherwise average the remainder.
- */
-#define FULLSHIFT 6 /* NCODES root 2 */
-#define NCODES (1<< FULLSHIFT) /* 64 */
-#define REDUCESHIFT (FULLSHIFT -1) /* SAMPLEREDUCE root 2 */
-
- /* Towards the high ( Why ?) end of half */
-#define BESTSAMPLE ((samplereduce * 3) /4) /* 24 */
-
- /* Leap hold time. After a leap second the clock will no longer be
- * reliable until it resynchronizes. Hope 40 minutes is enough. */
-#define EESLEAPHOLD (40 * 60)
-
-#define EES_STEP_F (1 << 24) /* the receiver steps in units of about 4ms */
-#define EES_STEP_F_GRACE (EES_STEP_F/8) /*Allow for slop of 1/8 which is .5ms*/
-#define EES_STEP_NOTE (1 << 21)/* Log any unexpected jumps, say .5 ms .... */
-#define EES_STEP_NOTES 50 /* Only do a limited number */
-#define MAX_STEP 16 /* Max number of steps to remember */
-
- /* debug is a bit mask of debugging that is wanted */
-#define DB_SYSLOG_SMPLI 0x0001
-#define DB_SYSLOG_SMPLE 0x0002
-#define DB_SYSLOG_SMTHI 0x0004
-#define DB_SYSLOG_NSMTHE 0x0008
-#define DB_SYSLOG_NSMTHI 0x0010
-#define DB_SYSLOG_SMTHE 0x0020
-#define DB_PRINT_EV 0x0040
-#define DB_PRINT_CDT 0x0080
-#define DB_PRINT_CDTC 0x0100
-#define DB_SYSLOG_KEEPD 0x0800
-#define DB_SYSLOG_KEEPE 0x1000
-#define DB_LOG_DELTAS 0x2000
-#define DB_PRINT_DELTAS 0x4000
-#define DB_LOG_AWAITMORE 0x8000
-#define DB_LOG_SAMPLES 0x10000
-#define DB_NO_PPS 0x20000
-#define DB_INC_PPS 0x40000
-#define DB_DUMP_DELTAS 0x80000
-
- struct eesunit { /* EES unit control structure. */
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp reftime; /* reference time */
- l_fp lastsampletime; /* time as in txt from last EES msg */
- l_fp arrvtime; /* Time at which pkt arrived */
- l_fp codeoffsets[NCODES]; /* the time of arrival of 232 codes */
- l_fp offset; /* chosen offset (for clkbug) */
- l_fp lowoffset; /* lowest sample offset (for clkbug) */
- l_fp highoffset; /* highest " " (for clkbug) */
- char lastcode[LENEESCODE+6]; /* last time code we received */
- u_long lasttime; /* last time clock heard from */
- u_long clocklastgood; /* last time good radio seen */
- u_char lencode; /* length of code in buffer */
- u_char nsamples; /* number of samples we've collected */
- u_char codestate; /* state of 232 code reception */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- char tz; /* timezone from clock */
- u_char ttytype; /* method used */
- u_char dump_vals; /* Should clock values be dumped */
- u_char usealldata; /* Use ALL samples */
- u_short day; /* day of year from last code */
- u_long yearstart; /* start of current year */
- u_long leaphold; /* time of leap hold expiry */
- u_long badformat; /* number of bad format codes */
- u_long baddata; /* number of invalid time codes */
- u_long timestarted; /* time we started this */
- long last_pps_no; /* The serial # of the last PPS */
- char fix_pending; /* Is a "sync to time" pending ? */
- /* Fine tuning - compensate for 4 mS ramping .... */
- l_fp last_l; /* last time stamp */
- u_char last_steps[MAX_STEP]; /* Most recent n steps */
- int best_av_step; /* Best guess at average step */
- char best_av_step_count; /* # of steps over used above */
- char this_step; /* Current pos in buffer */
- int last_step_late; /* How late the last step was (0-59) */
- long jump_fsecs; /* # of fractions of a sec last jump */
- u_long last_step; /* time of last step */
- int last_step_secs; /* Number of seconds in last step */
- int using_ramp; /* 1 -> noemal, -1 -> over stepped */
- };
-#define last_sec last_l.l_ui
-#define last_sfsec last_l.l_f
-#define this_uisec ((ees->arrvtime).l_ui)
-#define this_sfsec ((ees->arrvtime).l_f)
-#define msec(x) ((x) / (1<<22))
-#define LAST_STEPS (sizeof ees->last_steps / sizeof ees->last_steps[0])
-#define subms(x) ((((((x < 0) ? (-(x)) : (x)) % (1<<22))/2) * 625) / (1<<(22 -5)))
-
-/* Bitmask for what methods to try to use -- currently only PPS enabled */
-#define T_CBREAK 1
-#define T_PPS 8
-/* macros to test above */
-#define is_cbreak(x) ((x)->ttytype & T_CBREAK)
-#define is_pps(x) ((x)->ttytype & T_PPS)
-#define is_any(x) ((x)->ttytype)
-
-#define CODEREASON 20 /* reason codes */
-
-/* Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back. */
-static struct eesunit *eesunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/* Keep the fudge factors separately so they can be set even
- * when no clock is configured. */
-static l_fp inherent_delay[MAXUNITS]; /* when time stamp is taken */
-static l_fp fudgefactor[MAXUNITS]; /* fudgetime1 */
-static l_fp os_delay[MAXUNITS]; /* fudgetime2 */
-static l_fp offset_fudge[MAXUNITS]; /* Sum of above */
-static u_char stratumtouse[MAXUNITS];
-static u_char sloppyclockflag[MAXUNITS];
-
-static int deltas[60];
-
-static l_fp acceptable_slop; /* = { 0, 1 << (FRACTION_PREC -2) }; */
-static l_fp onesec; /* = { 1, 0 }; */
-
-#ifndef DUMP_BUF_SIZE /* Size of buffer to be used by dump_buf */
-#define DUMP_BUF_SIZE 10112
-#endif
-
-/* ees_reset - reset the count back to zero */
-#define ees_reset(ees) (ees)->nsamples = 0; \
-(ees)->codestate = EESCS_WAIT
-
-/* ees_event - record and report an event */
-#define ees_event(ees, evcode) if ((ees)->status != (u_char)(evcode)) \
-ees_report_event((ees), (evcode))
-
- /* Find the precision of the system clock by reading it */
-#define USECS 1000000
-#define MINSTEP 5 /* some systems increment uS on each call */
-#define MAXLOOPS (USECS/9)
-
-/*
- * Function prototypes
- */
-
-static int msfees_start P((int unit, struct peer *peer));
-static void msfees_shutdown P((int unit, struct peer *peer));
-static void msfees_poll P((int unit, struct peer *peer));
-static void msfees_init P((void));
-static void dump_buf P((l_fp *coffs, int from, int to, char *text));
-static void ees_report_event P((struct eesunit *ees, int code));
-static void ees_receive P((struct recvbuf *rbufp));
-static void ees_process P((struct eesunit *ees));
-#ifdef QSORT_USES_VOID_P
-static int offcompare P((const void *va, const void *vb));
-#else
-static int offcompare P((const l_fp *a, const l_fp *b));
-#endif /* QSORT_USES_VOID_P */
-
-
-/*
- * Transfer vector
- */
-struct refclock refclock_msfees = {
- msfees_start, /* start up driver */
- msfees_shutdown, /* shut down driver */
- msfees_poll, /* transmit poll message */
- noentry, /* not used */
- msfees_init, /* initialize driver */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-
-static void
-dump_buf(
- l_fp *coffs,
- int from,
- int to,
- char *text
- )
-{
- char buff[DUMP_BUF_SIZE + 80];
- int i;
- register char *ptr = buff;
-
- sprintf(ptr, text);
- for (i=from; i<to; i++)
- { while (*ptr) ptr++;
- if ((ptr-buff) > DUMP_BUF_SIZE) msyslog(LOG_DEBUG, "D: %s", ptr=buff);
- sprintf(ptr, " %06d", ((int)coffs[i].l_f) / 4295);
- }
- msyslog(LOG_DEBUG, "D: %s", buff);
-}
-
-/* msfees_init - initialize internal ees driver data */
-static void
-msfees_init(void)
-{
- register int i;
- /* Just zero the data arrays */
- memset((char *)eesunits, 0, sizeof eesunits);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- acceptable_slop.l_ui = 0;
- acceptable_slop.l_uf = 1 << (FRACTION_PREC -2);
-
- onesec.l_ui = 1;
- onesec.l_uf = 0;
-
- /* Initialize fudge factors to default. */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor[i].l_ui = 0;
- fudgefactor[i].l_uf = DEFFUDGETIME;
- os_delay[i].l_ui = 0;
- os_delay[i].l_uf = DEFOSTIME;
- inherent_delay[i].l_ui = 0;
- inherent_delay[i].l_uf = DEFINHTIME;
- offset_fudge[i] = os_delay[i];
- L_ADD(&offset_fudge[i], &fudgefactor[i]);
- L_ADD(&offset_fudge[i], &inherent_delay[i]);
- stratumtouse[i] = 0;
- sloppyclockflag[i] = 0;
- }
-}
-
-
-/* msfees_start - open the EES devices and initialize data for processing */
-static int
-msfees_start(
- int unit,
- struct peer *peer
- )
-{
- register struct eesunit *ees;
- register int i;
- int fd232 = -1;
- char eesdev[20];
- struct termios ttyb, *ttyp;
- struct refclockproc *pp;
- pp = peer->procptr;
-
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "ees clock: unit number %d invalid (max %d)",
- unit, MAXUNITS-1);
- return 0;
- }
- if (unitinuse[unit]) {
- msyslog(LOG_ERR, "ees clock: unit number %d in use", unit);
- return 0;
- }
-
- /* Unit okay, attempt to open the devices. We do them both at
- * once to make sure we can */
- (void) sprintf(eesdev, EES232, unit);
-
- fd232 = open(eesdev, O_RDWR, 0777);
- if (fd232 == -1) {
- msyslog(LOG_ERR, "ees clock: open of %s failed: %m", eesdev);
- return 0;
- }
-
-#ifdef TIOCEXCL
- /* Set for exclusive use */
- if (ioctl(fd232, TIOCEXCL, (char *)0) < 0) {
- msyslog(LOG_ERR, "ees clock: ioctl(%s, TIOCEXCL): %m", eesdev);
- goto screwed;
- }
-#endif
-
- /* STRIPPED DOWN VERSION: Only PPS CD is supported at the moment */
-
- /* Set port characteristics. If we don't have a STREAMS module or
- * a clock line discipline, cooked mode is just usable, even though it
- * strips the top bit. The only EES byte which uses the top
- * bit is the year, and we don't use that anyway. If we do
- * have the line discipline, we choose raw mode, and the
- * line discipline code will block up the messages.
- */
-
- /* STIPPED DOWN VERSION: Only PPS CD is supported at the moment */
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- msyslog(LOG_ERR, "msfees_start: tcgetattr(%s): %m", eesdev);
- goto screwed;
- }
-
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_oflag = 0;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- msyslog(LOG_ERR, "msfees_start: tcsetattr(%s): %m", eesdev);
- goto screwed;
- }
-
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- msyslog(LOG_ERR, "msfees_start: tcflush(%s): %m", eesdev);
- goto screwed;
- }
-
- inherent_delay[unit].l_uf = INH_DELAY_PPS;
-
- /* offset fudge (how *late* the timestamp is) = fudge + os delays */
- offset_fudge[unit] = os_delay[unit];
- L_ADD(&offset_fudge[unit], &fudgefactor[unit]);
- L_ADD(&offset_fudge[unit], &inherent_delay[unit]);
-
- /* Looks like this might succeed. Find memory for the structure.
- * Look to see if there are any unused ones, if not we malloc() one.
- */
- if (eesunits[unit] != 0) /* The one we want is okay */
- ees = eesunits[unit];
- else {
- /* Look for an unused, but allocated struct */
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && eesunits[i] != 0)
- break;
- }
-
- if (i < MAXUNITS) { /* Reclaim this one */
- ees = eesunits[i];
- eesunits[i] = 0;
- } /* no spare -- make a new one */
- else ees = (struct eesunit *) emalloc(sizeof(struct eesunit));
- }
- memset((char *)ees, 0, sizeof(struct eesunit));
- eesunits[unit] = ees;
-
- /* Set up the structures */
- ees->peer = peer;
- ees->unit = (u_char)unit;
- ees->timestarted= current_time;
- ees->ttytype = 0;
- ees->io.clock_recv= ees_receive;
- ees->io.srcclock= (caddr_t)ees;
- ees->io.datalen = 0;
- ees->io.fd = fd232;
-
- /* Okay. Push one of the two (linked into the kernel, or dynamically
- * loaded) STREAMS module, and give it to the I/O code to start
- * receiving stuff.
- */
-
-#ifdef STREAM
- {
- int rc1;
- /* Pop any existing onews first ... */
- while (ioctl(fd232, I_POP, 0 ) >= 0) ;
-
- /* Now try pushing either of the possible modules */
- if ((rc1=ioctl(fd232, I_PUSH, STREAM_PP1)) < 0 &&
- ioctl(fd232, I_PUSH, STREAM_PP2) < 0) {
- msyslog(LOG_ERR,
- "ees clock: Push of `%s' and `%s' to %s failed %m",
- STREAM_PP1, STREAM_PP2, eesdev);
- goto screwed;
- }
- else {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO, "I: ees clock: PUSHed %s on %s",
- (rc1 >= 0) ? STREAM_PP1 : STREAM_PP2, eesdev);
- ees->ttytype |= T_PPS;
- }
- }
-#endif /* STREAM */
-
- /* Add the clock */
- if (!io_addclock(&ees->io)) {
- /* Oh shit. Just close and return. */
- msyslog(LOG_ERR, "ees clock: io_addclock(%s): %m", eesdev);
- goto screwed;
- }
-
-
- /* All done. Initialize a few random peer variables, then
- * return success. */
- peer->precision = sys_precision;
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1) {
- memcpy((char *)&pp->refid, EESREFID, 4);
- if (unit > 0 && unit < 10)
- ((char *)&pp->refid)[3] = '0' + unit;
- } else {
- peer->refid = htonl(EESHSREFID);
- }
- unitinuse[unit] = 1;
- pp->unitptr = (caddr_t) &eesunits[unit];
- pp->clockdesc = EESDESCRIPTION;
- msyslog(LOG_ERR, "ees clock: %s OK on %d", eesdev, unit);
- return (1);
-
- screwed:
- if (fd232 != -1)
- (void) close(fd232);
- return (0);
-}
-
-
-/* msfees_shutdown - shut down a EES clock */
-static void
-msfees_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct eesunit *ees;
-
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR,
- "ees clock: INTERNAL ERROR, unit number %d invalid (max %d)",
- unit, MAXUNITS);
- return;
- }
- if (!unitinuse[unit]) {
- msyslog(LOG_ERR,
- "ees clock: INTERNAL ERROR, unit number %d not in use", unit);
- return;
- }
-
- /* Tell the I/O module to turn us off. We're history. */
- ees = eesunits[unit];
- io_closeclock(&ees->io);
- unitinuse[unit] = 0;
-}
-
-
-/* ees_report_event - note the occurance of an event */
-static void
-ees_report_event(
- struct eesunit *ees,
- int code
- )
-{
- if (ees->status != (u_char)code) {
- ees->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- ees->lastevent = (u_char)code;
- /* Should report event to trap handler in here.
- * Soon...
- */
- }
-}
-
-
-/* ees_receive - receive data from the serial interface on an EES clock */
-static void
-ees_receive(
- struct recvbuf *rbufp
- )
-{
- register int n_sample;
- register int day;
- register struct eesunit *ees;
- register u_char *dpt; /* Data PoinTeR: move along ... */
- register u_char *dpend; /* Points just *after* last data char */
- register char *cp;
- l_fp tmp;
- int call_pps_sample = 0;
- l_fp pps_arrvstamp;
- int sincelast;
- int pps_step = 0;
- int suspect_4ms_step = 0;
- struct ppsclockev ppsclockev;
- long *ptr = (long *) &ppsclockev;
- int rc;
- int request;
-#ifdef HAVE_CIOGETEV
- request = CIOGETEV;
-#endif
-#ifdef HAVE_TIOCGPPSEV
- request = TIOCGPPSEV;
-#endif
-
- /* Get the clock this applies to and a pointer to the data */
- ees = (struct eesunit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
- dpend = dpt + rbufp->recv_length;
- if ((debug & DB_LOG_AWAITMORE) && (rbufp->recv_length != LENEESCODE))
- printf("[%d] ", rbufp->recv_length);
-
- /* Check out our state and process appropriately */
- switch (ees->codestate) {
- case EESCS_WAIT:
- /* Set an initial guess at the timestamp as the recv time.
- * If just running in CBREAK mode, we can't improve this.
- * If we have the CLOCK Line Discipline, PPSCD, or sime such,
- * then we will do better later ....
- */
- ees->arrvtime = rbufp->recv_time;
- ees->codestate = EESCS_GOTSOME;
- ees->lencode = 0;
- /*FALLSTHROUGH*/
-
- case EESCS_GOTSOME:
- cp = &(ees->lastcode[ees->lencode]);
-
- /* Gobble the bytes until the final (possibly stripped) 0xff */
- while (dpt < dpend && (*dpt & 0x7f) != 0x7f) {
- *cp++ = (char)*dpt++;
- ees->lencode++;
- /* Oh dear -- too many bytes .. */
- if (ees->lencode > LENEESPRT) {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO,
- "I: ees clock: %d + %d > %d [%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x]",
- ees->lencode, dpend - dpt, LENEESPRT,
-#define D(x) (ees->lastcode[x])
- D(0), D(1), D(2), D(3), D(4), D(5), D(6),
- D(7), D(8), D(9), D(10), D(11), D(12));
-#undef D
- ees->badformat++;
- ees->reason = CODEREASON + 1;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
- }
- /* Gave up because it was end of the buffer, rather than ff */
- if (dpt == dpend) {
- /* Incomplete. Wait for more. */
- if (debug & DB_LOG_AWAITMORE)
- msyslog(LOG_INFO,
- "I: ees clock %d: %p == %p: await more",
- ees->unit, dpt, dpend);
- return;
- }
-
- /* This shouldn't happen ... ! */
- if ((*dpt & 0x7f) != 0x7f) {
- msyslog(LOG_INFO, "I: ees clock: %0x & 0x7f != 0x7f", *dpt);
- ees->badformat++;
- ees->reason = CODEREASON + 2;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* Skip the 0xff */
- dpt++;
-
- /* Finally, got a complete buffer. Mainline code will
- * continue on. */
- cp = ees->lastcode;
- break;
-
- default:
- msyslog(LOG_ERR, "ees clock: INTERNAL ERROR: %d state %d",
- ees->unit, ees->codestate);
- ees->reason = CODEREASON + 5;
- ees_event(ees, CEVNT_FAULT);
- ees_reset(ees);
- return;
- }
-
- /* Boy! After all that crap, the lastcode buffer now contains
- * something we hope will be a valid time code. Do length
- * checks and sanity checks on constant data.
- */
- ees->codestate = EESCS_WAIT;
- ees->lasttime = current_time;
- if (ees->lencode != LENEESPRT) {
- ees->badformat++;
- ees->reason = CODEREASON + 6;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- cp = ees->lastcode;
-
- /* Check that centisecond is zero */
- if (cp[EESM_CSEC] != 0) {
- ees->baddata++;
- ees->reason = CODEREASON + 7;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* Check flag formats */
- if (cp[EESM_LEAP] != 0 && cp[EESM_LEAP] != 0x0f) {
- ees->badformat++;
- ees->reason = CODEREASON + 8;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- if (cp[EESM_BST] != 0 && cp[EESM_BST] != 0x03) {
- ees->badformat++;
- ees->reason = CODEREASON + 9;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- if (cp[EESM_MSFOK] != 0 && cp[EESM_MSFOK] != 0x3f) {
- ees->badformat++;
- ees->reason = CODEREASON + 10;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* So far, so good. Compute day, hours, minutes, seconds,
- * time zone. Do range checks on these.
- */
-
-#define bcdunpack(val) ( (((val)>>4) & 0x0f) * 10 + ((val) & 0x0f) )
-#define istrue(x) ((x)?1:0)
-
- ees->second = bcdunpack(cp[EESM_SEC]); /* second */
- ees->minute = bcdunpack(cp[EESM_MIN]); /* minute */
- ees->hour = bcdunpack(cp[EESM_HOUR]); /* hour */
-
- day = bcdunpack(cp[EESM_DAY]); /* day of month */
-
- switch (bcdunpack(cp[EESM_MON])) { /* month */
-
- /* Add in lengths of all previous months. Add one more
- if it is a leap year and after February.
- */
- case 12: day += NOV; /*FALLSTHROUGH*/
- case 11: day += OCT; /*FALLSTHROUGH*/
- case 10: day += SEP; /*FALLSTHROUGH*/
- case 9: day += AUG; /*FALLSTHROUGH*/
- case 8: day += JUL; /*FALLSTHROUGH*/
- case 7: day += JUN; /*FALLSTHROUGH*/
- case 6: day += MAY; /*FALLSTHROUGH*/
- case 5: day += APR; /*FALLSTHROUGH*/
- case 4: day += MAR; /*FALLSTHROUGH*/
- case 3: day += FEB;
- if (istrue(cp[EESM_LEAP])) day++; /*FALLSTHROUGH*/
- case 2: day += JAN; /*FALLSTHROUGH*/
- case 1: break;
- default: ees->baddata++;
- ees->reason = CODEREASON + 11;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
-
- ees->day = day;
-
- /* Get timezone. The clocktime routine wants the number
- * of hours to add to the delivered time to get UT.
- * Currently -1 if BST flag set, 0 otherwise. This
- * is the place to tweak things if double summer time
- * ever happens.
- */
- ees->tz = istrue(cp[EESM_BST]) ? -1 : 0;
-
- if (ees->day > 366 || ees->day < 1 ||
- ees->hour > 23 || ees->minute > 59 || ees->second > 59) {
- ees->baddata++;
- ees->reason = CODEREASON + 12;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
-
- n_sample = ees->nsamples;
-
- /* Now, compute the reference time value: text -> tmp.l_ui */
- if (!clocktime(ees->day, ees->hour, ees->minute, ees->second,
- ees->tz, rbufp->recv_time.l_ui, &ees->yearstart,
- &tmp.l_ui)) {
- ees->baddata++;
- ees->reason = CODEREASON + 13;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
- tmp.l_uf = 0;
-
- /* DON'T use ees->arrvtime -- it may be < reftime */
- ees->lastsampletime = tmp;
-
- /* If we are synchronised to the radio, update the reference time.
- * Also keep a note of when clock was last good.
- */
- if (istrue(cp[EESM_MSFOK])) {
- ees->reftime = tmp;
- ees->clocklastgood = current_time;
- }
-
-
- /* Compute the offset. For the fractional part of the
- * offset we use the expected delay for the message.
- */
- ees->codeoffsets[n_sample].l_ui = tmp.l_ui;
- ees->codeoffsets[n_sample].l_uf = 0;
-
- /* Number of seconds since the last step */
- sincelast = this_uisec - ees->last_step;
-
- memset((char *) &ppsclockev, 0, sizeof ppsclockev);
-
- rc = ioctl(ees->io.fd, request, (char *) &ppsclockev);
- if (debug & DB_PRINT_EV) fprintf(stderr,
- "[%x] CIOGETEV u%d %d (%x %d) gave %d (%d): %08lx %08lx %ld\n",
- DB_PRINT_EV, ees->unit, ees->io.fd, request, is_pps(ees),
- rc, errno, ptr[0], ptr[1], ptr[2]);
-
- /* If we managed to get the time of arrival, process the info */
- if (rc >= 0) {
- int conv = -1;
- pps_step = ppsclockev.serial - ees->last_pps_no;
-
- /* Possible that PPS triggered, but text message didn't */
- if (pps_step == 2) msyslog(LOG_ERR, "pps step = 2 @ %02d", ees->second);
- if (pps_step == 2 && ees->second == 1) suspect_4ms_step |= 1;
- if (pps_step == 2 && ees->second == 2) suspect_4ms_step |= 4;
-
- /* allow for single loss of PPS only */
- if (pps_step != 1 && pps_step != 2)
- fprintf(stderr, "PPS step: %d too far off %ld (%d)\n",
- ppsclockev.serial, ees->last_pps_no, pps_step);
- else if (!buftvtots((char *) &(ppsclockev.tv), &pps_arrvstamp))
- fprintf(stderr, "buftvtots failed\n");
- else { /* if ((ABS(time difference) - 0.25) < 0)
- * then believe it ...
- */
- l_fp diff;
- diff = pps_arrvstamp;
- conv = 0;
- L_SUB(&diff, &ees->arrvtime);
- if (debug & DB_PRINT_CDT)
- printf("[%x] Have %lx.%08lx and %lx.%08lx -> %lx.%08lx @ %s",
- DB_PRINT_CDT, (long)ees->arrvtime.l_ui, (long)ees->arrvtime.l_uf,
- (long)pps_arrvstamp.l_ui, (long)pps_arrvstamp.l_uf,
- (long)diff.l_ui, (long)diff.l_uf,
- ctime(&(ppsclockev.tv.tv_sec)));
- if (L_ISNEG(&diff)) M_NEG(diff.l_ui, diff.l_uf);
- L_SUB(&diff, &acceptable_slop);
- if (L_ISNEG(&diff)) { /* AOK -- pps_sample */
- ees->arrvtime = pps_arrvstamp;
- conv++;
- call_pps_sample++;
- }
- /* Some loss of some signals around sec = 1 */
- else if (ees->second == 1) {
- diff = pps_arrvstamp;
- L_ADD(&diff, &onesec);
- L_SUB(&diff, &ees->arrvtime);
- if (L_ISNEG(&diff)) M_NEG(diff.l_ui, diff.l_uf);
- L_SUB(&diff, &acceptable_slop);
- msyslog(LOG_ERR, "Have sec==1 slip %ds a=%08x-p=%08x -> %x.%08x (u=%d) %s",
- pps_arrvstamp.l_ui - ees->arrvtime.l_ui,
- pps_arrvstamp.l_uf,
- ees->arrvtime.l_uf,
- diff.l_ui, diff.l_uf,
- (int)ppsclockev.tv.tv_usec,
- ctime(&(ppsclockev.tv.tv_sec)));
- if (L_ISNEG(&diff)) { /* AOK -- pps_sample */
- suspect_4ms_step |= 2;
- ees->arrvtime = pps_arrvstamp;
- L_ADD(&ees->arrvtime, &onesec);
- conv++;
- call_pps_sample++;
- }
- }
- }
- ees->last_pps_no = ppsclockev.serial;
- if (debug & DB_PRINT_CDTC)
- printf(
- "[%x] %08lx %08lx %d u%d (%d %d)\n",
- DB_PRINT_CDTC, (long)pps_arrvstamp.l_ui,
- (long)pps_arrvstamp.l_uf, conv, ees->unit,
- call_pps_sample, pps_step);
- }
-
- /* See if there has been a 4ms jump at a minute boundry */
- { l_fp delta;
-#define delta_isec delta.l_ui
-#define delta_ssec delta.l_i
-#define delta_sfsec delta.l_f
- long delta_f_abs;
-
- delta.l_i = ees->arrvtime.l_i;
- delta.l_f = ees->arrvtime.l_f;
-
- L_SUB(&delta, &ees->last_l);
- delta_f_abs = delta_sfsec;
- if (delta_f_abs < 0) delta_f_abs = -delta_f_abs;
-
- /* Dump the deltas each minute */
- if (debug & DB_DUMP_DELTAS)
- { if (/*0 <= ees->second && */
- ees->second < ((sizeof deltas) / (sizeof deltas[0]))) deltas[ees->second] = delta_sfsec;
- /* Dump on second 1, as second 0 sometimes missed */
- if (ees->second == 1) {
- char text[16 * ((sizeof deltas) / (sizeof deltas[0]))];
- char *cptr=text;
- int i;
- for (i=0; i<((sizeof deltas) / (sizeof deltas[0])); i++) {
- sprintf(cptr, " %d.%04d",
- msec(deltas[i]), subms(deltas[i]));
- while (*cptr) cptr++;
- }
- msyslog(LOG_ERR, "Deltas: %d.%04d<->%d.%04d: %s",
- msec(EES_STEP_F - EES_STEP_F_GRACE), subms(EES_STEP_F - EES_STEP_F_GRACE),
- msec(EES_STEP_F + EES_STEP_F_GRACE), subms(EES_STEP_F + EES_STEP_F_GRACE),
- text+1);
- for (i=0; i<((sizeof deltas) / (sizeof deltas[0])); i++) deltas[i] = 0;
- }
- }
-
- /* Lets see if we have a 4 mS step at a minute boundaary */
- if ( ((EES_STEP_F - EES_STEP_F_GRACE) < delta_f_abs) &&
- (delta_f_abs < (EES_STEP_F + EES_STEP_F_GRACE)) &&
- (ees->second == 0 || ees->second == 1 || ees->second == 2) &&
- (sincelast < 0 || sincelast > 122)
- ) { /* 4ms jump at min boundry */
- int old_sincelast;
- int count=0;
- int sum = 0;
- /* Yes -- so compute the ramp time */
- if (ees->last_step == 0) sincelast = 0;
- old_sincelast = sincelast;
-
- /* First time in, just set "ees->last_step" */
- if(ees->last_step) {
- int other_step = 0;
- int third_step = 0;
- int this_step = (sincelast + (60 /2)) / 60;
- int p_step = ees->this_step;
- int p;
- ees->last_steps[p_step] = this_step;
- p= p_step;
- p_step++;
- if (p_step >= LAST_STEPS) p_step = 0;
- ees->this_step = p_step;
- /* Find the "average" interval */
- while (p != p_step) {
- int this = ees->last_steps[p];
- if (this == 0) break;
- if (this != this_step) {
- if (other_step == 0 && (
- this== (this_step +2) ||
- this== (this_step -2) ||
- this== (this_step +1) ||
- this== (this_step -1)))
- other_step = this;
- if (other_step != this) {
- int idelta = (this_step - other_step);
- if (idelta < 0) idelta = - idelta;
- if (third_step == 0 && (
- (idelta == 1) ? (
- this == (other_step +1) ||
- this == (other_step -1) ||
- this == (this_step +1) ||
- this == (this_step -1))
- :
- (
- this == (this_step + other_step)/2
- )
- )) third_step = this;
- if (third_step != this) break;
- }
- }
- sum += this;
- p--;
- if (p < 0) p += LAST_STEPS;
- count++;
- }
- msyslog(LOG_ERR, "MSF%d: %d: This=%d (%d), other=%d/%d, sum=%d, count=%d, pps_step=%d, suspect=%x", ees->unit, p, ees->last_steps[p], this_step, other_step, third_step, sum, count, pps_step, suspect_4ms_step);
- if (count != 0) sum = ((sum * 60) + (count /2)) / count;
-#define SV(x) (ees->last_steps[(x + p_step) % LAST_STEPS])
- msyslog(LOG_ERR, "MSF%d: %x steps %d: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
- ees->unit, suspect_4ms_step, p_step, SV(0), SV(1), SV(2), SV(3), SV(4), SV(5), SV(6),
- SV(7), SV(8), SV(9), SV(10), SV(11), SV(12), SV(13), SV(14), SV(15));
- printf("MSF%d: steps %d: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
- ees->unit, p_step, SV(0), SV(1), SV(2), SV(3), SV(4), SV(5), SV(6),
- SV(7), SV(8), SV(9), SV(10), SV(11), SV(12), SV(13), SV(14), SV(15));
-#undef SV
- ees->jump_fsecs = delta_sfsec;
- ees->using_ramp = 1;
- if (sincelast > 170)
- ees->last_step_late += sincelast - ((sum) ? sum : ees->last_step_secs);
- else ees->last_step_late = 30;
- if (ees->last_step_late < -60 || ees->last_step_late > 120) ees->last_step_late = 30;
- if (ees->last_step_late < 0) ees->last_step_late = 0;
- if (ees->last_step_late >= 60) ees->last_step_late = 59;
- sincelast = 0;
- }
- else { /* First time in -- just save info */
- ees->last_step_late = 30;
- ees->jump_fsecs = delta_sfsec;
- ees->using_ramp = 1;
- sum = 4 * 60;
- }
- ees->last_step = this_uisec;
- printf("MSF%d: d=%3ld.%04ld@%d :%d:%d:$%d:%d:%d\n",
- ees->unit, (long)msec(delta_sfsec), (long)subms(delta_sfsec),
- ees->second, old_sincelast, ees->last_step_late, count, sum,
- ees->last_step_secs);
- msyslog(LOG_ERR, "MSF%d: d=%3d.%04d@%d :%d:%d:%d:%d:%d",
- ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second,
- old_sincelast, ees->last_step_late, count, sum, ees->last_step_secs);
- if (sum) ees->last_step_secs = sum;
- }
- /* OK, so not a 4ms step at a minute boundry */
- else {
- if (suspect_4ms_step) msyslog(LOG_ERR,
- "MSF%d: suspect = %x, but delta of %d.%04d [%d.%04d<%d.%04d<%d.%04d: %d %d]",
- ees->unit, suspect_4ms_step, msec(delta_sfsec), subms(delta_sfsec),
- msec(EES_STEP_F - EES_STEP_F_GRACE),
- subms(EES_STEP_F - EES_STEP_F_GRACE),
- (int)msec(delta_f_abs),
- (int)subms(delta_f_abs),
- msec(EES_STEP_F + EES_STEP_F_GRACE),
- subms(EES_STEP_F + EES_STEP_F_GRACE),
- ees->second,
- sincelast);
- if ((delta_f_abs > EES_STEP_NOTE) && ees->last_l.l_i) {
- static int ees_step_notes = EES_STEP_NOTES;
- if (ees_step_notes > 0) {
- ees_step_notes--;
- printf("MSF%d: D=%3ld.%04ld@%02d :%d%s\n",
- ees->unit, (long)msec(delta_sfsec), (long)subms(delta_sfsec),
- ees->second, sincelast, ees_step_notes ? "" : " -- NO MORE !");
- msyslog(LOG_ERR, "MSF%d: D=%3d.%04d@%02d :%d%s",
- ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, (ees->last_step) ? sincelast : -1, ees_step_notes ? "" : " -- NO MORE !");
- }
- }
- }
- }
- ees->last_l = ees->arrvtime;
-
- /* IF we have found that it's ramping
- * && it's within twice the expected ramp period
- * && there is a non zero step size (avoid /0 !)
- * THEN we twiddle things
- */
- if (ees->using_ramp &&
- sincelast < (ees->last_step_secs)*2 &&
- ees->last_step_secs)
- { long sec_of_ramp = sincelast + ees->last_step_late;
- long fsecs;
- l_fp inc;
-
- /* Ramp time may vary, so may ramp for longer than last time */
- if (sec_of_ramp > (ees->last_step_secs + 120))
- sec_of_ramp = ees->last_step_secs;
-
- /* sec_of_ramp * ees->jump_fsecs may overflow 2**32 */
- fsecs = sec_of_ramp * (ees->jump_fsecs / ees->last_step_secs);
-
- if (debug & DB_LOG_DELTAS) msyslog(LOG_ERR,
- "[%x] MSF%d: %3ld/%03d -> d=%11ld (%d|%ld)",
- DB_LOG_DELTAS,
- ees->unit, sec_of_ramp, ees->last_step_secs, fsecs,
- pps_arrvstamp.l_f, pps_arrvstamp.l_f + fsecs);
- if (debug & DB_PRINT_DELTAS) printf(
- "MSF%d: %3ld/%03d -> d=%11ld (%ld|%ld)\n",
- ees->unit, sec_of_ramp, ees->last_step_secs, fsecs,
- (long)pps_arrvstamp.l_f, pps_arrvstamp.l_f + fsecs);
-
- /* Must sign extend the result */
- inc.l_i = (fsecs < 0) ? -1 : 0;
- inc.l_f = fsecs;
- if (debug & DB_INC_PPS)
- { L_SUB(&pps_arrvstamp, &inc);
- L_SUB(&ees->arrvtime, &inc);
- }
- else
- { L_ADD(&pps_arrvstamp, &inc);
- L_ADD(&ees->arrvtime, &inc);
- }
- }
- else {
- if (debug & DB_LOG_DELTAS) msyslog(LOG_ERR,
- "[%x] MSF%d: ees->using_ramp=%d, sincelast=%x / %x, ees->last_step_secs=%x",
- DB_LOG_DELTAS,
- ees->unit, ees->using_ramp,
- sincelast,
- (ees->last_step_secs)*2,
- ees->last_step_secs);
- if (debug & DB_PRINT_DELTAS) printf(
- "[%x] MSF%d: ees->using_ramp=%d, sincelast=%x / %x, ees->last_step_secs=%x\n",
- DB_LOG_DELTAS,
- ees->unit, ees->using_ramp,
- sincelast,
- (ees->last_step_secs)*2,
- ees->last_step_secs);
- }
-
- L_SUB(&ees->arrvtime, &offset_fudge[ees->unit]);
- L_SUB(&pps_arrvstamp, &offset_fudge[ees->unit]);
-
- if (call_pps_sample && !(debug & DB_NO_PPS)) {
- /* Sigh -- it expects its args negated */
- L_NEG(&pps_arrvstamp);
- /*
- * I had to disable this here, since it appears there is no pointer to the
- * peer structure.
- *
- (void) pps_sample(peer, &pps_arrvstamp);
- */
- }
-
- /* Subtract off the local clock time stamp */
- L_SUB(&ees->codeoffsets[n_sample], &ees->arrvtime);
- if (debug & DB_LOG_SAMPLES) msyslog(LOG_ERR,
- "MSF%d: [%x] %d (ees: %d %d) (pps: %d %d)%s",
- ees->unit, DB_LOG_DELTAS, n_sample,
- ees->codeoffsets[n_sample].l_f,
- ees->codeoffsets[n_sample].l_f / 4295,
- pps_arrvstamp.l_f,
- pps_arrvstamp.l_f /4295,
- (debug & DB_NO_PPS) ? " [no PPS]" : "");
-
- if (ees->nsamples++ == NCODES-1) ees_process(ees);
-
- /* Done! */
-}
-
-
-/* offcompare - auxiliary comparison routine for offset sort */
-
-#ifdef QSORT_USES_VOID_P
-static int
-offcompare(
- const void *va,
- const void *vb
- )
-{
- const l_fp *a = (const l_fp *)va;
- const l_fp *b = (const l_fp *)vb;
- return(L_ISGEQ(a, b) ? (L_ISEQU(a, b) ? 0 : 1) : -1);
-}
-#else
-static int
-offcompare(
- const l_fp *a,
- const l_fp *b
- )
-{
- return(L_ISGEQ(a, b) ? (L_ISEQU(a, b) ? 0 : 1) : -1);
-}
-#endif /* QSORT_USES_VOID_P */
-
-
-/* ees_process - process a pile of samples from the clock */
-static void
-ees_process(
- struct eesunit *ees
- )
-{
- static int last_samples = -1;
- register int i, j;
- register int noff;
- register l_fp *coffs = ees->codeoffsets;
- l_fp offset, tmp;
- double dispersion; /* ++++ */
- int lostsync, isinsync;
- int samples = ees->nsamples;
- int samplelog = 0; /* keep "gcc -Wall" happy ! */
- int samplereduce = (samples + 1) / 2;
- double doffset;
-
- /* Reset things to zero so we don't have to worry later */
- ees_reset(ees);
-
- if (sloppyclockflag[ees->unit]) {
- samplelog = (samples < 2) ? 0 :
- (samples < 5) ? 1 :
- (samples < 9) ? 2 :
- (samples < 17) ? 3 :
- (samples < 33) ? 4 : 5;
- samplereduce = (1 << samplelog);
- }
-
- if (samples != last_samples &&
- ((samples != (last_samples-1)) || samples < 3)) {
- msyslog(LOG_ERR, "Samples=%d (%d), samplereduce=%d ....",
- samples, last_samples, samplereduce);
- last_samples = samples;
- }
- if (samples < 1) return;
-
- /* If requested, dump the raw data we have in the buffer */
- if (ees->dump_vals) dump_buf(coffs, 0, samples, "Raw data is:");
-
- /* Sort the offsets, trim off the extremes, then choose one. */
- qsort((char *) coffs, (size_t)samples, sizeof(l_fp), offcompare);
-
- noff = samples;
- i = 0;
- while ((noff - i) > samplereduce) {
- /* Trim off the sample which is further away
- * from the median. We work this out by doubling
- * the median, subtracting off the end samples, and
- * looking at the sign of the answer, using the
- * identity (c-b)-(b-a) == 2*b-a-c
- */
- tmp = coffs[(noff + i)/2];
- L_ADD(&tmp, &tmp);
- L_SUB(&tmp, &coffs[i]);
- L_SUB(&tmp, &coffs[noff-1]);
- if (L_ISNEG(&tmp)) noff--; else i++;
- }
-
- /* If requested, dump the reduce data we have in the buffer */
- if (ees->dump_vals) dump_buf(coffs, i, noff, "Reduced to:");
-
- /* What we do next depends on the setting of the sloppy clock flag.
- * If it is on, average the remainder to derive our estimate.
- * Otherwise, just pick a representative value from the remaining stuff
- */
- if (sloppyclockflag[ees->unit]) {
- offset.l_ui = offset.l_uf = 0;
- for (j = i; j < noff; j++)
- L_ADD(&offset, &coffs[j]);
- for (j = samplelog; j > 0; j--)
- L_RSHIFTU(&offset);
- }
- else offset = coffs[i+BESTSAMPLE];
-
- /* Compute the dispersion as the difference between the
- * lowest and highest offsets that remain in the
- * consideration list.
- *
- * It looks like MOST clocks have MOD (max error), so halve it !
- */
- tmp = coffs[noff-1];
- L_SUB(&tmp, &coffs[i]);
-#define FRACT_SEC(n) ((1 << 30) / (n/2))
- dispersion = LFPTOFP(&tmp) / 2; /* ++++ */
- if (debug & (DB_SYSLOG_SMPLI | DB_SYSLOG_SMPLE)) msyslog(
- (debug & DB_SYSLOG_SMPLE) ? LOG_ERR : LOG_INFO,
- "I: [%x] Offset=%06d (%d), disp=%f%s [%d], %d %d=%d %d:%d %d=%d %d",
- debug & (DB_SYSLOG_SMPLI | DB_SYSLOG_SMPLE),
- offset.l_f / 4295, offset.l_f,
- (dispersion * 1526) / 100,
- (sloppyclockflag[ees->unit]) ? " by averaging" : "",
- FRACT_SEC(10) / 4295,
- (coffs[0].l_f) / 4295,
- i,
- (coffs[i].l_f) / 4295,
- (coffs[samples/2].l_f) / 4295,
- (coffs[i+BESTSAMPLE].l_f) / 4295,
- noff-1,
- (coffs[noff-1].l_f) / 4295,
- (coffs[samples-1].l_f) / 4295);
-
- /* Are we playing silly wotsits ?
- * If we are using all data, see if there is a "small" delta,
- * and if so, blurr this with 3/4 of the delta from the last value
- */
- if (ees->usealldata && ees->offset.l_uf) {
- long diff = (long) (ees->offset.l_uf - offset.l_uf);
-
- /* is the delta small enough ? */
- if ((- FRACT_SEC(100)) < diff && diff < FRACT_SEC(100)) {
- int samd = (64 * 4) / samples;
- long new;
- if (samd < 2) samd = 2;
- new = offset.l_uf + ((diff * (samd -1)) / samd);
-
- /* Sign change -> need to fix up int part */
- if ((new & 0x80000000) !=
- (((long) offset.l_uf) & 0x80000000))
- { NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO, "I: %lx != %lx (%lx %lx), so add %d",
- new & 0x80000000,
- ((long) offset.l_uf) & 0x80000000,
- new, (long) offset.l_uf,
- (new < 0) ? -1 : 1);
- offset.l_ui += (new < 0) ? -1 : 1;
- }
- dispersion /= 4;
- if (debug & (DB_SYSLOG_SMTHI | DB_SYSLOG_SMTHE)) msyslog(
- (debug & DB_SYSLOG_SMTHE) ? LOG_ERR : LOG_INFO,
- "I: [%x] Smooth data: %ld -> %ld, dispersion now %f",
- debug & (DB_SYSLOG_SMTHI | DB_SYSLOG_SMTHE),
- ((long) offset.l_uf) / 4295, new / 4295,
- (dispersion * 1526) / 100);
- offset.l_uf = (unsigned long) new;
- }
- else if (debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE)) msyslog(
- (debug & DB_SYSLOG_NSMTHE) ? LOG_ERR : LOG_INFO,
- "[%x] No smooth as delta not %d < %ld < %d",
- debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE),
- - FRACT_SEC(100), diff, FRACT_SEC(100));
- }
- else if (debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE)) msyslog(
- (debug & DB_SYSLOG_NSMTHE) ? LOG_ERR : LOG_INFO,
- "I: [%x] No smooth as flag=%x and old=%x=%d (%d:%d)",
- debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE),
- ees->usealldata, ees->offset.l_f, ees->offset.l_uf,
- offset.l_f, ees->offset.l_f - offset.l_f);
-
- /* Collect offset info for debugging info */
- ees->offset = offset;
- ees->lowoffset = coffs[i];
- ees->highoffset = coffs[noff-1];
-
- /* Determine synchronization status. Can be unsync'd either
- * by a report from the clock or by a leap hold.
- *
- * Loss of the radio signal for a short time does not cause
- * us to go unsynchronised, since the receiver keeps quite
- * good time on its own. The spec says 20ms in 4 hours; the
- * observed drift in our clock (Cambridge) is about a second
- * a day, but even that keeps us within the inherent tolerance
- * of the clock for about 15 minutes. Observation shows that
- * the typical "short" outage is 3 minutes, so to allow us
- * to ride out those, we will give it 5 minutes.
- */
- lostsync = current_time - ees->clocklastgood > 300 ? 1 : 0;
- isinsync = (lostsync || ees->leaphold > current_time) ? 0 : 1;
-
- /* Done. Use time of last good, synchronised code as the
- * reference time, and lastsampletime as the receive time.
- */
- if (ees->fix_pending) {
- msyslog(LOG_ERR, "MSF%d: fix_pending=%d -> jump %x.%08x\n",
- ees->fix_pending, ees->unit, offset.l_i, offset.l_f);
- ees->fix_pending = 0;
- }
- LFPTOD(&offset, doffset);
- refclock_receive(ees->peer);
- ees_event(ees, lostsync ? CEVNT_PROP : CEVNT_NOMINAL);
-}
-
-/* msfees_poll - called by the transmit procedure */
-static void
-msfees_poll(
- int unit,
- struct peer *peer
- )
-{
- if (unit >= MAXUNITS) {
- msyslog(LOG_ERR, "ees clock poll: INTERNAL: unit %d invalid",
- unit);
- return;
- }
- if (!unitinuse[unit]) {
- msyslog(LOG_ERR, "ees clock poll: INTERNAL: unit %d unused",
- unit);
- return;
- }
-
- ees_process(eesunits[unit]);
-
- if ((current_time - eesunits[unit]->lasttime) > 150)
- ees_event(eesunits[unit], CEVNT_FAULT);
-}
-
-
-#else
-int refclock_msfees_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_mx4200.c b/contrib/ntp/ntpd/refclock_mx4200.c
deleted file mode 100644
index bc694ad..0000000
--- a/contrib/ntp/ntpd/refclock_mx4200.c
+++ /dev/null
@@ -1,1654 +0,0 @@
-/*
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66.
- *
- * Copyright (c) 1992 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, Lawrence Berkeley Laboratory.
- * 4. The name of the University may not 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.
- */
-
-/*
- * Modified: Marc Brett <marc.brett@westgeo.com> Sept, 1999.
- *
- * 1. Added support for alternate PPS schemes, with code mostly
- * copied from the Oncore driver (Thanks, Poul-Henning Kamp).
- * This code runs on SunOS 4.1.3 with ppsclock-1.6a1 and Solaris 7.
- */
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_MX4200) && defined(HAVE_PPSAPI)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "mx4200.h"
-
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif
-
-#include "ntp_sprintf.h"
-
-#ifndef HAVE_STRUCT_PPSCLOCKEV
-struct ppsclockev {
-# ifdef HAVE_STRUCT_TIMESPEC
- struct timespec tv;
-# else
- struct timeval tv;
-# endif
- u_int serial;
-};
-#endif /* ! HAVE_STRUCT_PPSCLOCKEV */
-
-#ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
-#else
-# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
-# endif
-#endif
-
-/*
- * This driver supports the Magnavox Model MX 4200 GPS Receiver
- * adapted to precision timing applications. It requires the
- * ppsclock line discipline or streams module described in the
- * Line Disciplines and Streams Drivers page. It also requires a
- * gadget box and 1-PPS level converter, such as described in the
- * Pulse-per-second (PPS) Signal Interfacing page.
- *
- * It's likely that other compatible Magnavox receivers such as the
- * MX 4200D, MX 9212, MX 9012R, MX 9112 will be supported by this code.
- */
-
-/*
- * Check this every time you edit the code!
- */
-#define YEAR_LAST_MODIFIED 2000
-
-/*
- * GPS Definitions
- */
-#define DEVICE "/dev/gps%d" /* device name and unit */
-#define SPEED232 B4800 /* baud */
-
-/*
- * Radio interface parameters
- */
-#define PRECISION (-18) /* precision assumed (about 4 us) */
-#define REFID "GPS\0" /* reference id */
-#define DESCRIPTION "Magnavox MX4200 GPS Receiver" /* who we are */
-#define DEFFUDGETIME 0 /* default fudge time (ms) */
-
-#define SLEEPTIME 32 /* seconds to wait for reconfig to complete */
-
-/*
- * Position Averaging.
- */
-#define INTERVAL 1 /* Interval between position measurements (s) */
-#define AVGING_TIME 24 /* Number of hours to average */
-#define NOT_INITIALIZED -9999. /* initial pivot longitude */
-
-/*
- * MX4200 unit control structure.
- */
-struct mx4200unit {
- 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 */
- double avg_lat; /* average latitude */
- double avg_lon; /* average longitude */
- double avg_alt; /* average height */
- double central_meridian; /* central meridian */
- double N_fixes; /* Number of position measurements */
- int last_leap; /* leap second warning */
- u_int moving; /* mobile platform? */
- u_long sloppyclockflag; /* fudge flags */
- u_int known; /* position known yet? */
- u_long clamp_time; /* when to stop postion averaging */
- u_long log_time; /* when to print receiver status */
- pps_handle_t pps_h;
- pps_params_t pps_p;
- pps_info_t pps_i;
-};
-
-static char pmvxg[] = "PMVXG";
-
-/* XXX should be somewhere else */
-#ifdef __GNUC__
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-#ifndef __attribute__
-#define __attribute__(args)
-#endif /* __attribute__ */
-#endif /* __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) */
-#else
-#ifndef __attribute__
-#define __attribute__(args)
-#endif /* __attribute__ */
-#endif /* __GNUC__ */
-/* XXX end */
-
-/*
- * Function prototypes
- */
-static int mx4200_start P((int, struct peer *));
-static void mx4200_shutdown P((int, struct peer *));
-static void mx4200_receive P((struct recvbuf *));
-static void mx4200_poll P((int, struct peer *));
-
-static char * mx4200_parse_t P((struct peer *));
-static char * mx4200_parse_p P((struct peer *));
-static char * mx4200_parse_s P((struct peer *));
-#ifdef QSORT_USES_VOID_P
-int mx4200_cmpl_fp P((const void *, const void *));
-#else
-int mx4200_cmpl_fp P((const l_fp *, const l_fp *));
-#endif /* not QSORT_USES_VOID_P */
-static int mx4200_config P((struct peer *));
-static void mx4200_ref P((struct peer *));
-static void mx4200_send P((struct peer *, char *, ...))
- __attribute__ ((format (printf, 2, 3)));
-static u_char mx4200_cksum P((char *, int));
-static int mx4200_jday P((int, int, int));
-static void mx4200_debug P((struct peer *, char *, ...))
- __attribute__ ((format (printf, 2, 3)));
-static int mx4200_pps P((struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_mx4200 = {
- mx4200_start, /* start up driver */
- mx4200_shutdown, /* shut down driver */
- mx4200_poll, /* transmit poll message */
- noentry, /* not used (old mx4200_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old mx4200_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-
-/*
- * mx4200_start - open the devices and initialize data for processing
- */
-static int
-mx4200_start(
- int unit,
- struct peer *peer
- )
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
- int fd;
- char gpsdev[20];
-
- /*
- * Open serial port
- */
- (void)sprintf(gpsdev, DEVICE, unit);
- if (!(fd = refclock_open(gpsdev, SPEED232, LDISC_PPS))) {
- return (0);
- }
-
- /*
- * Allocate unit structure
- */
- if (!(up = (struct mx4200unit *) emalloc(sizeof(struct mx4200unit)))) {
- perror("emalloc");
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct mx4200unit));
- pp = peer->procptr;
- pp->io.clock_recv = mx4200_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
-
- /* Ensure the receiver is properly configured */
- return mx4200_config(peer);
-}
-
-
-/*
- * mx4200_shutdown - shut down the clock
- */
-static void
-mx4200_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * mx4200_config - Configure the receiver
- */
-static int
-mx4200_config(
- struct peer *peer
- )
-{
- char tr_mode;
- int add_mode;
- register struct mx4200unit *up;
- struct refclockproc *pp;
- int mode;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /*
- * Initialize the unit variables
- *
- * STRANGE BEHAVIOUR WARNING: The fudge flags are not available
- * at the time mx4200_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, "mx4200_config: mobile platform");
- } else {
- up->moving = 0; /* Static Installation */
- }
- up->pollcnt = 2;
- up->polled = 0;
- up->known = 0;
- up->avg_lat = 0.0;
- up->avg_lon = 0.0;
- up->avg_alt = 0.0;
- up->central_meridian = NOT_INITIALIZED;
- up->N_fixes = 0.0;
- up->last_leap = 0; /* LEAP_NOWARNING */
- up->clamp_time = current_time + (AVGING_TIME * 60 * 60);
- up->log_time = current_time + SLEEPTIME;
-
- if (time_pps_create(pp->io.fd, &up->pps_h) < 0) {
- perror("time_pps_create");
- msyslog(LOG_ERR,
- "mx4200_config: time_pps_create failed: %m");
- return (0);
- }
- if (time_pps_getcap(up->pps_h, &mode) < 0) {
- msyslog(LOG_ERR,
- "mx4200_config: time_pps_getcap failed: %m");
- return (0);
- }
-
- if (time_pps_getparams(up->pps_h, &up->pps_p) < 0) {
- msyslog(LOG_ERR,
- "mx4200_config: time_pps_getparams failed: %m");
- return (0);
- }
-
- /* nb. only turn things on, if someone else has turned something
- * on before we get here, leave it alone!
- */
-
- up->pps_p.mode = PPS_CAPTUREASSERT | PPS_TSFMT_TSPEC;
- up->pps_p.mode &= mode; /* only set what is legal */
-
- if (time_pps_setparams(up->pps_h, &up->pps_p) < 0) {
- perror("time_pps_setparams");
- msyslog(LOG_ERR,
- "mx4200_config: time_pps_setparams failed: %m");
- exit(1);
- }
-
- if (time_pps_kcbind(up->pps_h, PPS_KC_HARDPPS, PPS_CAPTUREASSERT,
- PPS_TSFMT_TSPEC) < 0) {
- perror("time_pps_kcbind");
- msyslog(LOG_ERR,
- "mx4200_config: time_pps_kcbind failed: %m");
- exit(1);
- }
-
-
- /*
- * "007" Control Port Configuration
- * Zero the output list (do it twice to flush possible junk)
- */
- mx4200_send(peer, "%s,%03d,,%d,,,,,,", pmvxg,
- PMVXG_S_PORTCONF,
- /* control port output block Label */
- 1); /* clear current output control list (1=yes) */
- /* add/delete sentences from list */
- /* must be null */
- /* sentence output rate (sec) */
- /* precision for position output */
- /* nmea version for cga & gll output */
- /* pass-through control */
- mx4200_send(peer, "%s,%03d,,%d,,,,,,", pmvxg,
- PMVXG_S_PORTCONF, 1);
-
- /*
- * Request software configuration so we can syslog the firmware version
- */
- mx4200_send(peer, "%s,%03d", "CDGPQ", PMVXG_D_SOFTCONF);
-
- /*
- * "001" Initialization/Mode Control, Part A
- * Where ARE we?
- */
- mx4200_send(peer, "%s,%03d,,,,,,,,,,", pmvxg,
- PMVXG_S_INITMODEA);
- /* day of month */
- /* month of year */
- /* year */
- /* gmt */
- /* latitude DDMM.MMMM */
- /* north/south */
- /* longitude DDDMM.MMMM */
- /* east/west */
- /* height */
- /* Altitude Reference 1=MSL */
-
- /*
- * "001" Initialization/Mode Control, Part B
- * Start off in 2d/3d coast mode, holding altitude to last known
- * value if only 3 satellites available.
- */
- mx4200_send(peer, "%s,%03d,%d,,%.1f,%.1f,%d,%d,%d,%c,%d",
- pmvxg, PMVXG_S_INITMODEB,
- 3, /* 2d/3d coast */
- /* reserved */
- 0.1, /* hor accel fact as per Steve (m/s**2) */
- 0.1, /* ver accel fact as per Steve (m/s**2) */
- 10, /* vdop */
- 10, /* hdop limit as per Steve */
- 5, /* elevation limit as per Steve (deg) */
- 'U', /* time output mode (UTC) */
- 0); /* local time offset from gmt (HHHMM) */
-
- /*
- * "023" Time Recovery Configuration
- * Get UTC time from a stationary receiver.
- * (Set field 1 'D' == dynamic if we are on a moving platform).
- * (Set field 1 'S' == static if we are not moving).
- * (Set field 1 'K' == known position if we can initialize lat/lon/alt).
- */
-
- if (pp->sloppyclockflag & CLK_FLAG2)
- up->moving = 1; /* Receiver on mobile platform */
- else
- up->moving = 0; /* Static Installation */
-
- up->pollcnt = 2;
- if (up->moving) {
- /* dynamic: solve for pos, alt, time, while moving */
- tr_mode = 'D';
- } else {
- /* static: solve for pos, alt, time, while stationary */
- tr_mode = 'S';
- }
- mx4200_send(peer, "%s,%03d,%c,%c,%c,%d,%d,%d,", pmvxg,
- PMVXG_S_TRECOVCONF,
- tr_mode, /* time recovery mode (see above ) */
- 'U', /* synchronize to UTC */
- 'A', /* always output a time pulse */
- 500, /* max time error in ns */
- 0, /* user bias in ns */
- 1); /* output "830" sentences to control port */
- /* Multi-satellite mode */
-
- /*
- * Output position information (to calculate fixed installation
- * location) only if we are not moving
- */
- if (up->moving) {
- add_mode = 2; /* delete from list */
- } else {
- add_mode = 1; /* add to list */
- }
-
-
- /*
- * "007" Control Port Configuration
- * Output "021" position, height, velocity reports
- */
- mx4200_send(peer, "%s,%03d,%03d,%d,%d,,%d,,,", pmvxg,
- PMVXG_S_PORTCONF,
- PMVXG_D_PHV, /* control port output block Label */
- 0, /* clear current output control list (0=no) */
- add_mode, /* add/delete sentences from list (1=add, 2=del) */
- /* must be null */
- INTERVAL); /* sentence output rate (sec) */
- /* precision for position output */
- /* nmea version for cga & gll output */
- /* pass-through control */
-
- return (1);
-}
-
-/*
- * mx4200_ref - Reconfigure unit as a reference station at a known position.
- */
-static void
-mx4200_ref(
- struct peer *peer
- )
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
- double minute, lat, lon, alt;
- char lats[16], lons[16];
- char nsc, ewc;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /* Should never happen! */
- if (up->moving) return;
-
- /*
- * Set up to output status information in the near future
- */
- up->log_time = current_time + SLEEPTIME;
-
- /*
- * "007" Control Port Configuration
- * Stop outputting "021" position, height, velocity reports
- */
- mx4200_send(peer, "%s,%03d,%03d,%d,%d,,,,,", pmvxg,
- PMVXG_S_PORTCONF,
- PMVXG_D_PHV, /* control port output block Label */
- 0, /* clear current output control list (0=no) */
- 2); /* add/delete sentences from list (2=delete) */
- /* must be null */
- /* sentence output rate (sec) */
- /* precision for position output */
- /* nmea version for cga & gll output */
- /* pass-through control */
-
- /*
- * "001" Initialization/Mode Control, Part B
- * Put receiver in fully-constrained 2d nav mode
- */
- mx4200_send(peer, "%s,%03d,%d,,%.1f,%.1f,%d,%d,%d,%c,%d",
- pmvxg, PMVXG_S_INITMODEB,
- 2, /* 2d nav */
- /* reserved */
- 0.1, /* hor accel fact as per Steve (m/s**2) */
- 0.1, /* ver accel fact as per Steve (m/s**2) */
- 10, /* vdop */
- 10, /* hdop limit as per Steve */
- 5, /* elevation limit as per Steve (deg) */
- 'U', /* time output mode (UTC) */
- 0); /* local time offset from gmt (HHHMM) */
-
- /*
- * "023" Time Recovery Configuration
- * Get UTC time from a stationary receiver. Solve for time only.
- * This should improve the time resolution dramatically.
- */
- mx4200_send(peer, "%s,%03d,%c,%c,%c,%d,%d,%d,", pmvxg,
- PMVXG_S_TRECOVCONF,
- 'K', /* known position: solve for time only */
- 'U', /* synchronize to UTC */
- 'A', /* always output a time pulse */
- 500, /* max time error in ns */
- 0, /* user bias in ns */
- 1); /* output "830" sentences to control port */
- /* Multi-satellite mode */
-
- /*
- * "000" Initialization/Mode Control - Part A
- * Fix to our averaged position.
- */
- if (up->central_meridian != NOT_INITIALIZED) {
- up->avg_lon += up->central_meridian;
- if (up->avg_lon < -180.0) up->avg_lon += 360.0;
- if (up->avg_lon > 180.0) up->avg_lon -= 360.0;
- }
-
- if (up->avg_lat >= 0.0) {
- lat = up->avg_lat;
- nsc = 'N';
- } else {
- lat = up->avg_lat * (-1.0);
- nsc = 'S';
- }
- if (up->avg_lon >= 0.0) {
- lon = up->avg_lon;
- ewc = 'E';
- } else {
- lon = up->avg_lon * (-1.0);
- ewc = 'W';
- }
- alt = up->avg_alt;
- minute = (lat - (double)(int)lat) * 60.0;
- sprintf(lats,"%02d%02.4f", (int)lat, minute);
- minute = (lon - (double)(int)lon) * 60.0;
- sprintf(lons,"%03d%02.4f", (int)lon, minute);
-
- mx4200_send(peer, "%s,%03d,,,,,%s,%c,%s,%c,%.2f,%d", pmvxg,
- PMVXG_S_INITMODEA,
- /* day of month */
- /* month of year */
- /* year */
- /* gmt */
- lats, /* latitude DDMM.MMMM */
- nsc, /* north/south */
- lons, /* longitude DDDMM.MMMM */
- ewc, /* east/west */
- alt, /* Altitude */
- 1); /* Altitude Reference (0=WGS84 ellipsoid, 1=MSL geoid)*/
-
- msyslog(LOG_DEBUG,
- "mx4200: reconfig to fixed location: %s %c, %s %c, %.2f m",
- lats, nsc, lons, ewc, alt );
-
-}
-
-/*
- * mx4200_poll - mx4200 watchdog routine
- */
-static void
-mx4200_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
-
- /*
- * If we haven't had a response in a while, reset the receiver.
- */
- if (up->pollcnt > 0) {
- up->pollcnt--;
- } else {
- refclock_report(peer, CEVNT_TIMEOUT);
-
- /*
- * Request a "000" status message which should trigger a
- * reconfig
- */
- mx4200_send(peer, "%s,%03d",
- "CDGPQ", /* query from CDU to GPS */
- PMVXG_D_STATUS); /* label of desired sentence */
- }
-
- /*
- * polled every 64 seconds. Ask mx4200_receive to hand in
- * a timestamp.
- */
- up->polled = 1;
- pp->polls++;
-
- /*
- * Output receiver status information.
- */
- if ((up->log_time > 0) && (current_time > up->log_time)) {
- up->log_time = 0;
- /*
- * Output the following messages once, for debugging.
- * "004" Mode Data
- * "523" Time Recovery Parameters
- */
- mx4200_send(peer, "%s,%03d", "CDGPQ", PMVXG_D_MODEDATA);
- mx4200_send(peer, "%s,%03d", "CDGPQ", PMVXG_D_TRECOVUSEAGE);
- }
-}
-
-static char char2hex[] = "0123456789ABCDEF";
-
-/*
- * mx4200_receive - receive gps data
- */
-static void
-mx4200_receive(
- struct recvbuf *rbufp
- )
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
- struct peer *peer;
- char *cp;
- int sentence_type;
- u_char ck;
-
- /*
- * Initialize pointers and read the timecode and timestamp.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /*
- * If operating mode has been changed, then reinitialize the receiver
- * before doing anything else.
- */
- if ((pp->sloppyclockflag & CLK_FLAG2) !=
- (up->sloppyclockflag & CLK_FLAG2)) {
- up->sloppyclockflag = pp->sloppyclockflag;
- mx4200_debug(peer,
- "mx4200_receive: mode switch: reset receiver\n");
- mx4200_config(peer);
- return;
- }
- up->sloppyclockflag = pp->sloppyclockflag;
-
- /*
- * Read clock output. Automatically handles STREAMS, CLKLDISC.
- */
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &pp->lastrec);
-
- /*
- * There is a case where <cr><lf> generates 2 timestamps.
- */
- if (pp->lencode == 0)
- return;
-
- up->pollcnt = 2;
- pp->a_lastcode[pp->lencode] = '\0';
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- mx4200_debug(peer, "mx4200_receive: %d %s\n",
- pp->lencode, pp->a_lastcode);
-
- /*
- * The structure of the control port sentences is based on the
- * NMEA-0183 Standard for interfacing Marine Electronics
- * Navigation Devices (Version 1.5)
- *
- * $PMVXG,XXX, ....................*CK<cr><lf>
- *
- * $ Sentence Start Identifier (reserved char)
- * (Start-of-Sentence Identifier)
- * P Special ID (Proprietary)
- * MVX Originator ID (Magnavox)
- * G Interface ID (GPS)
- * , Field Delimiters (reserved char)
- * XXX Sentence Type
- * ...... Data
- * * Checksum Field Delimiter (reserved char)
- * CK Checksum
- * <cr><lf> Carriage-Return/Line Feed (reserved chars)
- * (End-of-Sentence Identifier)
- *
- * Reject if any important landmarks are missing.
- */
- cp = pp->a_lastcode + pp->lencode - 3;
- if (cp < pp->a_lastcode || *pp->a_lastcode != '$' || cp[0] != '*' ) {
- mx4200_debug(peer, "mx4200_receive: bad format\n");
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Check and discard the checksum
- */
- ck = mx4200_cksum(&pp->a_lastcode[1], pp->lencode - 4);
- if (char2hex[ck >> 4] != cp[1] || char2hex[ck & 0xf] != cp[2]) {
- mx4200_debug(peer, "mx4200_receive: bad checksum\n");
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- *cp = '\0';
-
- /*
- * Get the sentence type.
- */
- sentence_type = 0;
- if ((cp = strchr(pp->a_lastcode, ',')) == NULL) {
- mx4200_debug(peer, "mx4200_receive: no sentence\n");
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
- cp++;
- sentence_type = strtol(cp, &cp, 10);
-
- /*
- * Process the sentence according to its type.
- */
- switch (sentence_type) {
-
- /*
- * "000" Status message
- */
- case PMVXG_D_STATUS:
- /*
- * XXX
- * Since we configure the receiver to not give us status
- * messages and since the receiver outputs status messages by
- * default after being reset to factory defaults when sent the
- * "$PMVXG,018,C\r\n" message, any status message we get
- * indicates the reciever needs to be initialized; thus, it is
- * not necessary to decode the status message.
- */
- if ((cp = mx4200_parse_s(peer)) != NULL) {
- mx4200_debug(peer,
- "mx4200_receive: status: %s\n", cp);
- }
- mx4200_debug(peer, "mx4200_receive: reset receiver\n");
- mx4200_config(peer);
- break;
-
- /*
- * "021" Position, Height, Velocity message,
- * if we are still averaging our position
- */
- case PMVXG_D_PHV:
- if (!up->known) {
- /*
- * Parse the message, calculating our averaged position.
- */
- if ((cp = mx4200_parse_p(peer)) != NULL) {
- mx4200_debug(peer, "mx4200_receive: pos: %s\n", cp);
- return;
- }
- mx4200_debug(peer,
- "mx4200_receive: position avg %f %.9f %.9f %.4f\n",
- up->N_fixes, up->avg_lat, up->avg_lon, up->avg_alt);
- /*
- * Reinitialize as a reference station
- * if position is well known.
- */
- if (current_time > up->clamp_time) {
- up->known++;
- mx4200_debug(peer, "mx4200_receive: reconfiguring!\n");
- mx4200_ref(peer);
- }
- }
- break;
-
- /*
- * Print to the syslog:
- * "004" Mode Data
- * "030" Software Configuration
- * "523" Time Recovery Parameters Currently in Use
- */
- case PMVXG_D_MODEDATA:
- case PMVXG_D_SOFTCONF:
- case PMVXG_D_TRECOVUSEAGE:
-
- if ((cp = mx4200_parse_s(peer)) != NULL) {
- mx4200_debug(peer,
- "mx4200_receive: multi-record: %s\n", cp);
- }
- break;
-
- /*
- * "830" Time Recovery Results message
- */
- case PMVXG_D_TRECOVOUT:
-
- /*
- * Capture the last PPS signal.
- * Precision timestamp is returned in pp->lastrec
- */
- if (mx4200_pps(peer) != NULL) {
- mx4200_debug(peer, "mx4200_receive: pps failure\n");
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
-
-
- /*
- * Parse the time recovery message, and keep the info
- * to print the pretty billboards.
- */
- if ((cp = mx4200_parse_t(peer)) != NULL) {
- mx4200_debug(peer, "mx4200_receive: time: %s\n", cp);
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Add the new sample to a median filter.
- */
- if (!refclock_process(pp)) {
- mx4200_debug(peer,"mx4200_receive: offset: %.6f\n",
- pp->offset);
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /*
- * 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)
- return;
-
- /*
- * 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.
- */
- mx4200_debug(peer, "mx4200_receive: process time: ");
- 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);
-
- /*
- * We have succeeded in answering the poll.
- * Turn off the flag and return
- */
- up->polled = 0;
- break;
-
- /*
- * Ignore all other sentence types
- */
- default:
- break;
-
- } /* switch (sentence_type) */
-
- return;
-}
-
-
-/*
- * Parse a mx4200 time recovery message. Returns a string if error.
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,830,T,YYYY,MM,DD,HH:MM:SS,U,S,FFFFFF,PPPPP,BBBBBB,LL
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 830=Time Recovery Results
- * 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 *last* 1PPS output.
- * 1 char Time Mark Valid: T=Valid, F=Not Valid
- * 2 int Year: 1993-
- * 3 int Month of Year: 1-12
- * 4 int Day of Month: 1-31
- * 5 int Time of Day: HH:MM:SS
- * 6 char Time Synchronization: U=UTC, G=GPS
- * 7 char Time Recovery Mode: D=Dynamic, S=Static,
- * K=Known Position, N=No Time Recovery
- * 8 int Oscillator Offset: The filter's estimate of the oscillator
- * frequency error, in parts per billion (ppb).
- * 9 int Time Mark Error: The computed error of the *last* pulse
- * output, in nanoseconds.
- * 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 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.
- *
- */
-static char *
-mx4200_parse_t(
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct mx4200unit *up;
- char time_mark_valid, time_sync, op_mode;
- int sentence_type, valid;
- int year, day_of_year, month, day_of_month;
- int hour, minute, second, leapsec;
- int oscillator_offset, time_mark_error, time_bias;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- leapsec = 0; /* Not all receivers output leap second warnings (!) */
- sscanf(pp->a_lastcode,
- "$PMVXG,%d,%c,%d,%d,%d,%d:%d:%d,%c,%c,%d,%d,%d,%d",
- &sentence_type, &time_mark_valid, &year, &month, &day_of_month,
- &hour, &minute, &second, &time_sync, &op_mode,
- &oscillator_offset, &time_mark_error, &time_bias, &leapsec);
-
- if (sentence_type != PMVXG_D_TRECOVOUT)
- return ("wrong rec-type");
-
- switch (time_mark_valid) {
- case 'T':
- valid = 1;
- break;
- case 'F':
- valid = 0;
- break;
- default:
- return ("bad pulse-valid");
- }
-
- switch (time_sync) {
- case 'G':
- return ("synchronized to GPS; should be UTC");
- case 'U':
- break; /* UTC -> ok */
- default:
- return ("not synchronized to UTC");
- }
-
- /*
- * Check for insane time (allow for possible leap seconds)
- */
- if (second > 60 || minute > 59 || hour > 23 ||
- second < 0 || minute < 0 || hour < 0) {
- mx4200_debug(peer,
- "mx4200_parse_t: bad time %02d:%02d:%02d",
- hour, minute, second);
- if (leapsec != 0)
- mx4200_debug(peer, " (leap %+d\n)", leapsec);
- mx4200_debug(peer, "\n");
- refclock_report(peer, CEVNT_BADTIME);
- return ("bad time");
- }
- if ( second == 60 ) {
- msyslog(LOG_DEBUG,
- "mx4200: leap second! %02d:%02d:%02d",
- hour, minute, second);
- }
-
- /*
- * Check for insane date
- * (Certainly can't be any year before this code was last altered!)
- */
- if (day_of_month > 31 || month > 12 ||
- day_of_month < 1 || month < 1 || year < YEAR_LAST_MODIFIED) {
- mx4200_debug(peer,
- "mx4200_parse_t: bad date (%4d-%02d-%02d)\n",
- year, month, day_of_month);
- refclock_report(peer, CEVNT_BADDATE);
- return ("bad date");
- }
-
- /*
- * Silly Hack for MX4200:
- * ASCII message is for *next* 1PPS signal, but we have the
- * timestamp for the *last* 1PPS signal. So we have to subtract
- * a second. Discard if we are on a month boundary to avoid
- * possible leap seconds and leap days.
- */
- second--;
- if (second < 0) {
- second = 59;
- minute--;
- if (minute < 0) {
- minute = 59;
- hour--;
- if (hour < 0) {
- hour = 23;
- day_of_month--;
- if (day_of_month < 1) {
- return ("sorry, month boundary");
- }
- }
- }
- }
-
- /*
- * Calculate Julian date
- */
- if (!(day_of_year = mx4200_jday(year, month, day_of_month))) {
- mx4200_debug(peer,
- "mx4200_parse_t: bad julian date %d (%4d-%02d-%02d)\n",
- day_of_year, year, month, day_of_month);
- refclock_report(peer, CEVNT_BADDATE);
- return("invalid julian date");
- }
-
- /*
- * Setup leap second indicator
- */
- switch (leapsec) {
- case 0:
- pp->leap = LEAP_NOWARNING;
- break;
- case 1:
- pp->leap = LEAP_ADDSECOND;
- break;
- case -1:
- pp->leap = LEAP_DELSECOND;
- break;
- default:
- pp->leap = LEAP_NOTINSYNC;
- }
-
- /*
- * Any change to the leap second warning status?
- */
- if (leapsec != up->last_leap ) {
- msyslog(LOG_DEBUG,
- "mx4200: leap second warning: %d to %d (%d)",
- up->last_leap, leapsec, pp->leap);
- }
- up->last_leap = leapsec;
-
- /*
- * Copy time data for billboard monitoring.
- */
-
- pp->year = year;
- pp->day = day_of_year;
- pp->hour = hour;
- pp->minute = minute;
- pp->second = second;
-
- /*
- * Toss if sentence is marked invalid
- */
- if (!valid || pp->leap == LEAP_NOTINSYNC) {
- mx4200_debug(peer, "mx4200_parse_t: time mark not valid\n");
- refclock_report(peer, CEVNT_BADTIME);
- return ("pulse invalid");
- }
-
- return (NULL);
-}
-
-/*
- * Calculate the checksum
- */
-static u_char
-mx4200_cksum(
- register char *cp,
- register int n
- )
-{
- register u_char ck;
-
- for (ck = 0; n-- > 0; cp++)
- ck ^= *cp;
- return (ck);
-}
-
-/*
- * Tables to compute the day of year. Viva la leap.
- */
-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};
-
-/*
- * Calculate the the Julian Day
- */
-static int
-mx4200_jday(
- int year,
- int month,
- int day_of_month
- )
-{
- register int day, i;
- int leap_year;
-
- /*
- * Is this a leap year ?
- */
- if (year % 4) {
- leap_year = 0; /* FALSE */
- } else {
- if (year % 100) {
- leap_year = 1; /* TRUE */
- } else {
- if (year % 400) {
- leap_year = 0; /* FALSE */
- } else {
- leap_year = 1; /* TRUE */
- }
- }
- }
-
- /*
- * Calculate the Julian Date
- */
- day = day_of_month;
-
- if (leap_year) {
- /* a leap year */
- if (day > day2tab[month - 1]) {
- return (0);
- }
- for (i = 0; i < month - 1; i++)
- day += day2tab[i];
- } else {
- /* not a leap year */
- if (day > day1tab[month - 1]) {
- return (0);
- }
- for (i = 0; i < month - 1; i++)
- day += day1tab[i];
- }
- return (day);
-}
-
-/*
- * Parse a mx4200 position/height/velocity sentence.
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,021,SSSSSS.SS,DDMM.MMMM,N,DDDMM.MMMM,E,HHHHH.H,GGGG.G,EEEE.E,WWWW.W,MM
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 021=Position, Height Velocity Data
- * This sentence gives the receiver position, height,
- * navigation mode, and velocity north/east.
- * *This sentence is intended for post-analysis
- * applications.*
- * 1 float UTC measurement time (seconds into week)
- * 2 float WGS-84 Lattitude (degrees, minutes)
- * 3 char N=North, S=South
- * 4 float WGS-84 Longitude (degrees, minutes)
- * 5 char E=East, W=West
- * 6 float Altitude (meters above mean sea level)
- * 7 float Geoidal height (meters)
- * 8 float East velocity (m/sec)
- * 9 float West Velocity (m/sec)
- * 10 int Navigation Mode
- * Mode if navigating:
- * 1 = Position from remote device
- * 2 = 2-D position
- * 3 = 3-D position
- * 4 = 2-D differential position
- * 5 = 3-D differential position
- * 6 = Static
- * 8 = Position known -- reference station
- * 9 = Position known -- Navigator
- * Mode if not navigating:
- * 51 = Too few satellites
- * 52 = DOPs too large
- * 53 = Position STD too large
- * 54 = Velocity STD too large
- * 55 = Too many iterations for velocity
- * 56 = Too many iterations for position
- * 57 = 3 sat startup failed
- * 58 = Command abort
- */
-static char *
-mx4200_parse_p(
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct mx4200unit *up;
- int sentence_type, mode;
- double mtime, lat, lon, alt, geoid, vele, veln;
- char north_south, east_west;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /* Should never happen! */
- if (up->moving) return ("mobile platform - no pos!");
-
- sscanf ( pp->a_lastcode,
- "$PMVXG,%d,%lf,%lf,%c,%lf,%c,%lf,%lf,%lf,%lf,%d",
- &sentence_type, &mtime, &lat, &north_south, &lon, &east_west,
- &alt, &geoid, &vele, &veln, &mode);
-
- /* Sentence type */
- if (sentence_type != PMVXG_D_PHV)
- return ("wrong rec-type");
-
- /*
- * return if not navigating
- */
- if (mode > 10)
- return ("not navigating");
- if (mode != 3 && mode != 5)
- return ("not navigating in 3D");
-
- /* Latitude (always +ve) and convert DDMM.MMMM to decimal */
- if (lat < 0.0) return ("negative latitude");
- if (lat > 9000.0) lat = 9000.0;
- lat *= 0.01;
- lat = ((int)lat) + (((lat - (int)lat)) * 1.6666666666666666);
-
- /* North/South */
- switch (north_south) {
- case 'N':
- break;
- case 'S':
- lat *= -1.0;
- break;
- default:
- return ("invalid north/south indicator");
- }
-
- /* Longitude (always +ve) and convert DDDMM.MMMM to decimal */
- if (lon < 0.0) return ("negative longitude");
- if (lon > 180.0) lon = 180.0;
- lon *= 0.01;
- lon = ((int)lon) + (((lon - (int)lon)) * 1.6666666666666666);
-
- /* East/West */
- switch (east_west) {
- case 'E':
- break;
- case 'W':
- lon *= -1.0;
- break;
- default:
- return ("invalid east/west indicator");
- }
-
- /*
- * Normalize longitude to near 0 degrees.
- * Assume all data are clustered around first reading.
- */
- if (up->central_meridian == NOT_INITIALIZED) {
- up->central_meridian = lon;
- mx4200_debug(peer,
- "mx4200_receive: central meridian = %.9f \n",
- up->central_meridian);
- }
- lon -= up->central_meridian;
- if (lon < -180.0) lon += 360.0;
- if (lon > 180.0) lon -= 360.0;
-
- /*
- * Calculate running averages
- */
-
- up->avg_lon = (up->N_fixes * up->avg_lon) + lon;
- up->avg_lat = (up->N_fixes * up->avg_lat) + lat;
- up->avg_alt = (up->N_fixes * up->avg_alt) + alt;
-
- up->N_fixes += 1.0;
-
- up->avg_lon /= up->N_fixes;
- up->avg_lat /= up->N_fixes;
- up->avg_alt /= up->N_fixes;
-
- mx4200_debug(peer,
- "mx4200_receive: position rdg %.0f: %.9f %.9f %.4f (CM=%.9f)\n",
- up->N_fixes, lat, lon, alt, up->central_meridian);
-
- return (NULL);
-}
-
-/*
- * Parse a mx4200 Status sentence
- * Parse a mx4200 Mode Data sentence
- * Parse a mx4200 Software Configuration sentence
- * Parse a mx4200 Time Recovery Parameters Currently in Use sentence
- * (used only for logging raw strings)
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,000,XXX,XX,X,HHMM,X
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 000=Status.
- * Returns status of the receiver to the controller.
- * 1 Current Receiver Status:
- * ACQ = Satellite re-acquisition
- * ALT = Constellation selection
- * COR = Providing corrections (for reference stations only)
- * IAC = Initial acquisition
- * IDL = Idle, no satellites
- * NAV = Navigation
- * STS = Search the Sky (no almanac available)
- * TRK = Tracking
- * 2 Number of satellites that should be visible
- * 3 Number of satellites being tracked
- * 4 Time since last navigation status if not currently navigating
- * (hours, minutes)
- * 5 Initialization status:
- * 0 = Waiting for initialization parameters
- * 1 = Initialization completed
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,004,C,R,D,H.HH,V.VV,TT,HHHH,VVVV,T
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 004=Software Configuration.
- * Defines the navigation mode and criteria for
- * acceptable navigation for the receiver.
- * 1 Constrain Altitude Mode:
- * 0 = Auto. Constrain altitude (2-D solution) and use
- * manual altitude input when 3 sats avalable. Do
- * not constrain altitude (3-D solution) when 4 sats
- * available.
- * 1 = Always constrain altitude (2-D solution).
- * 2 = Never constrain altitude (3-D solution).
- * 3 = Coast. Constrain altitude (2-D solution) and use
- * last GPS altitude calculation when 3 sats avalable.
- * Do not constrain altitude (3-D solution) when 4 sats
- * available.
- * 2 Altitude Reference: (always 0 for MX4200)
- * 0 = Ellipsoid
- * 1 = Geoid (MSL)
- * 3 Differential Navigation Control:
- * 0 = Disabled
- * 1 = Enabled
- * 4 Horizontal Acceleration Constant (m/sec**2)
- * 5 Vertical Acceleration Constant (m/sec**2) (0 for MX4200)
- * 6 Tracking Elevation Limit (degrees)
- * 7 HDOP Limit
- * 8 VDOP Limit
- * 9 Time Output Mode:
- * U = UTC
- * L = Local time
- * 10 Local Time Offset (minutes) (absent on MX4200)
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,030,NNNN,FFF
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 030=Software Configuration.
- * This sentence contains the navigation processor
- * and baseband firmware version numbers.
- * 1 Nav Processor Version Number
- * 2 Baseband Firmware Version Number
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,523,M,S,M,EEEE,BBBBBB,C,R
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 523=Time Recovery Parameters Currently in Use.
- * This sentence contains the configuration of the
- * time recovery feature of the receiver.
- * 1 Time Recovery Mode:
- * D = Dynamic; solve for position and time while moving
- * S = Static; solve for position and time while stationary
- * K = Known position input, solve for time only
- * N = No time recovery
- * 2 Time Synchronization:
- * U = UTC time
- * G = GPS time
- * 3 Time Mark Mode:
- * A = Always output a time pulse
- * V = Only output time pulse if time is valid (as determined
- * by Maximum Time Error)
- * 4 Maximum Time Error - the maximum error (in nanoseconds) for
- * which a time mark will be considered valid.
- * 5 User Time Bias - external bias in nanoseconds
- * 6 Time Message Control:
- * 0 = Do not output the time recovery message
- * 1 = Output the time recovery message (record 830) to
- * Control port
- * 2 = Output the time recovery message (record 830) to
- * Equipment port
- * 7 Reserved
- * 8 Position Known PRN (absent on MX 4200)
- *
- */
-static char *
-mx4200_parse_s(
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct mx4200unit *up;
- int sentence_type;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- sscanf ( pp->a_lastcode, "$PMVXG,%d", &sentence_type);
-
- /* Sentence type */
- switch (sentence_type) {
-
- case PMVXG_D_STATUS:
- msyslog(LOG_DEBUG,
- "mx4200: status: %s", pp->a_lastcode);
- break;
- case PMVXG_D_MODEDATA:
- msyslog(LOG_DEBUG,
- "mx4200: mode data: %s", pp->a_lastcode);
- break;
- case PMVXG_D_SOFTCONF:
- msyslog(LOG_DEBUG,
- "mx4200: firmware configuration: %s", pp->a_lastcode);
- break;
- case PMVXG_D_TRECOVUSEAGE:
- msyslog(LOG_DEBUG,
- "mx4200: time recovery parms: %s", pp->a_lastcode);
- break;
- default:
- return ("wrong rec-type");
- }
-
- return (NULL);
-}
-
-/*
- * Process a PPS signal, placing a timestamp in pp->lastrec.
- */
-static int
-mx4200_pps(
- struct peer *peer
- )
-{
- int temp_serial;
- struct refclockproc *pp;
- struct mx4200unit *up;
-
- struct timespec timeout;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /*
- * Grab the timestamp of the PPS signal.
- */
- temp_serial = up->pps_i.assert_sequence;
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
- if (time_pps_fetch(up->pps_h, PPS_TSFMT_TSPEC, &(up->pps_i),
- &timeout) < 0) {
- mx4200_debug(peer,
- "mx4200_pps: time_pps_fetch: serial=%d, %s\n",
- up->pps_i.assert_sequence, strerror(errno));
- refclock_report(peer, CEVNT_FAULT);
- return(1);
- }
- if (temp_serial == up->pps_i.assert_sequence) {
- mx4200_debug(peer,
- "mx4200_pps: assert_sequence serial not incrementing: %d\n",
- up->pps_i.assert_sequence);
- refclock_report(peer, CEVNT_FAULT);
- return(1);
- }
- /*
- * Check pps serial number against last one
- */
- if (up->lastserial + 1 != up->pps_i.assert_sequence &&
- up->lastserial != 0) {
- if (up->pps_i.assert_sequence == up->lastserial) {
- mx4200_debug(peer, "mx4200_pps: no new pps event\n");
- } else {
- mx4200_debug(peer, "mx4200_pps: missed %d pps events\n",
- up->pps_i.assert_sequence - up->lastserial - 1);
- }
- refclock_report(peer, CEVNT_FAULT);
- }
- up->lastserial = up->pps_i.assert_sequence;
-
- /*
- * Return the timestamp in pp->lastrec
- */
-
- pp->lastrec.l_ui = up->pps_i.assert_timestamp.tv_sec +
- (u_int32) JAN_1970;
- pp->lastrec.l_uf = ((double)(up->pps_i.assert_timestamp.tv_nsec) *
- 4.2949672960) + 0.5;
-
- return(0);
-}
-
-/*
- * mx4200_debug - print debug messages
- */
-#if defined(__STDC__)
-static void
-mx4200_debug(struct peer *peer, char *fmt, ...)
-#else
-static void
-mx4200_debug(peer, fmt, va_alist)
- struct peer *peer;
- char *fmt;
-#endif /* __STDC__ */
-{
- va_list ap;
- struct refclockproc *pp;
- struct mx4200unit *up;
-
- if (debug) {
-
-#if defined(__STDC__)
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif /* __STDC__ */
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
-
- /*
- * Print debug message to stdout
- * In the future, we may want to get get more creative...
- */
- vprintf(fmt, ap);
-
- va_end(ap);
- }
-}
-
-/*
- * Send a character string to the receiver. Checksum is appended here.
- */
-#if defined(__STDC__)
-static void
-mx4200_send(struct peer *peer, char *fmt, ...)
-#else
-static void
-mx4200_send(peer, fmt, va_alist)
- struct peer *peer;
- char *fmt;
- va_dcl
-#endif /* __STDC__ */
-{
- struct refclockproc *pp;
- struct mx4200unit *up;
-
- register char *cp;
- register int n, m;
- va_list ap;
- char buf[1024];
- u_char ck;
-
-#if defined(__STDC__)
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif /* __STDC__ */
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- cp = buf;
- *cp++ = '$';
- n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap));
- ck = mx4200_cksum(cp, n);
- cp += n;
- ++n;
- n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck));
-
- m = write(pp->io.fd, buf, (unsigned)n);
- if (m < 0)
- msyslog(LOG_ERR, "mx4200_send: write: %m (%s)", buf);
- mx4200_debug(peer, "mx4200_send: %d %s\n", m, buf);
- va_end(ap);
-}
-
-#else
-int refclock_mx4200_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_neoclock4x.c b/contrib/ntp/ntpd/refclock_neoclock4x.c
deleted file mode 100644
index 082b1cf..0000000
--- a/contrib/ntp/ntpd/refclock_neoclock4x.c
+++ /dev/null
@@ -1,1068 +0,0 @@
-/*
- *
- * Refclock_neoclock4x.c
- * - NeoClock4X driver for DCF77 or FIA Timecode
- *
- * 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-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.
- *
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#if defined(REFCLOCK) && (defined(CLOCK_NEOCLOCK4X))
-
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <ctype.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#if defined HAVE_SYS_MODEM_H
-# include <sys/modem.h>
-# define TIOCMSET MCSETA
-# define TIOCMGET MCGETA
-# define TIOCM_RTS MRTS
-#endif
-
-#ifdef HAVE_TERMIOS_H
-# ifdef TERMIOS_NEEDS__SVID3
-# define _SVID3
-# endif
-# include <termios.h>
-# ifdef TERMIOS_NEEDS__SVID3
-# undef _SVID3
-# endif
-#endif
-
-#ifdef HAVE_SYS_IOCTL_H
-# 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
-#define NEOCLOCK4X_OFFSET_RADIOSIGNAL 9
-#define NEOCLOCK4X_OFFSET_DAY 12
-#define NEOCLOCK4X_OFFSET_MONTH 14
-#define NEOCLOCK4X_OFFSET_YEAR 16
-#define NEOCLOCK4X_OFFSET_HOUR 18
-#define NEOCLOCK4X_OFFSET_MINUTE 20
-#define NEOCLOCK4X_OFFSET_SECOND 22
-#define NEOCLOCK4X_OFFSET_HSEC 24
-#define NEOCLOCK4X_OFFSET_DOW 26
-#define NEOCLOCK4X_OFFSET_TIMESOURCE 28
-#define NEOCLOCK4X_OFFSET_DSTSTATUS 29
-#define NEOCLOCK4X_OFFSET_QUARZSTATUS 30
-#define NEOCLOCK4X_OFFSET_ANTENNA1 31
-#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 */
- char leap_status; /* leap second flag */
- int recvnow;
-
- char firmware[80];
- char firmwaretag;
- char serial[7];
- char radiosignal[4];
- char timesource;
- char dststatus;
- char quarzstatus;
- int antenna1;
- int antenna2;
- int utc_year;
- int utc_month;
- int utc_day;
- int utc_hour;
- int utc_minute;
- int utc_second;
- int utc_msec;
-};
-
-static int neoclock4x_start P((int, struct peer *));
-static void neoclock4x_shutdown P((int, struct peer *));
-static void neoclock4x_receive P((struct recvbuf *));
-static void neoclock4x_poll P((int, struct peer *));
-static void neoclock4x_control P((int, struct refclockstat *, struct refclockstat *, struct peer *));
-
-static int neol_atoi_len P((const char str[], int *, int));
-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 */
- neoclock4x_shutdown, /* shut down driver */
- neoclock4x_poll, /* transmit poll message */
- neoclock4x_control,
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-static int
-neoclock4x_start(int unit,
- struct peer *peer)
-{
- struct neoclock4x_unit *up;
- struct refclockproc *pp;
- 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);
-
- /* LDISC_STD, LDISC_RAW
- * Open serial port. Use CLK line discipline, if available.
- */
- fd = refclock_open(dev, B2400, LDISC_CLK);
- if(fd <= 0)
- {
- 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 */
-#else
- sl232 = sl232 | CIOCM_DTR | CIOCM_RTS; /* turn on RTS, and DTR for power supply */
-#endif
- if(ioctl(fd, TIOCMSET, (caddr_t)&sl232) == -1)
- {
- msyslog(LOG_CRIT, "NeoClock4X(%d): can't set RTS/DTR to power neoclock4x: %m", unit);
- (void) close(fd);
- return (0);
- }
-#else
- 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))
- {
- msyslog(LOG_ERR, "NeoClock4X(%d): can't allocate memory for: %m",unit);
- (void) close(fd);
- return (0);
- }
-
- memset((char *)up, 0, sizeof(struct neoclock4x_unit));
- pp = peer->procptr;
- pp->clockdesc = "NeoClock4X";
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = neoclock4x_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- /*
- * 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;
-
- /*
- * 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 = '?';
- up->dststatus = '?';
- up->quarzstatus = '?';
- up->antenna1 = -1;
- up->antenna2 = -1;
- up->utc_year = 0;
- up->utc_month = 0;
- up->utc_day = 0;
- up->utc_hour = 0;
- up->utc_minute = 0;
- 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++)
- {
- NLOG(NLOG_CLOCKINFO)
- 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)))
- {
- break;
- }
- }
-
- /* 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);
-}
-
-static void
-neoclock4x_shutdown(int unit,
- struct peer *peer)
-{
- struct neoclock4x_unit *up;
- struct refclockproc *pp;
- int sl232;
-
- if(NULL != peer)
- {
- 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
- /* turn on RTS, and DTR for power supply */
- sl232 &= ~(TIOCM_DTR | TIOCM_RTS);
-#else
- /* 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);
- }
-#endif
- io_closeclock(&pp->io);
- }
- free(up);
- pp->unitptr = NULL;
- }
- }
- }
-
- msyslog(LOG_ERR, "NeoClock4X(%d): shutdown", unit);
-
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_INFO, "NeoClock4X(%d): receiver shutdown done", unit);
-}
-
-static void
-neoclock4x_receive(struct recvbuf *rbufp)
-{
- struct neoclock4x_unit *up;
- struct refclockproc *pp;
- struct peer *peer;
- unsigned long calc_utc;
- 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)
- msyslog(LOG_WARNING, "NeoClock4X(%d): received data has invalid length, expected %d bytes, received %d bytes: %s",
- up->unit, NEOCLOCK4X_TIMECODELEN, pp->lencode, pp->a_lastcode);
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- neol_hexatoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_CRC], &recv_chksum, 2);
-
- /* calculate checksum */
- calc_chksum = 0;
- for(c=0; c < NEOCLOCK4X_OFFSET_CRC; c++)
- {
- calc_chksum += pp->a_lastcode[c];
- }
- if(recv_chksum != calc_chksum)
- {
- NLOG(NLOG_CLOCKEVENT)
- msyslog(LOG_WARNING, "NeoClock4X(%d): received data has invalid chksum: %s",
- up->unit, pp->a_lastcode);
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /* 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))
- {
- if('I' != up->quarzstatus)
- {
- NLOG(NLOG_CLOCKEVENT)
- msyslog(LOG_NOTICE, "NeoClock4X(%d): quartz clock is not initialized: %s",
- up->unit, pp->a_lastcode);
- pp->leap = LEAP_NOTINSYNC;
- refclock_report(peer, CEVNT_BADDATE);
- return;
- }
- }
- if('I' != up->quarzstatus)
- {
- NLOG(NLOG_CLOCKEVENT)
- 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
- * check if we're allowed to synchronize with the quartz
- * clock.
- */
- up->timesource = pp->a_lastcode[NEOCLOCK4X_OFFSET_TIMESOURCE];
- if(0==(pp->sloppyclockflag & CLK_FLAG2))
- {
- if('A' != up->timesource)
- {
- /* not allowed to sync with quartz clock */
- if(0==(pp->sloppyclockflag & CLK_FLAG1))
- {
- refclock_report(peer, CEVNT_BADTIME);
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
- }
- }
-
- /* this should only used when first install is done */
- if(pp->sloppyclockflag & CLK_FLAG4)
- {
- msyslog(LOG_DEBUG, "NeoClock4X(%d): received data: %s",
- up->unit, pp->a_lastcode);
- }
-
- /* 123456789012345678901234567890123456789012345 */
- /* S/N123456DCF1004021010001202ASX1213CR\r\n */
-
- neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_YEAR], &pp->year, 2);
- neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_MONTH], &month, 2);
- neol_atoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_DAY], &day, 2);
- 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], &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);
- up->serial[6] = 0;
- up->dststatus = pp->a_lastcode[NEOCLOCK4X_OFFSET_DSTSTATUS];
- neol_hexatoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_ANTENNA1], &up->antenna1, 2);
- neol_hexatoi_len(&pp->a_lastcode[NEOCLOCK4X_OFFSET_ANTENNA2], &up->antenna2, 2);
-
- /*
- Validate received values at least enough to prevent internal
- array-bounds problems, etc.
- */
- if((pp->hour < 0) || (pp->hour > 23) ||
- (pp->minute < 0) || (pp->minute > 59) ||
- (pp->second < 0) || (pp->second > 60) /*Allow for leap seconds.*/ ||
- (day < 1) || (day > 31) ||
- (month < 1) || (month > 12) ||
- (pp->year < 0) || (pp->year > 99)) {
- /* Data out of range. */
- NLOG(NLOG_CLOCKEVENT)
- msyslog(LOG_WARNING, "NeoClock4X(%d): date/time out of range: %s",
- up->unit, pp->a_lastcode);
- refclock_report(peer, CEVNT_BADDATE);
- return;
- }
-
- /* 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);
-
- /*
- some preparations
- */
- 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.%03ld",
- up->unit,
- pp->year, month, day,
- pp->hour, pp->minute, pp->second, pp->nsec/1000);
- }
-
- up->utc_year = pp->year;
- up->utc_month = month;
- up->utc_day = day;
- up->utc_hour = pp->hour;
- up->utc_minute = pp->minute;
- up->utc_second = pp->second;
- up->utc_msec = pp->nsec/1000;
-
- if(!refclock_process(pp))
- {
- NLOG(NLOG_CLOCKEVENT)
- msyslog(LOG_WARNING, "NeoClock4X(%d): refclock_process failed!", up->unit);
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
- refclock_receive(peer);
-
- /* report good status */
- refclock_report(peer, CEVNT_NOMINAL);
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-}
-
-static void
-neoclock4x_poll(int unit,
- struct peer *peer)
-{
- struct neoclock4x_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct neoclock4x_unit *)pp->unitptr;
-
- pp->polls++;
- up->recvnow = 1;
-}
-
-static void
-neoclock4x_control(int unit,
- struct refclockstat *in,
- struct refclockstat *out,
- struct peer *peer)
-{
- struct neoclock4x_unit *up;
- struct refclockproc *pp;
-
- if(NULL == peer)
- {
- msyslog(LOG_ERR, "NeoClock4X(%d): control: unit invalid/inactive", unit);
- return;
- }
-
- pp = peer->procptr;
- if(NULL == pp)
- {
- msyslog(LOG_ERR, "NeoClock4X(%d): control: unit invalid/inactive", unit);
- return;
- }
-
- up = (struct neoclock4x_unit *)pp->unitptr;
- if(NULL == up)
- {
- msyslog(LOG_ERR, "NeoClock4X(%d): control: unit invalid/inactive", unit);
- return;
- }
-
- if(NULL != in)
- {
- /* check to see if a user supplied time offset is given */
- if(in->haveflags & CLK_HAVETIME1)
- {
- pp->fudgetime1 = in->fudgetime1;
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_NOTICE, "NeoClock4X(%d): using fudgetime1 with %0.5fs from ntp.conf.",
- unit, pp->fudgetime1);
- }
-
- /* notify */
- if(pp->sloppyclockflag & CLK_FLAG1)
- {
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_NOTICE, "NeoClock4X(%d): quartz clock is used to synchronize time if radio clock has no reception.", unit);
- }
- else
- {
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_NOTICE, "NeoClock4X(%d): time is only adjusted with radio signal reception.", unit);
- }
- }
-
- if(NULL != out)
- {
- 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;
-
- 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)
- snprintf(tt, 39, "timesource=\"radio\"");
- else if('C' == up->timesource)
- snprintf(tt, 39, "timesource=\"quartz\"");
- else
- snprintf(tt, 39, "timesource=\"unknown\"");
- tt = add_var(&out->kv_list, 40, RO|DEF);
- if('I' == up->quarzstatus)
- snprintf(tt, 39, "quartzstatus=\"synchronized\"");
- else if('X' == up->quarzstatus)
- snprintf(tt, 39, "quartzstatus=\"not synchronized\"");
- else
- snprintf(tt, 39, "quartzstatus=\"unknown\"");
- tt = add_var(&out->kv_list, 40, RO|DEF);
- if('S' == up->dststatus)
- snprintf(tt, 39, "dststatus=\"summer\"");
- else if('W' == up->dststatus)
- snprintf(tt, 39, "dststatus=\"winter\"");
- else
- 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)
-{
- 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;
- n = 16 * n + hexdigit;
- }
- *result = n;
- return (n);
-}
-
-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';
- n = 10 * n + digit;
- }
- *result = n;
- return (n);
-}
-
-/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
- * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
- * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
- *
- * [For the Julian calendar (which was used in Russia before 1917,
- * Britain & colonies before 1752, anywhere else before 1582,
- * and is still in use by some communities) leave out the
- * -year/100+year/400 terms, and add 10.]
- *
- * This algorithm was first published by Gauss (I think).
- *
- * WARNING: this function will overflow on 2106-02-07 06:28:16 on
- * 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)
-{
- if (0 >= (int) (mon -= 2)) { /* 1..12 . 11,12,1..10 */
- mon += 12; /* Puts Feb last since it has leap day */
- year -= 1;
- }
- return (((
- (unsigned long)(year/4 - year/100 + year/400 + 367*mon/12 + day) +
- year*365 - 719499
- )*24 + hour /* now have hours */
- )*60 + min /* now have minutes */
- )*60 + sec; /* finally seconds */
-}
-
-static void
-neol_localtime(unsigned long utc,
- int* year,
- int* month,
- int* day,
- int* hour,
- int* min,
- int* sec)
-{
- *sec = utc % 60;
- utc /= 60;
- *min = utc % 60;
- utc /= 60;
- *hour = utc % 24;
- utc /= 24;
-
- /* JDN Date 1/1/1970 */
- neol_jdn_to_ymd(utc + 2440588L, year, month, day);
-}
-
-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;
- y = 4000UL * (x + 1) / fudgedDaysPer4000Years;
- x = x - 1461UL * y / 4UL + 31UL;
- m = 80UL * x / 2447UL;
- d = x - 2447UL * m / 80UL;
- x = m / 11UL;
- m = m + 2UL - 12UL * x;
- y = 100UL * (z - 49UL) + y + x;
-
- *yy = (int)y;
- *mm = (int)m;
- *dd = (int)d;
-}
-
-#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)
-{
- char tmpbuf[256];
- int len;
- int lastsearch;
- unsigned char c;
- int last_c_was_crlf;
- int last_crlf_conv_len;
- int init;
- int read_errors;
- int flag = 0;
- int chars_read;
-
- /* wait a little bit */
- sleep(1);
- if(-1 != write(fd, "V", 1))
- {
- /* wait a little bit */
- sleep(1);
- memset(tmpbuf, 0x00, sizeof(tmpbuf));
-
- len = 0;
- lastsearch = 0;
- last_c_was_crlf = 0;
- last_crlf_conv_len = 0;
- init = 1;
- read_errors = 0;
- chars_read = 0;
- for(;;)
- {
- 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))
- {
- 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;
- }
-
-#if 0
- msyslog(LOG_NOTICE, "NeoClock4X(%d): firmware %c = %02Xh", unit, c, c);
-#endif
-
- if(0x0A == c || 0x0D == c)
- {
- if(last_c_was_crlf)
- {
- char *ptr;
- ptr = strstr(&tmpbuf[lastsearch], "S/N");
- if(NULL != ptr)
- {
- tmpbuf[last_crlf_conv_len] = 0;
- flag = 1;
- break;
- }
- /* convert \n to / */
- last_crlf_conv_len = len;
- tmpbuf[len++] = ' ';
- tmpbuf[len++] = '/';
- tmpbuf[len++] = ' ';
- lastsearch = len;
- }
- last_c_was_crlf = 1;
- }
- else
- {
- last_c_was_crlf = 0;
- if(0x00 != c)
- tmpbuf[len++] = (char) c;
- }
- tmpbuf[len] = '\0';
- if(len > sizeof(tmpbuf)-5)
- break;
- }
- }
- else
- {
- msyslog(LOG_ERR, "NeoClock4X(%d): can't query firmware version", unit);
- strcpy(tmpbuf, "unknown error");
- }
- strncpy(firmware, tmpbuf, maxlen);
- firmware[maxlen] = '\0';
-
- if(flag)
- {
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_INFO, "NeoClock4X(%d): firmware version: %s", unit, firmware);
- }
-
- 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 */
-
-/*
- * History:
- * refclock_neoclock4x.c
- *
- * 2002/04/27 cjh
- * Revision 1.0 first release
- *
- * 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
deleted file mode 100644
index 28d6263..0000000
--- a/contrib/ntp/ntpd/refclock_nmea.c
+++ /dev/null
@@ -1,723 +0,0 @@
-/*
- * refclock_nmea.c - clock driver for an NMEA GPS CLOCK
- * Michael Petry Jun 20, 1994
- * based on refclock_heathn.c
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(SYS_WINNT)
-#undef close
-#define close closesocket
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_NMEA)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef HAVE_PPSAPI
-# ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
-# else
-# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
-# endif
-# endif
-#endif /* HAVE_PPSAPI */
-
-/*
- * This driver supports the NMEA GPS Receiver with
- *
- * Protype was refclock_trak.c, Thanks a lot.
- *
- * The receiver used spits out the NMEA sentences for boat navigation.
- * And you thought it was an information superhighway. Try a raging river
- * filled with rapids and whirlpools that rip away your data and warp time.
- *
- * If HAVE_PPSAPI is defined code to use the PPSAPI will be compiled in.
- * On startup if initialization of the PPSAPI fails, it will fall back
- * to the "normal" timestamps.
- *
- * The PPSAPI part of the driver understands fudge flag2 and flag3. If
- * flag2 is set, it will use the clear edge of the pulse. If flag3 is
- * set, kernel hardpps is enabled.
- *
- * GPS sentences other than RMC (the default) may be enabled by setting
- * the relevent bits of 'mode' in the server configuration line
- * server 127.127.20.x mode X
- *
- * bit 0 - enables RMC (1)
- * bit 1 - enables GGA (2)
- * bit 2 - enables GLL (4)
- * multiple sentences may be selected
- */
-
-/*
- * Definitions
- */
-#ifdef SYS_WINNT
-# define DEVICE "COM%d:" /* COM 1 - 3 supported */
-#else
-# define DEVICE "/dev/gps%d" /* name of radio device */
-#endif
-#define SPEED232 B4800 /* uart speed (4800 bps) */
-#define PRECISION (-9) /* precision assumed (about 2 ms) */
-#define PPS_PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS\0" /* reference id */
-#define DESCRIPTION "NMEA GPS Clock" /* who we are */
-#define NANOSECOND 1000000000 /* one second (ns) */
-#define RANGEGATE 500000 /* range gate (ns) */
-
-#define LENNMEA 75 /* min timecode length */
-
-/*
- * Tables to compute the ddd of year form icky dd/mm timecode. Viva la
- * leap.
- */
-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};
-
-/*
- * Unit control structure
- */
-struct nmeaunit {
- int pollcnt; /* poll message counter */
- int polled; /* Hand in a sample? */
- l_fp tstamp; /* timestamp of last poll */
-#ifdef HAVE_PPSAPI
- struct timespec ts; /* last timestamp */
- pps_params_t pps_params; /* pps parameters */
- pps_info_t pps_info; /* last pps data */
- pps_handle_t handle; /* pps handlebars */
-#endif /* HAVE_PPSAPI */
-};
-
-/*
- * Function prototypes
- */
-static int nmea_start P((int, struct peer *));
-static void nmea_shutdown P((int, struct peer *));
-#ifdef HAVE_PPSAPI
-static void nmea_control P((int, struct refclockstat *, struct
- refclockstat *, struct peer *));
-static int nmea_ppsapi P((struct peer *, int, int));
-static int nmea_pps P((struct nmeaunit *, l_fp *));
-#endif /* HAVE_PPSAPI */
-static void nmea_receive P((struct recvbuf *));
-static void nmea_poll P((int, struct peer *));
-static void gps_send P((int, const char *, struct peer *));
-static char *field_parse P((char *, int));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_nmea = {
- nmea_start, /* start up driver */
- nmea_shutdown, /* shut down driver */
- nmea_poll, /* transmit poll message */
-#ifdef HAVE_PPSAPI
- nmea_control, /* fudge control */
-#else
- noentry, /* fudge control */
-#endif /* HAVE_PPSAPI */
- noentry, /* initialize driver */
- noentry, /* buginfo */
- NOFLAGS /* not used */
-};
-
-/*
- * nmea_start - open the GPS devices and initialize data for processing
- */
-static int
-nmea_start(
- int unit,
- struct peer *peer
- )
-{
- register struct nmeaunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
-
- fd = refclock_open(device, SPEED232, LDISC_CLK);
- if (fd < 0)
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- up = (struct nmeaunit *)emalloc(sizeof(struct nmeaunit));
- if (up == NULL) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct nmeaunit));
- pp = peer->procptr;
- pp->io.clock_recv = nmea_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->pollcnt = 2;
- gps_send(pp->io.fd,"$PMOTG,RMC,0000*1D\r\n", peer);
-
-#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, &up->handle) < 0) {
- up->handle = 0;
- msyslog(LOG_ERR,
- "refclock_nmea: time_pps_create failed: %m");
- return (1);
- }
- return(nmea_ppsapi(peer, 0, 0));
-#else
- return (1);
-#endif /* HAVE_PPSAPI */
-}
-
-/*
- * nmea_shutdown - shut down a GPS clock
- */
-static void
-nmea_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct nmeaunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
-#ifdef HAVE_PPSAPI
- if (up->handle != 0)
- time_pps_destroy(up->handle);
-#endif /* HAVE_PPSAPI */
- io_closeclock(&pp->io);
- free(up);
-}
-
-#ifdef HAVE_PPSAPI
-/*
- * nmea_control - fudge control
- */
-static void
-nmea_control(
- int unit, /* unit (not used */
- struct refclockstat *in, /* input parameters (not uded) */
- struct refclockstat *out, /* output parameters (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
- nmea_ppsapi(peer, pp->sloppyclockflag & CLK_FLAG2,
- pp->sloppyclockflag & CLK_FLAG3);
-}
-
-
-/*
- * Initialize PPSAPI
- */
-int
-nmea_ppsapi(
- struct peer *peer, /* peer structure pointer */
- int enb_clear, /* clear enable */
- int enb_hardpps /* hardpps enable */
- )
-{
- struct refclockproc *pp;
- struct nmeaunit *up;
- int capability;
-
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
- if (time_pps_getcap(up->handle, &capability) < 0) {
- msyslog(LOG_ERR,
- "refclock_nmea: time_pps_getcap failed: %m");
- return (0);
- }
- memset(&up->pps_params, 0, sizeof(pps_params_t));
- if (enb_clear)
- up->pps_params.mode = capability & PPS_CAPTURECLEAR;
- else
- up->pps_params.mode = capability & PPS_CAPTUREASSERT;
- if (!up->pps_params.mode) {
- msyslog(LOG_ERR,
- "refclock_nmea: invalid capture edge %d",
- !enb_clear);
- return (0);
- }
- up->pps_params.mode |= PPS_TSFMT_TSPEC;
- if (time_pps_setparams(up->handle, &up->pps_params) < 0) {
- msyslog(LOG_ERR,
- "refclock_nmea: time_pps_setparams failed: %m");
- return (0);
- }
- if (enb_hardpps) {
- if (time_pps_kcbind(up->handle, PPS_KC_HARDPPS,
- up->pps_params.mode & ~PPS_TSFMT_TSPEC,
- PPS_TSFMT_TSPEC) < 0) {
- msyslog(LOG_ERR,
- "refclock_nmea: time_pps_kcbind failed: %m");
- return (0);
- }
- pps_enable = 1;
- }
- peer->precision = PPS_PRECISION;
-
-#if DEBUG
- if (debug) {
- time_pps_getparams(up->handle, &up->pps_params);
- printf(
- "refclock_ppsapi: capability 0x%x version %d mode 0x%x kern %d\n",
- capability, up->pps_params.api_version,
- up->pps_params.mode, enb_hardpps);
- }
-#endif
-
- return (1);
-}
-
-/*
- * Get PPSAPI timestamps.
- *
- * Return 0 on failure and 1 on success.
- */
-static int
-nmea_pps(
- struct nmeaunit *up,
- l_fp *tsptr
- )
-{
- 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 (up->handle == 0)
- return (0);
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
- memcpy(&pps_info, &up->pps_info, sizeof(pps_info_t));
- if (time_pps_fetch(up->handle, PPS_TSFMT_TSPEC, &up->pps_info,
- &timeout) < 0)
- return (0);
- if (up->pps_params.mode & PPS_CAPTUREASSERT) {
- if (pps_info.assert_sequence ==
- up->pps_info.assert_sequence)
- return (0);
- ts = up->pps_info.assert_timestamp;
- } else if (up->pps_params.mode & PPS_CAPTURECLEAR) {
- if (pps_info.clear_sequence ==
- up->pps_info.clear_sequence)
- return (0);
- ts = up->pps_info.clear_timestamp;
- } else {
- return (0);
- }
- if ((up->ts.tv_sec == ts.tv_sec) && (up->ts.tv_nsec == ts.tv_nsec))
- return (0);
- up->ts = ts;
-
- tstmp.l_ui = ts.tv_sec + JAN_1970;
- dtemp = ts.tv_nsec * FRAC / 1e9;
- tstmp.l_uf = (u_int32)dtemp;
- *tsptr = tstmp;
- return (1);
-}
-#endif /* HAVE_PPSAPI */
-
-/*
- * nmea_receive - receive data from the serial interface
- */
-static void
-nmea_receive(
- struct recvbuf *rbufp
- )
-{
- register struct nmeaunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- int month, day;
- int i;
- char *cp, *dp;
- int cmdtype;
- /* Use these variables to hold data until we decide its worth keeping */
- char rd_lastcode[BMAX];
- l_fp rd_tmp;
- u_short rd_lencode;
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
- 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
- */
- if (rd_lencode == 0)
- return;
-
-#ifdef DEBUG
- if (debug)
- printf("nmea: gpsread %d %s\n", rd_lencode,
- rd_lastcode);
-#endif
-
- /*
- * We check the timecode format and decode its contents. The
- * we only care about a few of them. The most important being
- * the $GPRMC format
- * $GPRMC,hhmmss,a,fddmm.xx,n,dddmmm.xx,w,zz.z,yyy.,ddmmyy,dd,v*CC
- * For Magellan (ColorTrak) GLL probably datum (order of sentences)
- * also mode (0,1,2,3) select sentence ANY/ALL, RMC, GGA, GLL
- * $GPGLL,3513.8385,S,14900.7851,E,232420.594,A*21
- * $GPGGA,232420.59,3513.8385,S,14900.7851,E,1,05,3.4,00519,M,,,,*3F
- * $GPRMB,...
- * $GPRMC,232418.19,A,3513.8386,S,14900.7853,E,00.0,000.0,121199,12.,E*77
- * $GPAPB,...
- * $GPGSA,...
- * $GPGSV,...
- * $GPGSV,...
- */
-#define GPXXX 0
-#define GPRMC 1
-#define GPGGA 2
-#define GPGLL 4
- cp = rd_lastcode;
- cmdtype=0;
- if(strncmp(cp,"$GPRMC",6)==0) {
- cmdtype=GPRMC;
- }
- else if(strncmp(cp,"$GPGGA",6)==0) {
- cmdtype=GPGGA;
- }
- else if(strncmp(cp,"$GPGLL",6)==0) {
- cmdtype=GPGLL;
- }
- else if(strncmp(cp,"$GPXXX",6)==0) {
- cmdtype=GPXXX;
- }
- else
- return;
-
-
- /* See if I want to process this message type */
- if ( ((peer->ttl == 0) && (cmdtype != GPRMC))
- || ((peer->ttl != 0) && !(cmdtype & peer->ttl)) )
- return;
-
- pp->lencode = rd_lencode;
- strcpy(pp->a_lastcode,rd_lastcode);
- cp = pp->a_lastcode;
-
- pp->lastrec = up->tstamp = rd_tmp;
- up->pollcnt = 2;
-
-#ifdef DEBUG
- if (debug)
- printf("nmea: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
-
-
- /* Grab field depending on clock string type */
- switch( cmdtype ) {
- case GPRMC:
- /*
- * Test for synchronization. Check for quality byte.
- */
- dp = field_parse(cp,2);
- if( dp[0] != 'A')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
-
- /* Now point at the time field */
- dp = field_parse(cp,1);
- break;
-
-
- case GPGGA:
- /*
- * Test for synchronization. Check for quality byte.
- */
- dp = field_parse(cp,6);
- if( dp[0] == '0')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
-
- /* Now point at the time field */
- dp = field_parse(cp,1);
- break;
-
-
- case GPGLL:
- /*
- * Test for synchronization. Check for quality byte.
- */
- dp = field_parse(cp,6);
- if( dp[0] != 'A')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
-
- /* Now point at the time field */
- dp = field_parse(cp,5);
- break;
-
-
- case GPXXX:
- return;
- default:
- return;
-
- }
-
- /*
- * Check time code format of NMEA
- */
-
- if( !isdigit((int)dp[0]) ||
- !isdigit((int)dp[1]) ||
- !isdigit((int)dp[2]) ||
- !isdigit((int)dp[3]) ||
- !isdigit((int)dp[4]) ||
- !isdigit((int)dp[5])
- ) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
-
- /*
- * Convert time and check values.
- */
- pp->hour = ((dp[0] - '0') * 10) + dp[1] - '0';
- pp->minute = ((dp[2] - '0') * 10) + dp[3] - '0';
- pp->second = ((dp[4] - '0') * 10) + dp[5] - '0';
- /* Default to 0 milliseconds, if decimal convert milliseconds in
- one, two or three digits
- */
- pp->nsec = 0;
- if (dp[6] == '.') {
- if (isdigit((int)dp[7])) {
- pp->nsec = (dp[7] - '0') * 100000000;
- if (isdigit((int)dp[8])) {
- pp->nsec += (dp[8] - '0') * 10000000;
- if (isdigit((int)dp[9])) {
- pp->nsec += (dp[9] - '0') * 1000000;
- }
- }
- }
- }
-
- if (pp->hour > 23 || pp->minute > 59 || pp->second > 59
- || pp->nsec > 1000000000) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
-
- /*
- * Convert date and check values.
- */
- if (cmdtype==GPRMC) {
- dp = field_parse(cp,9);
- day = dp[0] - '0';
- day = (day * 10) + dp[1] - '0';
- month = dp[2] - '0';
- month = (month * 10) + dp[3] - '0';
- pp->year = dp[4] - '0';
- pp->year = (pp->year * 10) + dp[5] - '0';
- }
- else {
- /* only time */
- time_t tt = time(NULL);
- struct tm * t = gmtime(&tt);
- day = t->tm_mday;
- month = t->tm_mon + 1;
- pp->year= t->tm_year;
- }
-
- if (month < 1 || month > 12 || day < 1) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /* Hmmmm this will be a nono for 2100,2200,2300 but I don't think I'll be here */
- /* good thing that 2000 is a leap year */
- /* pp->year will be 00-99 if read from GPS, 00-> (years since 1900) from tm_year */
- if (pp->year % 4) {
- if (day > day1tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++)
- day += day1tab[i];
- } else {
- if (day > day2tab[month - 1]) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- for (i = 0; i < month - 1; i++)
- day += day2tab[i];
- }
- pp->day = day;
-
-
-#ifdef HAVE_PPSAPI
- /*
- * If the PPSAPI is working, rather use its timestamps.
- * assume that the PPS occurs on the second so blow any msec
- */
- if (nmea_pps(up, &rd_tmp) == 1) {
- pp->lastrec = up->tstamp = rd_tmp;
- pp->nsec = 0;
- }
-#endif /* HAVE_PPSAPI */
-
- /*
- * Process the new sample in the median filter and determine the
- * reference clock offset and dispersion. 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 (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
-
-
- /*
- * Only go on if we had been polled.
- */
- 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 */
- refclock_report(peer, CEVNT_NOMINAL);
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
-}
-
-/*
- * nmea_poll - called by the transmit procedure
- *
- * We go to great pains to avoid changing state here, since there may be
- * more than one eavesdropper receiving the same timecode.
- */
-static void
-nmea_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct nmeaunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
- if (up->pollcnt == 0)
- refclock_report(peer, CEVNT_TIMEOUT);
- else
- up->pollcnt--;
- pp->polls++;
- up->polled = 1;
-
- /*
- * usually nmea_receive can get a timestamp every second
- */
-
- gps_send(pp->io.fd,"$PMOTG,RMC,0000*1D\r\n", peer);
-}
-
-/*
- *
- * gps_send(fd,cmd, peer) Sends a command to the GPS receiver.
- * as gps_send(fd,"rqts,u\r", peer);
- *
- * We don't currently send any data, but would like to send
- * RTCM SC104 messages for differential positioning. It should
- * also give us better time. Without a PPS output, we're
- * Just fooling ourselves because of the serial code paths
- *
- */
-static void
-gps_send(
- int fd,
- const char *cmd,
- struct peer *peer
- )
-{
-
- if (write(fd, cmd, strlen(cmd)) == -1) {
- refclock_report(peer, CEVNT_FAULT);
- }
-}
-
-static char *
-field_parse(
- char *cp,
- int fn
- )
-{
- char *tp;
- int i = fn;
-
- for (tp = cp; *tp != '\0'; tp++) {
- if (*tp == ',')
- i--;
- if (i == 0)
- break;
- }
- return (++tp);
-}
-#else
-int refclock_nmea_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_oncore.c b/contrib/ntp/ntpd/refclock_oncore.c
deleted file mode 100644
index 14db92f..0000000
--- a/contrib/ntp/ntpd/refclock_oncore.c
+++ /dev/null
@@ -1,3723 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * 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, 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:
- *
- * (UT) (VP)
- * COPYRIGHT 1991-1997 MOTOROLA INC. COPYRIGHT 1991-1996 MOTOROLA INC.
- * SFTW P/N # 98-P36848P SFTW P/N # 98-P36830P
- * SOFTWARE VER # 2 SOFTWARE VER # 8
- * SOFTWARE REV # 2 SOFTWARE REV # 8
- * SOFTWARE DATE APR 24 1998 SOFTWARE DATE 06 Aug 1996
- * MODEL # R1121N1114 MODEL # B4121P1155
- * HWDR P/N # 1 HDWR P/N # _
- * SERIAL # R0010A SERIAL # SSG0226478
- * MANUFACTUR DATE 6H07 MANUFACTUR DATE 7E02
- * OPTIONS LIST IB
- *
- * (Basic) (M12)
- * 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 # SSG0049809 SERIAL # P003UD
- * MANUFACTUR DATE 417AMA199 MANUFACTUR DATE 0C27
- * OPTIONS LIST AB
- *
- * --------------------------------------------------------------------------
- * This code uses the two devices
- * /dev/oncore.serial.n
- * /dev/oncore.pps.n
- * which may be linked to the same device.
- * and can read initialization data from the file
- * /etc/ntp.oncoreN, /etc/ntp.oncore.N, or /etc/ntp.oncore, where
- * n or N are the unit number, viz 127.127.30.N.
- * --------------------------------------------------------------------------
- * Reg.Clemens <reg@dwf.com> Sep98.
- * Original code written for FreeBSD.
- * With these mods it works on FreeBSD, SunOS, Solaris and Linux
- * (SunOS 4.1.3 + ppsclock)
- * (Solaris7 + MU4)
- * (RedHat 5.1 2.0.35 + PPSKit, 2.1.126 + or later).
- *
- * Lat,Long,Ht, cable-delay, offset, and the ReceiverID (along with the
- * state machine state) are printed to CLOCKSTATS if that file is enabled
- * in /etc/ntp.conf.
- *
- * --------------------------------------------------------------------------
- *
- * According to the ONCORE manual (TRM0003, Rev 3.2, June 1998, page 3.13)
- * doing an average of 10000 valid 2D and 3D fixes is what the automatic
- * site survey mode does. Looking at the output from the receiver
- * it seems like it is only using 3D fixes.
- * When we do it ourselves, take 10000 3D fixes.
- */
-
-#define POS_HOLD_AVERAGE 10000 /* nb, 10000s ~= 2h45m */
-
-/*
- * ONCORE_SHMEM_STATUS will create a mmap(2)'ed file named according to a
- * "STATUS" line in the oncore config file, which contains the most recent
- * copy of all types of messages we recognize. This file can be mmap(2)'ed
- * by monitoring and statistics programs.
- *
- * See separate HTML documentation for this option.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_ONCORE) && defined(HAVE_PPSAPI)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#ifdef ONCORE_SHMEM_STATUS
-# ifdef HAVE_SYS_MMAN_H
-# include <sys/mman.h>
-# ifndef MAP_FAILED
-# define MAP_FAILED ((u_char *) -1)
-# endif /* not MAP_FAILED */
-# endif /* HAVE_SYS_MMAN_H */
-#endif /* ONCORE_SHMEM_STATUS */
-
-#ifdef HAVE_PPSAPI
-# ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
-# else
-# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
-# endif
-# endif
-#endif
-
-#ifdef HAVE_SYS_SIO_H
-# include <sys/sio.h>
-#endif
-
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif
-
-#ifndef HAVE_STRUCT_PPSCLOCKEV
-struct ppsclockev {
-# ifdef HAVE_STRUCT_TIMESPEC
- struct timespec tv;
-# else
- struct timeval tv;
-# endif
- u_int serial;
-};
-#endif /* not HAVE_STRUCT_PPSCLOCKEV */
-
-enum receive_state {
- ONCORE_NO_IDEA,
- ONCORE_CHECK_ID,
- ONCORE_CHECK_CHAN,
- ONCORE_HAVE_CHAN,
- ONCORE_RESET_SENT,
- ONCORE_TEST_SENT,
- ONCORE_INIT,
- ONCORE_ALMANAC,
- ONCORE_RUN
-};
-
-enum site_survey_state {
- ONCORE_SS_UNKNOWN,
- ONCORE_SS_TESTING,
- ONCORE_SS_HW,
- ONCORE_SS_SW,
- 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.
- */
-
-enum oncore_model {
- ONCORE_BASIC,
- ONCORE_PVT6,
- ONCORE_VP,
- ONCORE_UT,
- ONCORE_UTPLUS,
- ONCORE_GT,
- ONCORE_GTPLUS,
- ONCORE_SL,
- ONCORE_M12,
- ONCORE_UNKNOWN
-};
-
-/* the bits that describe these properties are in the same place
- * on the VP/UT, but have moved on the M12. As such we extract
- * them, and use them from this struct.
- *
- */
-
-struct RSM {
- u_char posn0D;
- u_char posn2D;
- u_char posn3D;
- u_char bad_almanac;
- u_char bad_fix;
-};
-
-/* It is possible to test the VP/UT each cycle (@@Ea or equivalent) to
- * see what mode it is in. The bits on the M12 are multiplexed with
- * other messages, so we have to 'keep' the last known mode here.
- */
-
-enum posn_mode {
- MODE_UNKNOWN,
- MODE_0D,
- MODE_2D,
- MODE_3D
-};
-
-struct instance {
- int unit; /* 127.127.30.unit */
- struct refclockproc *pp;
- struct peer *peer;
-
- int ttyfd; /* TTY file descriptor */
- int ppsfd; /* PPS file descriptor */
- int shmemfd; /* Status shm descriptor */
-#ifdef HAVE_PPSAPI
- pps_handle_t pps_h;
- pps_params_t pps_p;
-#endif
- 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;
-
- u_long delay; /* ns */
- long offset; /* ns */
-
- u_char *shmem;
- char *shmem_fname;
- u_int shmem_Cb;
- u_int shmem_Ba;
- u_int shmem_Ea;
- u_int shmem_Ha;
- u_char shmem_reset;
- u_char shmem_Posn;
- u_char shmem_bad_Ea;
- u_char almanac_from_shmem;
-
- double ss_lat;
- double ss_long;
- double ss_ht;
- double dH;
- int ss_count;
- u_char posn_set;
-
- enum oncore_model model;
- u_int version;
- 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, 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;
- u_long ev_serial;
- int Rcvptr;
- u_char Rcvbuf[500];
- u_char BEHa[160]; /* Ba, Ea or Ha */
- u_char BEHn[80]; /* Bn , En , or Hn */
- u_char Cj[300];
- 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;
- 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_char hardpps;
-};
-
-#define rcvbuf instance->Rcvbuf
-#define rcvptr instance->Rcvptr
-
-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_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));
-
-struct refclock refclock_oncore = {
- oncore_start, /* start up driver */
- oncore_shutdown, /* shut down driver */
- oncore_poll, /* transmit poll message */
- oncore_control, /* fudge (flag) control messages */
- noentry, /* not used */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-/*
- * Understanding the next bit here is not easy unless you have a manual
- * for the the various Oncore Models.
- */
-
-static struct msg_desc {
- const char flag[3];
- const int len;
- void (*handler) P((struct instance *, u_char *, size_t));
- const char *fmt;
- int shmem;
-} oncore_messages[] = {
- /* Ea and En first since they're most common */
- { "Ea", 76, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdimsdimsdsC" },
- { "Ba", 68, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdsC" },
- { "Ha", 154, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmaaaaoooohhhhmmmmVVvvhhddntimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddssrrccooooTTushmvvvvvvC" },
- { "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, 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, "" },
- { "Av", 8, 0, "" },
- { "Aw", 8, 0, "" },
- { "Ay", 11, oncore_msg_Ay, "" },
- { "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, "" },
- { "Cf", 7, oncore_msg_Cf, "" },
- { "Cg", 8, 0, "" },
- { "Ch", 9, 0, "" },
- { "Cj", 294, oncore_msg_Cj, "" },
- { "Ek", 71, 0, "" },
- { "Fa", 9, oncore_msg_CaFaIa, "" },
- { "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, "" }
-};
-
-
-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
- */
-
-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 */
-#define INIT_FILE "/etc/ntp.oncore" /* optional init file */
-
-#define SPEED B9600 /* Oncore Binary speed (9600 bps) */
-
-/*
- * Assemble and disassemble 32bit signed quantities from a buffer.
- *
- */
-
- /* to buffer, int w, u_char *buf */
-#define w32_buf(buf,w) { u_int i_tmp; \
- i_tmp = (w<0) ? (~(-w)+1) : (w); \
- (buf)[0] = (i_tmp >> 24) & 0xff; \
- (buf)[1] = (i_tmp >> 16) & 0xff; \
- (buf)[2] = (i_tmp >> 8) & 0xff; \
- (buf)[3] = (i_tmp ) & 0xff; \
- }
-
-#define w32(buf) (((buf)[0]&0xff) << 24 | \
- ((buf)[1]&0xff) << 16 | \
- ((buf)[2]&0xff) << 8 | \
- ((buf)[3]&0xff) )
-
- /* from buffer, char *buf, result to an int */
-#define buf_w32(buf) (((buf)[0]&0200) ? (-(~w32(buf)+1)) : w32(buf))
-
-
-/*
- * oncore_start - initialize data for processing
- */
-
-static int
-oncore_start(
- int unit,
- struct peer *peer
- )
-{
- register struct instance *instance;
- struct refclockproc *pp;
- int fd1, fd2;
- char device1[30], device2[30];
- const char *cp;
- struct stat stat1, stat2;
-
- /* OPEN DEVICES */
- /* opening different devices for fd1 and fd2 presents no problems */
- /* opening the SAME device twice, seems to be OS dependent.
- (a) on Linux (no streams) no problem
- (b) on SunOS (and possibly Solaris, untested), (streams)
- never see the line discipline.
- Since things ALWAYS work if we only open the device once, we check
- to see if the two devices are in fact the same, then proceed to
- do one open or two.
- */
-
- (void)sprintf(device1, DEVICE1, unit);
- (void)sprintf(device2, DEVICE2, unit);
-
- if (stat(device1, &stat1)) {
- perror("ONCORE: stat fd1");
- exit(1);
- }
-
- if (stat(device2, &stat2)) {
- perror("ONCORE: stat fd2");
- 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
-#if !defined(HAVE_PPSAPI) && !defined(TIOCDCDTIMESTAMP)
- | LDISC_PPS
-#endif
- ))) {
- perror("ONCORE: fd1");
- exit(1);
- }
- fd2 = fd1;
- } else { /* different devices here */
- if (!(fd1=refclock_open(device1, SPEED, LDISC_RAW))) {
- perror("ONCORE: fd1");
- exit(1);
- }
- if ((fd2=open(device2, O_RDWR)) < 0) {
- perror("ONCORE: fd2");
- exit(1);
- }
- }
-
- /* 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;
-
- cp = "ONCORE DRIVER -- CONFIGURING";
- record_clock_stats(&(instance->peer->srcadr), cp);
-
- instance->o_state = ONCORE_NO_IDEA;
- cp = "state = ONCORE_NO_IDEA";
- record_clock_stats(&(instance->peer->srcadr), cp);
-
- instance->ttyfd = fd1;
- instance->ppsfd = fd2;
-
- instance->Bj_day = -1;
- 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;
- peer->maxpoll = 4;
- pp->clockdesc = "Motorola Oncore GPS Receiver";
- memcpy((char *)&pp->refid, "GPS\0", (size_t) 4);
-
- /* go read any input data in /etc/ntp.oncoreX or /etc/ntp/oncore.X */
-
- oncore_read_config(instance);
-
-#ifdef HAVE_PPSAPI
- if (time_pps_create(fd2, &instance->pps_h) < 0) {
- perror("time_pps_create");
- 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");
- return (0);
- }
-
- if (time_pps_getparams(instance->pps_h, &instance->pps_p) < 0) {
- msyslog(LOG_ERR, "refclock_ioctl: time_pps_getparams failed: %m");
- return (0);
- }
-
- /* nb. only turn things on, if someone else has turned something
- * on before we get here, leave it alone!
- */
-
- if (instance->assert) { /* nb, default or ON */
- instance->pps_p.mode = PPS_CAPTUREASSERT | PPS_OFFSETASSERT;
- instance->pps_p.assert_offset.tv_sec = 0;
- instance->pps_p.assert_offset.tv_nsec = 0;
- } else {
- instance->pps_p.mode = PPS_CAPTURECLEAR | PPS_OFFSETCLEAR;
- instance->pps_p.clear_offset.tv_sec = 0;
- instance->pps_p.clear_offset.tv_nsec = 0;
- }
- instance->pps_p.mode |= PPS_TSFMT_TSPEC;
- instance->pps_p.mode &= mode; /* only set what is legal */
-
- if (time_pps_setparams(instance->pps_h, &instance->pps_p) < 0) {
- perror("time_pps_setparams");
- exit(1);
- }
-
- /* If HARDPPS is on, we tell kernel */
-
- if (instance->hardpps) {
- int i;
-
- 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;
- }
- }
- return(1);
-}
-#endif
-
-
-
-#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);
- }
-
- /* 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.
- */
-
- 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;
-
- 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 */
-
-
-
-/*
- * Read Input file if it exists.
- */
-
-static void
-oncore_read_config(
- struct instance *instance
- )
-{
-/*
- * First we try to open the configuration file
- * /etc/oncoreN
- * where N is the unit number viz 127.127.30.N.
- * If we don't find it we try
- * /etc/ntp.oncore.N
- * and then
- * /etc/ntp.oncore
- *
- * If we don't find any then we don't have the cable delay or PPS offset
- * and we choose MODE (4) below.
- *
- * Five Choices for MODE
- * (0) ONCORE is preinitialized, don't do anything to change it.
- * nb, DON'T set 0D mode, DON'T set Delay, position...
- * (1) NO RESET, Read Position, delays from data file, lock it in, go to 0D mode.
- * (2) NO RESET, Read Delays from data file, do SITE SURVEY to get position,
- * lock this in, go to 0D mode.
- * (3) HARD RESET, Read Position, delays from data file, lock it in, go to 0D mode.
- * (4) HARD RESET, Read Delays from data file, do SITE SURVEY to get position,
- * lock this in, go to 0D mode.
- * NB. If a POSITION is specified in the config file with mode=(2,4) [SITE SURVEY]
- * then this position is set as the INITIAL position of the ONCORE.
- * This can reduce the time to first fix.
- * -------------------------------------------------------------------------------
- * Note that an Oncore UT without a battery backup retains NO information if it is
- * power cycled, with a Battery Backup it remembers the almanac, etc.
- * For an Oncore VP, there is an eeprom that will contain this data, along with the
- * option of Battery Backup.
- * So a UT without Battery Backup is equivalent to doing a HARD RESET on each
- * power cycle, since there is nowhere to store the data.
- * -------------------------------------------------------------------------------
- *
- * 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, 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).
- *
- * Read input file.
- *
- * # is comment to end of line
- * = allowed between 1st and 2nd fields.
- *
- * Expect to see one line with 'MODE' as first field, followed by an integer
- * in the range 0-4 (default = 4).
- *
- * Expect to see two lines with 'LONG', 'LAT' followed by 1-3 fields.
- * All numbers are floating point.
- * DDD.ddd
- * DDD MMM.mmm
- * DDD MMM SSS.sss
- *
- * 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 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
- * by 1 or two fields. The first is a number (a time) the second is
- * 'MS', 'US' or 'NS' for miliseconds, microseconds or nanoseconds.
- * DELAY is cable delay, typically a few tens of ns.
- *
- * There is an optional line, starting with OFFSET, followed
- * by 1 or two fields. The first is a number (a time) the second is
- * 'MS', 'US' or 'NS' for miliseconds, microseconds or nanoseconds.
- * OFFSET is the offset of the PPS pulse from 0. (only fully implemented
- * with the PPSAPI, we need to be able to tell the Kernel about this
- * offset if the Kernel PLL is in use, but can only do this presently
- * when using the PPSAPI interface. If not using the Kernel PLL,
- * then there is no problem.
- *
- * 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 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 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 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
- * LAT 35 08.999
- * HT 1589 # could equally well say HT 5215 FT
- * DELAY 60 ns
- */
-
- FILE *fd;
- char *cp, *cc, *ca, line[100], units[2], device[20], Msg[160];
- 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 */
- if ((fd=fopen(device, "r")) == NULL) { /* it was in the original documentation */
- sprintf(device, "%s.%d", INIT_FILE, instance->unit); /* then try "ntp.oncore.0 */
- if ((fd=fopen(device, "r")) == NULL) {
- if ((fd=fopen(INIT_FILE, "r")) == NULL) { /* and finally "ntp.oncore" */
- instance->init_type = 4;
- return;
- }
- }
- }
-
- mode = mask = 0;
- lat_flg = long_flg = ht_flg = 0;
- while (fgets(line, 100, fd)) {
-
- /* Remove comments */
- if ((cp = strchr(line, '#')))
- *cp = '\0';
-
- /* Remove trailing space */
- 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, "STATUS", (size_t) 6) || !strncmp(cc, "SHMEM", (size_t) 5)) {
- i = strlen(ca);
- instance->shmem_fname = (char *) malloc((unsigned) (i+1));
- strcpy(instance->shmem_fname, ca);
- continue;
- }
-
- /* Uppercase argument as well */
- for (cp = ca; *cp; cp++)
- if (isascii((int)*cp) && islower((int)*cp))
- *cp = toupper(*cp);
-
- if (!strncmp(cc, "LAT", (size_t) 3)) {
- f1 = f2 = f3 = 0;
- sscanf(ca, "%lf %lf %lf", &f1, &f2, &f3);
- sign = 1;
- if (f1 < 0) {
- f1 = -f1;
- sign = -1;
- }
- instance->ss_lat = sign*1000*(fabs(f3) + 60*(fabs(f2) + 60*f1)); /*miliseconds*/
- lat_flg++;
- } else if (!strncmp(cc, "LON", (size_t) 3)) {
- f1 = f2 = f3 = 0;
- sscanf(ca, "%lf %lf %lf", &f1, &f2, &f3);
- sign = 1;
- if (f1 < 0) {
- f1 = -f1;
- sign = -1;
- }
- instance->ss_long = sign*1000*(fabs(f3) + 60*(fabs(f2) + 60*f1)); /*miliseconds*/
- long_flg++;
- } else if (!strncmp(cc, "HT", (size_t) 2)) {
- f1 = 0;
- units[0] = '\0';
- sscanf(ca, "%lf %1s", &f1, units);
- if (units[0] == 'F')
- f1 = 0.3048 * f1;
- instance->ss_ht = 100 * f1; /* cm */
- ht_flg++;
- } else if (!strncmp(cc, "DELAY", (size_t) 5)) {
- f1 = 0;
- units[0] = '\0';
- sscanf(ca, "%lf %1s", &f1, units);
- if (units[0] == 'N')
- ;
- else if (units[0] == 'U')
- f1 = 1000 * f1;
- else if (units[0] == 'M')
- f1 = 1000000 * f1;
- else
- f1 = 1000000000 * f1;
- if (f1 < 0 || f1 > 1.e9)
- f1 = 0;
- if (f1 < 0 || f1 > 999999) {
- sprintf(Msg, "PPS Cable delay of %fns out of Range, ignored", f1);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- } else
- instance->delay = f1; /* delay in ns */
- } else if (!strncmp(cc, "OFFSET", (size_t) 6)) {
- f1 = 0;
- units[0] = '\0';
- sscanf(ca, "%lf %1s", &f1, units);
- if (units[0] == 'N')
- ;
- else if (units[0] == 'U')
- f1 = 1000 * f1;
- else if (units[0] == 'M')
- f1 = 1000000 * f1;
- else
- f1 = 1000000000 * f1;
- if (f1 < 0 || f1 > 1.e9)
- f1 = 0;
- if (f1 < 0 || f1 > 999999999.) {
- sprintf(Msg, "PPS Offset of %fns out of Range, ignored", f1);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- } else
- instance->offset = f1; /* offset in ns */
- } else if (!strncmp(cc, "MODE", (size_t) 4)) {
- sscanf(ca, "%d", &mode);
- if (mode < 0 || mode > 4)
- mode = 4;
- } else if (!strncmp(cc, "ASSERT", (size_t) 6)) {
- 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)) {
- instance->shmem_Posn = 3;
- } else if (!strncmp(cc, "CHAN", (size_t) 4)) {
- sscanf(ca, "%d", &i);
- if ((i == 6) || (i == 8) || (i == 12))
- instance->chan_in = i;
- } else if (!strncmp(cc, "TRAIM", (size_t) 5)) {
- instance->traim_in = 1; /* so TRAIM alone is YES */
- if (!strcmp(ca, "NO") || !strcmp(ca, "OFF")) /* Yes/No, On/Off */
- 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);
-
- /*
- * OK, have read all of data file, and extracted the good stuff.
- * If lat/long/ht specified they ALL must be specified for mode = (1,3).
- */
-
- instance->posn_set = 1;
- 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) {
- sprintf(Msg, "Input Mode = %d, but no/incomplete position, mode set to %d", mode, mode+1);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- mode++;
- }
- }
- instance->init_type = mode;
-
- sprintf(Msg, "Input mode = %d", mode);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-}
-
-
-
-/*
- * move data from NTP to buffer (toss the extra in the unlikely case it won't fit)
- */
-
-static void
-oncore_receive(
- struct recvbuf *rbufp
- )
-{
- size_t i;
- u_char *p;
- struct peer *peer;
- struct instance *instance;
-
- peer = (struct peer *)rbufp->recv_srcclock;
- instance = (struct instance *) peer->procptr->unitptr;
- p = (u_char *) &rbufp->recv_space;
-
-#if 0
- if (debug > 4) {
- int i;
- printf("ONCORE: >>>");
- for(i=0; i<rbufp->recv_length; i++)
- printf("%02x ", p[i]);
- printf("\n");
- printf("ONCORE: >>>");
- for(i=0; i<rbufp->recv_length; i++)
- printf("%03o ", p[i]);
- printf("\n");
- }
-#endif
-
- i = rbufp->recv_length;
- if (rcvbuf+rcvptr+i > &rcvbuf[sizeof rcvbuf])
- i = sizeof(rcvbuf) - rcvptr; /* and some char will be lost */
- memcpy(rcvbuf+rcvptr, p, i);
- rcvptr += i;
- oncore_consume(instance);
-}
-
-
-
-/*
- * Deal with any complete messages
- */
-
-static void
-oncore_consume(
- struct instance *instance
- )
-{
- int i, m;
- unsigned l;
-
- while (rcvptr >= 7) {
- if (rcvbuf[0] != '@' || rcvbuf[1] != '@') {
- /* We're not in sync, lets try to get there */
- for (i=1; i < rcvptr-1; i++)
- if (rcvbuf[i] == '@' && rcvbuf[i+1] == '@')
- break;
- if (debug > 4)
- printf("ONCORE[%d]: >>> skipping %d chars\n", instance->unit, i);
- if (i != rcvptr)
- memcpy(rcvbuf, rcvbuf+i, (size_t)(rcvptr-i));
- rcvptr -= i;
- continue;
- }
-
- /* Ok, we have a header now */
- l = sizeof(oncore_messages)/sizeof(oncore_messages[0]) -1;
- for(m=0; m<l; m++)
- if (!strncmp(oncore_messages[m].flag, (char *)(rcvbuf+2), (size_t) 2))
- break;
- if (m == l) {
- if (debug > 4)
- printf("ONCORE[%d]: >>> Unknown MSG, skipping 4 (%c%c)\n", instance->unit, rcvbuf[2], rcvbuf[3]);
- memcpy(rcvbuf, rcvbuf+4, (size_t) 4);
- rcvptr -= 4;
- continue;
- }
-
- l = oncore_messages[m].len;
-#if 0
- if (debug > 3)
- printf("ONCORE[%d]: GOT: %c%c %d of %d entry %d\n", instance->unit, rcvbuf[2], rcvbuf[3], rcvptr, l, m);
-#endif
- /* Got the entire message ? */
-
- if (rcvptr < l)
- return;
-
- /* are we at the end of message? should be <Cksum><CR><LF> */
-
- if (rcvbuf[l-2] != '\r' || rcvbuf[l-1] != '\n') {
- if (debug)
- printf("ONCORE[%d]: NO <CR><LF> at end of message\n", instance->unit);
- } else { /* check the CheckSum */
- 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,
- rcvbuf, (size_t) l);
- }
- oncore_msg_any(instance, rcvbuf, (size_t) (l-3), m);
- if (oncore_messages[m].handler)
- oncore_messages[m].handler(instance, rcvbuf, (size_t) (l-3));
- } else if (debug) {
- 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]);
- printf("\n");
- }
- }
-
- if (l != rcvptr)
- memcpy(rcvbuf, rcvbuf+l, (size_t) (rcvptr-l));
- rcvptr -= l;
- }
-}
-
-
-
-static void
-oncore_get_timestamp(
- struct instance *instance,
- long dt1, /* tick offset THIS time step */
- long dt2 /* tick offset NEXT time step */
- )
-{
- 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 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.
- */
-
-static void
-oncore_msg_any(
- struct instance *instance,
- u_char *buf,
- size_t len,
- int idx
- )
-{
- int i;
- const char *fmt = oncore_messages[idx].fmt;
- const char *p;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- struct timeval tv;
-
- if (debug > 3) {
-#ifdef HAVE_GETCLOCK
- (void) getclock(TIMEOFDAY, &ts);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000;
-#else
- GETTIMEOFDAY(&tv, 0);
-#endif
- printf("ONCORE[%d]: %ld.%06ld\n", instance->unit, (long) tv.tv_sec, (long) tv.tv_usec);
-
- if (!*fmt) {
- printf(">>@@%c%c ", buf[2], buf[3]);
- for(i=2; i < len && i < 2400 ; i++)
- printf("%02x", buf[i]);
- printf("\n");
- return;
- } else {
- printf("##");
- for (p = fmt; *p; p++) {
- putchar(*p);
- putchar('_');
- }
- printf("\n%c%c", buf[2], buf[3]);
- i = 4;
- for (p = fmt; *p; p++) {
- printf("%02x", buf[i++]);
- }
- printf("\n");
- }
- }
-}
-
-
-
-/* Latitude, Longitude, Height */
-
-static void
-oncore_msg_Adef(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
-}
-
-
-
-/* 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);
-}
-
-
-
-/*
- * get Position hold position
- */
-
-static void
-oncore_msg_As(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- instance->ss_lat = buf_w32(&buf[4]);
- instance->ss_long = buf_w32(&buf[8]);
- instance->ss_ht = buf_w32(&buf[12]);
-
- /* Print out Position */
- oncore_print_posn(instance);
-}
-
-
-
-/*
- * Try to use Oncore UT+ Auto Survey Feature
- * If its not there (VP), set flag to do it ourselves.
- */
-
-static void
-oncore_msg_At(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char *cp;
-
- 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");
-
- cp = "SSstate = ONCORE_SS_HW";
- record_clock_stats(&(instance->peer->srcadr), cp);
- instance->site_survey = ONCORE_SS_HW;
- }
- }
-}
-
-
-
-/*
- * get PPS Offset
- * Nb. @@Ay is not supported for early UT (no plus) model
- */
-
-static void
-oncore_msg_Ay(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char Msg[120];
-
- if (instance->saw_Ay)
- return;
-
- instance->saw_Ay = 1;
-
- instance->offset = buf_w32(&buf[4]);
-
- sprintf(Msg, "PPS Offset is set to %ld ns", instance->offset);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-}
-
-
-
-/*
- * get Cable Delay
- */
-
-static void
-oncore_msg_Az(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char Msg[120];
-
- if (instance->saw_Az)
- return;
-
- instance->saw_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);
-}
-
-
-
-/* Ba, Ea and Ha come here, these contain Position */
-
-static void
-oncore_msg_BaEaHa(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- const char *cp;
- char Msg[160];
- int mode;
-
- /* 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->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;
-
- instance->count3 = 0;
-
- if (instance->chan_in != -1) /* set in Input */
- instance->chan = instance->chan_in;
- else /* set from test */
- instance->chan = instance->chan_ck;
-
- 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);
-
- instance->o_state = ONCORE_HAVE_CHAN;
- cp = "state = ONCORE_HAVE_CHAN";
- record_clock_stats(&(instance->peer->srcadr), cp);
-
- instance->timeout = 4;
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
- return;
- }
-
- if (instance->o_state != ONCORE_ALMANAC && instance->o_state != ONCORE_RUN)
- return;
-
- /* PAUSE 5sec */
-
- 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 */
-
- /* check the antenna and almanac for changes (did it get unplugged, is it ready?) */
-
- oncore_check_almanac(instance);
- oncore_check_antenna(instance);
-
- /* 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_ALMANAC)
- if (oncore_wait_almanac(instance))
- return;
-
- /* do some things once when we get this far in BaEaHa */
-
- if (instance->once) {
- instance->once = 0;
- instance->count2 = 1;
-
- /* Have we seen an @@At (position hold) command response */
- /* if not, message out */
-
- 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_sendmsg(instance->ttyfd, oncore_cmd_Av1, sizeof(oncore_cmd_Av1));
- }
-
- /* 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
- */
-
- 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;
- }
-
- /* 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 */
-
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Azx, sizeof(oncore_cmd_Azx));
-
- /* 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);
-
- record_clock_stats(&(instance->peer->srcadr), "SSstate = ONCORE_SS_SW");
- instance->site_survey = ONCORE_SS_SW;
-
- 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 */
- }
- }
- }
- }
-
- /* check the mode we are in 0/2/3D */
-
- if (instance->chan == 6) {
- if (instance->BEHa[64]&0x8)
- instance->mode = MODE_0D;
- else if (instance->BEHa[64]&0x10)
- instance->mode = MODE_2D;
- else if (instance->BEHa[64]&0x20)
- instance->mode = MODE_3D;
- } else if (instance->chan == 8) {
- if (instance->BEHa[72]&0x8)
- instance->mode = MODE_0D;
- else if (instance->BEHa[72]&0x10)
- instance->mode = MODE_2D;
- else if (instance->BEHa[72]&0x20)
- instance->mode = MODE_3D;
- } else if (instance->chan == 12) {
- int bits;
-
- bits = (instance->BEHa[129]>>5) & 0x7; /* actually Ha */
- if (bits == 0x4)
- instance->mode = MODE_0D;
- else if (bits == 0x6)
- instance->mode = MODE_2D;
- else if (bits == 0x7)
- instance->mode = MODE_3D;
- }
-
- /* 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 */
-
- 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;
- }
-
- 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 (i) {
- i *= (len+6);
- smp[i + 2]++;
- memcpy(&smp[i+3], buf, (size_t) (len+3));
- }
- }
-
- /*
- * check if timer active
- * if it hasn't been cleared, then @@Bn/@@En/@@Hn did not respond
- */
-
- if (instance->traim_delay) {
- if (instance->traim_delay++ > 5) {
- instance->traim = 0;
- 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->minute = buf[9];
- instance->pp->second = buf[10];
-
- /*
- * Are we doing a Hardware or Software Site Survey?
- */
-
- if (instance->site_survey == ONCORE_SS_HW || instance->site_survey == ONCORE_SS_SW)
- oncore_ss(instance);
-
- /* see if we ever saw a response from the @@Ayx above */
-
- if (instance->count2) {
- if (instance->count2++ > 5) { /* this delay to check on @@Ay command */
- instance->count2 = 0;
-
- /* 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.
- */
-
- oncore_check_leap_sec(instance);
-
- /*
- * if SHMEM active, every 15s, steal one 'tick' to get 2D or 3D posn.
- */
-
- if (instance->shmem && !instance->shmem_bad_Ea && instance->shmem_Posn && (instance->site_survey == ONCORE_SS_DONE))
- oncore_shmem_get_3D(instance);
-
- if (!instance->traim) /* NO traim, no BnEnHn, go get tick */
- oncore_get_timestamp(instance, instance->offset, instance->offset);
-}
-
-
-
-/* Almanac Status */
-
-static void
-oncore_msg_Bd(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char Msg[160];
-
- 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);
-}
-
-
-
-/* get leap-second warning message */
-
-/*
- * @@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.
- */
-
-static void
-oncore_msg_Bj(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- const 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;
- }
- record_clock_stats(&(instance->peer->srcadr), cp);
-}
-
-
-
-static void
-oncore_msg_BnEnHn(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- long dt1, dt2;
- char *cp;
-
- if (instance->o_state != ONCORE_RUN)
- return;
-
- 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->BEHn, buf, (size_t) len); /* Bn or En or Hn */
-
- /* If Time RAIM doesn't like it, don't trust it */
-
- 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->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_msg_CaFaIa(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char *cp;
- int i;
-
- if (instance->o_state == ONCORE_TEST_SENT) {
- enum antenna_state antenna;
-
- instance->timeout = 0;
-
- 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]);
- }
-
- antenna = (buf[4] & 0xc0) >> 6;
- buf[4] &= ~0xc0;
-
- 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);
-
- refclock_report(instance->peer, CEVNT_FAULT);
- oncore_shutdown(instance->unit, instance->peer);
- return;
- }
-
- /* report the current antenna state */
-
- 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));
- }
-}
-
-
-
-/*
- * 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;
-
- 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;
-
- cp = "Cb: Response is NO ALMANAC";
- record_clock_stats(&(instance->peer->srcadr), cp);
- return;
- }
-
- 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
-}
-
-
-
-/*
- * 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_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);
-
- oncore_sendmsg(instance->ttyfd, oncore_cmd_Cj, sizeof(oncore_cmd_Cj));
- }
-}
-
-
-
-/*
- * 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.
- */
-
-static void
-oncore_msg_Cj(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- int mode;
- char *cp;
-
- memcpy(instance->Cj, buf, len);
-
- 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);
- }
- }
-
- 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);
-}
-
-
-
-/* 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
- */
-
-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;
- }
-
- /* 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';
-
- 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);
-}
-
-
-
-/* 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_Cj_init(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- 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);
-}
-
-
-
-/* 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);
-}
-
-
-
-/*
- * Try to use Oncore M12+Timing Auto Survey Feature
- * If its not there (M12), set flag to do it ourselves.
- */
-
-static void
-oncore_msg_Gd(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- char *cp;
-
- 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;
- }
- }
-}
-
-
-
-/* Leap Second for M12, gives all info from satellite message */
-/* also in UT v3.0 */
-
-static void
-oncore_msg_Gj(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- int dt;
- char Msg[160], *cp;
-
- instance->saw_Gj = 1; /* flag, saw_Gj, dont need to try Bj in check_leap */
-
- /* print the message to verify whats there */
-
- dt = buf[5] - buf[4];
-
-#if 1
- sprintf(Msg, "ONCORE[%d]: Leap Sec Msg: %d %d %d %d %d %d %d %d %d %d",
- instance->unit,
- buf[4], buf[5], 256*buf[6]+buf[7], buf[8], buf[9], buf[10],
- (buf[14]+256*(buf[13]+256*(buf[12]+256*buf[11]))),
- buf[15], buf[16], buf[17]);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-#endif
- if (dt) {
- sprintf(Msg, "ONCORE[%d]: Leap second (%d) scheduled for %d%s%d at %d:%d:%d",
- instance->unit,
- dt, buf[9], Month[buf[8]], 256*buf[6]+buf[7],
- buf[15], buf[16], buf[17]);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- }
-
- /* Only raise warning within a month of the leap second */
-
- instance->peer->leap = LEAP_NOWARNING;
- cp = "Set peer.leap to LEAP_NOWARNING";
-
- 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;
- cp = "Set peer.leap to LEAP_DELSECOND";
- } else {
- instance->peer->leap = LEAP_ADDSECOND;
- cp = "Set peer.leap to LEAP_ADDSECOND";
- }
- }
- }
- record_clock_stats(&(instance->peer->srcadr), cp);
-}
-
-
-
-/* Power on failure */
-
-static void
-oncore_msg_Sz(
- struct instance *instance,
- u_char *buf,
- size_t len
- )
-{
- 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;
-
- 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->ant_state = new_state;
- record_clock_stats(&instance->peer->srcadr, cp);
-}
-
-
-
-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_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
- )
-{
- char Msg[120], ew, ns;
- double xd, xm, xs, yd, ym, ys, hm, hft;
- int idx, idy, is, imx, imy;
- long lat, lon;
-
- record_clock_stats(&(instance->peer->srcadr), "Posn:");
- ew = 'E';
- lon = instance->ss_long;
- if (lon < 0) {
- ew = 'W';
- lon = -lon;
- }
-
- ns = 'N';
- lat = instance->ss_lat;
- if (lat < 0) {
- ns = 'S';
- lat = -lat;
- }
-
- hm = instance->ss_ht/100.;
- hft= hm/0.3048;
-
- xd = lat/3600000.; /* lat, lon in int msec arc, ht in cm. */
- yd = lon/3600000.;
- sprintf(Msg, "Lat = %c %11.7fdeg, Long = %c %11.7fdeg, Alt = %5.2fm (%5.2fft) GPS", ns, xd, ew, yd, hm, hft);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-
- idx = xd;
- idy = yd;
- imx = lat%3600000;
- 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);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-
- imx = xm;
- imy = ym;
- is = lat%60000;
- 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);
- record_clock_stats(&(instance->peer->srcadr), Msg);
-}
-
-
-
-/*
- * write message to Oncore.
- */
-
-static void
-oncore_sendmsg(
- int fd,
- u_char *ptr,
- size_t len
- )
-{
- u_char cs = 0;
-
- 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);
-}
-
-
-
-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));
- }
-}
-
-
-
-/*
- * if SHMEM active, every 15s, steal one 'tick' to get 2D or 3D posn.
- */
-
-static void
-oncore_shmem_get_3D(
- struct instance *instance
- )
-{
- 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));
- }
- }
-}
-
-
-
-/*
- * 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_ss(
- struct instance *instance
- )
-{
- char *cp, Msg[160];
- double lat, lon, ht;
-
-
- 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);
- 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
deleted file mode 100644
index 897221b..0000000
--- a/contrib/ntp/ntpd/refclock_palisade.c
+++ /dev/null
@@ -1,954 +0,0 @@
-/*
- * This software was developed by the Software and Component Technologies
- * group of Trimble Navigation, Ltd.
- *
- * Copyright (c) 1997, 1998, 1999, 2000 Trimble Navigation Ltd.
- * 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 Trimble Navigation, Ltd.
- * 4. The name of Trimble Navigation Ltd. may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TRIMBLE NAVIGATION LTD. ``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 TRIMBLE NAVIGATION LTD. 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.
- */
-
-/*
- * refclock_palisade - clock driver for the Trimble Palisade GPS
- * timing receiver
- *
- * For detailed information on this program, please refer to the html
- * Refclock 29 page accompanying the NTP distribution.
- *
- * for questions / bugs / comments, contact:
- * sven_dietrich@trimble.com
- *
- * Sven-Thorsten Dietrich
- * 645 North Mary Avenue
- * Post Office Box 3642
- * Sunnyvale, CA 94088-3642
- *
- * Version 2.45; July 14, 1999
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#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"
-/* Table to get from month to day of the year */
-const int days_of_year [12] = {
- 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
-};
-
-#ifdef DEBUG
-const char * Tracking_Status[15][15] = {
- { "Doing Fixes\0" }, { "Good 1SV\0" }, { "Approx. 1SV\0" },
- {"Need Time\0" }, { "Need INIT\0" }, { "PDOP too High\0" },
- { "Bad 1SV\0" }, { "0SV Usable\0" }, { "1SV Usable\0" },
- { "2SV Usable\0" }, { "3SV Usable\0" }, { "No Integrity\0" },
- { "Diff Corr\0" }, { "Overdet Clock\0" }, { "Invalid\0" } };
-#endif
-
-/*
- * Transfer vector
- */
-struct refclock refclock_palisade = {
- palisade_start, /* start up driver */
- palisade_shutdown, /* shut down driver */
- palisade_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-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
- */
-static int
-palisade_start (
-#ifdef PALISADE
- unit, peer
- )
- int unit;
- struct peer *peer;
-#else /* ANSI */
- int unit,
- struct peer *peer
- )
-#endif
-{
- struct palisade_unit *up;
- struct refclockproc *pp;
- int fd;
- char gpsdev[20];
-
- struct termios tio;
-#ifdef SYS_WINNT
- (void) sprintf(gpsdev, "COM%d:", unit);
-#else
- (void) sprintf(gpsdev, DEVICE, unit);
-#endif
- /*
- * Open serial port.
- */
-#if defined PALISADE
- fd = open(gpsdev, O_RDWR
-#ifdef O_NONBLOCK
- | O_NONBLOCK
-#endif
- );
-#else /* NTP 4.x */
- fd = refclock_open(gpsdev, SPEED232, LDISC_RAW);
-#endif
- if (fd <= 0) {
-#ifdef DEBUG
- printf("Palisade(%d) start: open %s failed\n", unit, gpsdev);
-#endif
- return 0;
- }
-
- msyslog(LOG_NOTICE, "Palisade(%d) fd: %d dev: %s", unit, fd,
- gpsdev);
-
-#if defined PALISADE
- tio.c_cflag = (CS8|CLOCAL|CREAD|PARENB|PARODD);
- tio.c_iflag = (IGNBRK);
- tio.c_oflag = (0);
- tio.c_lflag = (0);
-
- if (cfsetispeed(&tio, SPEED232) == -1) {
- msyslog(LOG_ERR,"Palisade(%d) cfsetispeed(fd, &tio): %m",unit);
-#ifdef DEBUG
- printf("Palisade(%d) cfsetispeed(fd, &tio)\n",unit);
-#endif
- return 0;
- }
- if (cfsetospeed(&tio, SPEED232) == -1) {
-#ifdef DEBUG
- printf("Palisade(%d) cfsetospeed(fd, &tio)\n",unit);
-#endif
- msyslog(LOG_ERR,"Palisade(%d) cfsetospeed(fd, &tio): %m",unit);
- return 0;
- }
-#else /* NTP 4.x */
- if (tcgetattr(fd, &tio) < 0) {
- msyslog(LOG_ERR,
- "Palisade(%d) tcgetattr(fd, &tio): %m",unit);
-#ifdef DEBUG
- printf("Palisade(%d) tcgetattr(fd, &tio)\n",unit);
-#endif
- return (0);
- }
-
- tio.c_cflag |= (PARENB|PARODD);
- tio.c_iflag &= ~ICRNL;
-#endif /* NTP 4.x */
-
- if (tcsetattr(fd, TCSANOW, &tio) == -1) {
- msyslog(LOG_ERR, "Palisade(%d) tcsetattr(fd, &tio): %m",unit);
-#ifdef DEBUG
- printf("Palisade(%d) tcsetattr(fd, &tio)\n",unit);
-#endif
- return 0;
- }
-
- /*
- * Allocate and initialize unit structure
- */
- up = (struct palisade_unit *) emalloc(sizeof(struct palisade_unit));
-
- if (!(up)) {
- msyslog(LOG_ERR, "Palisade(%d) emalloc: %m",unit);
-#ifdef DEBUG
- printf("Palisade(%d) emalloc\n",unit);
-#endif
- (void) close(fd);
- return (0);
- }
-
- 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;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
-#ifdef DEBUG
- printf("Palisade(%d) io_addclock\n",unit);
-#endif
- (void) close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- pp->unitptr = (caddr_t)up;
- pp->clockdesc = DESCRIPTION;
-
- peer->precision = PRECISION;
- peer->sstclktype = CTL_SST_TS_UHF;
- peer->minpoll = TRMB_MINPOLL;
- peer->maxpoll = TRMB_MAXPOLL;
- memcpy((char *)&pp->refid, REFID, 4);
-
- up->leap_status = 0;
- up->unit = (short) unit;
- up->rpt_status = TSIP_PARSED_EMPTY;
- up->rpt_cnt = 0;
-
- return 1;
-}
-
-
-/*
- * palisade_shutdown - shut down the clock
- */
-static void
-palisade_shutdown (
-#ifdef PALISADE
- unit, peer
- )
- int unit;
- struct peer *peer;
-#else /* ANSI */
- int unit,
- struct peer *peer
- )
-#endif
-{
- struct palisade_unit *up;
- struct refclockproc *pp;
- pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-
-/*
- * unpack_date - get day and year from date
- */
-int
-day_of_year (
-#ifdef PALISADE
- dt
- )
- char * dt;
-#else
- char * dt
- )
-#endif
-{
- int day, mon, year;
-
- mon = dt[1];
- /* Check month is inside array bounds */
- if ((mon < 1) || (mon > 12))
- return -1;
-
- day = dt[0] + days_of_year[mon - 1];
- year = getint((u_char *) (dt + 2));
-
- if ( !(year % 4) && ((year % 100) ||
- (!(year % 100) && !(year%400)))
- &&(mon > 2))
- day ++; /* leap year and March or later */
-
- return day;
-}
-
-
-/*
- * TSIP_decode - decode the TSIP data packets
- */
-int
-TSIP_decode (
-#ifdef PALISADE
- peer
- )
- struct peer *peer;
-#else
- struct peer *peer
- )
-#endif
-{
- int st;
- long secint;
- double secs;
- double secfrac;
- unsigned short event = 0;
-
- struct palisade_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
-
- /*
- * Check the time packet, decode its contents.
- * If the timecode has invalid length or is not in
- * proper format, declare bad format and exit.
- */
-
- if ((up->rpt_buf[0] == (char) 0x41) ||
- (up->rpt_buf[0] == (char) 0x46) ||
- (up->rpt_buf[0] == (char) 0x54) ||
- (up->rpt_buf[0] == (char) 0x4B) ||
- (up->rpt_buf[0] == (char) 0x6D)) {
-
- /* standard time packet - GPS time and GPS week number */
-#ifdef DEBUG
- printf("Palisade Port B packets detected. Connect to Port A\n");
-#endif
-
- return 0;
- }
-
- /*
- * 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
- */
- event = (unsigned short) (getint((u_char *) &mb(1)) & 0xffff);
- if (!((pp->sloppyclockflag & CLK_FLAG2) || event))
- /* Ignore Packet */
- return 0;
-
- switch (mb(0) & 0xff) {
- int GPS_UTC_Offset;
- case PACKET_8F0B:
-
- if (up->polled <= 0)
- return 0;
-
- if (up->rpt_cnt != LENCODE_8F0B) /* check length */
- break;
-
-#ifdef DEBUG
-if (debug > 1) {
- int ts;
- double lat, lon, alt;
- lat = getdbl((u_char *) &mb(42)) * R2D;
- lon = getdbl((u_char *) &mb(50)) * R2D;
- alt = getdbl((u_char *) &mb(58));
-
- printf("TSIP_decode: unit %d: Latitude: %03.4f Longitude: %03.4f Alt: %05.2f m\n",
- up->unit, lat,lon,alt);
- printf("TSIP_decode: unit %d: Sats:", up->unit);
- for (st = 66, ts = 0; st <= 73; st++) if (mb(st)) {
- if (mb(st) > 0) ts++;
- printf(" %02d", mb(st));
- }
- printf(" : Tracking %d\n", ts);
- }
-#endif
-
- GPS_UTC_Offset = getint((u_char *) &mb(16));
- if (GPS_UTC_Offset == 0) { /* Check UTC offset */
-#ifdef DEBUG
- printf("TSIP_decode: UTC Offset Unknown\n");
-#endif
- break;
- }
-
- secs = getdbl((u_char *) &mb(3));
- secint = (long) secs;
- secfrac = secs - secint; /* 0.0 <= secfrac < 1.0 */
-
- pp->nsec = (long) (secfrac * 1000000000);
-
- secint %= 86400; /* Only care about today */
- pp->hour = secint / 3600;
- secint %= 3600;
- pp->minute = secint / 60;
- secint %= 60;
- pp->second = secint % 60;
-
- if ((pp->day = day_of_year(&mb(11))) < 0) break;
-
- pp->year = getint((u_char *) &mb(13));
-
-#ifdef DEBUG
- 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->nsec, mb(12), mb(11), pp->year, GPS_UTC_Offset);
-#endif
- /* Only use this packet when no
- * 8F-AD's are being received
- */
-
- if (up->leap_status) {
- up->leap_status = 0;
- return 0;
- }
-
- return 2;
- break;
-
- case PACKET_NTP:
- /* Palisade-NTP Packet */
-
- if (up->rpt_cnt != LENCODE_NTP) /* check length */
- break;
-
- up->leap_status = mb(19);
-
- if (up->polled <= 0)
- return 0;
-
- /* Check Tracking Status */
- st = mb(18);
- if (st < 0 || st > 14) st = 14;
- if ((st >= 2 && st <= 7) || st == 11 || st == 12) {
-#ifdef DEBUG
- printf("TSIP_decode: Not Tracking Sats : %s\n",
- *Tracking_Status[st]);
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- up->polled = -1;
- return 0;
- break;
- }
-
- if (up->leap_status & PALISADE_LEAP_PENDING) {
- if (up->leap_status & PALISADE_UTC_TIME)
- pp->leap = LEAP_ADDSECOND;
- else
- pp->leap = LEAP_DELSECOND;
- }
- else if (up->leap_status)
- pp->leap = LEAP_NOWARNING;
-
- else { /* UTC flag is not set:
- * Receiver may have been reset, and lost
- * its UTC almanac data */
- pp->leap = LEAP_NOTINSYNC;
-#ifdef DEBUG
- printf("TSIP_decode: UTC Almanac unavailable: %d\n",
- mb(19));
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- up->polled = -1;
- return 0;
- }
-
- pp->nsec = (long) (getdbl((u_char *) &mb(3)) * 1000000);
-
- if ((pp->day = day_of_year(&mb(14))) < 0)
- break;
- pp->year = getint((u_char *) &mb(16));
- pp->hour = mb(11);
- pp->minute = mb(12);
- pp->second = mb(13);
-
-#ifdef DEBUG
- 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->nsec, mb(15), mb(14), pp->year,
- mb(19), *Tracking_Status[st]);
-#endif
- return 1;
- break;
-
- default:
- /* Ignore Packet */
- return 0;
- } /* switch */
- }/* if 8F packets */
-
- refclock_report(peer, CEVNT_BADREPLY);
- up->polled = -1;
-#ifdef DEBUG
- printf("TSIP_decode: unit %d: bad packet %02x-%02x event %d len %d\n",
- up->unit, up->rpt_buf[0] & 0xff, mb(0) & 0xff,
- event, up->rpt_cnt);
-#endif
- return 0;
-}
-
-/*
- * palisade__receive - receive data from the serial interface
- */
-
-static void
-palisade_receive (
-#ifdef PALISADE
- peer
- )
- struct peer * peer;
-#else /* ANSI */
- struct peer * peer
- )
-#endif
-{
- struct palisade_unit *up;
- struct refclockproc *pp;
-
- /*
- * Initialize pointers and read the timecode and timestamp.
- */
- pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
-
- if (! TSIP_decode(peer)) return;
-
- if (up->polled <= 0)
- return; /* no poll pending, already received or timeout */
-
- up->polled = 0; /* Poll reply received */
- pp->lencode = 0; /* clear time code */
-#ifdef DEBUG
- if (debug)
- 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->nsec);
-#endif
-
- /*
- * Process the sample
- * Generate timecode: YYYY DoY HH:MM:SS.microsec
- * report and process
- */
-
- (void) sprintf(pp->a_lastcode,"%4d %03d %02d:%02d:%02d.%06ld",
- pp->year,pp->day,pp->hour,pp->minute, pp->second,pp->nsec);
- pp->lencode = 24;
-
-#ifdef PALISADE
- pp->lasttime = current_time;
-#endif
- if (!refclock_process(pp
-#ifdef PALISADE
- , PALISADE_SAMPLES, PALISADE_SAMPLES * 3 / 5
-#endif
- )) {
- refclock_report(peer, CEVNT_BADTIME);
-
-#ifdef DEBUG
- printf("palisade_receive: unit %d: refclock_process failed!\n",
- up->unit);
-#endif
- return;
- }
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
-#ifdef DEBUG
- if (debug)
- 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,
- &pp->lastrec, &pp->lastrec, pp->leap
-#endif
- );
-}
-
-
-/*
- * palisade_poll - called by the transmit procedure
- *
- */
-static void
-palisade_poll (
-#ifdef PALISADE
- unit, peer
- )
- int unit;
- struct peer *peer;
-#else
- int unit,
- struct peer *peer
- )
-#endif
-{
- struct palisade_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
-
- pp->polls++;
- if (up->polled > 0) /* last reply never arrived or error */
- refclock_report(peer, CEVNT_TIMEOUT);
-
- up->polled = 2; /* synchronous packet + 1 event */
-
-#ifdef DEBUG
- if (debug)
- printf("palisade_poll: unit %d: polling %s\n", unit,
- (pp->sloppyclockflag & CLK_FLAG2) ?
- "synchronous packet" : "event");
-#endif
-
- 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 (
-#ifdef PALISADE
- rbufp
- )
- struct recvbuf *rbufp;
-#else /* ANSI */
- struct recvbuf *rbufp
- )
-#endif
-{
- /*
- * Initialize pointers and read the timecode and timestamp.
- */
- struct palisade_unit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- char * c, * d;
-
- peer = (struct peer *)rbufp->recv_srcclock;
- 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;
-
- while (c != d) {
-
- /* Build time packet */
- switch (up->rpt_status) {
-
- case TSIP_PARSED_DLE_1:
- switch (*c)
- {
- case 0:
- case DLE:
- case ETX:
- up->rpt_status = TSIP_PARSED_EMPTY;
- break;
-
- default:
- up->rpt_status = TSIP_PARSED_DATA;
- /* save packet ID */
- up->rpt_buf[0] = *c;
- break;
- }
- break;
-
- case TSIP_PARSED_DATA:
- if (*c == DLE)
- up->rpt_status = TSIP_PARSED_DLE_2;
- else
- mb(up->rpt_cnt++) = *c;
- break;
-
- case TSIP_PARSED_DLE_2:
- if (*c == DLE) {
- up->rpt_status = TSIP_PARSED_DATA;
- mb(up->rpt_cnt++) =
- *c;
- }
- else if (*c == ETX)
- up->rpt_status = TSIP_PARSED_FULL;
- else {
- /* error: start new report packet */
- up->rpt_status = TSIP_PARSED_DLE_1;
- up->rpt_buf[0] = *c;
- }
- break;
-
- case TSIP_PARSED_FULL:
- case TSIP_PARSED_EMPTY:
- default:
- if ( *c != DLE)
- up->rpt_status = TSIP_PARSED_EMPTY;
- else
- up->rpt_status = TSIP_PARSED_DLE_1;
- break;
- }
-
- c++;
-
- if (up->rpt_status == TSIP_PARSED_DLE_1) {
- up->rpt_cnt = 0;
- if (pp->sloppyclockflag & CLK_FLAG2)
- /* stamp it */
- get_systime(&pp->lastrec);
- }
- else if (up->rpt_status == TSIP_PARSED_EMPTY)
- up->rpt_cnt = 0;
-
- else if (up->rpt_cnt > BMAX)
- up->rpt_status =TSIP_PARSED_EMPTY;
-
- if (up->rpt_status == TSIP_PARSED_FULL)
- palisade_receive(peer);
-
- } /* while chars in buffer */
-}
-
-
-/*
- * Trigger the Palisade's event input, which is driven off the RTS
- *
- * Take a system time stamp to match the GPS time stamp.
- *
- */
-long
-HW_poll (
-#ifdef PALISADE
- pp /* pointer to unit structure */
- )
- struct refclockproc * pp; /* pointer to unit structure */
-#else
- struct refclockproc * pp /* pointer to unit structure */
- )
-#endif
-{
- int x; /* state before & after RTS set */
- struct palisade_unit *up;
-
- up = (struct palisade_unit *) pp->unitptr;
-
- /* read the current status, so we put things back right */
- if (ioctl(pp->io.fd, TIOCMGET, &x) < 0) {
-#ifdef DEBUG
- if (debug)
- printf("Palisade HW_poll: unit %d: GET %s\n", up->unit, strerror(errno));
-#endif
- msyslog(LOG_ERR, "Palisade(%d) HW_poll: ioctl(fd,GET): %m",
- up->unit);
- return -1;
- }
-
- x |= TIOCM_RTS; /* turn on RTS */
-
- /* Edge trigger */
- if (ioctl(pp->io.fd, TIOCMSET, &x) < 0) {
-#ifdef DEBUG
- if (debug)
- printf("Palisade HW_poll: unit %d: SET \n", up->unit);
-#endif
- msyslog(LOG_ERR,
- "Palisade(%d) HW_poll: ioctl(fd, SET, RTS_on): %m",
- up->unit);
- return -1;
- }
-
- x &= ~TIOCM_RTS; /* turn off RTS */
-
- /* poll timestamp */
- get_systime(&pp->lastrec);
-
- if (ioctl(pp->io.fd, TIOCMSET, &x) == -1) {
-#ifdef DEBUG
- if (debug)
- printf("Palisade HW_poll: unit %d: UNSET \n", up->unit);
-#endif
- msyslog(LOG_ERR,
- "Palisade(%d) HW_poll: ioctl(fd, UNSET, RTS_off): %m",
- up->unit);
- return -1;
- }
-
- return 0;
-}
-
-#if 0 /* unused */
-/*
- * this 'casts' a character array into a float
- */
-float
-getfloat (
-#ifdef PALISADE
- bp
- )
- u_char *bp;
-#else
- u_char *bp
- )
-#endif
-{
- float sval;
-#ifdef WORDS_BIGENDIAN
- ((char *) &sval)[0] = *bp++;
- ((char *) &sval)[1] = *bp++;
- ((char *) &sval)[2] = *bp++;
- ((char *) &sval)[3] = *bp++;
-#else
- ((char *) &sval)[3] = *bp++;
- ((char *) &sval)[2] = *bp++;
- ((char *) &sval)[1] = *bp++;
- ((char *) &sval)[0] = *bp;
-#endif /* ! XNTP_BIG_ENDIAN */
- return sval;
-}
-#endif
-
-/*
- * this 'casts' a character array into a double
- */
-double
-getdbl (
-#ifdef PALISADE
- bp
- )
- u_char *bp;
-#else
- u_char *bp
- )
-#endif
-{
- double dval;
-#ifdef WORDS_BIGENDIAN
- ((char *) &dval)[0] = *bp++;
- ((char *) &dval)[1] = *bp++;
- ((char *) &dval)[2] = *bp++;
- ((char *) &dval)[3] = *bp++;
- ((char *) &dval)[4] = *bp++;
- ((char *) &dval)[5] = *bp++;
- ((char *) &dval)[6] = *bp++;
- ((char *) &dval)[7] = *bp;
-#else
- ((char *) &dval)[7] = *bp++;
- ((char *) &dval)[6] = *bp++;
- ((char *) &dval)[5] = *bp++;
- ((char *) &dval)[4] = *bp++;
- ((char *) &dval)[3] = *bp++;
- ((char *) &dval)[2] = *bp++;
- ((char *) &dval)[1] = *bp++;
- ((char *) &dval)[0] = *bp;
-#endif /* ! XNTP_BIG_ENDIAN */
- return dval;
-}
-
-/*
- * cast a 16 bit character array into a short (16 bit) int
- */
-short
-getint (
-#ifdef PALISADE
- bp
- )
- u_char *bp;
-#else
- u_char *bp
- )
-#endif
-{
-return (short) (bp[1] + (bp[0] << 8));
-}
-
-#else
-int refclock_palisade_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_palisade.h b/contrib/ntp/ntpd/refclock_palisade.h
deleted file mode 100644
index 7e1ed49..0000000
--- a/contrib/ntp/ntpd/refclock_palisade.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * This software was developed by the Software and Component Technologies
- * group of Trimble Navigation, Ltd.
- *
- * Copyright (c) 1997, 1998, 1999, 2000 Trimble Navigation Ltd.
- * 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 Trimble Navigation, Ltd.
- * 4. The name of Trimble Navigation Ltd. may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TRIMBLE NAVIGATION LTD. ``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 TRIMBLE NAVIGATION LTD. 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.
- */
-
-/*
- * refclock_palisade - clock driver for the Trimble Palisade GPS
- * timing receiver
- *
- * For detailed information on this program, please refer to the html
- * Refclock 29 page accompanying the NTP distribution.
- *
- * for questions / bugs / comments, contact:
- * sven_dietrich@trimble.com
- *
- * Sven-Thorsten Dietrich
- * 645 North Mary Avenue
- * Post Office Box 3642
- * Sunnyvale, CA 94088-3642
- *
- */
-
-#ifndef _REFCLOCK_PALISADE_H
-#define _REFCLOCK_PALISADE_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if defined HAVE_SYS_MODEM_H
-#include <sys/modem.h>
-#define TIOCMSET MCSETA
-#define TIOCMGET MCGETA
-#define TIOCM_RTS MRTS
-#endif
-
-#ifdef HAVE_TERMIOS_H
-# ifdef TERMIOS_NEEDS__SVID3
-# define _SVID3
-# endif
-# include <termios.h>
-# ifdef TERMIOS_NEEDS__SVID3
-# undef _SVID3
-# endif
-#endif
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-/*
- * GPS Definitions
- */
-#define DESCRIPTION "Trimble Palisade GPS" /* Long name */
-#define PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS\0" /* reference ID */
-#define TRMB_MINPOLL 4 /* 16 seconds */
-#define TRMB_MAXPOLL 5 /* 32 seconds */
-
-/*
- * I/O Definitions
- */
-#define DEVICE "/dev/palisade%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-
-/*
- * TSIP Report Definitions
- */
-#define LENCODE_8F0B 74 /* Length of TSIP 8F-0B Packet & header */
-#define LENCODE_NTP 22 /* Length of Palisade NTP Packet */
-
-/* Allowed Sub-Packet ID's */
-#define PACKET_8F0B 0x0B
-#define PACKET_NTP 0xAD
-
-#define DLE 0x10
-#define ETX 0x03
-
-/* parse states */
-#define TSIP_PARSED_EMPTY 0
-#define TSIP_PARSED_FULL 1
-#define TSIP_PARSED_DLE_1 2
-#define TSIP_PARSED_DATA 3
-#define TSIP_PARSED_DLE_2 4
-
-/*
- * Leap-Insert and Leap-Delete are encoded as follows:
- * PALISADE_UTC_TIME set and PALISADE_LEAP_PENDING set: INSERT leap
- */
-
-#define PALISADE_LEAP_INPROGRESS 0x08 /* This is the leap flag */
-#define PALISADE_LEAP_WARNING 0x04 /* GPS Leap Warning (see ICD-200) */
-#define PALISADE_LEAP_PENDING 0x02 /* Leap Pending (24 hours) */
-#define PALISADE_UTC_TIME 0x01 /* UTC time available */
-
-#define mb(_X_) (up->rpt_buf[(_X_ + 1)]) /* shortcut for buffer access */
-
-/* Conversion Definitions */
-#define GPS_PI (3.1415926535898)
-#define R2D (180.0/GPS_PI)
-
-/*
- * Palisade unit control structure.
- */
-struct palisade_unit {
- short unit; /* NTP refclock unit number */
- int polled; /* flag to detect noreplies */
- char leap_status; /* leap second flag */
- 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 */
-};
-
-/*
- * Function prototypes
- */
-
-static int palisade_start P((int, struct peer *));
-static void palisade_shutdown P((int, struct peer *));
-static void palisade_receive P((struct peer *));
-static void palisade_poll P((int, struct peer *));
-static void palisade_io P((struct recvbuf *));
-int palisade_configure P((int, struct peer *));
-int TSIP_decode P((struct peer *));
-long HW_poll P((struct refclockproc *));
-float getfloat P((u_char *));
-double getdbl P((u_char *));
-short getint P((u_char *));
-
-#endif /* PALISADE_H */
diff --git a/contrib/ntp/ntpd/refclock_parse.c b/contrib/ntp/ntpd/refclock_parse.c
deleted file mode 100644
index 52fadaa..0000000
--- a/contrib/ntp/ntpd/refclock_parse.c
+++ /dev/null
@@ -1,5386 +0,0 @@
-/*
- * /src/NTP/ntp-4/ntpd/refclock_parse.c,v 4.36 1999/11/28 17:18:20 kardel RELEASE_19991128_A
- *
- * refclock_parse.c,v 4.36 1999/11/28 17:18:20 kardel RELEASE_19991128_A
- *
- * generic reference clock driver for receivers
- *
- * optionally make use of a STREAMS module for input processing where
- * available and configured. Currently the STREAMS module
- * is only available for Suns running SunOS 4.x and SunOS5.x
- *
- * the STREAMS module is not required for operation and may be omitted
- * at the cost of reduced accuracy. As new kernel interfaces emerger this
- * restriction may be lifted in future.
- *
- * Copyright (c) 1995-1999 by Frank Kardel <kardel@acm.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * This software may not be sold for profit without a written consent
- * from the author.
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PARSE)
-
-/*
- * This driver currently provides the support for
- * - Meinberg receiver DCF77 PZF 535 (TCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 535 (OCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 509 (DCF)
- * - Meinberg receiver DCF77 AM receivers (e.g. C51) (DCF)
- * - IGEL CLOCK (DCF)
- * - ELV DCF7000 (DCF)
- * - Schmid clock (DCF)
- * - Conrad DCF77 receiver module (DCF)
- * - FAU DCF77 NTP receiver (TimeBrick) (DCF)
- *
- * - Meinberg GPS166/GPS167 (GPS)
- * - Trimble (TSIP and TAIP protocol) (GPS)
- *
- * - RCC8000 MSF Receiver (MSF)
- * - WHARTON 400A Series clock (DCF)
- * - VARITEXT clock (MSF)
- */
-
-/*
- * Meinberg receivers are usually connected via a
- * 9600 baud serial line
- *
- * The Meinberg GPS receivers also have a special NTP time stamp
- * format. The firmware release is Uni-Erlangen.
- *
- * Meinberg generic receiver setup:
- * output time code every second
- * Baud rate 9600 7E2S
- *
- * Meinberg GPS16x setup:
- * output time code every second
- * Baudrate 19200 8N1
- *
- * This software supports the standard data formats used
- * in Meinberg receivers.
- *
- * Special software versions are only sensible for the
- * GPS 16x family of receivers.
- *
- * Meinberg can be reached via: http://www.meinberg.de/
- */
-
-#include "ntpd.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h" /* includes <sys/time.h> */
-#include "ntp_control.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#ifndef TM_IN_SYS_TIME
-# include <time.h>
-#endif
-
-#if !defined(STREAM) && !defined(HAVE_SYSV_TTYS) && !defined(HAVE_BSD_TTYS) && !defined(HAVE_TERMIOS)
-# include "Bletch: Define one of {STREAM,HAVE_SYSV_TTYS,HAVE_TERMIOS}"
-#endif
-
-#ifdef STREAM
-# include <sys/stream.h>
-# include <sys/stropts.h>
-#endif
-
-#ifdef HAVE_TERMIOS
-# define TTY_GETATTR(_FD_, _ARG_) tcgetattr((_FD_), (_ARG_))
-# define TTY_SETATTR(_FD_, _ARG_) tcsetattr((_FD_), TCSANOW, (_ARG_))
-# undef HAVE_SYSV_TTYS
-#endif
-
-#ifdef HAVE_SYSV_TTYS
-# define TTY_GETATTR(_FD_, _ARG_) ioctl((_FD_), TCGETA, (_ARG_))
-# define TTY_SETATTR(_FD_, _ARG_) ioctl((_FD_), TCSETAW, (_ARG_))
-#endif
-
-#ifdef HAVE_BSD_TTYS
-/* #error CURRENTLY NO BSD TTY SUPPORT */
-# include "Bletch: BSD TTY not currently supported"
-#endif
-
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-
-#ifdef PPS
-#ifdef HAVE_SYS_PPSCLOCK_H
-#include <sys/ppsclock.h>
-#endif
-#ifdef HAVE_TIO_SERIAL_STUFF
-#include <linux/serial.h>
-#endif
-#endif
-
-#include "ntp_io.h"
-#include "ntp_stdlib.h"
-
-#include "parse.h"
-#include "mbg_gps166.h"
-#include "trimble.h"
-#include "binio.h"
-#include "ascii.h"
-#include "ieee754io.h"
-
-static char rcsid[]="refclock_parse.c,v 4.36 1999/11/28 17:18:20 kardel RELEASE_19991128_A";
-
-/**===========================================================================
- ** external interface to ntp mechanism
- **/
-
-static void parse_init P((void));
-static int parse_start P((int, struct peer *));
-static void parse_shutdown P((int, struct peer *));
-static void parse_poll P((int, struct peer *));
-static void parse_control P((int, struct refclockstat *, struct refclockstat *, struct peer *));
-
-#define parse_buginfo noentry
-
-struct refclock refclock_parse = {
- parse_start,
- parse_shutdown,
- parse_poll,
- parse_control,
- parse_init,
- parse_buginfo,
- NOFLAGS
-};
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* maximum number of "PARSE" units permitted */
-#define PARSEDEVICE "/dev/refclock-%d" /* device to open %d is unit number */
-
-#undef ABS
-#define ABS(_X_) (((_X_) < 0) ? -(_X_) : (_X_))
-
-/**===========================================================================
- ** function vector for dynamically binding io handling mechanism
- **/
-
-struct parseunit; /* to keep inquiring minds happy */
-
-typedef struct bind
-{
- const char *bd_description; /* name of type of binding */
- int (*bd_init) P((struct parseunit *)); /* initialize */
- void (*bd_end) P((struct parseunit *)); /* end */
- int (*bd_setcs) P((struct parseunit *, parsectl_t *)); /* set character size */
- int (*bd_disable) P((struct parseunit *)); /* disable */
- int (*bd_enable) P((struct parseunit *)); /* enable */
- int (*bd_getfmt) P((struct parseunit *, parsectl_t *)); /* get format */
- int (*bd_setfmt) P((struct parseunit *, parsectl_t *)); /* setfmt */
- int (*bd_timecode) P((struct parseunit *, parsectl_t *)); /* get time code */
- void (*bd_receive) P((struct recvbuf *)); /* receive operation */
- int (*bd_io_input) P((struct recvbuf *)); /* input operation */
-} bind_t;
-
-#define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)
-#define PARSE_SETCS(_X_, _CS_) (*(_X_)->binding->bd_setcs)(_X_, _CS_)
-#define PARSE_ENABLE(_X_) (*(_X_)->binding->bd_enable)(_X_)
-#define PARSE_DISABLE(_X_) (*(_X_)->binding->bd_disable)(_X_)
-#define PARSE_GETFMT(_X_, _DCT_) (*(_X_)->binding->bd_getfmt)(_X_, _DCT_)
-#define PARSE_SETFMT(_X_, _DCT_) (*(_X_)->binding->bd_setfmt)(_X_, _DCT_)
-#define PARSE_GETTIMECODE(_X_, _DCT_) (*(_X_)->binding->bd_timecode)(_X_, _DCT_)
-
-/*
- * io modes
- */
-#define PARSE_F_PPSPPS 0x0001 /* use loopfilter PPS code (CIOGETEV) */
-#define PARSE_F_PPSONSECOND 0x0002 /* PPS pulses are on second */
-
-
-/**===========================================================================
- ** error message regression handling
- **
- ** there are quite a few errors that can occur in rapid succession such as
- ** noisy input data or no data at all. in order to reduce the amount of
- ** syslog messages in such case, we are using a backoff algorithm. We limit
- ** the number of error messages of a certain class to 1 per time unit. if a
- ** configurable number of messages is displayed that way, we move on to the
- ** next time unit / count for that class. a count of messages that have been
- ** suppressed is held and displayed whenever a corresponding message is
- ** displayed. the time units for a message class will also be displayed.
- ** whenever an error condition clears we reset the error message state,
- ** thus we would still generate much output on pathological conditions
- ** where the system oscillates between OK and NOT OK states. coping
- ** with that condition is currently considered too complicated.
- **/
-
-#define ERR_ALL (unsigned)~0 /* "all" errors */
-#define ERR_BADDATA (unsigned)0 /* unusable input data/conversion errors */
-#define ERR_NODATA (unsigned)1 /* no input data */
-#define ERR_BADIO (unsigned)2 /* read/write/select errors */
-#define ERR_BADSTATUS (unsigned)3 /* unsync states */
-#define ERR_BADEVENT (unsigned)4 /* non nominal events */
-#define ERR_INTERNAL (unsigned)5 /* internal error */
-#define ERR_CNT (unsigned)(ERR_INTERNAL+1)
-
-#define ERR(_X_) if (list_err(parse, (_X_)))
-
-struct errorregression
-{
- u_long err_count; /* number of repititions per class */
- u_long err_delay; /* minimum delay between messages */
-};
-
-static struct errorregression
-err_baddata[] = /* error messages for bad input data */
-{
- { 1, 0 }, /* output first message immediately */
- { 5, 60 }, /* output next five messages in 60 second intervals */
- { 3, 3600 }, /* output next 3 messages in hour intervals */
- { 0, 12*3600 } /* repeat messages only every 12 hours */
-};
-
-static struct errorregression
-err_nodata[] = /* error messages for missing input data */
-{
- { 1, 0 }, /* output first message immediately */
- { 5, 60 }, /* output next five messages in 60 second intervals */
- { 3, 3600 }, /* output next 3 messages in hour intervals */
- { 0, 12*3600 } /* repeat messages only every 12 hours */
-};
-
-static struct errorregression
-err_badstatus[] = /* unsynchronized state messages */
-{
- { 1, 0 }, /* output first message immediately */
- { 5, 60 }, /* output next five messages in 60 second intervals */
- { 3, 3600 }, /* output next 3 messages in hour intervals */
- { 0, 12*3600 } /* repeat messages only every 12 hours */
-};
-
-static struct errorregression
-err_badio[] = /* io failures (bad reads, selects, ...) */
-{
- { 1, 0 }, /* output first message immediately */
- { 5, 60 }, /* output next five messages in 60 second intervals */
- { 5, 3600 }, /* output next 3 messages in hour intervals */
- { 0, 12*3600 } /* repeat messages only every 12 hours */
-};
-
-static struct errorregression
-err_badevent[] = /* non nominal events */
-{
- { 20, 0 }, /* output first message immediately */
- { 6, 60 }, /* output next five messages in 60 second intervals */
- { 5, 3600 }, /* output next 3 messages in hour intervals */
- { 0, 12*3600 } /* repeat messages only every 12 hours */
-};
-
-static struct errorregression
-err_internal[] = /* really bad things - basically coding/OS errors */
-{
- { 0, 0 }, /* output all messages immediately */
-};
-
-static struct errorregression *
-err_tbl[] =
-{
- err_baddata,
- err_nodata,
- err_badio,
- err_badstatus,
- err_badevent,
- err_internal
-};
-
-struct errorinfo
-{
- u_long err_started; /* begin time (ntp) of error condition */
- u_long err_last; /* last time (ntp) error occurred */
- u_long err_cnt; /* number of error repititions */
- u_long err_suppressed; /* number of suppressed messages */
- struct errorregression *err_stage; /* current error stage */
-};
-
-/**===========================================================================
- ** refclock instance data
- **/
-
-struct parseunit
-{
- /*
- * NTP management
- */
- struct peer *peer; /* backlink to peer structure - refclock inactive if 0 */
- struct refclockproc *generic; /* backlink to refclockproc structure */
-
- /*
- * PARSE io
- */
- bind_t *binding; /* io handling binding */
-
- /*
- * parse state
- */
- parse_t parseio; /* io handling structure (user level parsing) */
-
- /*
- * type specific parameters
- */
- struct parse_clockinfo *parse_type; /* link to clock description */
-
- /*
- * clock state handling/reporting
- */
- u_char flags; /* flags (leap_control) */
- u_long lastchange; /* time (ntp) when last state change accured */
- u_long statetime[CEVNT_MAX+1]; /* accumulated time of clock states */
- u_long pollneeddata; /* current_time(!=0) for receive sample expected in PPS mode */
- u_short lastformat; /* last format used */
- u_long lastsync; /* time (ntp) when clock was last seen fully synchronized */
- u_long lastmissed; /* time (ntp) when poll didn't get data (powerup heuristic) */
- u_long ppsserial; /* magic cookie for ppsclock serials (avoids stale ppsclock data) */
- parsetime_t time; /* last (parse module) data */
- void *localdata; /* optional local, receiver-specific data */
- unsigned long localstate; /* private local state */
- struct errorinfo errors[ERR_CNT]; /* error state table for suppressing excessive error messages */
- struct ctl_var *kv; /* additional pseudo variables */
- u_long laststatistic; /* time when staticstics where output */
-};
-
-
-/**===========================================================================
- ** Clockinfo section all parameter for specific clock types
- ** includes NTP parameters, TTY parameters and IO handling parameters
- **/
-
-static void poll_dpoll P((struct parseunit *));
-static void poll_poll P((struct peer *));
-static int poll_init P((struct parseunit *));
-
-typedef struct poll_info
-{
- u_long rate; /* poll rate - once every "rate" seconds - 0 off */
- const char *string; /* string to send for polling */
- u_long count; /* number of characters in string */
-} poll_info_t;
-
-#define NO_CL_FLAGS 0
-#define NO_POLL 0
-#define NO_INIT 0
-#define NO_END 0
-#define NO_EVENT 0
-#define NO_DATA 0
-#define NO_MESSAGE 0
-#define NO_PPSDELAY 0
-
-#define DCF_ID "DCF" /* generic DCF */
-#define DCF_A_ID "DCFa" /* AM demodulation */
-#define DCF_P_ID "DCFp" /* psuedo random phase shift */
-#define GPS_ID "GPS" /* GPS receiver */
-
-#define NOCLOCK_ROOTDELAY 0.0
-#define NOCLOCK_BASEDELAY 0.0
-#define NOCLOCK_DESCRIPTION 0
-#define NOCLOCK_MAXUNSYNC 0
-#define NOCLOCK_CFLAG 0
-#define NOCLOCK_IFLAG 0
-#define NOCLOCK_OFLAG 0
-#define NOCLOCK_LFLAG 0
-#define NOCLOCK_ID "TILT"
-#define NOCLOCK_POLL NO_POLL
-#define NOCLOCK_INIT NO_INIT
-#define NOCLOCK_END NO_END
-#define NOCLOCK_DATA NO_DATA
-#define NOCLOCK_FORMAT ""
-#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
-#define NOCLOCK_SAMPLES 0
-#define NOCLOCK_KEEP 0
-
-#define DCF_TYPE CTL_SST_TS_LF
-#define GPS_TYPE CTL_SST_TS_UHF
-
-/*
- * receiver specific constants
- */
-#define MBG_SPEED (B9600)
-#define MBG_CFLAG (CS7|PARENB|CREAD|CLOCAL|HUPCL)
-#define MBG_IFLAG (IGNBRK|IGNPAR|ISTRIP)
-#define MBG_OFLAG 0
-#define MBG_LFLAG 0
-#define MBG_FLAGS PARSE_F_PPSONSECOND
-
-/*
- * Meinberg DCF77 receivers
- */
-#define DCFUA31_ROOTDELAY 0.0 /* 0 */
-#define DCFUA31_BASEDELAY 0.010 /* 10.7421875ms: 10 ms (+/- 3 ms) */
-#define DCFUA31_DESCRIPTION "Meinberg DCF77 C51 or compatible"
-#define DCFUA31_MAXUNSYNC 60*30 /* only trust clock for 1/2 hour */
-#define DCFUA31_SPEED MBG_SPEED
-#define DCFUA31_CFLAG MBG_CFLAG
-#define DCFUA31_IFLAG MBG_IFLAG
-#define DCFUA31_OFLAG MBG_OFLAG
-#define DCFUA31_LFLAG MBG_LFLAG
-#define DCFUA31_SAMPLES 5
-#define DCFUA31_KEEP 3
-#define DCFUA31_FORMAT "Meinberg Standard"
-
-/*
- * Meinberg DCF PZF535/TCXO (FM/PZF) receiver
- */
-#define DCFPZF535_ROOTDELAY 0.0
-#define DCFPZF535_BASEDELAY 0.001968 /* 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define DCFPZF535_DESCRIPTION "Meinberg DCF PZF 535/509 / TCXO"
-#define DCFPZF535_MAXUNSYNC 60*60*12 /* only trust clock for 12 hours
- * @ 5e-8df/f we have accumulated
- * at most 2.16 ms (thus we move to
- * NTP synchronisation */
-#define DCFPZF535_SPEED MBG_SPEED
-#define DCFPZF535_CFLAG MBG_CFLAG
-#define DCFPZF535_IFLAG MBG_IFLAG
-#define DCFPZF535_OFLAG MBG_OFLAG
-#define DCFPZF535_LFLAG MBG_LFLAG
-#define DCFPZF535_SAMPLES 5
-#define DCFPZF535_KEEP 3
-#define DCFPZF535_FORMAT "Meinberg Standard"
-
-/*
- * Meinberg DCF PZF535/OCXO receiver
- */
-#define DCFPZF535OCXO_ROOTDELAY 0.0
-#define DCFPZF535OCXO_BASEDELAY 0.001968 /* 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define DCFPZF535OCXO_DESCRIPTION "Meinberg DCF PZF 535/509 / OCXO"
-#define DCFPZF535OCXO_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
- * @ 5e-9df/f we have accumulated
- * at most an error of 1.73 ms
- * (thus we move to NTP synchronisation) */
-#define DCFPZF535OCXO_SPEED MBG_SPEED
-#define DCFPZF535OCXO_CFLAG MBG_CFLAG
-#define DCFPZF535OCXO_IFLAG MBG_IFLAG
-#define DCFPZF535OCXO_OFLAG MBG_OFLAG
-#define DCFPZF535OCXO_LFLAG MBG_LFLAG
-#define DCFPZF535OCXO_SAMPLES 5
-#define DCFPZF535OCXO_KEEP 3
-#define DCFPZF535OCXO_FORMAT "Meinberg Standard"
-
-/*
- * Meinberg GPS16X receiver
- */
-static void gps16x_message P((struct parseunit *, parsetime_t *));
-static int gps16x_poll_init P((struct parseunit *));
-
-#define GPS16X_ROOTDELAY 0.0 /* nothing here */
-#define GPS16X_BASEDELAY 0.001968 /* XXX to be fixed ! 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define GPS16X_DESCRIPTION "Meinberg GPS16x receiver"
-#define GPS16X_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
- * @ 5e-9df/f we have accumulated
- * at most an error of 1.73 ms
- * (thus we move to NTP synchronisation) */
-#define GPS16X_SPEED B19200
-#define GPS16X_CFLAG (CS8|CREAD|CLOCAL|HUPCL)
-#define GPS16X_IFLAG (IGNBRK|IGNPAR)
-#define GPS16X_OFLAG MBG_OFLAG
-#define GPS16X_LFLAG MBG_LFLAG
-#define GPS16X_POLLRATE 6
-#define GPS16X_POLLCMD ""
-#define GPS16X_CMDSIZE 0
-
-static poll_info_t gps16x_pollinfo = { GPS16X_POLLRATE, GPS16X_POLLCMD, GPS16X_CMDSIZE };
-
-#define GPS16X_INIT gps16x_poll_init
-#define GPS16X_POLL 0
-#define GPS16X_END 0
-#define GPS16X_DATA ((void *)(&gps16x_pollinfo))
-#define GPS16X_MESSAGE gps16x_message
-#define GPS16X_ID GPS_ID
-#define GPS16X_FORMAT "Meinberg GPS Extended"
-#define GPS16X_SAMPLES 5
-#define GPS16X_KEEP 3
-
-/*
- * ELV DCF7000 Wallclock-Receiver/Switching Clock (Kit)
- *
- * This is really not the hottest clock - but before you have nothing ...
- */
-#define DCF7000_ROOTDELAY 0.0 /* 0 */
-#define DCF7000_BASEDELAY 0.405 /* slow blow */
-#define DCF7000_DESCRIPTION "ELV DCF7000"
-#define DCF7000_MAXUNSYNC (60*5) /* sorry - but it just was not build as a clock */
-#define DCF7000_SPEED (B9600)
-#define DCF7000_CFLAG (CS8|CREAD|PARENB|PARODD|CLOCAL|HUPCL)
-#define DCF7000_IFLAG (IGNBRK)
-#define DCF7000_OFLAG 0
-#define DCF7000_LFLAG 0
-#define DCF7000_SAMPLES 5
-#define DCF7000_KEEP 3
-#define DCF7000_FORMAT "ELV DCF7000"
-
-/*
- * Schmid DCF Receiver Kit
- *
- * When the WSDCF clock is operating optimally we want the primary clock
- * distance to come out at 300 ms. Thus, peer.distance in the WSDCF peer
- * structure is set to 290 ms and we compute delays which are at least
- * 10 ms long. The following are 290 ms and 10 ms expressed in u_fp format
- */
-#define WS_POLLRATE 1 /* every second - watch interdependency with poll routine */
-#define WS_POLLCMD "\163"
-#define WS_CMDSIZE 1
-
-static poll_info_t wsdcf_pollinfo = { WS_POLLRATE, WS_POLLCMD, WS_CMDSIZE };
-
-#define WSDCF_INIT poll_init
-#define WSDCF_POLL poll_dpoll
-#define WSDCF_END 0
-#define WSDCF_DATA ((void *)(&wsdcf_pollinfo))
-#define WSDCF_ROOTDELAY 0.0 /* 0 */
-#define WSDCF_BASEDELAY 0.010 /* ~ 10ms */
-#define WSDCF_DESCRIPTION "WS/DCF Receiver"
-#define WSDCF_FORMAT "Schmid"
-#define WSDCF_MAXUNSYNC (60*60) /* assume this beast hold at 1 h better than 2 ms XXX-must verify */
-#define WSDCF_SPEED (B1200)
-#define WSDCF_CFLAG (CS8|CREAD|CLOCAL)
-#define WSDCF_IFLAG 0
-#define WSDCF_OFLAG 0
-#define WSDCF_LFLAG 0
-#define WSDCF_SAMPLES 5
-#define WSDCF_KEEP 3
-
-/*
- * RAW DCF77 - input of DCF marks via RS232 - many variants
- */
-#define RAWDCF_FLAGS 0
-#define RAWDCF_ROOTDELAY 0.0 /* 0 */
-#define RAWDCF_BASEDELAY 0.258
-#define RAWDCF_FORMAT "RAW DCF77 Timecode"
-#define RAWDCF_MAXUNSYNC (0) /* sorry - its a true receiver - no signal - no time */
-#define RAWDCF_SPEED (B50)
-#ifdef NO_PARENB_IGNPAR /* Was: defined(SYS_IRIX4) || defined(SYS_IRIX5) */
-/* somehow doesn't grok PARENB & IGNPAR (mj) */
-# define RAWDCF_CFLAG (CS8|CREAD|CLOCAL)
-#else
-# define RAWDCF_CFLAG (CS8|CREAD|CLOCAL|PARENB)
-#endif
-#ifdef RAWDCF_NO_IGNPAR /* Was: defined(SYS_LINUX) && defined(CLOCK_RAWDCF) */
-# define RAWDCF_IFLAG 0
-#else
-# define RAWDCF_IFLAG (IGNPAR)
-#endif
-#define RAWDCF_OFLAG 0
-#define RAWDCF_LFLAG 0
-#define RAWDCF_SAMPLES 20
-#define RAWDCF_KEEP 12
-#define RAWDCF_INIT 0
-
-/*
- * RAW DCF variants
- */
-/*
- * Conrad receiver
- *
- * simplest (cheapest) DCF clock - e. g. DCF77 receiver by Conrad
- * (~40DM - roughly $30 ) followed by a level converter for RS232
- */
-#define CONRAD_BASEDELAY 0.292 /* Conrad receiver @ 50 Baud on a Sun */
-#define CONRAD_DESCRIPTION "RAW DCF77 CODE (Conrad DCF77 receiver module)"
-
-/*
- * TimeBrick receiver
- */
-#define TIMEBRICK_BASEDELAY 0.210 /* TimeBrick @ 50 Baud on a Sun */
-#define TIMEBRICK_DESCRIPTION "RAW DCF77 CODE (TimeBrick)"
-
-/*
- * IGEL:clock receiver
- */
-#define IGELCLOCK_BASEDELAY 0.258 /* IGEL:clock receiver */
-#define IGELCLOCK_DESCRIPTION "RAW DCF77 CODE (IGEL:clock)"
-#define IGELCLOCK_SPEED (B1200)
-#define IGELCLOCK_CFLAG (CS8|CREAD|HUPCL|CLOCAL)
-
-/*
- * RAWDCF receivers that need to be powered from DTR
- * (like Expert mouse clock)
- */
-static int rawdcf_init_1 P((struct parseunit *));
-#define RAWDCFDTRSET_DESCRIPTION "RAW DCF77 CODE (DTR SET/RTS CLR)"
-#define RAWDCFDTRSET_INIT rawdcf_init_1
-
-/*
- * RAWDCF receivers that need to be powered from
- * DTR CLR and RTS SET
- */
-static int rawdcf_init_2 P((struct parseunit *));
-#define RAWDCFDTRCLRRTSSET_DESCRIPTION "RAW DCF77 CODE (DTR CLR/RTS SET)"
-#define RAWDCFDTRCLRRTSSET_INIT rawdcf_init_2
-
-/*
- * Trimble GPS receivers (TAIP and TSIP protocols)
- */
-#ifndef TRIM_POLLRATE
-#define TRIM_POLLRATE 0 /* only true direct polling */
-#endif
-
-#define TRIM_TAIPPOLLCMD ">SRM;FR_FLAG=F;EC_FLAG=F<>QTM<"
-#define TRIM_TAIPCMDSIZE (sizeof(TRIM_TAIPPOLLCMD)-1)
-
-static poll_info_t trimbletaip_pollinfo = { TRIM_POLLRATE, TRIM_TAIPPOLLCMD, TRIM_TAIPCMDSIZE };
-static int trimbletaip_init P((struct parseunit *));
-static void trimbletaip_event P((struct parseunit *, int));
-
-/* query time & UTC correction data */
-static char tsipquery[] = { DLE, 0x21, DLE, ETX, DLE, 0x2F, DLE, ETX };
-
-static poll_info_t trimbletsip_pollinfo = { TRIM_POLLRATE, tsipquery, sizeof(tsipquery) };
-static int trimbletsip_init P((struct parseunit *));
-static void trimbletsip_end P((struct parseunit *));
-static void trimbletsip_message P((struct parseunit *, parsetime_t *));
-static void trimbletsip_event P((struct parseunit *, int));
-
-#define TRIMBLETSIP_IDLE_TIME (300) /* 5 minutes silence at most */
-
-#define TRIMBLETAIP_SPEED (B4800)
-#define TRIMBLETAIP_CFLAG (CS8|CREAD|CLOCAL)
-#define TRIMBLETAIP_IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
-#define TRIMBLETAIP_OFLAG (OPOST|ONLCR)
-#define TRIMBLETAIP_LFLAG (0)
-
-#define TRIMBLETSIP_SPEED (B9600)
-#define TRIMBLETSIP_CFLAG (CS8|CLOCAL|CREAD|PARENB|PARODD)
-#define TRIMBLETSIP_IFLAG (IGNBRK)
-#define TRIMBLETSIP_OFLAG (0)
-#define TRIMBLETSIP_LFLAG (ICANON)
-
-#define TRIMBLETSIP_SAMPLES 5
-#define TRIMBLETSIP_KEEP 3
-#define TRIMBLETAIP_SAMPLES 5
-#define TRIMBLETAIP_KEEP 3
-
-#define TRIMBLETAIP_FLAGS (PARSE_F_PPSONSECOND)
-#define TRIMBLETSIP_FLAGS (TRIMBLETAIP_FLAGS)
-
-#define TRIMBLETAIP_POLL poll_dpoll
-#define TRIMBLETSIP_POLL poll_dpoll
-
-#define TRIMBLETAIP_INIT trimbletaip_init
-#define TRIMBLETSIP_INIT trimbletsip_init
-
-#define TRIMBLETAIP_EVENT trimbletaip_event
-
-#define TRIMBLETSIP_EVENT trimbletsip_event
-#define TRIMBLETSIP_MESSAGE trimbletsip_message
-
-#define TRIMBLETAIP_END 0
-#define TRIMBLETSIP_END trimbletsip_end
-
-#define TRIMBLETAIP_DATA ((void *)(&trimbletaip_pollinfo))
-#define TRIMBLETSIP_DATA ((void *)(&trimbletsip_pollinfo))
-
-#define TRIMBLETAIP_ID GPS_ID
-#define TRIMBLETSIP_ID GPS_ID
-
-#define TRIMBLETAIP_FORMAT "Trimble TAIP"
-#define TRIMBLETSIP_FORMAT "Trimble TSIP"
-
-#define TRIMBLETAIP_ROOTDELAY 0x0
-#define TRIMBLETSIP_ROOTDELAY 0x0
-
-#define TRIMBLETAIP_BASEDELAY 0.0
-#define TRIMBLETSIP_BASEDELAY 0.020 /* GPS time message latency */
-
-#define TRIMBLETAIP_DESCRIPTION "Trimble GPS (TAIP) receiver"
-#define TRIMBLETSIP_DESCRIPTION "Trimble GPS (TSIP) receiver"
-
-#define TRIMBLETAIP_MAXUNSYNC 0
-#define TRIMBLETSIP_MAXUNSYNC 0
-
-#define TRIMBLETAIP_EOL '<'
-
-/*
- * RadioCode Clocks RCC 800 receiver
- */
-#define RCC_POLLRATE 0 /* only true direct polling */
-#define RCC_POLLCMD "\r"
-#define RCC_CMDSIZE 1
-
-static poll_info_t rcc8000_pollinfo = { RCC_POLLRATE, RCC_POLLCMD, RCC_CMDSIZE };
-#define RCC8000_FLAGS 0
-#define RCC8000_POLL poll_dpoll
-#define RCC8000_INIT poll_init
-#define RCC8000_END 0
-#define RCC8000_DATA ((void *)(&rcc8000_pollinfo))
-#define RCC8000_ROOTDELAY 0.0
-#define RCC8000_BASEDELAY 0.0
-#define RCC8000_ID "MSF"
-#define RCC8000_DESCRIPTION "RCC 8000 MSF Receiver"
-#define RCC8000_FORMAT "Radiocode RCC8000"
-#define RCC8000_MAXUNSYNC (60*60) /* should be ok for an hour */
-#define RCC8000_SPEED (B2400)
-#define RCC8000_CFLAG (CS8|CREAD|CLOCAL)
-#define RCC8000_IFLAG (IGNBRK|IGNPAR)
-#define RCC8000_OFLAG 0
-#define RCC8000_LFLAG 0
-#define RCC8000_SAMPLES 5
-#define RCC8000_KEEP 3
-
-/*
- * Hopf Radio clock 6021 Format
- *
- */
-#define HOPF6021_ROOTDELAY 0.0
-#define HOPF6021_BASEDELAY 0.0
-#define HOPF6021_DESCRIPTION "HOPF 6021"
-#define HOPF6021_FORMAT "hopf Funkuhr 6021"
-#define HOPF6021_MAXUNSYNC (60*60) /* should be ok for an hour */
-#define HOPF6021_SPEED (B9600)
-#define HOPF6021_CFLAG (CS8|CREAD|CLOCAL)
-#define HOPF6021_IFLAG (IGNBRK|ISTRIP)
-#define HOPF6021_OFLAG 0
-#define HOPF6021_LFLAG 0
-#define HOPF6021_FLAGS 0
-#define HOPF6021_SAMPLES 5
-#define HOPF6021_KEEP 3
-
-/*
- * Diem's Computime Radio Clock Receiver
- */
-#define COMPUTIME_FLAGS 0
-#define COMPUTIME_ROOTDELAY 0.0
-#define COMPUTIME_BASEDELAY 0.0
-#define COMPUTIME_ID DCF_ID
-#define COMPUTIME_DESCRIPTION "Diem's Computime receiver"
-#define COMPUTIME_FORMAT "Diem's Computime Radio Clock"
-#define COMPUTIME_TYPE DCF_TYPE
-#define COMPUTIME_MAXUNSYNC (60*60) /* only trust clock for 1 hour */
-#define COMPUTIME_SPEED (B9600)
-#define COMPUTIME_CFLAG (CSTOPB|CS7|CREAD|CLOCAL)
-#define COMPUTIME_IFLAG (IGNBRK|IGNPAR|ISTRIP)
-#define COMPUTIME_OFLAG 0
-#define COMPUTIME_LFLAG 0
-#define COMPUTIME_SAMPLES 5
-#define COMPUTIME_KEEP 3
-
-/*
- * Varitext Radio Clock Receiver
- */
-#define VARITEXT_FLAGS 0
-#define VARITEXT_ROOTDELAY 0.0
-#define VARITEXT_BASEDELAY 0.0
-#define VARITEXT_ID "MSF"
-#define VARITEXT_DESCRIPTION "Varitext receiver"
-#define VARITEXT_FORMAT "Varitext Radio Clock"
-#define VARITEXT_TYPE DCF_TYPE
-#define VARITEXT_MAXUNSYNC (60*60) /* only trust clock for 1 hour */
-#define VARITEXT_SPEED (B9600)
-#define VARITEXT_CFLAG (CS7|CREAD|CLOCAL|PARENB|PARODD)
-#define VARITEXT_IFLAG (IGNPAR|IGNBRK|INPCK) /*|ISTRIP)*/
-#define VARITEXT_OFLAG 0
-#define VARITEXT_LFLAG 0
-#define VARITEXT_SAMPLES 32
-#define VARITEXT_KEEP 20
-
-static struct parse_clockinfo
-{
- u_long cl_flags; /* operation flags (io modes) */
- void (*cl_poll) P((struct parseunit *)); /* active poll routine */
- int (*cl_init) P((struct parseunit *)); /* active poll init routine */
- void (*cl_event) P((struct parseunit *, int)); /* special event handling (e.g. reset clock) */
- void (*cl_end) P((struct parseunit *)); /* active poll end routine */
- void (*cl_message) P((struct parseunit *, parsetime_t *)); /* process a lower layer message */
- void *cl_data; /* local data area for "poll" mechanism */
- double cl_rootdelay; /* rootdelay */
- double cl_basedelay; /* current offset by which the RS232
- time code is delayed from the actual time */
- const char *cl_id; /* ID code */
- 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 losing synch */
- u_long cl_speed; /* terminal input & output baudrate */
- u_long cl_cflag; /* terminal control flags */
- u_long cl_iflag; /* terminal input flags */
- u_long cl_oflag; /* terminal output flags */
- u_long cl_lflag; /* terminal local flags */
- u_long cl_samples; /* samples for median filter */
- u_long cl_keep; /* samples for median filter to keep */
-} parse_clockinfo[] =
-{
- { /* mode 0 */
- MBG_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- DCFPZF535_ROOTDELAY,
- DCFPZF535_BASEDELAY,
- DCF_P_ID,
- DCFPZF535_DESCRIPTION,
- DCFPZF535_FORMAT,
- DCF_TYPE,
- DCFPZF535_MAXUNSYNC,
- DCFPZF535_SPEED,
- DCFPZF535_CFLAG,
- DCFPZF535_IFLAG,
- DCFPZF535_OFLAG,
- DCFPZF535_LFLAG,
- DCFPZF535_SAMPLES,
- DCFPZF535_KEEP
- },
- { /* mode 1 */
- MBG_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- DCFPZF535OCXO_ROOTDELAY,
- DCFPZF535OCXO_BASEDELAY,
- DCF_P_ID,
- DCFPZF535OCXO_DESCRIPTION,
- DCFPZF535OCXO_FORMAT,
- DCF_TYPE,
- DCFPZF535OCXO_MAXUNSYNC,
- DCFPZF535OCXO_SPEED,
- DCFPZF535OCXO_CFLAG,
- DCFPZF535OCXO_IFLAG,
- DCFPZF535OCXO_OFLAG,
- DCFPZF535OCXO_LFLAG,
- DCFPZF535OCXO_SAMPLES,
- DCFPZF535OCXO_KEEP
- },
- { /* mode 2 */
- MBG_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- DCFUA31_ROOTDELAY,
- DCFUA31_BASEDELAY,
- DCF_A_ID,
- DCFUA31_DESCRIPTION,
- DCFUA31_FORMAT,
- DCF_TYPE,
- DCFUA31_MAXUNSYNC,
- DCFUA31_SPEED,
- DCFUA31_CFLAG,
- DCFUA31_IFLAG,
- DCFUA31_OFLAG,
- DCFUA31_LFLAG,
- DCFUA31_SAMPLES,
- DCFUA31_KEEP
- },
- { /* mode 3 */
- MBG_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- DCF7000_ROOTDELAY,
- DCF7000_BASEDELAY,
- DCF_A_ID,
- DCF7000_DESCRIPTION,
- DCF7000_FORMAT,
- DCF_TYPE,
- DCF7000_MAXUNSYNC,
- DCF7000_SPEED,
- DCF7000_CFLAG,
- DCF7000_IFLAG,
- DCF7000_OFLAG,
- DCF7000_LFLAG,
- DCF7000_SAMPLES,
- DCF7000_KEEP
- },
- { /* mode 4 */
- NO_CL_FLAGS,
- WSDCF_POLL,
- WSDCF_INIT,
- NO_EVENT,
- WSDCF_END,
- NO_MESSAGE,
- WSDCF_DATA,
- WSDCF_ROOTDELAY,
- WSDCF_BASEDELAY,
- DCF_A_ID,
- WSDCF_DESCRIPTION,
- WSDCF_FORMAT,
- DCF_TYPE,
- WSDCF_MAXUNSYNC,
- WSDCF_SPEED,
- WSDCF_CFLAG,
- WSDCF_IFLAG,
- WSDCF_OFLAG,
- WSDCF_LFLAG,
- WSDCF_SAMPLES,
- WSDCF_KEEP
- },
- { /* mode 5 */
- RAWDCF_FLAGS,
- NO_POLL,
- RAWDCF_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- CONRAD_BASEDELAY,
- DCF_A_ID,
- CONRAD_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_SPEED,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG,
- RAWDCF_SAMPLES,
- RAWDCF_KEEP
- },
- { /* mode 6 */
- RAWDCF_FLAGS,
- NO_POLL,
- RAWDCF_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- TIMEBRICK_BASEDELAY,
- DCF_A_ID,
- TIMEBRICK_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_SPEED,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG,
- RAWDCF_SAMPLES,
- RAWDCF_KEEP
- },
- { /* mode 7 */
- MBG_FLAGS,
- GPS16X_POLL,
- GPS16X_INIT,
- NO_EVENT,
- GPS16X_END,
- GPS16X_MESSAGE,
- GPS16X_DATA,
- GPS16X_ROOTDELAY,
- GPS16X_BASEDELAY,
- GPS16X_ID,
- GPS16X_DESCRIPTION,
- GPS16X_FORMAT,
- GPS_TYPE,
- GPS16X_MAXUNSYNC,
- GPS16X_SPEED,
- GPS16X_CFLAG,
- GPS16X_IFLAG,
- GPS16X_OFLAG,
- GPS16X_LFLAG,
- GPS16X_SAMPLES,
- GPS16X_KEEP
- },
- { /* mode 8 */
- RAWDCF_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- IGELCLOCK_BASEDELAY,
- DCF_A_ID,
- IGELCLOCK_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- IGELCLOCK_SPEED,
- IGELCLOCK_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG,
- RAWDCF_SAMPLES,
- RAWDCF_KEEP
- },
- { /* mode 9 */
- TRIMBLETAIP_FLAGS,
-#if TRIM_POLLRATE /* DHD940515: Allow user config */
- NO_POLL,
-#else
- TRIMBLETAIP_POLL,
-#endif
- TRIMBLETAIP_INIT,
- TRIMBLETAIP_EVENT,
- TRIMBLETAIP_END,
- NO_MESSAGE,
- TRIMBLETAIP_DATA,
- TRIMBLETAIP_ROOTDELAY,
- TRIMBLETAIP_BASEDELAY,
- TRIMBLETAIP_ID,
- TRIMBLETAIP_DESCRIPTION,
- TRIMBLETAIP_FORMAT,
- GPS_TYPE,
- TRIMBLETAIP_MAXUNSYNC,
- TRIMBLETAIP_SPEED,
- TRIMBLETAIP_CFLAG,
- TRIMBLETAIP_IFLAG,
- TRIMBLETAIP_OFLAG,
- TRIMBLETAIP_LFLAG,
- TRIMBLETAIP_SAMPLES,
- TRIMBLETAIP_KEEP
- },
- { /* mode 10 */
- TRIMBLETSIP_FLAGS,
-#if TRIM_POLLRATE /* DHD940515: Allow user config */
- NO_POLL,
-#else
- TRIMBLETSIP_POLL,
-#endif
- TRIMBLETSIP_INIT,
- TRIMBLETSIP_EVENT,
- TRIMBLETSIP_END,
- TRIMBLETSIP_MESSAGE,
- TRIMBLETSIP_DATA,
- TRIMBLETSIP_ROOTDELAY,
- TRIMBLETSIP_BASEDELAY,
- TRIMBLETSIP_ID,
- TRIMBLETSIP_DESCRIPTION,
- TRIMBLETSIP_FORMAT,
- GPS_TYPE,
- TRIMBLETSIP_MAXUNSYNC,
- TRIMBLETSIP_SPEED,
- TRIMBLETSIP_CFLAG,
- TRIMBLETSIP_IFLAG,
- TRIMBLETSIP_OFLAG,
- TRIMBLETSIP_LFLAG,
- TRIMBLETSIP_SAMPLES,
- TRIMBLETSIP_KEEP
- },
- { /* mode 11 */
- NO_CL_FLAGS,
- RCC8000_POLL,
- RCC8000_INIT,
- NO_EVENT,
- RCC8000_END,
- NO_MESSAGE,
- RCC8000_DATA,
- RCC8000_ROOTDELAY,
- RCC8000_BASEDELAY,
- RCC8000_ID,
- RCC8000_DESCRIPTION,
- RCC8000_FORMAT,
- DCF_TYPE,
- RCC8000_MAXUNSYNC,
- RCC8000_SPEED,
- RCC8000_CFLAG,
- RCC8000_IFLAG,
- RCC8000_OFLAG,
- RCC8000_LFLAG,
- RCC8000_SAMPLES,
- RCC8000_KEEP
- },
- { /* mode 12 */
- HOPF6021_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- HOPF6021_ROOTDELAY,
- HOPF6021_BASEDELAY,
- DCF_ID,
- HOPF6021_DESCRIPTION,
- HOPF6021_FORMAT,
- DCF_TYPE,
- HOPF6021_MAXUNSYNC,
- HOPF6021_SPEED,
- HOPF6021_CFLAG,
- HOPF6021_IFLAG,
- HOPF6021_OFLAG,
- HOPF6021_LFLAG,
- HOPF6021_SAMPLES,
- HOPF6021_KEEP
- },
- { /* mode 13 */
- COMPUTIME_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- COMPUTIME_ROOTDELAY,
- COMPUTIME_BASEDELAY,
- COMPUTIME_ID,
- COMPUTIME_DESCRIPTION,
- COMPUTIME_FORMAT,
- COMPUTIME_TYPE,
- COMPUTIME_MAXUNSYNC,
- COMPUTIME_SPEED,
- COMPUTIME_CFLAG,
- COMPUTIME_IFLAG,
- COMPUTIME_OFLAG,
- COMPUTIME_LFLAG,
- COMPUTIME_SAMPLES,
- COMPUTIME_KEEP
- },
- { /* mode 14 */
- RAWDCF_FLAGS,
- NO_POLL,
- RAWDCFDTRSET_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- RAWDCF_BASEDELAY,
- DCF_A_ID,
- RAWDCFDTRSET_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_SPEED,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG,
- RAWDCF_SAMPLES,
- RAWDCF_KEEP
- },
- { /* mode 15 */
- 0, /* operation flags (io modes) */
- NO_POLL, /* active poll routine */
- NO_INIT, /* active poll init routine */
- NO_EVENT, /* special event handling (e.g. reset clock) */
- NO_END, /* active poll end routine */
- NO_MESSAGE, /* process a lower layer message */
- NO_DATA, /* local data area for "poll" mechanism */
- 0, /* rootdelay */
- 11.0 /* bits */ / 9600, /* current offset by which the RS232
- time code is delayed from the actual time */
- DCF_ID, /* ID code */
- "WHARTON 400A Series clock", /* device name */
- "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 losing synch */
- B9600, /* terminal input & output baudrate */
- (CS8|CREAD|PARENB|CLOCAL|HUPCL),/* terminal control flags */
- 0, /* terminal input flags */
- 0, /* terminal output flags */
- 0, /* terminal local flags */
- 5, /* samples for median filter */
- 3, /* samples for median filter to keep */
- },
- { /* mode 16 - RAWDCF RTS set, DTR clr */
- RAWDCF_FLAGS,
- NO_POLL,
- RAWDCFDTRCLRRTSSET_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- RAWDCF_BASEDELAY,
- DCF_A_ID,
- RAWDCFDTRCLRRTSSET_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_SPEED,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG,
- RAWDCF_SAMPLES,
- RAWDCF_KEEP
- },
- { /* mode 17 */
- VARITEXT_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_EVENT,
- NO_END,
- NO_MESSAGE,
- NO_DATA,
- VARITEXT_ROOTDELAY,
- VARITEXT_BASEDELAY,
- VARITEXT_ID,
- VARITEXT_DESCRIPTION,
- VARITEXT_FORMAT,
- VARITEXT_TYPE,
- VARITEXT_MAXUNSYNC,
- VARITEXT_SPEED,
- VARITEXT_CFLAG,
- VARITEXT_IFLAG,
- VARITEXT_OFLAG,
- VARITEXT_LFLAG,
- VARITEXT_SAMPLES,
- VARITEXT_KEEP
- }
-};
-
-static int ncltypes = sizeof(parse_clockinfo) / sizeof(struct parse_clockinfo);
-
-#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)->ttl) & 0x80)
-
-/*
- * Other constant stuff
- */
-#define PARSEHSREFID 0x7f7f08ff /* 127.127.8.255 refid for hi strata */
-
-#define PARSESTATISTICS (60*60) /* output state statistics every hour */
-
-static struct parseunit *parseunits[MAXUNITS];
-
-static int notice = 0;
-
-#define PARSE_STATETIME(parse, i) ((parse->generic->currentstatus == i) ? parse->statetime[i] + current_time - parse->lastchange : parse->statetime[i])
-
-static void parse_event P((struct parseunit *, int));
-static void parse_process P((struct parseunit *, parsetime_t *));
-static void clear_err P((struct parseunit *, u_long));
-static int list_err P((struct parseunit *, u_long));
-static char * l_mktime P((u_long));
-
-/**===========================================================================
- ** implementation error message regression module
- **/
-static void
-clear_err(
- struct parseunit *parse,
- u_long lstate
- )
-{
- if (lstate == ERR_ALL)
- {
- int i;
-
- for (i = 0; i < ERR_CNT; i++)
- {
- parse->errors[i].err_stage = err_tbl[i];
- parse->errors[i].err_cnt = 0;
- parse->errors[i].err_last = 0;
- parse->errors[i].err_started = 0;
- parse->errors[i].err_suppressed = 0;
- }
- }
- else
- {
- parse->errors[lstate].err_stage = err_tbl[lstate];
- parse->errors[lstate].err_cnt = 0;
- parse->errors[lstate].err_last = 0;
- parse->errors[lstate].err_started = 0;
- parse->errors[lstate].err_suppressed = 0;
- }
-}
-
-static int
-list_err(
- struct parseunit *parse,
- u_long lstate
- )
-{
- int do_it;
- struct errorinfo *err = &parse->errors[lstate];
-
- if (err->err_started == 0)
- {
- err->err_started = current_time;
- }
-
- do_it = (current_time - err->err_last) >= err->err_stage->err_delay;
-
- if (do_it)
- err->err_cnt++;
-
- if (err->err_stage->err_count &&
- (err->err_cnt >= err->err_stage->err_count))
- {
- err->err_stage++;
- err->err_cnt = 0;
- }
-
- if (!err->err_cnt && do_it)
- msyslog(LOG_INFO, "PARSE receiver #%d: interval for following error message class is at least %s",
- CLK_UNIT(parse->peer), l_mktime(err->err_stage->err_delay));
-
- if (!do_it)
- err->err_suppressed++;
- else
- err->err_last = current_time;
-
- if (do_it && err->err_suppressed)
- {
- msyslog(LOG_INFO, "PARSE receiver #%d: %ld message%s suppressed, error condition class persists for %s",
- CLK_UNIT(parse->peer), err->err_suppressed, (err->err_suppressed == 1) ? " was" : "s where",
- l_mktime(current_time - err->err_started));
- err->err_suppressed = 0;
- }
-
- return do_it;
-}
-
-/*--------------------------------------------------
- * mkreadable - make a printable ascii string (without
- * embedded quotes so that the ntpq protocol isn't
- * fooled
- */
-#ifndef isprint
-#define isprint(_X_) (((_X_) > 0x1F) && ((_X_) < 0x7F))
-#endif
-
-static char *
-mkreadable(
- char *buffer,
- long blen,
- const char *src,
- u_long srclen,
- int hex
- )
-{
- char *b = buffer;
- char *endb = (char *)0;
-
- if (blen < 4)
- return (char *)0; /* don't bother with mini buffers */
-
- endb = buffer + blen - 4;
-
- blen--; /* account for '\0' */
-
- while (blen && srclen--)
- {
- if (!hex && /* no binary only */
- (*src != '\\') && /* no plain \ */
- (*src != '"') && /* no " */
- isprint((int)*src)) /* only printables */
- { /* they are easy... */
- *buffer++ = *src++;
- blen--;
- }
- else
- {
- if (blen < 4)
- {
- while (blen--)
- {
- *buffer++ = '.';
- }
- *buffer = '\0';
- return b;
- }
- else
- {
- if (*src == '\\')
- {
- strcpy(buffer,"\\\\");
- buffer += 2;
- blen -= 2;
- src++;
- }
- else
- {
- sprintf(buffer, "\\x%02x", *src++);
- blen -= 4;
- buffer += 4;
- }
- }
- }
- if (srclen && !blen && endb) /* overflow - set last chars to ... */
- strcpy(endb, "...");
- }
-
- *buffer = '\0';
- return b;
-}
-
-
-/*--------------------------------------------------
- * mkascii - make a printable ascii string
- * assumes (unless defined better) 7-bit ASCII
- */
-static char *
-mkascii(
- char *buffer,
- long blen,
- const char *src,
- u_long srclen
- )
-{
- return mkreadable(buffer, blen, src, srclen, 0);
-}
-
-/**===========================================================================
- ** implementation of i/o handling methods
- ** (all STREAM, partial STREAM, user level)
- **/
-
-/*
- * define possible io handling methods
- */
-#ifdef STREAM
-static int ppsclock_init P((struct parseunit *));
-static int stream_init P((struct parseunit *));
-static void stream_end P((struct parseunit *));
-static int stream_enable P((struct parseunit *));
-static int stream_disable P((struct parseunit *));
-static int stream_setcs P((struct parseunit *, parsectl_t *));
-static int stream_getfmt P((struct parseunit *, parsectl_t *));
-static int stream_setfmt P((struct parseunit *, parsectl_t *));
-static int stream_timecode P((struct parseunit *, parsectl_t *));
-static void stream_receive P((struct recvbuf *));
-#endif
-
-static int local_init P((struct parseunit *));
-static void local_end P((struct parseunit *));
-static int local_nop P((struct parseunit *));
-static int local_setcs P((struct parseunit *, parsectl_t *));
-static int local_getfmt P((struct parseunit *, parsectl_t *));
-static int local_setfmt P((struct parseunit *, parsectl_t *));
-static int local_timecode P((struct parseunit *, parsectl_t *));
-static void local_receive P((struct recvbuf *));
-static int local_input P((struct recvbuf *));
-
-static bind_t io_bindings[] =
-{
-#ifdef STREAM
- {
- "parse STREAM",
- stream_init,
- stream_end,
- stream_setcs,
- stream_disable,
- stream_enable,
- stream_getfmt,
- stream_setfmt,
- stream_timecode,
- stream_receive,
- 0,
- },
- {
- "ppsclock STREAM",
- ppsclock_init,
- local_end,
- local_setcs,
- local_nop,
- local_nop,
- local_getfmt,
- local_setfmt,
- local_timecode,
- local_receive,
- local_input,
- },
-#endif
- {
- "normal",
- local_init,
- local_end,
- local_setcs,
- local_nop,
- local_nop,
- local_getfmt,
- local_setfmt,
- local_timecode,
- local_receive,
- local_input,
- },
- {
- (char *)0,
- }
-};
-
-#ifdef STREAM
-
-#define fix_ts(_X_) \
- if ((&(_X_))->tv.tv_usec >= 1000000) \
- { \
- (&(_X_))->tv.tv_usec -= 1000000; \
- (&(_X_))->tv.tv_sec += 1; \
- }
-
-#define cvt_ts(_X_, _Y_) \
- { \
- l_fp ts; \
- fix_ts((_X_)); \
- if (!buftvtots((const char *)&(&(_X_))->tv, &ts)) \
- { \
- ERR(ERR_BADDATA) \
- msyslog(LOG_ERR,"parse: stream_receive: timestamp conversion error (buftvtots) (%s) (%ld.%06ld) ", (_Y_), (long)(&(_X_))->tv.tv_sec, (long)(&(_X_))->tv.tv_usec);\
- return; \
- } \
- else \
- { \
- (&(_X_))->fp = ts; \
- } \
- }
-
-/*--------------------------------------------------
- * ppsclock STREAM init
- */
-static int
-ppsclock_init(
- struct parseunit *parse
- )
-{
- static char m1[] = "ppsclocd";
- static char m2[] = "ppsclock";
-
- /*
- * now push the parse streams module
- * it will ensure exclusive access to the device
- */
- if (ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m1) == -1 &&
- ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m2) == -1)
- {
- if (errno != EINVAL)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: ppsclock_init: ioctl(fd, I_PUSH, \"ppsclock\"): %m",
- CLK_UNIT(parse->peer));
- }
- return 0;
- }
- if (!local_init(parse))
- {
- (void)ioctl(parse->generic->io.fd, I_POP, (caddr_t)0);
- return 0;
- }
-
- parse->flags |= PARSE_PPSCLOCK;
- return 1;
-}
-
-/*--------------------------------------------------
- * parse STREAM init
- */
-static int
-stream_init(
- struct parseunit *parse
- )
-{
- static char m1[] = "parse";
- /*
- * now push the parse streams module
- * to test whether it is there (neat interface 8-( )
- */
- if (ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m1) == -1)
- {
- if (errno != EINVAL) /* accept non-existence */
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CLK_UNIT(parse->peer));
- }
- return 0;
- }
- else
- {
- while(ioctl(parse->generic->io.fd, I_POP, (caddr_t)0) == 0)
- /* empty loop */;
-
- /*
- * now push it a second time after we have removed all
- * module garbage
- */
- if (ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m1) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- else
- {
- return 1;
- }
- }
-}
-
-/*--------------------------------------------------
- * parse STREAM end
- */
-static void
-stream_end(
- struct parseunit *parse
- )
-{
- while(ioctl(parse->generic->io.fd, I_POP, (caddr_t)0) == 0)
- /* empty loop */;
-}
-
-/*--------------------------------------------------
- * STREAM setcs
- */
-static int
-stream_setcs(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETCS;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_setcs: ioctl(fd, I_STR, PARSEIOC_SETCS): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM enable
- */
-static int
-stream_enable(
- struct parseunit *parse
- )
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_ENABLE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)0;
- strioc.ic_len = 0;
-
- if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_enable: ioctl(fd, I_STR, PARSEIOC_ENABLE): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- parse->generic->io.clock_recv = stream_receive; /* ok - parse input in kernel */
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM disable
- */
-static int
-stream_disable(
- struct parseunit *parse
- )
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_DISABLE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)0;
- strioc.ic_len = 0;
-
- if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_disable: ioctl(fd, I_STR, PARSEIOC_DISABLE): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- parse->generic->io.clock_recv = local_receive; /* ok - parse input in daemon */
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM getfmt
- */
-static int
-stream_getfmt(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_GETFMT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
- if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: ioctl(fd, I_STR, PARSEIOC_GETFMT): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM setfmt
- */
-static int
-stream_setfmt(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETFMT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_setfmt: ioctl(fd, I_STR, PARSEIOC_SETFMT): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- return 1;
-}
-
-
-/*--------------------------------------------------
- * STREAM timecode
- */
-static int
-stream_timecode(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_TIMECODE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
- {
- ERR(ERR_INTERNAL)
- msyslog(LOG_ERR, "PARSE receiver #%d: stream_timecode: ioctl(fd, I_STR, PARSEIOC_TIMECODE): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- clear_err(parse, ERR_INTERNAL);
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM receive
- */
-static void
-stream_receive(
- struct recvbuf *rbufp
- )
-{
- struct parseunit *parse = (struct parseunit *)((void *)rbufp->recv_srcclock);
- parsetime_t parsetime;
-
- if (!parse->peer)
- return;
-
- if (rbufp->recv_length != sizeof(parsetime_t))
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR,"PARSE receiver #%d: stream_receive: bad size (got %d expected %d)",
- CLK_UNIT(parse->peer), rbufp->recv_length, (int)sizeof(parsetime_t));
- parse->generic->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
- return;
- }
- clear_err(parse, ERR_BADIO);
-
- memmove((caddr_t)&parsetime,
- (caddr_t)rbufp->recv_buffer,
- sizeof(parsetime_t));
-
-#ifdef DEBUG
- if (debug > 3)
- {
- printf("PARSE receiver #%d: status %06x, state %08x, time %lx.%08lx, stime %lx.%08lx, ptime %lx.%08lx\n",
- CLK_UNIT(parse->peer),
- (unsigned int)parsetime.parse_status,
- (unsigned int)parsetime.parse_state,
- (long)parsetime.parse_time.tv.tv_sec,
- (long)parsetime.parse_time.tv.tv_usec,
- (long)parsetime.parse_stime.tv.tv_sec,
- (long)parsetime.parse_stime.tv.tv_usec,
- (long)parsetime.parse_ptime.tv.tv_sec,
- (long)parsetime.parse_ptime.tv.tv_usec);
- }
-#endif
-
- /*
- * switch time stamp world - be sure to normalize small usec field
- * errors.
- */
-
- cvt_ts(parsetime.parse_stime, "parse_stime");
-
- if (PARSE_TIMECODE(parsetime.parse_state))
- {
- cvt_ts(parsetime.parse_time, "parse_time");
- }
-
- if (PARSE_PPS(parsetime.parse_state))
- cvt_ts(parsetime.parse_ptime, "parse_ptime");
-
- parse_process(parse, &parsetime);
-}
-#endif
-
-/*--------------------------------------------------
- * local init
- */
-static int
-local_init(
- struct parseunit *parse
- )
-{
- return parse_ioinit(&parse->parseio);
-}
-
-/*--------------------------------------------------
- * local end
- */
-static void
-local_end(
- struct parseunit *parse
- )
-{
- parse_ioend(&parse->parseio);
-}
-
-
-/*--------------------------------------------------
- * local nop
- */
-static int
-local_nop(
- struct parseunit *parse
- )
-{
- return 1;
-}
-
-/*--------------------------------------------------
- * local setcs
- */
-static int
-local_setcs(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- return parse_setcs(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local getfmt
- */
-static int
-local_getfmt(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- return parse_getfmt(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local setfmt
- */
-static int
-local_setfmt(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- return parse_setfmt(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local timecode
- */
-static int
-local_timecode(
- struct parseunit *parse,
- parsectl_t *tcl
- )
-{
- return parse_timecode(tcl, &parse->parseio);
-}
-
-
-/*--------------------------------------------------
- * local input
- */
-static int
-local_input(
- struct recvbuf *rbufp
- )
-{
- struct parseunit *parse = (struct parseunit *)((void *)rbufp->recv_srcclock);
- int count;
- unsigned char *s;
- timestamp_t ts;
-
- if (!parse->peer)
- return 0;
-
- /*
- * eat all characters, parsing then and feeding complete samples
- */
- count = rbufp->recv_length;
- s = (unsigned char *)rbufp->recv_buffer;
- ts.fp = rbufp->recv_time;
-
- while (count--)
- {
- if (parse_ioread(&parse->parseio, (unsigned int)(*s++), &ts))
- {
- struct recvbuf buf;
-
- /*
- * got something good to eat
- */
- if (!PARSE_PPS(parse->parseio.parse_dtime.parse_state))
- {
-#ifdef TIOCDCDTIMESTAMP
- struct timeval dcd_time;
-
- if (ioctl(rbufp->fd, TIOCDCDTIMESTAMP, &dcd_time) != -1)
- {
- l_fp tstmp;
-
- TVTOTS(&dcd_time, &tstmp);
- tstmp.l_ui += JAN_1970;
- L_SUB(&ts.fp, &tstmp);
- if (ts.fp.l_ui == 0)
- {
-#ifdef DEBUG
- if (debug)
- {
- printf(
- "parse: local_receive: fd %d DCDTIMESTAMP %s\n",
- rbufp->fd,
- lfptoa(&tstmp, 6));
- printf(" sigio %s\n",
- lfptoa(&ts.fp, 6));
- }
-#endif
- parse->parseio.parse_dtime.parse_ptime.fp = tstmp;
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
- }
- }
-#else /* TIOCDCDTIMESTAMP */
-#if defined(HAVE_STRUCT_PPSCLOCKEV) && (defined(HAVE_CIOGETEV) || defined(HAVE_TIOCGPPSEV))
- if (parse->flags & PARSE_PPSCLOCK)
- {
- l_fp tts;
- struct ppsclockev ev;
-
-#ifdef HAVE_CIOGETEV
- if (ioctl(parse->generic->io.fd, CIOGETEV, (caddr_t)&ev) == 0)
-#endif
-#ifdef HAVE_TIOCGPPSEV
- if (ioctl(parse->generic->io.fd, TIOCGPPSEV, (caddr_t)&ev) == 0)
-#endif
- {
- if (ev.serial != parse->ppsserial)
- {
- /*
- * add PPS time stamp if available via ppsclock module
- * and not supplied already.
- */
- if (!buftvtots((const char *)&ev.tv, &tts))
- {
- ERR(ERR_BADDATA)
- msyslog(LOG_ERR,"parse: local_receive: timestamp conversion error (buftvtots) (ppsclockev.tv)");
- }
- else
- {
- parse->parseio.parse_dtime.parse_ptime.fp = tts;
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
- }
- }
- parse->ppsserial = ev.serial;
- }
- }
-#endif
-#endif /* TIOCDCDTIMESTAMP */
- }
- if (count)
- { /* simulate receive */
- memmove((caddr_t)buf.recv_buffer,
- (caddr_t)&parse->parseio.parse_dtime,
- sizeof(parsetime_t));
- parse_iodone(&parse->parseio);
- buf.recv_length = sizeof(parsetime_t);
- buf.recv_time = rbufp->recv_time;
- buf.srcadr = rbufp->srcadr;
- buf.dstadr = rbufp->dstadr;
- buf.fd = rbufp->fd;
- buf.next = 0;
- buf.X_from_where = rbufp->X_from_where;
- rbufp->receiver(&buf);
- }
- else
- {
- memmove((caddr_t)rbufp->recv_buffer,
- (caddr_t)&parse->parseio.parse_dtime,
- sizeof(parsetime_t));
- parse_iodone(&parse->parseio);
- rbufp->recv_length = sizeof(parsetime_t);
- return 1; /* got something & in place return */
- }
- }
- }
- return 0; /* nothing to pass up */
-}
-
-/*--------------------------------------------------
- * local receive
- */
-static void
-local_receive(
- struct recvbuf *rbufp
- )
-{
- struct parseunit *parse = (struct parseunit *)((void *)rbufp->recv_srcclock);
- parsetime_t parsetime;
-
- if (!parse->peer)
- return;
-
- if (rbufp->recv_length != sizeof(parsetime_t))
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR,"PARSE receiver #%d: local_receive: bad size (got %d expected %d)",
- CLK_UNIT(parse->peer), rbufp->recv_length, (int)sizeof(parsetime_t));
- parse->generic->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
- return;
- }
- clear_err(parse, ERR_BADIO);
-
- memmove((caddr_t)&parsetime,
- (caddr_t)rbufp->recv_buffer,
- sizeof(parsetime_t));
-
-#ifdef DEBUG
- if (debug > 3)
- {
- printf("PARSE receiver #%d: status %06x, state %08x, time %lx.%08lx, stime %lx.%08lx, ptime %lx.%08lx\n",
- CLK_UNIT(parse->peer),
- (unsigned int)parsetime.parse_status,
- (unsigned int)parsetime.parse_state,
- (long)parsetime.parse_time.tv.tv_sec,
- (long)parsetime.parse_time.tv.tv_usec,
- (long)parsetime.parse_stime.tv.tv_sec,
- (long)parsetime.parse_stime.tv.tv_usec,
- (long)parsetime.parse_ptime.tv.tv_sec,
- (long)parsetime.parse_ptime.tv.tv_usec);
- }
-#endif
-
- parse_process(parse, &parsetime);
-}
-
-/*--------------------------------------------------
- * init_iobinding - find and initialize lower layers
- */
-static bind_t *
-init_iobinding(
- struct parseunit *parse
- )
-{
- bind_t *b = io_bindings;
-
- while (b->bd_description != (char *)0)
- {
- if ((*b->bd_init)(parse))
- {
- return b;
- }
- b++;
- }
- return (bind_t *)0;
-}
-
-/**===========================================================================
- ** support routines
- **/
-
-/*--------------------------------------------------
- * convert a flag field to a string
- */
-static char *
-parsestate(
- u_long lstate,
- char *buffer
- )
-{
- static struct bits
- {
- u_long bit;
- const char *name;
- } flagstrings[] =
- {
- { PARSEB_ANNOUNCE, "DST SWITCH WARNING" },
- { PARSEB_POWERUP, "NOT SYNCHRONIZED" },
- { PARSEB_NOSYNC, "TIME CODE NOT CONFIRMED" },
- { PARSEB_DST, "DST" },
- { PARSEB_UTC, "UTC DISPLAY" },
- { PARSEB_LEAPADD, "LEAP ADD WARNING" },
- { PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
- { PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE, "ALTERNATE ANTENNA" },
- { PARSEB_TIMECODE, "TIME CODE" },
- { PARSEB_PPS, "PPS" },
- { PARSEB_POSITION, "POSITION" },
- { 0 }
- };
-
- static struct sbits
- {
- u_long bit;
- const char *name;
- } sflagstrings[] =
- {
- { PARSEB_S_LEAP, "LEAP INDICATION" },
- { PARSEB_S_PPS, "PPS SIGNAL" },
- { PARSEB_S_ANTENNA, "ANTENNA" },
- { PARSEB_S_POSITION, "POSITION" },
- { 0 }
- };
- int i;
-
- *buffer = '\0';
-
- i = 0;
- while (flagstrings[i].bit)
- {
- if (flagstrings[i].bit & lstate)
- {
- if (buffer[0])
- strcat(buffer, "; ");
- strcat(buffer, flagstrings[i].name);
- }
- i++;
- }
-
- if (lstate & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
- {
- char *s, *t;
-
- if (buffer[0])
- strcat(buffer, "; ");
-
- strcat(buffer, "(");
-
- t = s = buffer + strlen(buffer);
-
- i = 0;
- while (sflagstrings[i].bit)
- {
- if (sflagstrings[i].bit & lstate)
- {
- if (t != s)
- {
- strcpy(t, "; ");
- t += 2;
- }
-
- strcpy(t, sflagstrings[i].name);
- t += strlen(t);
- }
- i++;
- }
- strcpy(t, ")");
- }
- return buffer;
-}
-
-/*--------------------------------------------------
- * convert a status flag field to a string
- */
-static char *
-parsestatus(
- u_long lstate,
- char *buffer
- )
-{
- static struct bits
- {
- u_long bit;
- const char *name;
- } flagstrings[] =
- {
- { CVT_OK, "CONVERSION SUCCESSFUL" },
- { CVT_NONE, "NO CONVERSION" },
- { CVT_FAIL, "CONVERSION FAILED" },
- { CVT_BADFMT, "ILLEGAL FORMAT" },
- { CVT_BADDATE, "DATE ILLEGAL" },
- { CVT_BADTIME, "TIME ILLEGAL" },
- { CVT_ADDITIONAL, "ADDITIONAL DATA" },
- { 0 }
- };
- int i;
-
- *buffer = '\0';
-
- i = 0;
- while (flagstrings[i].bit)
- {
- if (flagstrings[i].bit & lstate)
- {
- if (buffer[0])
- strcat(buffer, "; ");
- strcat(buffer, flagstrings[i].name);
- }
- i++;
- }
-
- return buffer;
-}
-
-/*--------------------------------------------------
- * convert a clock status flag field to a string
- */
-static const char *
-clockstatus(
- u_long lstate
- )
-{
- static char buffer[20];
- static struct status
- {
- u_long value;
- const char *name;
- } flagstrings[] =
- {
- { CEVNT_NOMINAL, "NOMINAL" },
- { CEVNT_TIMEOUT, "NO RESPONSE" },
- { CEVNT_BADREPLY,"BAD FORMAT" },
- { CEVNT_FAULT, "FAULT" },
- { CEVNT_PROP, "PROPAGATION DELAY" },
- { CEVNT_BADDATE, "ILLEGAL DATE" },
- { CEVNT_BADTIME, "ILLEGAL TIME" },
- { (unsigned)~0L }
- };
- int i;
-
- i = 0;
- while (flagstrings[i].value != ~0)
- {
- if (flagstrings[i].value == lstate)
- {
- return flagstrings[i].name;
- }
- i++;
- }
-
- sprintf(buffer, "unknown #%ld", (u_long)lstate);
-
- return buffer;
-}
-
-
-/*--------------------------------------------------
- * l_mktime - make representation of a relative time
- */
-static char *
-l_mktime(
- u_long delta
- )
-{
- u_long tmp, m, s;
- static char buffer[40];
-
- buffer[0] = '\0';
-
- if ((tmp = delta / (60*60*24)) != 0)
- {
- sprintf(buffer, "%ldd+", (u_long)tmp);
- delta -= tmp * 60*60*24;
- }
-
- s = delta % 60;
- delta /= 60;
- m = delta % 60;
- delta /= 60;
-
- sprintf(buffer+strlen(buffer), "%02d:%02d:%02d",
- (int)delta, (int)m, (int)s);
-
- return buffer;
-}
-
-
-/*--------------------------------------------------
- * parse_statistics - list summary of clock states
- */
-static void
-parse_statistics(
- struct parseunit *parse
- )
-{
- int i;
-
- NLOG(NLOG_CLOCKSTATIST) /* conditional if clause for conditional syslog */
- {
- msyslog(LOG_INFO, "PARSE receiver #%d: running time: %s",
- CLK_UNIT(parse->peer),
- l_mktime(current_time - parse->generic->timestarted));
-
- msyslog(LOG_INFO, "PARSE receiver #%d: current status: %s",
- CLK_UNIT(parse->peer),
- clockstatus(parse->generic->currentstatus));
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
- u_long s_time;
- u_long percent, d = current_time - parse->generic->timestarted;
-
- percent = s_time = PARSE_STATETIME(parse, i);
-
- while (((u_long)(~0) / 10000) < percent)
- {
- percent /= 10;
- d /= 10;
- }
-
- if (d)
- percent = (percent * 10000) / d;
- else
- percent = 10000;
-
- if (s_time)
- msyslog(LOG_INFO, "PARSE receiver #%d: state %18s: %13s (%3ld.%02ld%%)",
- CLK_UNIT(parse->peer),
- clockstatus((unsigned int)i),
- l_mktime(s_time),
- percent / 100, percent % 100);
- }
- }
-}
-
-/*--------------------------------------------------
- * cparse_statistics - wrapper for statistics call
- */
-static void
-cparse_statistics(
- register struct parseunit *parse
- )
-{
- if (parse->laststatistic + PARSESTATISTICS < current_time)
- parse_statistics(parse);
- parse->laststatistic = current_time;
-}
-
-/**===========================================================================
- ** ntp interface routines
- **/
-
-/*--------------------------------------------------
- * parse_init - initialize internal parse driver data
- */
-static void
-parse_init(void)
-{
- memset((caddr_t)parseunits, 0, sizeof parseunits);
-}
-
-
-/*--------------------------------------------------
- * parse_shutdown - shut down a PARSE clock
- */
-static void
-parse_shutdown(
- int unit,
- struct peer *peer
- )
-{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
-
- if (parse && !parse->peer)
- {
- msyslog(LOG_ERR,
- "PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit not in use", unit);
- return;
- }
-
- /*
- * print statistics a last time and
- * stop statistics machine
- */
- parse_statistics(parse);
-
- if (parse->parse_type->cl_end)
- {
- parse->parse_type->cl_end(parse);
- }
-
- if (parse->binding)
- PARSE_END(parse);
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- io_closeclock(&parse->generic->io);
-
- free_varlist(parse->kv);
-
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" removed",
- CLK_UNIT(parse->peer), parse->parse_type->cl_description);
-
- parse->peer = (struct peer *)0; /* unused now */
- free(parse);
-}
-
-/*--------------------------------------------------
- * parse_start - open the PARSE devices and initialize data for processing
- */
-static int
-parse_start(
- int sysunit,
- struct peer *peer
- )
-{
- u_int unit;
- int fd232;
-#ifdef HAVE_TERMIOS
- struct termios tio; /* NEEDED FOR A LONG TIME ! */
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tio; /* NEEDED FOR A LONG TIME ! */
-#endif
- struct parseunit * parse;
- char parsedev[sizeof(PARSEDEVICE)+20];
- parsectl_t tmp_ctl;
- u_int type;
-
- type = CLK_TYPE(peer);
- unit = CLK_UNIT(peer);
-
- if ((type == ~0) || (parse_clockinfo[type].cl_description == (char *)0))
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: unsupported clock type %d (max %d)",
- unit, CLK_REALTYPE(peer), ncltypes-1);
- return 0;
- }
-
- /*
- * Unit okay, attempt to open the device.
- */
- (void) sprintf(parsedev, PARSEDEVICE, unit);
-
-#ifndef O_NOCTTY
-#define O_NOCTTY 0
-#endif
-
- fd232 = open(parsedev, O_RDWR | O_NOCTTY
-#ifdef O_NONBLOCK
- | O_NONBLOCK
-#endif
- , 0777);
-
- if (fd232 == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: open of %s failed: %m", unit, parsedev);
- return 0;
- }
-
- parse = (struct parseunit *)emalloc(sizeof(struct parseunit));
-
- memset((char *)parse, 0, sizeof(struct parseunit));
-
- parse->generic = peer->procptr; /* link up */
- parse->generic->unitptr = (caddr_t)parse; /* link down */
-
- /*
- * Set up the structures
- */
- parse->generic->timestarted = current_time;
- parse->lastchange = current_time;
-
- parse->generic->currentstatus = CEVNT_TIMEOUT; /* expect the worst */
-
- parse->flags = 0;
- parse->pollneeddata = 0;
- parse->laststatistic = current_time;
- parse->lastformat = (unsigned short)~0; /* assume no format known */
- parse->time.parse_status = (unsigned short)~0; /* be sure to mark initial status change */
- parse->lastmissed = 0; /* assume got everything */
- parse->ppsserial = 0;
- parse->localdata = (void *)0;
- parse->localstate = 0;
- parse->kv = (struct ctl_var *)0;
-
- clear_err(parse, ERR_ALL);
-
- parse->parse_type = &parse_clockinfo[type];
-
- parse->generic->fudgetime1 = parse->parse_type->cl_basedelay;
-
- parse->generic->fudgetime2 = 0.0;
-
- parse->generic->clockdesc = parse->parse_type->cl_description;
-
- peer->rootdelay = parse->parse_type->cl_rootdelay;
- peer->sstclktype = parse->parse_type->cl_type;
- peer->precision = sys_precision;
-
- peer->stratum = STRATUM_REFCLOCK;
- if (peer->stratum <= 1)
- memmove((char *)&parse->generic->refid, parse->parse_type->cl_id, 4);
- else
- parse->generic->refid = htonl(PARSEHSREFID);
-
- parse->generic->io.fd = fd232;
-
- parse->peer = peer; /* marks it also as busy */
-
- /*
- * configure terminal line
- */
- if (TTY_GETATTR(fd232, &tio) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcgetattr(%d, &tio): %m", unit, fd232);
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0;
- }
- else
- {
-#ifndef _PC_VDISABLE
- memset((char *)tio.c_cc, 0, sizeof(tio.c_cc));
-#else
- int disablec;
- errno = 0; /* pathconf can deliver -1 without changing errno ! */
-
- disablec = fpathconf(parse->generic->io.fd, _PC_VDISABLE);
- if (disablec == -1 && errno)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: fpathconf(fd, _PC_VDISABLE): %m", CLK_UNIT(parse->peer));
- memset((char *)tio.c_cc, 0, sizeof(tio.c_cc)); /* best guess */
- }
- else
- if (disablec != -1)
- memset((char *)tio.c_cc, disablec, sizeof(tio.c_cc));
-#endif
-
-#if defined (VMIN) || defined(VTIME)
- if ((parse_clockinfo[type].cl_lflag & ICANON) == 0)
- {
-#ifdef VMIN
- tio.c_cc[VMIN] = 1;
-#endif
-#ifdef VTIME
- tio.c_cc[VTIME] = 0;
-#endif
- }
-#endif
-
- tio.c_cflag = parse_clockinfo[type].cl_cflag;
- tio.c_iflag = parse_clockinfo[type].cl_iflag;
- tio.c_oflag = parse_clockinfo[type].cl_oflag;
- tio.c_lflag = parse_clockinfo[type].cl_lflag;
-
-
-#ifdef HAVE_TERMIOS
- if ((cfsetospeed(&tio, parse_clockinfo[type].cl_speed) == -1) ||
- (cfsetispeed(&tio, parse_clockinfo[type].cl_speed) == -1))
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcset{i,o}speed(&tio, speed): %m", unit);
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0;
- }
-#else
- tio.c_cflag |= parse_clockinfo[type].cl_speed;
-#endif
-
-#if defined(HAVE_TIO_SERIAL_STUFF) /* Linux hack: define PPS interface */
- {
- struct serial_struct ss;
- if (ioctl(fd232, TIOCGSERIAL, &ss) < 0 ||
- (
-#ifdef ASYNC_LOW_LATENCY
- ss.flags |= ASYNC_LOW_LATENCY,
-#endif
-#ifdef ASYNC_PPS_CD_NEG
- ss.flags |= ASYNC_PPS_CD_NEG,
-#endif
- ioctl(fd232, TIOCSSERIAL, &ss)) < 0) {
- msyslog(LOG_NOTICE, "refclock_parse: TIOCSSERIAL fd %d, %m", fd232);
- msyslog(LOG_NOTICE,
- "refclock_parse: optional PPS processing not available");
- } else {
- parse->flags |= PARSE_PPSCLOCK;
- msyslog(LOG_INFO,
- "refclock_parse: PPS detection on");
- }
- }
-#endif
-#ifdef HAVE_TIOCSPPS /* SUN PPS support */
- if (CLK_PPS(parse->peer))
- {
- int i = 1;
-
- if (ioctl(fd232, TIOCSPPS, (caddr_t)&i) == 0)
- {
- parse->flags |= PARSE_PPSCLOCK;
- }
- }
-#endif
-
- if (TTY_SETATTR(fd232, &tio) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcsetattr(%d, &tio): %m", unit, fd232);
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0;
- }
- }
-
- /*
- * Insert in async io device list.
- */
- parse->generic->io.srcclock = (caddr_t)parse;
- parse->generic->io.datalen = 0;
-
- if (!io_addclock(&parse->generic->io))
- {
- msyslog(LOG_ERR,
- "PARSE receiver #%d: parse_start: addclock %s fails (ABORT - clock type requires async io)", CLK_UNIT(parse->peer), parsedev);
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0;
- }
-
- parse->binding = init_iobinding(parse);
- parse->generic->io.clock_recv = parse->binding->bd_receive; /* pick correct receive routine */
- parse->generic->io.io_input = parse->binding->bd_io_input; /* pick correct input routine */
-
- if (parse->binding == (bind_t *)0)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: io sub system initialisation failed.", CLK_UNIT(parse->peer));
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- /*
- * as we always(?) get 8 bit chars we want to be
- * sure, that the upper bits are zero for less
- * than 8 bit I/O - so we pass that information on.
- * note that there can be only one bit count format
- * per file descriptor
- */
-
- switch (tio.c_cflag & CSIZE)
- {
- case CS5:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS5;
- break;
-
- case CS6:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS6;
- break;
-
- case CS7:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS7;
- break;
-
- case CS8:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS8;
- break;
- }
-
- if (!PARSE_SETCS(parse, &tmp_ctl))
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setcs() FAILED.", unit);
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- strcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format);
- tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
-
- if (!PARSE_SETFMT(parse, &tmp_ctl))
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setfmt() FAILED.", unit);
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- /*
- * get rid of all IO accumulated so far
- */
-#ifdef HAVE_TERMIOS
- (void) tcflush(parse->generic->io.fd, TCIOFLUSH);
-#else
-#ifdef TCFLSH
- {
-#ifndef TCIOFLUSH
-#define TCIOFLUSH 2
-#endif
- int flshcmd = TCIOFLUSH;
-
- (void) ioctl(parse->generic->io.fd, TCFLSH, (caddr_t)&flshcmd);
- }
-#endif
-#endif
-
- /*
- * try to do any special initializations
- */
- if (parse->parse_type->cl_init)
- {
- if (parse->parse_type->cl_init(parse))
- {
- parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
- }
-
- /*
- * get out Copyright information once
- */
- if (!notice)
- {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO, "NTP PARSE support: Copyright (c) 1989-1999, Frank Kardel");
- notice = 1;
- }
-
- /*
- * print out configuration
- */
- NLOG(NLOG_CLOCKINFO)
- {
- /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" (device %s) added",
- CLK_UNIT(parse->peer),
- parse->parse_type->cl_description, parsedev);
-
- msyslog(LOG_INFO, "PARSE receiver #%d: Stratum %d, %sPPS support, trust time %s, precision %d",
- CLK_UNIT(parse->peer),
- parse->peer->stratum, CLK_PPS(parse->peer) ? "" : "no ",
- l_mktime(parse->parse_type->cl_maxunsync), parse->peer->precision);
-
- msyslog(LOG_INFO, "PARSE receiver #%d: rootdelay %.6f s, phaseadjust %.6f s, %s IO handling",
- CLK_UNIT(parse->peer),
- parse->parse_type->cl_rootdelay,
- parse->generic->fudgetime1,
- parse->binding->bd_description);
-
- msyslog(LOG_INFO, "PARSE receiver #%d: Format recognition: %s", CLK_UNIT(parse->peer),
- parse->parse_type->cl_format);
-#ifdef PPS
- msyslog(LOG_INFO, "PARSE receiver #%d: %sPPS ioctl support", CLK_UNIT(parse->peer),
- (parse->flags & PARSE_PPSCLOCK) ? "" : "NO ");
-#endif
- }
-
- return 1;
-}
-
-/*--------------------------------------------------
- * parse_poll - called by the transmit procedure
- */
-static void
-parse_poll(
- int unit,
- struct peer *peer
- )
-{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
-
- if (peer != parse->peer)
- {
- msyslog(LOG_ERR,
- "PARSE receiver #%d: poll: INTERNAL: peer incorrect",
- unit);
- return;
- }
-
- /*
- * Update clock stat counters
- */
- parse->generic->polls++;
-
- if (parse->pollneeddata &&
- ((current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
- {
- /*
- * start worrying when exceeding a poll inteval
- * bad news - didn't get a response last time
- */
- parse->generic->noreply++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- ERR(ERR_NODATA)
- msyslog(LOG_WARNING, "PARSE receiver #%d: no data from device within poll interval (check receiver / cableling)", CLK_UNIT(parse->peer));
- }
-
- /*
- * we just mark that we want the next sample for the clock filter
- */
- parse->pollneeddata = current_time;
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- cparse_statistics(parse);
-
- return;
-}
-
-#define LEN_STATES 300 /* length of state string */
-
-/*--------------------------------------------------
- * parse_control - set fudge factors, return statistics
- */
-static void
-parse_control(
- int unit,
- struct refclockstat *in,
- struct refclockstat *out,
- struct peer *peer
- )
-{
- register struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
- parsectl_t tmpctl;
-
- static char outstatus[400]; /* status output buffer */
-
- if (out)
- {
- out->lencode = 0;
- out->p_lastcode = 0;
- out->kv_list = (struct ctl_var *)0;
- }
-
- if (!parse || !parse->peer)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_control: unit invalid (UNIT INACTIVE)",
- unit);
- return;
- }
-
- unit = CLK_UNIT(parse->peer);
-
- if (in)
- {
- if (in->haveflags & (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
- {
- parse->flags = in->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4);
- }
- }
-
- if (out)
- {
- u_long sum = 0;
- char *t, *tt, *start;
- int i;
-
- outstatus[0] = '\0';
-
- out->type = REFCLK_PARSE;
- out->haveflags |= CLK_HAVETIME2;
-
- /*
- * figure out skew between PPS and RS232 - just for informational
- * purposes - returned in time2 value
- */
- if (PARSE_SYNC(parse->time.parse_state))
- {
- if (PARSE_PPS(parse->time.parse_state) && PARSE_TIMECODE(parse->time.parse_state))
- {
- l_fp off;
-
- /*
- * we have a PPS and RS232 signal - calculate the skew
- * WARNING: assumes on TIMECODE == PULSE (timecode after pulse)
- */
- off = parse->time.parse_stime.fp;
- L_SUB(&off, &parse->time.parse_ptime.fp); /* true offset */
- tt = add_var(&out->kv_list, 80, RO);
- sprintf(tt, "refclock_ppsskew=%s", lfptoms(&off, 6));
- }
- }
-
- if (PARSE_PPS(parse->time.parse_state))
- {
- tt = add_var(&out->kv_list, 80, RO|DEF);
- sprintf(tt, "refclock_ppstime=\"%s\"", gmprettydate(&parse->time.parse_ptime.fp));
- }
-
- tt = add_var(&out->kv_list, 128, RO|DEF);
- sprintf(tt, "refclock_time=\"");
- tt += strlen(tt);
-
- if (parse->time.parse_time.fp.l_ui == 0)
- {
- strcpy(tt, "<UNDEFINED>\"");
- }
- else
- {
- sprintf(tt, "%s\"", gmprettydate(&parse->time.parse_time.fp));
- t = tt + strlen(tt);
- }
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
- {
- ERR(ERR_INTERNAL)
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_control: parse_timecode() FAILED", unit);
- }
- else
- {
- tt = add_var(&out->kv_list, 512, RO|DEF);
- sprintf(tt, "refclock_status=\"");
- tt += strlen(tt);
-
- /*
- * copy PPS flags from last read transaction (informational only)
- */
- tmpctl.parsegettc.parse_state |= parse->time.parse_state &
- (PARSEB_PPS|PARSEB_S_PPS);
-
- (void) parsestate(tmpctl.parsegettc.parse_state, tt);
-
- strcat(tt, "\"");
-
- if (tmpctl.parsegettc.parse_count)
- mkascii(outstatus+strlen(outstatus), (int)(sizeof(outstatus)- strlen(outstatus) - 1),
- tmpctl.parsegettc.parse_buffer, (unsigned)(tmpctl.parsegettc.parse_count - 1));
-
- parse->generic->badformat += tmpctl.parsegettc.parse_badformat;
- }
-
- tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
- if (!PARSE_GETFMT(parse, &tmpctl))
- {
- ERR(ERR_INTERNAL)
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_control: parse_getfmt() FAILED", unit);
- }
- else
- {
- tt = add_var(&out->kv_list, 80, RO|DEF);
- sprintf(tt, "refclock_format=\"");
-
- strncat(tt, tmpctl.parseformat.parse_buffer, tmpctl.parseformat.parse_count);
- strcat(tt,"\"");
- }
-
- /*
- * gather state statistics
- */
-
- start = tt = add_var(&out->kv_list, LEN_STATES, RO|DEF);
- strcpy(tt, "refclock_states=\"");
- tt += strlen(tt);
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
- u_long s_time;
- u_long d = current_time - parse->generic->timestarted;
- u_long percent;
-
- percent = s_time = PARSE_STATETIME(parse, i);
-
- while (((u_long)(~0) / 10000) < percent)
- {
- percent /= 10;
- d /= 10;
- }
-
- if (d)
- percent = (percent * 10000) / d;
- else
- percent = 10000;
-
- if (s_time)
- {
- char item[80];
- int count;
-
- sprintf(item, "%s%s%s: %s (%d.%02d%%)",
- sum ? "; " : "",
- (parse->generic->currentstatus == i) ? "*" : "",
- clockstatus((unsigned int)i),
- l_mktime(s_time),
- (int)(percent / 100), (int)(percent % 100));
- if ((count = strlen(item)) < (LEN_STATES - 40 - (tt - start)))
- {
- strcpy(tt, item);
- tt += count;
- }
- sum += s_time;
- }
- }
-
- sprintf(tt, "; running time: %s\"", l_mktime(sum));
-
- tt = add_var(&out->kv_list, 32, RO);
- sprintf(tt, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
- tt = add_var(&out->kv_list, 80, RO);
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
- sprintf(tt, "refclock_driver_version=\"%s\"", rcsid);
-
- {
- struct ctl_var *k;
-
- k = parse->kv;
- while (k && !(k->flags & EOV))
- {
- set_var(&out->kv_list, k->text, strlen(k->text)+1, k->flags);
- k++;
- }
- }
-
- out->lencode = strlen(outstatus);
- out->p_lastcode = outstatus;
- }
-}
-
-/**===========================================================================
- ** processing routines
- **/
-
-/*--------------------------------------------------
- * event handling - note that nominal events will also be posted
- */
-static void
-parse_event(
- struct parseunit *parse,
- int event
- )
-{
- if (parse->generic->currentstatus != (u_char) event)
- {
- parse->statetime[parse->generic->currentstatus] += current_time - parse->lastchange;
- parse->lastchange = current_time;
-
- parse->generic->currentstatus = (u_char)event;
-
- if (parse->parse_type->cl_event)
- parse->parse_type->cl_event(parse, event);
-
- if (event != CEVNT_NOMINAL)
- {
- parse->generic->lastevent = parse->generic->currentstatus;
- }
- else
- {
- NLOG(NLOG_CLOCKSTATUS)
- msyslog(LOG_INFO, "PARSE receiver #%d: SYNCHRONIZED",
- CLK_UNIT(parse->peer));
- }
-
- if (event == CEVNT_FAULT)
- {
- 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), ceventstr(event),
- (u_int)event);
- }
- else
- {
- 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), ceventstr(event),
- (u_int)event);
- }
-
- report_event(EVNT_PEERCLOCK, parse->peer);
- report_event(EVNT_CLOCKEXCPT, parse->peer);
- }
-}
-
-/*--------------------------------------------------
- * process a PARSE time sample
- */
-static void
-parse_process(
- struct parseunit *parse,
- parsetime_t *parsetime
- )
-{
- l_fp off, rectime, reftime;
- double fudge;
-
- /*
- * check for changes in conversion status
- * (only one for each new status !)
- */
- if (((parsetime->parse_status & CVT_MASK) != CVT_OK) &&
- ((parsetime->parse_status & CVT_MASK) != CVT_NONE) &&
- (parse->time.parse_status != parsetime->parse_status))
- {
- char buffer[400];
-
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_WARNING, "PARSE receiver #%d: conversion status \"%s\"",
- CLK_UNIT(parse->peer), parsestatus(parsetime->parse_status, buffer));
-
- if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
- {
- /*
- * tell more about the story - list time code
- * there is a slight change for a race condition and
- * the time code might be overwritten by the next packet
- */
- parsectl_t tmpctl;
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
- {
- ERR(ERR_INTERNAL)
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_process: parse_timecode() FAILED", CLK_UNIT(parse->peer));
- }
- else
- {
- ERR(ERR_BADDATA)
- msyslog(LOG_WARNING, "PARSE receiver #%d: FAILED TIMECODE: \"%s\" (check receiver configuration / cableling)",
- CLK_UNIT(parse->peer), mkascii(buffer, sizeof buffer, tmpctl.parsegettc.parse_buffer, (unsigned)(tmpctl.parsegettc.parse_count - 1)));
- parse->generic->badformat += tmpctl.parsegettc.parse_badformat;
- }
- }
- }
-
- /*
- * examine status and post appropriate events
- */
- if ((parsetime->parse_status & CVT_MASK) != CVT_OK)
- {
- /*
- * got bad data - tell the rest of the system
- */
- switch (parsetime->parse_status & CVT_MASK)
- {
- case CVT_NONE:
- if ((parsetime->parse_status & CVT_ADDITIONAL) &&
- parse->parse_type->cl_message)
- parse->parse_type->cl_message(parse, parsetime);
- break; /* well, still waiting - timeout is handled at higher levels */
-
- case CVT_FAIL:
- parse->generic->badformat++;
- if (parsetime->parse_status & CVT_BADFMT)
- {
- parse_event(parse, CEVNT_BADREPLY);
- }
- else
- if (parsetime->parse_status & CVT_BADDATE)
- {
- parse_event(parse, CEVNT_BADDATE);
- }
- else
- if (parsetime->parse_status & CVT_BADTIME)
- {
- parse_event(parse, CEVNT_BADTIME);
- }
- else
- {
- parse_event(parse, CEVNT_BADREPLY); /* for the lack of something better */
- }
- }
- return; /* skip the rest - useless */
- }
-
- /*
- * check for format changes
- * (in case somebody has swapped clocks 8-)
- */
- if (parse->lastformat != parsetime->parse_format)
- {
- parsectl_t tmpctl;
-
- tmpctl.parseformat.parse_format = parsetime->parse_format;
-
- if (!PARSE_GETFMT(parse, &tmpctl))
- {
- ERR(ERR_INTERNAL)
- msyslog(LOG_ERR, "PARSE receiver #%d: parse_getfmt() FAILED", CLK_UNIT(parse->peer));
- }
- else
- {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO, "PARSE receiver #%d: packet format \"%s\"",
- CLK_UNIT(parse->peer), tmpctl.parseformat.parse_buffer);
- }
- parse->lastformat = parsetime->parse_format;
- }
-
- /*
- * now, any changes ?
- */
- if (parse->time.parse_state != parsetime->parse_state)
- {
- char tmp1[200];
- char tmp2[200];
- /*
- * something happend
- */
-
- (void) parsestate(parsetime->parse_state, tmp1);
- (void) parsestate(parse->time.parse_state, tmp2);
-
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
- CLK_UNIT(parse->peer), tmp2, tmp1);
- }
-
- /*
- * remember for future
- */
- parse->time = *parsetime;
-
- /*
- * check to see, whether the clock did a complete powerup or lost PZF signal
- * and post correct events for current condition
- */
- if (PARSE_POWERUP(parsetime->parse_state))
- {
- /*
- * this is bad, as we have completely lost synchronisation
- * well this is a problem with the receiver here
- * for PARSE Meinberg DCF77 receivers the lost synchronisation
- * is true as it is the powerup state and the time is taken
- * from a crude real time clock chip
- * for the PZF series this is only partly true, as
- * PARSE_POWERUP only means that the pseudo random
- * phase shift sequence cannot be found. this is only
- * bad, if we have never seen the clock in the SYNC
- * state, where the PHASE and EPOCH are correct.
- * for reporting events the above business does not
- * really matter, but we can use the time code
- * even in the POWERUP state after having seen
- * the clock in the synchronized state (PZF class
- * receivers) unless we have had a telegram disruption
- * after having seen the clock in the SYNC state. we
- * thus require having seen the clock in SYNC state
- * *after* having missed telegrams (noresponse) from
- * the clock. one problem remains: we might use erroneously
- * POWERUP data if the disruption is shorter than 1 polling
- * interval. fortunately powerdowns last usually longer than 64
- * seconds and the receiver is at least 2 minutes in the
- * POWERUP or NOSYNC state before switching to SYNC
- */
- parse_event(parse, CEVNT_FAULT);
- NLOG(NLOG_CLOCKSTATUS)
- ERR(ERR_BADSTATUS)
- msyslog(LOG_ERR,"PARSE receiver #%d: NOT SYNCHRONIZED",
- CLK_UNIT(parse->peer));
- }
- else
- {
- /*
- * we have two states left
- *
- * SYNC:
- * this state means that the EPOCH (timecode) and PHASE
- * information has be read correctly (at least two
- * successive PARSE timecodes were received correctly)
- * this is the best possible state - full trust
- *
- * NOSYNC:
- * The clock should be on phase with respect to the second
- * signal, but the timecode has not been received correctly within
- * at least the last two minutes. this is a sort of half baked state
- * for PARSE Meinberg DCF77 clocks this is bad news (clock running
- * without timecode confirmation)
- * PZF 535 has also no time confirmation, but the phase should be
- * very precise as the PZF signal can be decoded
- */
-
- if (PARSE_SYNC(parsetime->parse_state))
- {
- /*
- * currently completely synchronized - best possible state
- */
- parse->lastsync = current_time;
- clear_err(parse, ERR_BADSTATUS);
- }
- else
- {
- /*
- * we have had some problems receiving the time code
- */
- parse_event(parse, CEVNT_PROP);
- NLOG(NLOG_CLOCKSTATUS)
- ERR(ERR_BADSTATUS)
- msyslog(LOG_ERR,"PARSE receiver #%d: TIMECODE NOT CONFIRMED",
- CLK_UNIT(parse->peer));
- }
- }
-
- fudge = parse->generic->fudgetime1; /* standard RS232 Fudgefactor */
-
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- rectime = parsetime->parse_stime.fp;
- off = reftime = parsetime->parse_time.fp;
-
- L_SUB(&off, &rectime); /* prepare for PPS adjustments logic */
-
-#ifdef DEBUG
- if (debug > 3)
- printf("PARSE receiver #%d: Reftime %s, Recvtime %s - initial offset %s\n",
- CLK_UNIT(parse->peer),
- prettydate(&reftime),
- prettydate(&rectime),
- lfptoa(&off,6));
-#endif
- }
-
- if (PARSE_PPS(parsetime->parse_state) && CLK_PPS(parse->peer))
- {
- l_fp offset;
-
- /*
- * we have a PPS signal - much better than the RS232 stuff (we hope)
- */
- offset = parsetime->parse_ptime.fp;
-
-#ifdef DEBUG
- if (debug > 3)
- printf("PARSE receiver #%d: PPStime %s\n",
- CLK_UNIT(parse->peer),
- prettydate(&offset));
-#endif
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- if (M_ISGEQ(off.l_i, off.l_f, -1, 0x80000000) &&
- M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_f))
- {
- fudge = parse->generic->fudgetime2; /* pick PPS fudge factor */
-
- /*
- * RS232 offsets within [-0.5..0.5[ - take PPS offsets
- */
-
- if (parse->parse_type->cl_flags & PARSE_F_PPSONSECOND)
- {
- reftime = off = offset;
- if (reftime.l_uf & (unsigned)0x80000000)
- reftime.l_ui++;
- reftime.l_uf = 0;
-
-
- /*
- * implied on second offset
- */
- off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_ui = (off.l_f < 0) ? ~0 : 0; /* sign extend */
- }
- else
- {
- /*
- * time code describes pulse
- */
- reftime = off = parsetime->parse_time.fp;
-
- L_SUB(&off, &offset); /* true offset */
- }
- }
- /*
- * take RS232 offset when PPS when out of bounds
- */
- }
- else
- {
- fudge = parse->generic->fudgetime2; /* pick PPS fudge factor */
- /*
- * Well, no time code to guide us - assume on second pulse
- * and pray, that we are within [-0.5..0.5[
- */
- off = offset;
- reftime = offset;
- if (reftime.l_uf & (unsigned)0x80000000)
- reftime.l_ui++;
- reftime.l_uf = 0;
- /*
- * implied on second offset
- */
- off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_ui = (off.l_f < 0) ? ~0 : 0; /* sign extend */
- }
- }
- else
- {
- if (!PARSE_TIMECODE(parsetime->parse_state))
- {
- /*
- * Well, no PPS, no TIMECODE, no more work ...
- */
- if ((parsetime->parse_status & CVT_ADDITIONAL) &&
- parse->parse_type->cl_message)
- parse->parse_type->cl_message(parse, parsetime);
- return;
- }
- }
-
-#ifdef DEBUG
- if (debug > 3)
- printf("PARSE receiver #%d: Reftime %s, Recvtime %s - final offset %s\n",
- CLK_UNIT(parse->peer),
- prettydate(&reftime),
- prettydate(&rectime),
- lfptoa(&off,6));
-#endif
-
-
- rectime = reftime;
- L_SUB(&rectime, &off); /* just to keep the ntp interface happy */
-
-#ifdef DEBUG
- if (debug > 3)
- printf("PARSE receiver #%d: calculated Reftime %s, Recvtime %s\n",
- CLK_UNIT(parse->peer),
- prettydate(&reftime),
- prettydate(&rectime));
-#endif
-
- if ((parsetime->parse_status & CVT_ADDITIONAL) &&
- parse->parse_type->cl_message)
- parse->parse_type->cl_message(parse, parsetime);
-
- if (PARSE_SYNC(parsetime->parse_state))
- {
- /*
- * log OK status
- */
- parse_event(parse, CEVNT_NOMINAL);
- }
-
- clear_err(parse, ERR_BADIO);
- clear_err(parse, ERR_BADDATA);
- clear_err(parse, ERR_NODATA);
- clear_err(parse, ERR_INTERNAL);
-
-#ifdef DEBUG
- if (debug > 2)
- {
- printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
- CLK_UNIT(parse->peer),
- prettydate(&reftime),
- prettydate(&rectime),
- fudge);
- }
-#endif
-
- refclock_process_offset(parse->generic, reftime, rectime, fudge);
- if (PARSE_PPS(parsetime->parse_state) && CLK_PPS(parse->peer))
- {
- (void) pps_sample(&parse->time.parse_ptime.fp);
- }
-
-
- /*
- * and now stick it into the clock machine
- * samples are only valid iff lastsync is not too old and
- * we have seen the clock in sync at least once
- * after the last time we didn't see an expected data telegram
- * see the clock states section above for more reasoning
- */
- if (((current_time - parse->lastsync) > parse->parse_type->cl_maxunsync) ||
- (parse->lastsync <= parse->lastmissed))
- {
- parse->generic->leap = LEAP_NOTINSYNC;
- }
- else
- {
- if (PARSE_LEAPADD(parsetime->parse_state))
- {
- /*
- * we pick this state also for time code that pass leap warnings
- * without direction information (as earth is currently slowing
- * down).
- */
- parse->generic->leap = (parse->flags & PARSE_LEAP_DELETE) ? LEAP_DELSECOND : LEAP_ADDSECOND;
- }
- else
- if (PARSE_LEAPDEL(parsetime->parse_state))
- {
- parse->generic->leap = LEAP_DELSECOND;
- }
- else
- {
- parse->generic->leap = LEAP_NOWARNING;
- }
- }
-
- /*
- * ready, unless the machine wants a sample
- */
- if (!parse->pollneeddata)
- return;
-
- parse->pollneeddata = 0;
-
- refclock_receive(parse->peer);
-}
-
-/**===========================================================================
- ** special code for special clocks
- **/
-
-static void
-mk_utcinfo(
- char *t,
- int wnt,
- int wnlsf,
- int dn,
- int dtls,
- int dtlsf
- )
-{
- l_fp leapdate;
-
- sprintf(t, "current correction %d sec", dtls);
- t += strlen(t);
-
- if (wnlsf < 990)
- wnlsf += 1024;
-
- if (wnt < 990)
- wnt += 1024;
-
- gpstolfp((unsigned short)wnlsf, (unsigned short)dn, 0, &leapdate);
-
- if ((dtlsf != dtls) &&
- ((wnlsf - wnt) < 52))
- {
- sprintf(t, ", next correction %d sec on %s, new GPS-UTC offset %d",
- dtlsf - dtls, gmprettydate(&leapdate), dtlsf);
- }
- else
- {
- sprintf(t, ", last correction on %s",
- gmprettydate(&leapdate));
- }
-}
-
-#ifdef CLOCK_MEINBERG
-/**===========================================================================
- ** Meinberg GPS166/GPS167 support
- **/
-
-/*------------------------------------------------------------
- * gps16x_message - process GPS16x messages
- */
-static void
-gps16x_message(
- struct parseunit *parse,
- parsetime_t *parsetime
- )
-{
- if (parse->time.parse_msglen && parsetime->parse_msg[0] == SOH)
- {
- GPS_MSG_HDR header;
- unsigned char *bufp = (unsigned char *)parsetime->parse_msg + 1;
-
-#ifdef DEBUG
- if (debug > 2)
- {
- char msgbuffer[600];
-
- mkreadable(msgbuffer, sizeof(msgbuffer), (char *)parsetime->parse_msg, parsetime->parse_msglen, 1);
- printf("PARSE receiver #%d: received message (%d bytes) >%s<\n",
- CLK_UNIT(parse->peer),
- parsetime->parse_msglen,
- msgbuffer);
- }
-#endif
- get_mbg_header(&bufp, &header);
- if (header.gps_hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
- (header.gps_len == 0 ||
- (header.gps_len < sizeof(parsetime->parse_msg) &&
- header.gps_data_csum == mbg_csum(bufp, header.gps_len))))
- {
- /*
- * clean message
- */
- switch (header.gps_cmd)
- {
- case GPS_SW_REV:
- {
- char buffer[64];
- SW_REV gps_sw_rev;
-
- get_mbg_sw_rev(&bufp, &gps_sw_rev);
- sprintf(buffer, "meinberg_gps_version=\"%x.%02x%s%s\"",
- (gps_sw_rev.code >> 8) & 0xFF,
- gps_sw_rev.code & 0xFF,
- gps_sw_rev.name[0] ? " " : "",
- gps_sw_rev.name);
- set_var(&parse->kv, buffer, 64, RO|DEF);
- }
- break;
-
- case GPS_STAT:
- {
- static struct state
- {
- unsigned short flag; /* status flag */
- unsigned const char *string; /* bit name */
- } states[] =
- {
- { TM_ANT_DISCONN, (const unsigned char *)"ANTENNA FAULTY" },
- { TM_SYN_FLAG, (const unsigned char *)"NO SYNC SIGNAL" },
- { TM_NO_SYNC, (const unsigned char *)"NO SYNC POWERUP" },
- { TM_NO_POS, (const unsigned char *)"NO POSITION" },
- { 0, (const unsigned char *)"" }
- };
- unsigned short status;
- struct state *s = states;
- char buffer[512];
- char *p, *b;
-
- status = get_lsb_short(&bufp);
- sprintf(buffer, "meinberg_gps_status=\"[0x%04x] ", status);
-
- if (status)
- {
- p = b = buffer + strlen(buffer);
- while (s->flag)
- {
- if (status & s->flag)
- {
- if (p != b)
- {
- *p++ = ',';
- *p++ = ' ';
- }
-
- strcat(p, (const char *)s->string);
- }
- s++;
- }
-
- *p++ = '"';
- *p = '\0';
- }
- else
- {
- strcat(buffer, "<OK>\"");
- }
-
- set_var(&parse->kv, buffer, 64, RO|DEF);
- }
- break;
-
- case GPS_POS_XYZ:
- {
- XYZ xyz;
- char buffer[256];
-
- get_mbg_xyz(&bufp, xyz);
- sprintf(buffer, "gps_position(XYZ)=\"%s m, %s m, %s m\"",
- mfptoa(xyz[XP].l_ui, xyz[XP].l_uf, 1),
- mfptoa(xyz[YP].l_ui, xyz[YP].l_uf, 1),
- mfptoa(xyz[ZP].l_ui, xyz[ZP].l_uf, 1));
-
- set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
- }
- break;
-
- case GPS_POS_LLA:
- {
- LLA lla;
- char buffer[256];
-
- get_mbg_lla(&bufp, lla);
-
- sprintf(buffer, "gps_position(LLA)=\"%s deg, %s deg, %s m\"",
- mfptoa(lla[LAT].l_ui, lla[LAT].l_uf, 4),
- mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
- mfptoa(lla[ALT].l_ui, lla[ALT].l_uf, 1));
-
- set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
- }
- break;
-
- case GPS_TZDL:
- break;
-
- case GPS_PORT_PARM:
- break;
-
- case GPS_SYNTH:
- break;
-
- case GPS_ANT_INFO:
- {
- ANT_INFO antinfo;
- u_char buffer[512];
- u_char *p;
-
- get_mbg_antinfo(&bufp, &antinfo);
- sprintf(buffer, "meinberg_antenna_status=\"");
- p = buffer + strlen(buffer);
-
- switch (antinfo.status)
- {
- case ANT_INVALID:
- strcat(p, "<OK>");
- p += strlen(p);
- break;
-
- case ANT_DISCONN:
- strcat(p, "DISCONNECTED since ");
- NLOG(NLOG_CLOCKSTATUS)
- ERR(ERR_BADSTATUS)
- msyslog(LOG_ERR,"PARSE receiver #%d: ANTENNA FAILURE: %s",
- CLK_UNIT(parse->peer), p);
-
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_disconn);
- *p = '\0';
- break;
-
- case ANT_RECONN:
- strcat(p, "RECONNECTED on ");
- p += strlen(p);
- 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(&p, &antinfo.tm_disconn);
- *p = '\0';
- break;
-
- default:
- sprintf(p, "bad status 0x%04x", antinfo.status);
- p += strlen(p);
- break;
- }
-
- *p++ = '"';
- *p = '\0';
-
- set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
- }
- break;
-
- case GPS_UCAP:
- break;
-
- case GPS_CFGH:
- {
- CFGH cfgh;
- u_char buffer[512];
- u_char *p;
-
- get_mbg_cfgh(&bufp, &cfgh);
- if (cfgh.valid)
- {
- int i;
-
- p = buffer;
- strcpy(buffer, "gps_tot_51=\"");
- p += strlen(p);
- mbg_tgps_str(&p, &cfgh.tot_51);
- *p++ = '"';
- *p = '\0';
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
- p = buffer;
- strcpy(buffer, "gps_tot_63=\"");
- p += strlen(p);
- mbg_tgps_str(&p, &cfgh.tot_63);
- *p++ = '"';
- *p = '\0';
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
- p = buffer;
- strcpy(buffer, "gps_t0a=\"");
- p += strlen(p);
- mbg_tgps_str(&p, &cfgh.t0a);
- *p++ = '"';
- *p = '\0';
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
- for (i = MIN_SVNO; i <= MAX_SVNO; i++)
- {
- p = buffer;
- sprintf(p, "gps_cfg[%d]=\"[0x%x] ", i, cfgh.cfg[i]);
- p += strlen(p);
- switch (cfgh.cfg[i] & 0x7)
- {
- case 0:
- strcpy(p, "BLOCK I");
- break;
- case 1:
- strcpy(p, "BLOCK II");
- break;
- default:
- sprintf(p, "bad CFG");
- break;
- }
- strcat(p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
-
- p = buffer;
- sprintf(p, "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
- p += strlen(p);
- switch ((cfgh.health[i] >> 5) & 0x7 )
- {
- case 0:
- strcpy(p, "OK;");
- break;
- case 1:
- strcpy(p, "PARITY;");
- break;
- case 2:
- strcpy(p, "TLM/HOW;");
- break;
- case 3:
- strcpy(p, "Z-COUNT;");
- break;
- case 4:
- strcpy(p, "SUBFRAME 1,2,3;");
- break;
- case 5:
- strcpy(p, "SUBFRAME 4,5;");
- break;
- case 6:
- strcpy(p, "UPLOAD BAD;");
- break;
- case 7:
- strcpy(p, "DATA BAD;");
- break;
- }
-
- p += strlen(p);
-
- switch (cfgh.health[i] & 0x1F)
- {
- case 0:
- strcpy(p, "SIGNAL OK");
- break;
- case 0x1C:
- strcpy(p, "SV TEMP OUT");
- break;
- case 0x1D:
- strcpy(p, "SV WILL BE TEMP OUT");
- break;
- case 0x1E:
- break;
- case 0x1F:
- strcpy(p, "MULTIPLE ERRS");
- break;
- default:
- strcpy(p, "TRANSMISSION PROBLEMS");
- break;
- }
-
- strcat(p, "\"");
- set_var(&parse->kv, buffer, sizeof(buffer), RO);
- }
- }
- }
- break;
-
- case GPS_ALM:
- break;
-
- case GPS_EPH:
- break;
-
- case GPS_UTC:
- {
- UTC utc;
- char buffer[512];
- char *p;
-
- p = buffer;
-
- get_mbg_utc(&bufp, &utc);
-
- if (utc.valid)
- {
- strcpy(p, "gps_utc_correction=\"");
- p += strlen(p);
- mk_utcinfo(p, utc.t0t.wn, utc.WNlsf, utc.DNt, utc.delta_tls, utc.delta_tlsf);
- strcat(p, "\"");
- }
- else
- {
- strcpy(p, "gps_utc_correction=\"<NO UTC DATA>\"");
- }
- set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
- }
- break;
-
- case GPS_IONO:
- break;
-
- case GPS_ASCII_MSG:
- {
- ASCII_MSG gps_ascii_msg;
- char buffer[128];
-
- get_mbg_ascii_msg(&bufp, &gps_ascii_msg);
-
- if (gps_ascii_msg.valid)
- {
- char buffer1[128];
- mkreadable(buffer1, sizeof(buffer1), gps_ascii_msg.s, strlen(gps_ascii_msg.s), (int)0);
-
- sprintf(buffer, "gps_message=\"%s\"", buffer1);
- }
- else
- strcpy(buffer, "gps_message=<NONE>");
-
- set_var(&parse->kv, buffer, 128, RO|DEF);
- }
-
- break;
-
- default:
- break;
- }
- }
- else
- {
- msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%lx), data_len = %d, data_csum = 0x%x (expected 0x%lx)",
- CLK_UNIT(parse->peer),
- header.gps_hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
- header.gps_len,
- header.gps_data_csum, mbg_csum(bufp, (unsigned)((header.gps_len < sizeof(parsetime->parse_msg)) ? header.gps_len : 0)));
- }
- }
-
- return;
-}
-
-/*------------------------------------------------------------
- * gps16x_poll - query the reciver peridically
- */
-static void
-gps16x_poll(
- struct peer *peer
- )
-{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
-
- static GPS_MSG_HDR sequence[] =
- {
- { GPS_SW_REV, 0, 0, 0 },
- { GPS_STAT, 0, 0, 0 },
- { GPS_UTC, 0, 0, 0 },
- { GPS_ASCII_MSG, 0, 0, 0 },
- { GPS_ANT_INFO, 0, 0, 0 },
- { GPS_CFGH, 0, 0, 0 },
- { GPS_POS_XYZ, 0, 0, 0 },
- { GPS_POS_LLA, 0, 0, 0 },
- { (unsigned short)~0, 0, 0, 0 }
- };
-
- int rtc;
- unsigned char cmd_buffer[64];
- unsigned char *outp = cmd_buffer;
- GPS_MSG_HDR *header;
-
- if (((poll_info_t *)parse->parse_type->cl_data)->rate)
- {
- parse->peer->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
- }
-
- if (sequence[parse->localstate].gps_cmd == (unsigned short)~0)
- parse->localstate = 0;
-
- header = sequence + parse->localstate++;
-
- *outp++ = SOH; /* start command */
-
- put_mbg_header(&outp, header);
- outp = cmd_buffer + 1;
-
- header->gps_hdr_csum = (short)mbg_csum(outp, 6);
- put_mbg_header(&outp, header);
-
-#ifdef DEBUG
- if (debug > 2)
- {
- char buffer[128];
-
- mkreadable(buffer, sizeof(buffer), (char *)cmd_buffer, (unsigned)(outp - cmd_buffer), 1);
- printf("PARSE receiver #%d: transmitted message #%ld (%d bytes) >%s<\n",
- CLK_UNIT(parse->peer),
- parse->localstate - 1,
- (int)(outp - cmd_buffer),
- buffer);
- }
-#endif
-
- rtc = write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
-
- if (rtc < 0)
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: gps16x_poll: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
- }
- else
- if (rtc != outp - cmd_buffer)
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: gps16x_poll: failed to send cmd incomplete (%d of %d bytes sent)", CLK_UNIT(parse->peer), rtc, (int)(outp - cmd_buffer));
- }
-
- clear_err(parse, ERR_BADIO);
- return;
-}
-
-/*--------------------------------------------------
- * init routine - setup timer
- */
-static int
-gps16x_poll_init(
- struct parseunit *parse
- )
-{
- if (((poll_info_t *)parse->parse_type->cl_data)->rate)
- {
- parse->peer->action = gps16x_poll;
- gps16x_poll(parse->peer);
- }
-
- return 0;
-}
-
-#else
-static void
-gps16x_message(
- struct parseunit *parse,
- parsetime_t *parsetime
- )
-{}
-static int
-gps16x_poll_init(
- struct parseunit *parse
- )
-{
- return 1;
-}
-#endif /* CLOCK_MEINBERG */
-
-/**===========================================================================
- ** clock polling support
- **/
-
-/*--------------------------------------------------
- * direct poll routine
- */
-static void
-poll_dpoll(
- struct parseunit *parse
- )
-{
- int rtc;
- const char *ps = ((poll_info_t *)parse->parse_type->cl_data)->string;
- int ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
-
- rtc = write(parse->generic->io.fd, ps, (unsigned long)ct);
- if (rtc < 0)
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
- }
- else
- if (rtc != ct)
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%d of %d bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
- }
- clear_err(parse, ERR_BADIO);
-}
-
-/*--------------------------------------------------
- * periodic poll routine
- */
-static void
-poll_poll(
- struct peer *peer
- )
-{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
-
- if (parse->parse_type->cl_poll)
- parse->parse_type->cl_poll(parse);
-
- if (((poll_info_t *)parse->parse_type->cl_data)->rate)
- {
- parse->peer->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
- }
-}
-
-/*--------------------------------------------------
- * init routine - setup timer
- */
-static int
-poll_init(
- struct parseunit *parse
- )
-{
- if (((poll_info_t *)parse->parse_type->cl_data)->rate)
- {
- parse->peer->action = poll_poll;
- poll_poll(parse->peer);
- }
-
- return 0;
-}
-
-/**===========================================================================
- ** Trimble support
- **/
-
-/*-------------------------------------------------------------
- * trimble TAIP init routine - setup EOL and then do poll_init.
- */
-static int
-trimbletaip_init(
- struct parseunit *parse
- )
-{
-#ifdef HAVE_TERMIOS
- struct termios tio;
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tio;
-#endif
- /*
- * configure terminal line for trimble receiver
- */
- if (TTY_GETATTR(parse->generic->io.fd, &tio) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_init: tcgetattr(fd, &tio): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- else
- {
- tio.c_cc[VEOL] = TRIMBLETAIP_EOL;
-
- if (TTY_SETATTR(parse->generic->io.fd, &tio) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_init: tcsetattr(fd, &tio): %m", CLK_UNIT(parse->peer));
- return 0;
- }
- }
- return poll_init(parse);
-}
-
-/*--------------------------------------------------
- * trimble TAIP event routine - reset receiver upon data format trouble
- */
-static const char *taipinit[] = {
- ">FPV00000000<",
- ">SRM;ID_FLAG=F;CS_FLAG=T;EC_FLAG=F;FR_FLAG=T;CR_FLAG=F<",
- ">FTM00020001<",
- (char *)0
-};
-
-static void
-trimbletaip_event(
- struct parseunit *parse,
- int event
- )
-{
- switch (event)
- {
- case CEVNT_BADREPLY: /* reset on garbled input */
- case CEVNT_TIMEOUT: /* reset on no input */
- {
- const char **iv;
-
- iv = taipinit;
- while (*iv)
- {
- int rtc = write(parse->generic->io.fd, *iv, strlen(*iv));
- if (rtc < 0)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
- return;
- }
- else
- {
- if (rtc != strlen(*iv))
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd incomplete (%d of %d bytes sent)",
- CLK_UNIT(parse->peer), rtc, (int)strlen(*iv));
- return;
- }
- }
- iv++;
- }
-
- NLOG(NLOG_CLOCKINFO)
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: RECEIVER INITIALIZED",
- CLK_UNIT(parse->peer));
- }
- break;
-
- default: /* ignore */
- break;
- }
-}
-
-/*
- * This driver supports the Trimble SVee Six Plus GPS receiver module.
- * It should support other Trimble receivers which use the Trimble Standard
- * Interface Protocol (see below).
- *
- * The module has a serial I/O port for command/data and a 1 pulse-per-second
- * output, about 1 microsecond wide. The leading edge of the pulse is
- * coincident with the change of the GPS second. This is the same as
- * the change of the UTC second +/- ~1 microsecond. Some other clocks
- * specifically use a feature in the data message as a timing reference, but
- * the SVee Six Plus does not do this. In fact there is considerable jitter
- * on the timing of the messages, so this driver only supports the use
- * of the PPS pulse for accurate timing. Where it is determined that
- * the offset is way off, when first starting up ntpd for example,
- * the timing of the data stream is used until the offset becomes low enough
- * (|offset| < CLOCK_MAX), at which point the pps offset is used.
- *
- * It can use either option for receiving PPS information - the 'ppsclock'
- * stream pushed onto the serial data interface to timestamp the Carrier
- * Detect interrupts, where the 1PPS connects to the CD line. This only
- * works on SunOS 4.1.x currently. To select this, define PPSPPS in
- * Config.local. The other option is to use a pulse-stretcher/level-converter
- * to convert the PPS pulse into a RS232 start pulse & feed this into another
- * tty port. To use this option, define PPSCLK in Config.local. The pps input,
- * by whichever method, is handled in ntp_loopfilter.c
- *
- * The receiver uses a serial message protocol called Trimble Standard
- * Interface Protocol (it can support others but this driver only supports
- * TSIP). Messages in this protocol have the following form:
- *
- * <DLE><id> ... <data> ... <DLE><ETX>
- *
- * Any bytes within the <data> portion of value 10 hex (<DLE>) are doubled
- * on transmission and compressed back to one on reception. Otherwise
- * the values of data bytes can be anything. The serial interface is RS-422
- * asynchronous using 9600 baud, 8 data bits with odd party (**note** 9 bits
- * in total!), and 1 stop bit. The protocol supports byte, integer, single,
- * and double datatypes. Integers are two bytes, sent most significant first.
- * Singles are IEEE754 single precision floating point numbers (4 byte) sent
- * sign & exponent first. Doubles are IEEE754 double precision floating point
- * numbers (8 byte) sent sign & exponent first.
- * The receiver supports a large set of messages, only a small subset of
- * which are used here. From driver to receiver the following are used:
- *
- * ID Description
- *
- * 21 Request current time
- * 22 Mode Select
- * 2C Set/Request operating parameters
- * 2F Request UTC info
- * 35 Set/Request I/O options
-
- * From receiver to driver the following are recognised:
- *
- * ID Description
- *
- * 41 GPS Time
- * 44 Satellite selection, PDOP, mode
- * 46 Receiver health
- * 4B Machine code/status
- * 4C Report operating parameters (debug only)
- * 4F UTC correction data (used to get leap second warnings)
- * 55 I/O options (debug only)
- *
- * All others are accepted but ignored.
- *
- */
-
-#define PI 3.1415926535898 /* lots of sig figs */
-#define D2R PI/180.0
-
-/*-------------------------------------------------------------------
- * sendcmd, sendbyte, sendetx, sendflt, sendint implement the command
- * interface to the receiver.
- *
- * CAVEAT: the sendflt, sendint routines are byte order dependend and
- * float implementation dependend - these must be converted to portable
- * versions !
- *
- * CURRENT LIMITATION: float implementation. This runs only on systems
- * with IEEE754 floats as native floats
- */
-
-typedef struct trimble
-{
- u_long last_msg; /* last message received */
- u_char qtracking; /* query tracking status */
- u_long ctrack; /* current tracking set */
- u_long ltrack; /* last tracking set */
-} trimble_t;
-
-union uval {
- u_char bd[8];
- int iv;
- float fv;
- double dv;
-};
-
-struct txbuf
-{
- short idx; /* index to first unused byte */
- u_char *txt; /* pointer to actual data buffer */
-};
-
-void sendcmd P((struct txbuf *buf, int c));
-void sendbyte P((struct txbuf *buf, int b));
-void sendetx P((struct txbuf *buf, struct parseunit *parse));
-void sendint P((struct txbuf *buf, int a));
-void sendflt P((struct txbuf *buf, double a));
-
-void
-sendcmd(
- struct txbuf *buf,
- int c
- )
-{
- buf->txt[0] = DLE;
- buf->txt[1] = (u_char)c;
- buf->idx = 2;
-}
-
-void
-sendbyte(
- struct txbuf *buf,
- int b
- )
-{
- if (b == DLE)
- buf->txt[buf->idx++] = DLE;
- buf->txt[buf->idx++] = (u_char)b;
-}
-
-void
-sendetx(
- struct txbuf *buf,
- struct parseunit *parse
- )
-{
- buf->txt[buf->idx++] = DLE;
- buf->txt[buf->idx++] = ETX;
-
- if (write(parse->generic->io.fd, buf->txt, (unsigned long)buf->idx) != buf->idx)
- {
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: sendetx: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
- }
- else
- {
-#ifdef DEBUG
- if (debug > 2)
- {
- char buffer[256];
-
- mkreadable(buffer, sizeof(buffer), (char *)buf->txt, (unsigned)buf->idx, 1);
- printf("PARSE receiver #%d: transmitted message (%d bytes) >%s<\n",
- CLK_UNIT(parse->peer),
- buf->idx, buffer);
- }
-#endif
- clear_err(parse, ERR_BADIO);
- }
-}
-
-void
-sendint(
- struct txbuf *buf,
- int a
- )
-{
- /* send 16bit int, msbyte first */
- sendbyte(buf, (u_char)((a>>8) & 0xff));
- sendbyte(buf, (u_char)(a & 0xff));
-}
-
-void
-sendflt(
- struct txbuf *buf,
- double a
- )
-{
- int i;
- union uval uval;
-
- uval.fv = a;
-#ifdef WORDS_BIGENDIAN
- for (i=0; i<=3; i++)
-#else
- for (i=3; i>=0; i--)
-#endif
- sendbyte(buf, uval.bd[i]);
-}
-
-#define TRIM_POS_OPT 0x13 /* output position with high precision */
-#define TRIM_TIME_OPT 0x03 /* use UTC time stamps, on second */
-
-/*--------------------------------------------------
- * trimble TSIP setup routine
- */
-static int
-trimbletsip_setup(
- struct parseunit *parse,
- const char *reason
- )
-{
- u_char buffer[256];
- struct txbuf buf;
-
- buf.txt = buffer;
-
- sendcmd(&buf, CMD_CVERSION); /* request software versions */
- sendetx(&buf, parse);
-
- sendcmd(&buf, CMD_COPERPARAM); /* set operating parameters */
- sendbyte(&buf, 4); /* static */
- sendflt(&buf, 5.0*D2R); /* elevation angle mask = 10 deg XXX */
- sendflt(&buf, 4.0); /* s/n ratio mask = 6 XXX */
- sendflt(&buf, 12.0); /* PDOP mask = 12 */
- sendflt(&buf, 8.0); /* PDOP switch level = 8 */
- sendetx(&buf, parse);
-
- sendcmd(&buf, CMD_CMODESEL); /* fix mode select */
- sendbyte(&buf, 0); /* automatic */
- sendetx(&buf, parse);
-
- sendcmd(&buf, CMD_CMESSAGE); /* request system message */
- sendetx(&buf, parse);
-
- sendcmd(&buf, CMD_CSUPER); /* superpacket fix */
- sendbyte(&buf, 0x2); /* binary mode */
- sendetx(&buf, parse);
-
- sendcmd(&buf, CMD_CIOOPTIONS); /* set I/O options */
- sendbyte(&buf, TRIM_POS_OPT); /* position output */
- sendbyte(&buf, 0x00); /* no velocity output */
- sendbyte(&buf, TRIM_TIME_OPT); /* UTC, compute on seconds */
- sendbyte(&buf, 0x00); /* no raw measurements */
- sendetx(&buf, parse);
-
- sendcmd(&buf, CMD_CUTCPARAM); /* request UTC correction data */
- sendetx(&buf, parse);
-
- NLOG(NLOG_CLOCKINFO)
- ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletsip_setup: RECEIVER RE-INITIALIZED (%s)", CLK_UNIT(parse->peer), reason);
-
- return 0;
-}
-
-/*--------------------------------------------------
- * TRIMBLE TSIP check routine
- */
-static void
-trimble_check(
- struct peer *peer
- )
-{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
- trimble_t *t = parse->localdata;
- u_char buffer[256];
- struct txbuf buf;
- buf.txt = buffer;
-
- if (t)
- {
- if (current_time > t->last_msg + TRIMBLETSIP_IDLE_TIME)
- (void)trimbletsip_setup(parse, "message timeout");
- }
- poll_poll(parse->peer); /* emit query string and re-arm timer */
-
- if (t->qtracking)
- {
- u_long oldsats = t->ltrack & ~t->ctrack;
-
- t->qtracking = 0;
- t->ltrack = t->ctrack;
-
- if (oldsats)
- {
- int i;
-
- for (i = 0; oldsats; i++)
- if (oldsats & (1 << i))
- {
- sendcmd(&buf, CMD_CSTATTRACK);
- sendbyte(&buf, i+1); /* old sat */
- sendetx(&buf, parse);
- }
- oldsats &= ~(1 << i);
- }
-
- sendcmd(&buf, CMD_CSTATTRACK);
- sendbyte(&buf, 0x00); /* current tracking set */
- sendetx(&buf, parse);
- }
-}
-
-/*--------------------------------------------------
- * TRIMBLE TSIP end routine
- */
-static void
-trimbletsip_end(
- struct parseunit *parse
- )
-{ trimble_t *t = parse->localdata;
-
- if (t)
- {
- free(t);
- parse->localdata = (void *)0;
- }
- parse->peer->nextaction = 0;
- parse->peer->action = (void (*) P((struct peer *)))0;
-}
-
-/*--------------------------------------------------
- * TRIMBLE TSIP init routine
- */
-static int
-trimbletsip_init(
- struct parseunit *parse
- )
-{
-#if defined(VEOL) || defined(VEOL2)
-#ifdef HAVE_TERMIOS
- struct termios tio; /* NEEDED FOR A LONG TIME ! */
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tio; /* NEEDED FOR A LONG TIME ! */
-#endif
- /*
- * allocate local data area
- */
- if (!parse->localdata)
- {
- trimble_t *t;
-
- t = (trimble_t *)(parse->localdata = emalloc(sizeof(trimble_t)));
-
- if (t)
- {
- memset((char *)t, 0, sizeof(trimble_t));
- t->last_msg = current_time;
- }
- }
-
- parse->peer->action = trimble_check;
- parse->peer->nextaction = current_time;
-
- /*
- * configure terminal line for ICANON mode with VEOL characters
- */
- if (TTY_GETATTR(parse->generic->io.fd, &tio) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletsip_init: tcgetattr(%d, &tio): %m", CLK_UNIT(parse->peer), parse->generic->io.fd);
- return 0;
- }
- else
- {
- if ((parse_clockinfo[CLK_TYPE(parse->peer)].cl_lflag & ICANON))
- {
-#ifdef VEOL
- tio.c_cc[VEOL] = ETX;
-#endif
-#ifdef VEOL2
- tio.c_cc[VEOL2] = DLE;
-#endif
- }
-
- if (TTY_SETATTR(parse->generic->io.fd, &tio) == -1)
- {
- msyslog(LOG_ERR, "PARSE receiver #%d: trimbletsip_init: tcsetattr(%d, &tio): %m", CLK_UNIT(parse->peer), parse->generic->io.fd);
- return 0;
- }
- }
-#endif
- return trimbletsip_setup(parse, "initial startup");
-}
-
-/*------------------------------------------------------------
- * trimbletsip_event - handle Trimble events
- * simple evente handler - attempt to re-initialize receiver
- */
-static void
-trimbletsip_event(
- struct parseunit *parse,
- int event
- )
-{
- switch (event)
- {
- case CEVNT_BADREPLY: /* reset on garbled input */
- case CEVNT_TIMEOUT: /* reset on no input */
- (void)trimbletsip_setup(parse, "event BAD_REPLY/TIMEOUT");
- break;
-
- default: /* ignore */
- break;
- }
-}
-
-/*
- * getflt, getint convert fields in the incoming data into the
- * appropriate type of item
- *
- * CAVEAT: these routines are currently definitely byte order dependent
- * and assume Representation(float) == IEEE754
- * These functions MUST be converted to portable versions (especially
- * converting the float representation into ntp_fp formats in order
- * to avoid floating point operations at all!
- */
-
-static float
-getflt(
- u_char *bp
- )
-{
- union uval uval;
-
-#ifdef WORDS_BIGENDIAN
- uval.bd[0] = *bp++;
- uval.bd[1] = *bp++;
- uval.bd[2] = *bp++;
- uval.bd[3] = *bp;
-#else /* ! WORDS_BIGENDIAN */
- uval.bd[3] = *bp++;
- uval.bd[2] = *bp++;
- uval.bd[1] = *bp++;
- uval.bd[0] = *bp;
-#endif /* ! WORDS_BIGENDIAN */
- return uval.fv;
-}
-
-static double
-getdbl(
- u_char *bp
- )
-{
- union uval uval;
-
-#ifdef WORDS_BIGENDIAN
- uval.bd[0] = *bp++;
- uval.bd[1] = *bp++;
- uval.bd[2] = *bp++;
- uval.bd[3] = *bp++;
- uval.bd[4] = *bp++;
- uval.bd[5] = *bp++;
- uval.bd[6] = *bp++;
- uval.bd[7] = *bp;
-#else /* ! WORDS_BIGENDIAN */
- uval.bd[7] = *bp++;
- uval.bd[6] = *bp++;
- uval.bd[5] = *bp++;
- uval.bd[4] = *bp++;
- uval.bd[3] = *bp++;
- uval.bd[2] = *bp++;
- uval.bd[1] = *bp++;
- uval.bd[0] = *bp;
-#endif /* ! WORDS_BIGENDIAN */
- return uval.dv;
-}
-
-static int
-getshort(
- unsigned char *p
- )
-{
- return get_msb_short(&p);
-}
-
-/*--------------------------------------------------
- * trimbletsip_message - process trimble messages
- */
-#define RTOD (180.0 / 3.1415926535898)
-#define mb(_X_) (buffer[2+(_X_)]) /* shortcut for buffer access */
-
-static void
-trimbletsip_message(
- struct parseunit *parse,
- parsetime_t *parsetime
- )
-{
- unsigned char *buffer = parsetime->parse_msg;
- unsigned int size = parsetime->parse_msglen;
-
- if ((size < 4) ||
- (buffer[0] != DLE) ||
- (buffer[size-1] != ETX) ||
- (buffer[size-2] != DLE))
- {
-#ifdef DEBUG
- if (debug > 2) {
- int i;
-
- printf("TRIMBLE BAD packet, size %d:\n ", size);
- for (i = 0; i < size; i++) {
- printf ("%2.2x, ", buffer[i]&0xff);
- if (i%16 == 15) printf("\n\t");
- }
- printf("\n");
- }
-#endif
- return;
- }
- else
- {
- int var_flag;
- trimble_t *tr = parse->localdata;
- unsigned int cmd = buffer[1];
- char pbuffer[200];
- char *t = pbuffer;
- cmd_info_t *s;
-
-#ifdef DEBUG
- if (debug > 3) {
- int i;
-
- printf("TRIMBLE packet 0x%02x, size %d:\n ", cmd, size);
- for (i = 0; i < size; i++) {
- printf ("%2.2x, ", buffer[i]&0xff);
- if (i%16 == 15) printf("\n\t");
- }
- printf("\n");
- }
-#endif
-
- if (tr)
- tr->last_msg = current_time;
-
- s = trimble_convert(cmd, trimble_rcmds);
-
- if (s)
- {
- sprintf(t, "%s=\"", s->varname);
- }
- else
- {
- printf("TRIMBLE unknown command 0x%02x\n", cmd);
- return;
- }
-
- var_flag = s->varmode;
-
- t += strlen(t);
-
- switch(cmd)
- {
- case CMD_RCURTIME:
- sprintf(t, "%f, %d, %f",
- getflt((unsigned char *)&mb(0)), getshort((unsigned char *)&mb(4)),
- getflt((unsigned char *)&mb(6)));
- break;
-
- case CMD_RBEST4:
- strcpy(t, "mode: ");
- t += strlen(t);
- switch (mb(0) & 0xF)
- {
- default:
- sprintf(t, "0x%x", mb(0) & 0x7);
- break;
-
- case 1:
- strcat(t, "0D");
- break;
-
- case 3:
- strcat(t, "2D");
- break;
-
- case 4:
- strcat(t, "3D");
- break;
- }
- t += strlen(t);
- if (mb(0) & 0x10)
- strcpy(t, "-MANUAL, ");
- else
- strcpy(t, "-AUTO, ");
- t += strlen(t);
-
- sprintf(t, "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
- mb(1), mb(2), mb(3), mb(4),
- getflt((unsigned char *)&mb(5)),
- getflt((unsigned char *)&mb(9)),
- getflt((unsigned char *)&mb(13)),
- getflt((unsigned char *)&mb(17)));
-
- break;
-
- case CMD_RVERSION:
- sprintf(t, "%d.%d (%d/%d/%d)",
- mb(0)&0xff, mb(1)&0xff, 1900+(mb(4)&0xff), mb(2)&0xff, mb(3)&0xff);
- break;
-
- case CMD_RRECVHEALTH:
- {
- static const char *msgs[] =
- {
- "Battery backup failed",
- "Signal processor error",
- "Alignment error, channel or chip 1",
- "Alignment error, channel or chip 2",
- "Antenna feed line fault",
- "Excessive ref freq. error",
- "<BIT 6>",
- "<BIT 7>"
- };
-
- int i, bits;
-
- switch (mb(0) & 0xFF)
- {
- default:
- sprintf(t, "illegal value 0x%02x", mb(0) & 0xFF);
- break;
- case 0x00:
- strcpy(t, "doing position fixes");
- break;
- case 0x01:
- strcpy(t, "no GPS time yet");
- break;
- case 0x03:
- strcpy(t, "PDOP too high");
- break;
- case 0x08:
- strcpy(t, "no usable satellites");
- break;
- case 0x09:
- strcpy(t, "only ONE usable satellite");
- break;
- case 0x0A:
- strcpy(t, "only TWO usable satellites");
- break;
- case 0x0B:
- strcpy(t, "only THREE usable satellites");
- break;
- case 0x0C:
- strcpy(t, "the chosen satellite is unusable");
- break;
- }
-
- t += strlen(t);
-
- bits = mb(1) & 0xFF;
-
- for (i = 0; i < 8; i++)
- if (bits & (0x1<<i))
- {
- sprintf(t, ", %s", msgs[i]);
- t += strlen(t);
- }
- }
- break;
-
- case CMD_RMESSAGE:
- mkreadable(t, (int)(sizeof(pbuffer) - (t - pbuffer)), (char *)&mb(0), (unsigned)(size - 2 - (&mb(0) - buffer)), 0);
- break;
-
- case CMD_RMACHSTAT:
- {
- static const char *msgs[] =
- {
- "Synthesizer Fault",
- "Battery Powered Time Clock Fault",
- "A-to-D Converter Fault",
- "The almanac stored in the receiver is not complete and current",
- "<BIT 4>",
- "<BIT 5",
- "<BIT 6>",
- "<BIT 7>"
- };
-
- int i, bits;
-
- sprintf(t, "machine id 0x%02x", mb(0) & 0xFF);
- t += strlen(t);
-
- bits = mb(1) & 0xFF;
-
- for (i = 0; i < 8; i++)
- if (bits & (0x1<<i))
- {
- sprintf(t, ", %s", msgs[i]);
- t += strlen(t);
- }
-
- sprintf(t, ", Superpackets %ssupported", (mb(2) & 0xFF) ? "" :"un" );
- }
- break;
-
- case CMD_ROPERPARAM:
- sprintf(t, "%2x %.1f %.1f %.1f %.1f",
- mb(0), getflt((unsigned char *)&mb(1)), getflt((unsigned char *)&mb(5)),
- getflt((unsigned char *)&mb(9)), getflt((unsigned char *)&mb(13)));
- break;
-
- case CMD_RUTCPARAM:
- {
- float t0t = getflt((unsigned char *)&mb(14));
- short wnt = getshort((unsigned char *)&mb(18));
- short dtls = getshort((unsigned char *)&mb(12));
- short wnlsf = getshort((unsigned char *)&mb(20));
- short dn = getshort((unsigned char *)&mb(22));
- short dtlsf = getshort((unsigned char *)&mb(24));
-
- if ((int)t0t != 0)
- {
- mk_utcinfo(t, wnt, wnlsf, dn, dtls, dtlsf);
- }
- else
- {
- strcpy(t, "<NO UTC DATA>");
- }
- }
- break;
-
- case CMD_RSAT1BIAS:
- sprintf(t, "%.1fm %.2fm/s at %.1fs",
- getflt(&mb(0)), getflt(&mb(4)), getflt(&mb(8)));
- break;
-
- case CMD_RIOOPTIONS:
- {
- sprintf(t, "%02x %02x %02x %02x",
- mb(0), mb(1), mb(2), mb(3));
- if (mb(0) != TRIM_POS_OPT ||
- mb(2) != TRIM_TIME_OPT)
- {
- (void)trimbletsip_setup(parse, "bad io options");
- }
- }
- break;
-
- case CMD_RSPOSXYZ:
- {
- double x = getflt((unsigned char *)&mb(0));
- double y = getflt((unsigned char *)&mb(4));
- double z = getflt((unsigned char *)&mb(8));
- double f = getflt((unsigned char *)&mb(12));
-
- if (f > 0.0)
- sprintf(t, "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
- x, y, z,
- f);
- else
- return;
- }
- break;
-
- case CMD_RSLLAPOS:
- {
- double lat = getflt((unsigned char *)&mb(0));
- double lng = getflt((unsigned char *)&mb(4));
- double f = getflt((unsigned char *)&mb(12));
-
- if (f > 0.0)
- sprintf(t, "lat %f %c, long %f %c, alt %.2fm",
- ((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
- ((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
- getflt((unsigned char *)&mb(8)));
- else
- return;
- }
- break;
-
- case CMD_RDOUBLEXYZ:
- {
- double x = getdbl((unsigned char *)&mb(0));
- double y = getdbl((unsigned char *)&mb(8));
- double z = getdbl((unsigned char *)&mb(16));
- sprintf(t, "x= %.1fm, y= %.1fm, z= %.1fm",
- x, y, z);
- }
- break;
-
- case CMD_RDOUBLELLA:
- {
- double lat = getdbl((unsigned char *)&mb(0));
- double lng = getdbl((unsigned char *)&mb(8));
- sprintf(t, "lat %f %c, lon %f %c, alt %.2fm",
- ((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
- ((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
- getdbl((unsigned char *)&mb(16)));
- }
- break;
-
- case CMD_RALLINVIEW:
- {
- int i, sats;
-
- strcpy(t, "mode: ");
- t += strlen(t);
- switch (mb(0) & 0x7)
- {
- default:
- sprintf(t, "0x%x", mb(0) & 0x7);
- break;
-
- case 3:
- strcat(t, "2D");
- break;
-
- case 4:
- strcat(t, "3D");
- break;
- }
- t += strlen(t);
- if (mb(0) & 0x8)
- strcpy(t, "-MANUAL, ");
- else
- strcpy(t, "-AUTO, ");
- t += strlen(t);
-
- sats = (mb(0)>>4) & 0xF;
-
- sprintf(t, "PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f, %d satellite%s in view: ",
- getflt((unsigned char *)&mb(1)),
- getflt((unsigned char *)&mb(5)),
- getflt((unsigned char *)&mb(9)),
- getflt((unsigned char *)&mb(13)),
- sats, (sats == 1) ? "" : "s");
- t += strlen(t);
-
- for (i=0; i < sats; i++)
- {
- sprintf(t, "%s%02d", i ? ", " : "", mb(17+i));
- t += strlen(t);
- if (tr)
- tr->ctrack |= (1 << (mb(17+i)-1));
- }
-
- if (tr)
- { /* mark for tracking status query */
- tr->qtracking = 1;
- }
- }
- break;
-
- case CMD_RSTATTRACK:
- {
- sprintf(t-2, "[%02d]=\"", mb(0)); /* add index to var name */
- t += strlen(t);
-
- if (getflt((unsigned char *)&mb(4)) < 0.0)
- {
- strcpy(t, "<NO MEASUREMENTS>");
- var_flag &= ~DEF;
- }
- else
- {
- sprintf(t, "ch=%d, acq=%s, eph=%d, signal_level= %5.2f, elevation= %5.2f, azimuth= %6.2f",
- (mb(1) & 0xFF)>>3,
- mb(2) ? ((mb(2) == 1) ? "ACQ" : "SRCH") : "NEVER",
- mb(3),
- getflt((unsigned char *)&mb(4)),
- getflt((unsigned char *)&mb(12)) * RTOD,
- getflt((unsigned char *)&mb(16)) * RTOD);
- t += strlen(t);
- if (mb(20))
- {
- var_flag &= ~DEF;
- strcpy(t, ", OLD");
- }
- t += strlen(t);
- if (mb(22))
- {
- if (mb(22) == 1)
- strcpy(t, ", BAD PARITY");
- else
- if (mb(22) == 2)
- strcpy(t, ", BAD EPH HEALTH");
- }
- t += strlen(t);
- if (mb(23))
- strcpy(t, ", collecting data");
- }
- }
- break;
-
- default:
- strcpy(t, "<UNDECODED>");
- break;
- }
- strcat(t,"\"");
- set_var(&parse->kv, pbuffer, sizeof(pbuffer), var_flag);
- }
-}
-
-
-/**============================================================
- ** RAWDCF support
- **/
-
-/*--------------------------------------------------
- * rawdcf_init_1 - set up modem lines for RAWDCF receivers
- * SET DTR line
- */
-#if defined(TIOCMSET) && (defined(TIOCM_DTR) || defined(CIOCM_DTR))
-static int
-rawdcf_init_1(
- struct parseunit *parse
- )
-{
- /* fixed 2000 for using with Linux by Wolfram Pienkoss <wp@bszh.de> */
- /*
- * You can use the RS232 to supply the power for a DCF77 receiver.
- * Here a voltage between the DTR and the RTS line is used. Unfortunately
- * the name has changed from CIOCM_DTR to TIOCM_DTR recently.
- */
- int sl232;
-
- if (ioctl(parse->generic->io.fd, TIOCMGET, (caddr_t)&sl232) == -1)
- {
- msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_1: WARNING: ioctl(fd, TIOCMGET, [C|T]IOCM_DTR): %m", CLK_UNIT(parse->peer));
- return 0;
- }
-
-#ifdef TIOCM_DTR
- sl232 = (sl232 & ~TIOCM_RTS) | TIOCM_DTR; /* turn on DTR, clear RTS for power supply */
-#else
- sl232 = (sl232 & ~CIOCM_RTS) | CIOCM_DTR; /* turn on DTR, clear RTS for power supply */
-#endif
-
- if (ioctl(parse->generic->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
- {
- msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_1: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_DTR): %m", CLK_UNIT(parse->peer));
- }
- return 0;
-}
-#else
-static int
-rawdcfdtr_init_1(
- struct parseunit *parse
- )
-{
- msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_1: WARNING: OS interface incapable of setting DTR to power DCF modules", CLK_UNIT(parse->peer));
- return 0;
-}
-#endif /* DTR initialisation type */
-
-/*--------------------------------------------------
- * rawdcf_init_2 - set up modem lines for RAWDCF receivers
- * CLR DTR line, SET RTS line
- */
-#if defined(TIOCMSET) && (defined(TIOCM_RTS) || defined(CIOCM_RTS))
-static int
-rawdcf_init_2(
- struct parseunit *parse
- )
-{
- /* fixed 2000 for using with Linux by Wolfram Pienkoss <wp@bszh.de> */
- /*
- * You can use the RS232 to supply the power for a DCF77 receiver.
- * Here a voltage between the DTR and the RTS line is used. Unfortunately
- * the name has changed from CIOCM_DTR to TIOCM_DTR recently.
- */
- int sl232;
-
- if (ioctl(parse->generic->io.fd, TIOCMGET, (caddr_t)&sl232) == -1)
- {
- msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_2: WARNING: ioctl(fd, TIOCMGET, [C|T]IOCM_RTS): %m", CLK_UNIT(parse->peer));
- return 0;
- }
-
-#ifdef TIOCM_RTS
- sl232 = (sl232 & ~TIOCM_DTR) | TIOCM_RTS; /* turn on RTS, clear DTR for power supply */
-#else
- sl232 = (sl232 & ~CIOCM_DTR) | CIOCM_RTS; /* turn on RTS, clear DTR for power supply */
-#endif
-
- if (ioctl(parse->generic->io.fd, TIOCMSET, (caddr_t)&sl232) == -1)
- {
- msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_2: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_RTS): %m", CLK_UNIT(parse->peer));
- }
- return 0;
-}
-#else
-static int
-rawdcf_init_2(
- struct parseunit *parse
- )
-{
- msyslog(LOG_NOTICE, "PARSE receiver #%d: rawdcf_init_2: WARNING: OS interface incapable of setting RTS to power DCF modules", CLK_UNIT(parse->peer));
- return 0;
-}
-#endif /* DTR initialisation type */
-
-#else /* defined(REFCLOCK) && defined(PARSE) */
-int refclock_parse_bs;
-#endif /* defined(REFCLOCK) && defined(PARSE) */
-
-/*
- * History:
- *
- * refclock_parse.c,v
- * Revision 4.36 1999/11/28 17:18:20 kardel
- * disabled burst mode
- *
- * Revision 4.35 1999/11/28 09:14:14 kardel
- * RECON_4_0_98F
- *
- * Revision 4.34 1999/05/14 06:08:05 kardel
- * store current_time in a suitable container (u_long)
- *
- * Revision 4.33 1999/05/13 21:48:38 kardel
- * double the no response timeout interval
- *
- * Revision 4.32 1999/05/13 20:09:13 kardel
- * complain only about missing polls after a full poll interval
- *
- * Revision 4.31 1999/05/13 19:59:32 kardel
- * add clock type 16 for RTS set DTR clr in RAWDCF
- *
- * Revision 4.30 1999/02/28 20:36:43 kardel
- * fixed printf fmt
- *
- * Revision 4.29 1999/02/28 19:58:23 kardel
- * updated copyright information
- *
- * Revision 4.28 1999/02/28 19:01:50 kardel
- * improved debug out on sent Meinberg messages
- *
- * Revision 4.27 1999/02/28 18:05:55 kardel
- * no linux/ppsclock.h stuff
- *
- * Revision 4.26 1999/02/28 15:27:27 kardel
- * wharton clock integration
- *
- * Revision 4.25 1999/02/28 14:04:46 kardel
- * added missing double quotes to UTC information string
- *
- * Revision 4.24 1999/02/28 12:06:50 kardel
- * (parse_control): using gmprettydate instead of prettydate()
- * (mk_utcinfo): new function for formatting GPS derived UTC information
- * (gps16x_message): changed to use mk_utcinfo()
- * (trimbletsip_message): changed to use mk_utcinfo()
- * ignoring position information in unsynchronized mode
- * (parse_start): augument linux support for optional ASYNC_LOW_LATENCY
- *
- * Revision 4.23 1999/02/23 19:47:53 kardel
- * fixed #endifs
- * (stream_receive): fixed formats
- *
- * Revision 4.22 1999/02/22 06:21:02 kardel
- * use new autoconfig symbols
- *
- * Revision 4.21 1999/02/21 12:18:13 kardel
- * 4.91f reconcilation
- *
- * Revision 4.20 1999/02/21 10:53:36 kardel
- * initial Linux PPSkit version
- *
- * Revision 4.19 1999/02/07 09:10:45 kardel
- * clarify STREAMS mitigation rules in comment
- *
- * Revision 4.18 1998/12/20 23:45:34 kardel
- * fix types and warnings
- *
- * Revision 4.17 1998/11/15 21:24:51 kardel
- * cannot access mbg_ routines when CLOCK_MEINBERG
- * is not defined
- *
- * Revision 4.16 1998/11/15 20:28:17 kardel
- * Release 4.0.73e13 reconcilation
- *
- * Revision 4.15 1998/08/22 21:56:08 kardel
- * fixed IO handling for non-STREAM IO
- *
- * Revision 4.14 1998/08/16 19:00:48 kardel
- * (gps16x_message): reduced UTC parameter information (dropped A0,A1)
- * made uval a local variable (killed one of the last globals)
- * (sendetx): added logging of messages when in debug mode
- * (trimble_check): added periodic checks to facilitate re-initialization
- * (trimbletsip_init): made use of EOL character if in non-kernel operation
- * (trimbletsip_message): extended message interpretation
- * (getdbl): fixed data conversion
- *
- * Revision 4.13 1998/08/09 22:29:13 kardel
- * Trimble TSIP support
- *
- * Revision 4.12 1998/07/11 10:05:34 kardel
- * Release 4.0.73d reconcilation
- *
- * Revision 4.11 1998/06/14 21:09:42 kardel
- * Sun acc cleanup
- *
- * Revision 4.10 1998/06/13 12:36:45 kardel
- * signed/unsigned, name clashes
- *
- * Revision 4.9 1998/06/12 15:30:00 kardel
- * prototype fixes
- *
- * Revision 4.8 1998/06/12 11:19:42 kardel
- * added direct input processing routine for refclocks in
- * order to avaiod that single character io gobbles up all
- * receive buffers and drops input data. (Problem started
- * with fast machines so a character a buffer was possible
- * one of the few cases where faster machines break existing
- * allocation algorithms)
- *
- * Revision 4.7 1998/06/06 18:35:20 kardel
- * (parse_start): added BURST mode initialisation
- *
- * Revision 4.6 1998/05/27 06:12:46 kardel
- * RAWDCF_BASEDELAY default added
- * old comment removed
- * casts for ioctl()
- *
- * Revision 4.5 1998/05/25 22:05:09 kardel
- * RAWDCF_SETDTR option removed
- * clock type 14 attempts to set DTR for
- * power supply of RAWDCF receivers
- *
- * Revision 4.4 1998/05/24 16:20:47 kardel
- * updated comments referencing Meinberg clocks
- * added RAWDCF clock with DTR set option as type 14
- *
- * Revision 4.3 1998/05/24 10:48:33 kardel
- * calibrated CONRAD RAWDCF default fudge factor
- *
- * Revision 4.2 1998/05/24 09:59:35 kardel
- * corrected version information (ntpq support)
- *
- * Revision 4.1 1998/05/24 09:52:31 kardel
- * use fixed format only (new IO model)
- * output debug to stdout instead of msyslog()
- * don't include >"< in ASCII output in order not to confuse
- * ntpq parsing
- *
- * Revision 4.0 1998/04/10 19:52:11 kardel
- * Start 4.0 release version numbering
- *
- * Revision 1.2 1998/04/10 19:28:04 kardel
- * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
- * derived from 3.105.1.2 from V3 tree
- *
- * Revision information 3.1 - 3.105 from log deleted 1998/04/10 kardel
- *
- */
diff --git a/contrib/ntp/ntpd/refclock_pcf.c b/contrib/ntp/ntpd/refclock_pcf.c
deleted file mode 100644
index d4e9fd1..0000000
--- a/contrib/ntp/ntpd/refclock_pcf.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * refclock_pcf - clock driver for the Conrad parallel port radio clock
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PCF)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/*
- * This driver supports the parallel port radio clock sold by Conrad
- * Electronic under order numbers 967602 and 642002.
- *
- * It requires that the local timezone be CET/CEST and that the pcfclock
- * device driver be installed. A device driver for Linux is available at
- * http://home.pages.de/~voegele/pcf.html. Information about a FreeBSD
- * driver is available at http://schumann.cx/pcfclock/.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/pcfclocks/%d"
-#define OLDDEVICE "/dev/pcfclock%d"
-#define PRECISION (-1) /* precision assumed (about 0.5 s) */
-#define REFID "PCF"
-#define DESCRIPTION "Conrad parallel port radio clock"
-
-#define LENPCF 18 /* timecode length */
-
-/*
- * Function prototypes
- */
-static int pcf_start P((int, struct peer *));
-static void pcf_shutdown P((int, struct peer *));
-static void pcf_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_pcf = {
- pcf_start, /* start up driver */
- pcf_shutdown, /* shut down driver */
- pcf_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-
-
-/*
- * pcf_start - open the device and initialize data for processing
- */
-static int
-pcf_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- int fd;
- char device[128];
-
- /*
- * Open device file for reading.
- */
- (void)sprintf(device, DEVICE, unit);
- fd = open(device, O_RDONLY);
- if (fd == -1) {
- (void)sprintf(device, OLDDEVICE, unit);
- fd = open(device, O_RDONLY);
- }
-#ifdef DEBUG
- if (debug)
- printf ("starting PCF with device %s\n",device);
-#endif
- if (fd == -1) {
- return (0);
- }
-
- pp = peer->procptr;
- pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- /* one transmission takes 172.5 milliseconds since the radio clock
- transmits 69 bits with a period of 2.5 milliseconds per bit */
- pp->fudgetime1 = 0.1725;
- memcpy((char *)&pp->refid, REFID, 4);
-
- return (1);
-}
-
-
-/*
- * pcf_shutdown - shut down the clock
- */
-static void
-pcf_shutdown(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
- (void)close(pp->io.fd);
-}
-
-
-/*
- * pcf_poll - called by the transmit procedure
- */
-static void
-pcf_poll(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- char buf[LENPCF];
- struct tm tm, *tp;
- time_t t;
-
- pp = peer->procptr;
-
- buf[0] = 0;
- if (read(pp->io.fd, buf, sizeof(buf)) < sizeof(buf) || buf[0] != 9) {
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
-
- tm.tm_mday = buf[11] * 10 + buf[10];
- tm.tm_mon = buf[13] * 10 + buf[12] - 1;
- tm.tm_year = buf[15] * 10 + buf[14];
- tm.tm_hour = buf[7] * 10 + buf[6];
- tm.tm_min = buf[5] * 10 + buf[4];
- tm.tm_sec = buf[3] * 10 + buf[2];
- tm.tm_isdst = (buf[8] & 1) ? 1 : (buf[8] & 2) ? 0 : -1;
-
- /*
- * Y2K convert the 2-digit year
- */
- if (tm.tm_year < 99)
- tm.tm_year += 100;
-
- t = mktime(&tm);
- if (t == (time_t) -1) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
-#if defined(__GLIBC__) && defined(_BSD_SOURCE)
- if ((tm.tm_isdst > 0 && tm.tm_gmtoff != 7200)
- || (tm.tm_isdst == 0 && tm.tm_gmtoff != 3600)
- || tm.tm_isdst < 0) {
-#ifdef DEBUG
- if (debug)
- printf ("local time zone not set to CET/CEST\n");
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-#endif
-
- pp->lencode = strftime(pp->a_lastcode, BMAX, "%Y %m %d %H %M %S", &tm);
-
-#if defined(_REENTRANT) || defined(_THREAD_SAFE)
- tp = gmtime_r(&t, &tm);
-#else
- tp = gmtime(&t);
-#endif
- if (!tp) {
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
-
- get_systime(&pp->lastrec);
- pp->polls++;
- pp->year = tp->tm_year + 1900;
- pp->day = tp->tm_yday + 1;
- pp->hour = tp->tm_hour;
- pp->minute = tp->tm_min;
- pp->second = tp->tm_sec;
- pp->nsec = buf[16] * 31250000;
- if (buf[17] & 1)
- pp->nsec += 500000000;
-
-#ifdef DEBUG
- if (debug)
- printf ("pcf%d: time is %04d/%02d/%02d %02d:%02d:%02d UTC\n",
- unit, pp->year, tp->tm_mon + 1, tp->tm_mday, pp->hour,
- pp->minute, pp->second);
-#endif
-
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- if ((buf[1] & 1) && !(pp->sloppyclockflag & CLK_FLAG2))
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
-}
-#else
-int refclock_pcf_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_pst.c b/contrib/ntp/ntpd/refclock_pst.c
deleted file mode 100644
index 2443b2c..0000000
--- a/contrib/ntp/ntpd/refclock_pst.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * refclock_pst - clock driver for PSTI/Traconex WWV/WWVH receivers
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PST)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * 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.
- *
- * The DIPswitches 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 DIPswitches; otherwise, the day of year will be incorrect after
- * 28 April of a normal or leap year. The propagation delay DIPswitches
- * 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.
- *
- * Using the poll sequence QTQDQM, the response timecode is in three
- * sections totalling 50 ASCII printing characters, as concatenated by
- * the driver, in the following format:
- *
- * ahh:mm:ss.fffs<cr> yy/dd/mm/ddd<cr> frdzycchhSSFTttttuuxx<cr>
- *
- * on-time = first <cr>
- * hh:mm:ss.fff = hours, minutes, seconds, milliseconds
- * a = AM/PM indicator (' ' for 24-hour mode)
- * yy = year (from internal switches)
- * 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)
- *
- * The alarm condition is indicated by other than '8' at A, which occurs
- * during initial synchronization and when received signal is lost for
- * an extended period; unlock condition is indicated by other than
- * "0000" in the tttt subfield at Q.
- *
- * Fudge Factors
- *
- * There are no special fudge factors other than the generic.
- */
-
-/*
- * Interface definitions
- */
-#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 */
-#define WWVHREFID "WWVH" /* WWVH reference ID */
-#define DESCRIPTION "PSTI/Traconex WWV/WWVH Receiver" /* WRU */
-#define PST_PHI (10e-6) /* max clock oscillator offset */
-#define LENPST 46 /* min timecode length */
-
-/*
- * Unit control structure
- */
-struct pstunit {
- int tcswitch; /* timecode switch */
- char *lastptr; /* pointer to timecode data */
-};
-
-/*
- * Function prototypes
- */
-static int pst_start P((int, struct peer *));
-static void pst_shutdown P((int, struct peer *));
-static void pst_receive P((struct recvbuf *));
-static void pst_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_pst = {
- pst_start, /* start up driver */
- pst_shutdown, /* shut down driver */
- pst_poll, /* transmit poll message */
- noentry, /* not used (old pst_control) */
- noentry, /* initialize driver */
- noentry, /* not used (old pst_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * pst_start - open the devices and initialize data for processing
- */
-static int
-pst_start(
- int unit,
- struct peer *peer
- )
-{
- register struct pstunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct pstunit *)emalloc(sizeof(struct pstunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct pstunit));
- pp = peer->procptr;
- pp->io.clock_recv = pst_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, WWVREFID, 4);
- peer->burst = MAXSTAGE;
- return (1);
-}
-
-
-/*
- * pst_shutdown - shut down the clock
- */
-static void
-pst_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct pstunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct pstunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * pst_receive - receive data from the serial interface
- */
-static void
-pst_receive(
- struct recvbuf *rbufp
- )
-{
- register struct pstunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- l_fp trtmp;
- u_long ltemp;
- char ampmchar; /* AM/PM indicator */
- char daychar; /* standard/daylight indicator */
- char junque[10]; /* "yy/dd/mm/" discard */
- char info[14]; /* "frdzycchhSSFT" clock info */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct pstunit *)pp->unitptr;
- up->lastptr += refclock_gtlin(rbufp, up->lastptr, pp->a_lastcode
- + BMAX - 2 - up->lastptr, &trtmp);
- *up->lastptr++ = ' ';
- *up->lastptr = '\0';
-
- /*
- * Note we get a buffer and timestamp for each <cr>, but only
- * the first timestamp is retained.
- */
- if (up->tcswitch == 0)
- pp->lastrec = trtmp;
- up->tcswitch++;
- pp->lencode = up->lastptr - pp->a_lastcode;
- if (up->tcswitch < 3)
- return;
-
- /*
- * 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.
- */
- if (pp->lencode < LENPST) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Timecode format:
- * "ahh:mm:ss.fffs yy/dd/mm/ddd frdzycchhSSFTttttuuxx"
- */
- 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
- * unsynchronized, set the leap bits accordingly and exit. Once
- * synchronized, the dispersion depends only on when the clock
- * was last heard, which depends on the time since last update,
- * as reported by the clock.
- */
- if (info[9] != '8')
- pp->leap = LEAP_NOTINSYNC;
- if (info[12] == 'H')
- memcpy((char *)&pp->refid, WWVHREFID, 4);
- else
- memcpy((char *)&pp->refid, WWVREFID, 4);
- if (peer->stratum <= 1)
- peer->refid = pp->refid;
- if (ltemp == 0)
- pp->lastref = pp->lastrec;
- pp->disp = PST_PHI * ltemp * 60;
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp))
- refclock_report(peer, CEVNT_BADTIME);
-
-}
-
-
-/*
- * pst_poll - called by the transmit procedure
- */
-static void
-pst_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct pstunit *up;
- struct refclockproc *pp;
-
- /*
- * Time to poll the clock. The PSTI/Traconex clock responds to a
- * "QTQDQMT" by returning a timecode in the format specified
- * 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;
- up->tcswitch = 0;
- up->lastptr = pp->a_lastcode;
- if (write(pp->io.fd, "QTQDQMT", 6) != 6)
- refclock_report(peer, CEVNT_FAULT);
- if (peer->burst > 0)
- return;
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- refclock_receive(peer);
- 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
-int refclock_pst_int;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_ptbacts.c b/contrib/ntp/ntpd/refclock_ptbacts.c
deleted file mode 100644
index 09d7bf4..0000000
--- a/contrib/ntp/ntpd/refclock_ptbacts.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * crude hack to avoid hard links in distribution
- * and keep only one ACTS type source for different
- * ACTS refclocks
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_PTBACTS)
-# define KEEPPTBACTS
-# include "refclock_acts.c"
-#else /* not (REFCLOCK && CLOCK_PTBACTS) */
-int refclock_ptbacts_bs;
-#endif /* not (REFCLOCK && CLOCK_PTBACTS) */
diff --git a/contrib/ntp/ntpd/refclock_ripencc.c b/contrib/ntp/ntpd/refclock_ripencc.c
deleted file mode 100644
index 6337f63..0000000
--- a/contrib/ntp/ntpd/refclock_ripencc.c
+++ /dev/null
@@ -1,4870 +0,0 @@
-/*
- * $Id: refclock_ripencc.c,v 1.13 2002/06/18 14:20:55 marks Exp marks $
- *
- * Copyright (c) 2002 RIPE NCC
- *
- * All Rights Reserved
- *
- * 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 appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of the author not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
- * AUTHOR 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.
- *
- *
- *
- * This driver was developed for use with the RIPE NCC TTM project.
- *
- *
- * The initial driver was developed by Daniel Karrenberg <dfk@ripe.net>
- * using the code made available by Trimble. This was for xntpd-3.x.x
- *
- * Rewrite of the driver for ntpd-4.x.x by Mark Santcroos <marks@ripe.net>
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#if defined(REFCLOCK) && defined(CLOCK_RIPENCC)
-
-#include "ntp_stdlib.h"
-#include "ntpd.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_io.h"
-
-#ifdef HAVE_TIMEPPS_H
-# include <timepps.h>
-#else /* HAVE_TIMEPPS_H */
-# ifdef HAVE_SYS_TIMEPPS_H
-# include <sys/timepps.h>
-# endif /* HAVE_SYS_TIMEPPS_H */
-#endif /* HAVE_TIMEPPS_H */
-
-/*
- * Definitions
- */
-
-/* we are on little endian */
-#define BYTESWAP
-
-/*
- * DEBUG statements: uncomment if necessary
- */
-/* #define DEBUG_NCC */ /* general debug statements */
-/* #define DEBUG_PPS */ /* debug pps */
-/* #define DEBUG_RAW */ /* print raw packets */
-
-#define TRIMBLE_OUTPUT_FUNC
-#define TSIP_VERNUM "7.12a"
-
-#ifndef FALSE
-#define FALSE (0)
-#define TRUE (!FALSE)
-#endif /* FALSE */
-
-#define GPS_PI (3.1415926535898)
-#define GPS_C (299792458.)
-#define D2R (GPS_PI/180.0)
-#define R2D (180.0/GPS_PI)
-#define WEEK (604800.)
-#define MAXCHAN (8)
-
-/* control characters for TSIP packets */
-#define DLE (0x10)
-#define ETX (0x03)
-
-#define MAX_RPTBUF (256)
-
-/* values of TSIPPKT.status */
-#define TSIP_PARSED_EMPTY 0
-#define TSIP_PARSED_FULL 1
-#define TSIP_PARSED_DLE_1 2
-#define TSIP_PARSED_DATA 3
-#define TSIP_PARSED_DLE_2 4
-
-#define UTCF_UTC_AVAIL (unsigned char) (1) /* UTC available */
-#define UTCF_LEAP_SCHD (unsigned char) (1<<4) /* Leap scheduled */
-#define UTCF_LEAP_PNDG (unsigned char) (1<<5) /* Leap pending, will occur at end of day */
-
-#define DEVICE "/dev/gps%d" /* name of radio device */
-#define PRECISION (-9) /* precision assumed (about 2 ms) */
-#define PPS_PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS\0" /* reference id */
-#define REFID_LEN 4
-#define DESCRIPTION "RIPE NCC GPS (Palisade)" /* Description */
-#define SPEED232 B9600 /* 9600 baud */
-
-#define NSAMPLES 3 /* stages of median filter */
-
-/* Structures */
-
-/* TSIP packets have the following structure, whether report or command. */
-typedef struct {
- short
- counter, /* counter */
- len; /* size of buf; < MAX_RPTBUF unsigned chars */
- unsigned char
- status, /* TSIP packet format/parse status */
- code, /* TSIP code */
- buf[MAX_RPTBUF];/* report or command string */
-} TSIPPKT;
-
-/* TSIP binary data structures */
-typedef struct {
- unsigned char
- t_oa_raw, SV_health;
- float
- e, t_oa, i_0, OMEGADOT, sqrt_A,
- OMEGA_0, omega, M_0, a_f0, a_f1,
- Axis, n, OMEGA_n, ODOT_n, t_zc;
- short
- weeknum, wn_oa;
-} ALM_INFO;
-
-typedef struct { /* Almanac health page (25) parameters */
- unsigned char
- WN_a, SV_health[32], t_oa;
-} ALH_PARMS;
-
-typedef struct { /* Universal Coordinated Time (UTC) parms */
- double
- A_0;
- float
- A_1;
- short
- delta_t_LS;
- float
- t_ot;
- short
- WN_t, WN_LSF, DN, delta_t_LSF;
-} UTC_INFO;
-
-typedef struct { /* Ionospheric info (float) */
- float
- alpha_0, alpha_1, alpha_2, alpha_3,
- beta_0, beta_1, beta_2, beta_3;
-} ION_INFO;
-
-typedef struct { /* Subframe 1 info (float) */
- short
- weeknum;
- unsigned char
- codeL2, L2Pdata, SVacc_raw, SV_health;
- short
- IODC;
- float
- T_GD, t_oc, a_f2, a_f1, a_f0, SVacc;
-} EPHEM_CLOCK;
-
-typedef struct { /* Ephemeris info (float) */
- unsigned char
- IODE, fit_interval;
- float
- C_rs, delta_n;
- double
- M_0;
- float
- C_uc;
- double
- e;
- float
- C_us;
- double
- sqrt_A;
- float
- t_oe, C_ic;
- double
- OMEGA_0;
- float
- C_is;
- double
- i_0;
- float
- C_rc;
- double
- omega;
- float
- OMEGADOT, IDOT;
- double
- Axis, n, r1me2, OMEGA_n, ODOT_n;
-} EPHEM_ORBIT;
-
-typedef struct { /* Navigation data structure */
- short
- sv_number; /* SV number (0 = no entry) */
- float
- t_ephem; /* time of ephemeris collection */
- EPHEM_CLOCK
- ephclk; /* subframe 1 data */
- EPHEM_ORBIT
- ephorb; /* ephemeris data */
-} NAV_INFO;
-
-typedef struct {
- unsigned char
- bSubcode,
- operating_mode,
- dgps_mode,
- dyn_code,
- trackmode;
- float
- elev_mask,
- cno_mask,
- dop_mask,
- dop_switch;
- unsigned char
- dgps_age_limit;
-} TSIP_RCVR_CFG;
-
-
-#ifdef TRIMBLE_OUTPUT_FUNC
-static char
- *dayname[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
- old_baudnum[] = {0, 1, 4, 5, 6, 8, 9, 11, 28, 12},
- *st_baud_text_app [] = {"", "", " 300", " 600", " 1200", " 2400",
- " 4800", " 9600", "19200", "38400"},
- *old_parity_text[] = {"EVEN", "ODD", "", "", "NONE"},
- *parity_text [] = {"NONE", "ODD", "EVEN"},
- *old_input_ch[] = { "TSIP", "RTCM (6 of 8 bits)"},
- *old_output_ch[] = { "TSIP", "No output", "", "", "", "NMEA 0183"},
- *protocols_in_text[] = { "", "TSIP", "", ""},
- *protocols_out_text[] = { "", "TSIP", "NMEA"},
- *rcvr_port_text [] = { "Port A ", "Port B ", "Current Port"},
- *dyn_text [] = {"Unchanged", "Land", "Sea", "Air", "Static"},
- *NavModeText0xBB[] = {"automatic", "time only (0-D)", "", "2-D",
- "3-D", "", "", "OverDetermined Time"},
- *PPSTimeBaseText[] = {"GPS", "UTC", "USER"},
- *PPSPolarityText[] = {"Positive", "Negative"},
- *MaskText[] = { "Almanac ", "Ephemeris", "UTC ", "Iono ",
- "GPS Msg ", "Alm Hlth ", "Time Fix ", "SV Select",
- "Ext Event", "Pos Fix ", "Raw Meas "};
-
-#endif /* TRIMBLE_OUTPUT_FUNC */
-
-/*
- * Unit control structure
- */
-struct ripencc_unit {
- int unit; /* unit number */
- int pollcnt; /* poll message counter */
- int polled; /* Hand in a sample? */
- char leapdelta; /* delta of next leap event */
- unsigned char utcflags; /* delta of next leap event */
- l_fp tstamp; /* timestamp of last poll */
-
- struct timespec ts; /* last timestamp */
- pps_params_t pps_params; /* pps parameters */
- pps_info_t pps_info; /* last pps data */
- pps_handle_t handle; /* pps handlebars */
-
-};
-
-
-/******************* PROTOYPES *****************/
-
-/* prototypes for report parsing primitives */
-short rpt_0x3D (TSIPPKT *rpt, unsigned char *tx_baud_index,
- unsigned char *rx_baud_index, unsigned char *char_format_index,
- unsigned char *stop_bits, unsigned char *tx_mode_index,
- unsigned char *rx_mode_index);
-short rpt_0x40 (TSIPPKT *rpt, unsigned char *sv_prn, short *week_num,
- float *t_zc, float *eccentricity, float *t_oa, float *i_0,
- float *OMEGA_dot, float *sqrt_A, float *OMEGA_0, float *omega,
- float *M_0);
-short rpt_0x41 (TSIPPKT *rpt, float *time_of_week, float *UTC_offset,
- short *week_num);
-short rpt_0x42 (TSIPPKT *rpt, float ECEF_pos[3], float *time_of_fix);
-short rpt_0x43 (TSIPPKT *rpt, float ECEF_vel[3], float *freq_offset,
- float *time_of_fix);
-short rpt_0x45 (TSIPPKT *rpt, unsigned char *major_nav_version,
- unsigned char *minor_nav_version, unsigned char *nav_day,
- unsigned char *nav_month, unsigned char *nav_year,
- unsigned char *major_dsp_version, unsigned char *minor_dsp_version,
- unsigned char *dsp_day, unsigned char *dsp_month,
- unsigned char *dsp_year);
-short rpt_0x46 (TSIPPKT *rpt, unsigned char *status1, unsigned char *status2);
-short rpt_0x47 (TSIPPKT *rpt, unsigned char *nsvs, unsigned char *sv_prn,
- float *snr);
-short rpt_0x48 (TSIPPKT *rpt, unsigned char *message);
-short rpt_0x49 (TSIPPKT *rpt, unsigned char *sv_health);
-short rpt_0x4A (TSIPPKT *rpt, float *lat, float *lon, float *alt,
- float *clock_bias, float *time_of_fix);
-short rpt_0x4A_2 (TSIPPKT *rpt, float *alt, float *dummy,
- unsigned char *alt_flag);
-short rpt_0x4B (TSIPPKT *rpt, unsigned char *machine_id,
- unsigned char *status3, unsigned char *status4);
-short rpt_0x4C (TSIPPKT *rpt, unsigned char *dyn_code, float *el_mask,
- float *snr_mask, float *dop_mask, float *dop_switch);
-short rpt_0x4D (TSIPPKT *rpt, float *osc_offset);
-short rpt_0x4E (TSIPPKT *rpt, unsigned char *response);
-short rpt_0x4F (TSIPPKT *rpt, double *a0, float *a1, float *time_of_data,
- short *dt_ls, short *wn_t, short *wn_lsf, short *dn, short *dt_lsf);
-short rpt_0x54 (TSIPPKT *rpt, float *clock_bias, float *freq_offset,
- float *time_of_fix);
-short rpt_0x55 (TSIPPKT *rpt, unsigned char *pos_code, unsigned char *vel_code,
- unsigned char *time_code, unsigned char *aux_code);
-short rpt_0x56 (TSIPPKT *rpt, float vel_ENU[3], float *freq_offset,
- float *time_of_fix);
-short rpt_0x57 (TSIPPKT *rpt, unsigned char *source_code,
- unsigned char *diag_code, short *week_num, float *time_of_fix);
-short rpt_0x58 (TSIPPKT *rpt, unsigned char *op_code, unsigned char *data_type,
- unsigned char *sv_prn, unsigned char *data_length,
- unsigned char *data_packet);
-short rpt_0x59 (TSIPPKT *rpt, unsigned char *code_type,
- unsigned char status_code[32]);
-short rpt_0x5A (TSIPPKT *rpt, unsigned char *sv_prn, float *sample_length,
- float *signal_level, float *code_phase, float *Doppler,
- double *time_of_fix);
-short rpt_0x5B (TSIPPKT *rpt, unsigned char *sv_prn, unsigned char *sv_health,
- unsigned char *sv_iode, unsigned char *fit_interval_flag,
- float *time_of_collection, float *time_of_eph, float *sv_accy);
-short rpt_0x5C (TSIPPKT *rpt, unsigned char *sv_prn, unsigned char *slot,
- unsigned char *chan, unsigned char *acq_flag, unsigned char *eph_flag,
- float *signal_level, float *time_of_last_msmt, float *elev,
- float *azim, unsigned char *old_msmt_flag,
- unsigned char *integer_msec_flag, unsigned char *bad_data_flag,
- unsigned char *data_collect_flag);
-short rpt_0x6D (TSIPPKT *rpt, unsigned char *manual_mode, unsigned char *nsvs,
- unsigned char *ndim, unsigned char sv_prn[], float *pdop,
- float *hdop, float *vdop, float *tdop);
-short rpt_0x82 (TSIPPKT *rpt, unsigned char *diff_mode);
-short rpt_0x83 (TSIPPKT *rpt, double ECEF_pos[3], double *clock_bias,
- float *time_of_fix);
-short rpt_0x84 (TSIPPKT *rpt, double *lat, double *lon, double *alt,
- double *clock_bias, float *time_of_fix);
-short rpt_Paly0xBB(TSIPPKT *rpt, TSIP_RCVR_CFG *TsipxBB);
-short rpt_0xBC (TSIPPKT *rpt, unsigned char *port_num,
- unsigned char *in_baud, unsigned char *out_baud,
- unsigned char *data_bits, unsigned char *parity,
- unsigned char *stop_bits, unsigned char *flow_control,
- unsigned char *protocols_in, unsigned char *protocols_out,
- unsigned char *reserved);
-
-/* prototypes for superpacket parsers */
-
-short rpt_0x8F0B (TSIPPKT *rpt, unsigned short *event, double *tow,
- unsigned char *date, unsigned char *month, short *year,
- unsigned char *dim_mode, short *utc_offset, double *bias, double *drift,
- float *bias_unc, float *dr_unc, double *lat, double *lon, double *alt,
- char sv_id[8]);
-short rpt_0x8F14 (TSIPPKT *rpt, short *datum_idx, double datum_coeffs[5]);
-short rpt_0x8F15 (TSIPPKT *rpt, short *datum_idx, double datum_coeffs[5]);
-short rpt_0x8F20 (TSIPPKT *rpt, unsigned char *info, double *lat,
- double *lon, double *alt, double vel_enu[], double *time_of_fix,
- short *week_num, unsigned char *nsvs, unsigned char sv_prn[],
- short sv_IODC[], short *datum_index);
-short rpt_0x8F41 (TSIPPKT *rpt, unsigned char *bSearchRange,
- unsigned char *bBoardOptions, unsigned long *iiSerialNumber,
- unsigned char *bBuildYear, unsigned char *bBuildMonth,
- unsigned char *bBuildDay, unsigned char *bBuildHour,
- float *fOscOffset, unsigned short *iTestCodeId);
-short rpt_0x8F42 (TSIPPKT *rpt, unsigned char *bProdOptionsPre,
- unsigned char *bProdNumberExt, unsigned short *iCaseSerialNumberPre,
- unsigned long *iiCaseSerialNumber, unsigned long *iiProdNumber,
- unsigned short *iPremiumOptions, unsigned short *iMachineID,
- unsigned short *iKey);
-short rpt_0x8F45 (TSIPPKT *rpt, unsigned char *bSegMask);
-short rpt_0x8F4A_16 (TSIPPKT *rpt, unsigned char *pps_enabled,
- unsigned char *pps_timebase, unsigned char *pos_polarity,
- double *pps_offset, float *bias_unc_threshold);
-short rpt_0x8F4B (TSIPPKT *rpt, unsigned long *decorr_max);
-short rpt_0x8F4D (TSIPPKT *rpt, unsigned long *event_mask);
-short rpt_0x8FA5 (TSIPPKT *rpt, unsigned char *spktmask);
-short rpt_0x8FAD (TSIPPKT *rpt, unsigned short *COUNT, double *FracSec,
- unsigned char *Hour, unsigned char *Minute, unsigned char *Second,
- unsigned char *Day, unsigned char *Month, unsigned short *Year,
- unsigned char *Status, unsigned char *Flags);
-
-/**/
-/* prototypes for command-encode primitives with suffix convention: */
-/* c = clear, s = set, q = query, e = enable, d = disable */
-void cmd_0x1F (TSIPPKT *cmd);
-void cmd_0x26 (TSIPPKT *cmd);
-void cmd_0x2F (TSIPPKT *cmd);
-void cmd_0x35s (TSIPPKT *cmd, unsigned char pos_code, unsigned char vel_code,
- unsigned char time_code, unsigned char opts_code);
-void cmd_0x3C (TSIPPKT *cmd, unsigned char sv_prn);
-void cmd_0x3Ds (TSIPPKT *cmd, unsigned char baud_out, unsigned char baud_inp,
- unsigned char char_code, unsigned char stopbitcode,
- unsigned char output_mode, unsigned char input_mode);
-void cmd_0xBBq (TSIPPKT *cmd, unsigned char subcode) ;
-
-/* prototypes 8E commands */
-void cmd_0x8E0Bq (TSIPPKT *cmd);
-void cmd_0x8E41q (TSIPPKT *cmd);
-void cmd_0x8E42q (TSIPPKT *cmd);
-void cmd_0x8E4Aq (TSIPPKT *cmd);
-void cmd_0x8E4As (TSIPPKT *cmd, unsigned char PPSOnOff, unsigned char TimeBase,
- unsigned char Polarity, double PPSOffset, float Uncertainty);
-void cmd_0x8E4Bq (TSIPPKT *cmd);
-void cmd_0x8E4Ds (TSIPPKT *cmd, unsigned long AutoOutputMask);
-void cmd_0x8EADq (TSIPPKT *cmd);
-
-/* header/source border XXXXXXXXXXXXXXXXXXXXXXXXXX */
-
-/* Trimble parse functions */
-static int parse0x8FAD P((TSIPPKT *, struct peer *));
-static int parse0x8F0B P((TSIPPKT *, struct peer *));
-#ifdef TRIMBLE_OUTPUT_FUNC
-static int parseany P((TSIPPKT *, struct peer *));
-static void TranslateTSIPReportToText P((TSIPPKT *, char *));
-#endif /* TRIMBLE_OUTPUT_FUNC */
-static int parse0x5C P((TSIPPKT *, struct peer *));
-static int parse0x4F P((TSIPPKT *, struct peer *));
-static void tsip_input_proc P((TSIPPKT *, int));
-
-/* Trimble helper functions */
-static void bPutFloat P((float *, unsigned char *));
-static void bPutDouble P((double *, unsigned char *));
-static void bPutULong P((unsigned long *, unsigned char *));
-static int print_msg_table_header P((int rptcode, char *HdrStr, int force));
-static char * show_time P((float time_of_week));
-
-/* RIPE NCC functions */
-static void ripencc_control P((int, struct refclockstat *, struct
- refclockstat *, struct peer *));
-static int ripencc_ppsapi P((struct peer *, int, int));
-static int ripencc_get_pps_ts P((struct ripencc_unit *, l_fp *));
-static int ripencc_start P((int, struct peer *));
-static void ripencc_shutdown P((int, struct peer *));
-static void ripencc_poll P((int, struct peer *));
-static void ripencc_send P((struct peer *, TSIPPKT spt));
-static void ripencc_receive P((struct recvbuf *));
-
-/* fill in reflock structure for our clock */
-struct refclock refclock_ripencc = {
- ripencc_start, /* start up driver */
- ripencc_shutdown, /* shut down driver */
- ripencc_poll, /* transmit poll message */
- ripencc_control, /* control function */
- noentry, /* initialize driver */
- noentry, /* debug info */
- NOFLAGS /* clock flags */
-};
-
-/*
- * Tables to compute the ddd of year form icky dd/mm timecode. Viva la
- * leap.
- */
-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};
-
-
-/*
- * ripencc_start - open the GPS devices and initialize data for processing
- */
-static int
-ripencc_start(int unit, struct peer *peer)
-{
- register struct ripencc_unit *up;
- struct refclockproc *pp;
- char device[40];
- int fd;
- struct termios tio;
- TSIPPKT spt;
-
- /*
- * Open serial port
- */
- (void)snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_RAW)))
- return (0);
-
- /* from refclock_palisade.c */
- if (tcgetattr(fd, &tio) < 0) {
- msyslog(LOG_ERR, "Palisade(%d) tcgetattr(fd, &tio): %m",unit);
- return (0);
- }
-
- /*
- * set flags
- */
- tio.c_cflag |= (PARENB|PARODD);
- tio.c_iflag &= ~ICRNL;
- if (tcsetattr(fd, TCSANOW, &tio) == -1) {
- msyslog(LOG_ERR, "Palisade(%d) tcsetattr(fd, &tio): %m",unit);
- return (0);
- }
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct ripencc_unit *)
- emalloc(sizeof(struct ripencc_unit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct ripencc_unit));
- pp = peer->procptr;
- pp->io.clock_recv = ripencc_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, REFID_LEN);
- up->pollcnt = 2;
- up->unit = unit;
- up->leapdelta = 0;
- up->utcflags = 0;
-
- /*
- * Initialize the Clock
- */
-
- /* query software versions */
- cmd_0x1F(&spt);
- ripencc_send(peer, spt);
-
- /* query receiver health */
- cmd_0x26(&spt);
- ripencc_send(peer, spt);
-
- /* query serial numbers */
- cmd_0x8E42q(&spt);
- ripencc_send(peer, spt);
-
- /* query manuf params */
- cmd_0x8E41q(&spt);
- ripencc_send(peer, spt);
-
- /* i/o opts */ /* trimble manual page A30 */
- cmd_0x35s(&spt,
- 0x1C, /* position */
- 0x00, /* velocity */
- 0x05, /* timing */
- 0x0a); /* auxilary */
- ripencc_send(peer, spt);
-
- /* turn off port A */
- cmd_0x3Ds (&spt,
- 0x0B, /* baud_out */
- 0x0B, /* baud_inp */
- 0x07, /* char_code */
- 0x07, /* stopbitcode */
- 0x01, /* output_mode */
- 0x00); /* input_mode */
- ripencc_send(peer, spt);
-
- /* set i/o options */
- cmd_0x8E4As (&spt,
- 0x01, /* PPS on */
- 0x01, /* Timebase UTC */
- 0x00, /* polarity positive */
- 0., /* 100 ft. cable XXX make flag */
- 1e-6 * GPS_C); /* turn of biasuncert. > (1us) */
- ripencc_send(peer,spt);
-
- /* all outomatic packet output off */
- cmd_0x8E4Ds(&spt,
- 0x00000000); /* AutoOutputMask */
- ripencc_send(peer, spt);
-
- cmd_0xBBq (&spt,
- 0x00); /* query primary configuration */
- ripencc_send(peer,spt);
-
-
- /* query PPS parameters */
- cmd_0x8E4Aq (&spt); /* query PPS params */
- ripencc_send(peer,spt);
-
- /* query survey limit */
- cmd_0x8E4Bq (&spt); /* query survey limit */
- ripencc_send(peer,spt);
-
-#ifdef DEBUG_NCC
- if (debug)
- printf("ripencc_start: success\n");
-#endif /* DEBUG_NCC */
-
- /*
- * 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, &up->handle) < 0) {
- up->handle = 0;
- msyslog(LOG_ERR, "refclock_ripencc: time_pps_create failed: %m");
- return (1);
- }
-
- return(ripencc_ppsapi(peer, 0, 0));
-}
-
-/*
- * ripencc_control - fudge control
- */
-static void
-ripencc_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 */
- )
-{
- struct refclockproc *pp;
-
-#ifdef DEBUG_NCC
- msyslog(LOG_INFO,"%s()",__FUNCTION__);
-#endif /* DEBUG_NCC */
-
- pp = peer->procptr;
- ripencc_ppsapi(peer, pp->sloppyclockflag & CLK_FLAG2,
- pp->sloppyclockflag & CLK_FLAG3);
-}
-
-
-/*
- * Initialize PPSAPI
- */
-int
-ripencc_ppsapi(
- struct peer *peer, /* peer structure pointer */
- int enb_clear, /* clear enable */
- int enb_hardpps /* hardpps enable */
- )
-{
- struct refclockproc *pp;
- struct ripencc_unit *up;
- int capability;
-
- pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
- if (time_pps_getcap(up->handle, &capability) < 0) {
- msyslog(LOG_ERR,
- "refclock_ripencc: time_pps_getcap failed: %m");
- return (0);
- }
- memset(&up->pps_params, 0, sizeof(pps_params_t));
- if (enb_clear)
- up->pps_params.mode = capability & PPS_CAPTURECLEAR;
- else
- up->pps_params.mode = capability & PPS_CAPTUREASSERT;
- if (!up->pps_params.mode) {
- msyslog(LOG_ERR,
- "refclock_ripencc: invalid capture edge %d",
- !enb_clear);
- return (0);
- }
- up->pps_params.mode |= PPS_TSFMT_TSPEC;
- if (time_pps_setparams(up->handle, &up->pps_params) < 0) {
- msyslog(LOG_ERR,
- "refclock_ripencc: time_pps_setparams failed: %m");
- return (0);
- }
- if (enb_hardpps) {
- if (time_pps_kcbind(up->handle, PPS_KC_HARDPPS,
- up->pps_params.mode & ~PPS_TSFMT_TSPEC,
- PPS_TSFMT_TSPEC) < 0) {
- msyslog(LOG_ERR,
- "refclock_ripencc: time_pps_kcbind failed: %m");
- return (0);
- }
- pps_enable = 1;
- }
- peer->precision = PPS_PRECISION;
-
-#if DEBUG_NCC
- if (debug) {
- time_pps_getparams(up->handle, &up->pps_params);
- printf(
- "refclock_ripencc: capability 0x%x version %d mode 0x%x kern %d\n",
- capability, up->pps_params.api_version,
- up->pps_params.mode, enb_hardpps);
- }
-#endif /* DEBUG_NCC */
-
- return (1);
-}
-
-/*
- * This function is called every 64 seconds from ripencc_receive
- * It will fetch the pps time
- *
- * Return 0 on failure and 1 on success.
- */
-static int
-ripencc_get_pps_ts(
- struct ripencc_unit *up,
- l_fp *tsptr
- )
-{
- pps_info_t pps_info;
- struct timespec timeout, ts;
- double dtemp;
- l_fp tstmp;
-
-#ifdef DEBUG_PPS
- msyslog(LOG_INFO,"ripencc_get_pps_ts\n");
-#endif /* DEBUG_PPS */
-
-
- /*
- * Convert the timespec nanoseconds field to ntp l_fp units.
- */
- if (up->handle == 0)
- return (0);
- timeout.tv_sec = 0;
- timeout.tv_nsec = 0;
- memcpy(&pps_info, &up->pps_info, sizeof(pps_info_t));
- if (time_pps_fetch(up->handle, PPS_TSFMT_TSPEC, &up->pps_info,
- &timeout) < 0)
- return (0);
- if (up->pps_params.mode & PPS_CAPTUREASSERT) {
- if (pps_info.assert_sequence ==
- up->pps_info.assert_sequence)
- return (0);
- ts = up->pps_info.assert_timestamp;
- } else if (up->pps_params.mode & PPS_CAPTURECLEAR) {
- if (pps_info.clear_sequence ==
- up->pps_info.clear_sequence)
- return (0);
- ts = up->pps_info.clear_timestamp;
- } else {
- return (0);
- }
- if ((up->ts.tv_sec == ts.tv_sec) && (up->ts.tv_nsec == ts.tv_nsec))
- return (0);
- up->ts = ts;
-
- tstmp.l_ui = ts.tv_sec + JAN_1970;
- dtemp = ts.tv_nsec * FRAC / 1e9;
- tstmp.l_uf = (u_int32)dtemp;
-
-#ifdef DEBUG_PPS
- msyslog(LOG_INFO,"ts.tv_sec: %d\n",(int)ts.tv_sec);
- msyslog(LOG_INFO,"ts.tv_nsec: %ld\n",ts.tv_nsec);
-#endif /* DEBUG_PPS */
-
- *tsptr = tstmp;
- return (1);
-}
-
-/*
- * ripencc_shutdown - shut down a GPS clock
- */
-static void
-ripencc_shutdown(int unit, struct peer *peer)
-{
- register struct ripencc_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
-
- if (up->handle != 0)
- time_pps_destroy(up->handle);
-
- io_closeclock(&pp->io);
-
- free(up);
-}
-
-/*
- * ripencc_poll - called by the transmit procedure
- */
-static void
-ripencc_poll(int unit, struct peer *peer)
-{
- register struct ripencc_unit *up;
- struct refclockproc *pp;
- TSIPPKT spt;
-
-#ifdef DEBUG_NCC
- if (debug)
- fprintf(stderr, "ripencc_poll(%d)\n", unit);
-#endif /* DEBUG_NCC */
- pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
- if (up->pollcnt == 0)
- refclock_report(peer, CEVNT_TIMEOUT);
- else
- up->pollcnt--;
-
- pp->polls++;
- up->polled = 1;
-
- /* poll for UTC superpacket */
- cmd_0x8EADq (&spt);
- ripencc_send(peer,spt);
-}
-
-/*
- * ripencc_send - send message to clock
- * use the structures being created by the trimble functions!
- * makes the code more readable/clean
- */
-static void
-ripencc_send(struct peer *peer, TSIPPKT spt)
-{
- unsigned char *ip, *op;
- unsigned char obuf[512];
-
-#ifdef DEBUG_RAW
- {
- register struct ripencc_unit *up;
- register struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
- if (debug)
- printf("ripencc_send(%d, %02X)\n", up->unit, cmd);
- }
-#endif /* DEBUG_RAW */
-
- ip = spt.buf;
- op = obuf;
-
- *op++ = 0x10;
- *op++ = spt.code;
-
- while (spt.len--) {
- if (op-obuf > sizeof(obuf)-5) {
- msyslog(LOG_ERR, "ripencc_send obuf overflow!");
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
-
- if (*ip == 0x10) /* byte stuffing */
- *op++ = 0x10;
- *op++ = *ip++;
- }
-
- *op++ = 0x10;
- *op++ = 0x03;
-
-#ifdef DEBUG_RAW
- if (debug) { /* print raw packet */
- unsigned char *cp;
- int i;
-
- printf("ripencc_send: len %d\n", op-obuf);
- for (i=1, cp=obuf; cp<op; i++, cp++) {
- printf(" %02X", *cp);
- if (i%10 == 0)
- printf("\n");
- }
- printf("\n");
- }
-#endif /* DEBUG_RAW */
-
- if (write(peer->procptr->io.fd, obuf, op-obuf) == -1) {
- refclock_report(peer, CEVNT_FAULT);
- }
-}
-
-/*
- * ripencc_receive()
- *
- * called when a packet is received on the serial port
- * takes care of further processing
- *
- */
-static void
-ripencc_receive(struct recvbuf *rbufp)
-{
- register struct ripencc_unit *up;
- register struct refclockproc *pp;
- struct peer *peer;
- static TSIPPKT rpt; /* structure for current incoming TSIP report */
- TSIPPKT spt; /* send packet */
- int ns_since_pps;
- int i;
- char *cp;
- /* Use these variables to hold data until we decide its worth keeping */
- char rd_lastcode[BMAX];
- l_fp rd_tmp;
- u_short rd_lencode;
-
- /* msyslog(LOG_INFO, "%s",__FUNCTION__); */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
- rd_lencode = refclock_gtlin(rbufp, rd_lastcode, BMAX, &rd_tmp);
-
-#ifdef DEBUG_RAW
- if (debug)
- fprintf(stderr, "ripencc_receive(%d)\n", up->unit);
-#endif /* DEBUG_RAW */
-
-#ifdef DEBUG_RAW
- if (debug) { /* print raw packet */
- int i;
- unsigned char *cp;
-
- printf("ripencc_receive: len %d\n", rbufp->recv_length);
- for (i=1, cp=(char*)&rbufp->recv_space; i <= rbufp->recv_length; i++, cp++) {
- printf(" %02X", *cp);
- if (i%10 == 0)
- printf("\n");
- }
- printf("\n");
- }
-#endif /* DEBUG_RAW */
-
- cp = (char*) &rbufp->recv_space;
- i=rbufp->recv_length;
-
- while (i--) { /* loop over received chars */
-
- tsip_input_proc(&rpt, (unsigned char) *cp++);
-
- if (rpt.status != TSIP_PARSED_FULL)
- continue;
-
- switch (rpt.code) {
-
- case 0x8F: /* superpacket */
-
- switch (rpt.buf[0]) {
-
- case 0xAD: /* UTC Time */
- /*
- * When polling on port B the timecode
- * is the time of the previous PPS.
- * If we completed receiving the packet
- * less than 150ms after the turn of the second,
- * it may have the code of the previous second.
- * We do not trust that and simply poll again
- * without even parsing it.
- *
- * More elegant would be to re-schedule the poll,
- * but I do not know (yet) how to do that cleanly.
- *
- */
- /* BLA ns_since_pps = ncc_tstmp(rbufp, &trtmp); */
-/* if (up->polled && ns_since_pps > -1 && ns_since_pps < 150) { */
-
- ns_since_pps=200;
- if (up->polled && ns_since_pps < 150) {
- msyslog(LOG_INFO, "%s(): up->polled",__FUNCTION__);
- ripencc_poll(up->unit, peer);
- break;
- }
-
- /*
- * Parse primary utc time packet
- * and fill refclock structure
- * from results.
- */
- if (parse0x8FAD(&rpt, peer) < 0) {
- msyslog(LOG_INFO, "%s(): parse0x8FAD < 0",__FUNCTION__);
- refclock_report(peer, CEVNT_BADREPLY);
- break;
- }
- /*
- * If the PPSAPI is working, rather use its
- * timestamps.
- * assume that the PPS occurs on the second
- * so blow any msec
- */
- if (ripencc_get_pps_ts(up, &rd_tmp) == 1) {
- pp->lastrec = up->tstamp = rd_tmp;
- pp->nsec = 0;
- }
- else
- msyslog(LOG_INFO, "%s(): ripencc_get_pps_ts returns failure\n",__FUNCTION__);
-
-
- if (!up->polled) {
- msyslog(LOG_INFO, "%s(): unrequested packet\n",__FUNCTION__);
- /* unrequested packet */
- break;
- }
-
- /* we have been polled ! */
- up->polled = 0;
- up->pollcnt = 2;
-
- /* poll for next packet */
- cmd_0x8E0Bq(&spt);
- ripencc_send(peer,spt);
-
- if (ns_since_pps < 0) { /* no PPS */
- msyslog(LOG_INFO, "%s(): ns_since_pps < 0",__FUNCTION__);
- refclock_report(peer, CEVNT_BADTIME);
- break;
- }
-
- /*
- * Process the new sample in the median filter and determine the
- * reference clock offset and dispersion.
- */
- if (!refclock_process(pp)) {
- msyslog(LOG_INFO, "%s(): !refclock_process",__FUNCTION__);
- refclock_report(peer, CEVNT_BADTIME);
- break;
- }
-
- refclock_receive(peer);
- break;
-
- case 0x0B: /* comprehensive time packet */
- parse0x8F0B(&rpt, peer);
- break;
-
- default: /* other superpackets */
-#ifdef DEBUG_NCC
- msyslog(LOG_INFO, "%s(): calling parseany",__FUNCTION__);
-#endif /* DEBUG_NCC */
-#ifdef TRIMBLE_OUTPUT_FUNC
- parseany(&rpt, peer);
-#endif /* TRIMBLE_OUTPUT_FUNC */
- break;
- }
- break;
-
- case 0x4F: /* UTC parameters, for leap info */
- parse0x4F(&rpt, peer);
- break;
-
- case 0x5C: /* sat tracking data */
- parse0x5C(&rpt, peer);
- break;
-
- default: /* other packets */
-#ifdef TRIMBLE_OUTPUT_FUNC
- parseany(&rpt, peer);
-#endif /* TRIMBLE_OUTPUT_FUNC */
- break;
- }
- rpt.status = TSIP_PARSED_EMPTY;
- }
-}
-
-/*
- * All trimble functions that are directly referenced from driver code
- * (so not from parseany)
- */
-
-void cmd_0x1F (TSIPPKT *cmd)
-/* request software versions */
-{
- cmd->len = 0;
- cmd->code = 0x1F;
-}
-
-void cmd_0x26 (TSIPPKT *cmd)
-/* request receiver health */
-{
- cmd->len = 0;
- cmd->code = 0x26;
-}
-
-
-
-
-void cmd_0x2F (TSIPPKT *cmd)
-/* request UTC params */
-{
- cmd->len = 0;
- cmd->code = 0x2F;
-}
-
-void cmd_0x35s (TSIPPKT *cmd, unsigned char pos_code, unsigned char vel_code,
- unsigned char time_code, unsigned char opts_code)
-/* set serial I/O options */
-{
- cmd->buf[0] = pos_code;
- cmd->buf[1] = vel_code;
- cmd->buf[2] = time_code;
- cmd->buf[3] = opts_code;
- cmd->len = 4;
- cmd->code = 0x35;
-}
-void cmd_0x3C (TSIPPKT *cmd, unsigned char sv_prn)
-/* request tracking status */
-{
- cmd->buf[0] = sv_prn;
- cmd->len = 1;
- cmd->code = 0x3C;
-}
-
-
-void cmd_0x3Ds (TSIPPKT *cmd,
- unsigned char baud_out, unsigned char baud_inp,
- unsigned char char_code, unsigned char stopbitcode,
- unsigned char output_mode, unsigned char input_mode)
-/* set Channel A configuration for dual-port operation */
-{
- cmd->buf[0] = baud_out; /* XMT baud rate */
- cmd->buf[1] = baud_inp; /* RCV baud rate */
- cmd->buf[2] = char_code; /* parity and #bits per byte */
- cmd->buf[3] = stopbitcode; /* number of stop bits code */
- cmd->buf[4] = output_mode; /* Ch. A transmission mode */
- cmd->buf[5] = input_mode; /* Ch. A reception mode */
- cmd->len = 6;
- cmd->code = 0x3D;
-}
-
-
-/* query primary configuration */
-void cmd_0xBBq (TSIPPKT *cmd,
- unsigned char subcode)
-{
-
- cmd->len = 1;
- cmd->code = 0xBB;
- cmd->buf[0] = subcode;
-}
-
-
-/**** Superpackets ****/
-void cmd_0x8E0Bq (TSIPPKT *cmd)
-/* 8E-0B to query 8F-0B controls */
-{
-
- cmd->len = 1;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x0B;
-}
-
-
-void cmd_0x8E41q (TSIPPKT *cmd)
-/* 8F-41 to query board serial number */
-{
-
- cmd->len = 1;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x41;
-}
-
-
-void cmd_0x8E42q (TSIPPKT *cmd)
-/* 8F-42 to query product serial number */
-{
-
- cmd->len = 1;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x42;
-}
-void cmd_0x8E4Aq (TSIPPKT *cmd)
-/* 8F-4A to query PPS parameters */
-{
- cmd->len = 1;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x4A;
-}
-
-
-/* set i/o options */
-void cmd_0x8E4As (TSIPPKT *cmd,
- unsigned char PPSOnOff,
- unsigned char TimeBase,
- unsigned char Polarity,
- double PPSOffset,
- float Uncertainty)
-{
- cmd->len = 16;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x4A;
- cmd->buf[1] = PPSOnOff;
- cmd->buf[2] = TimeBase;
- cmd->buf[3] = Polarity;
- bPutDouble (&PPSOffset, &cmd->buf[4]);
- bPutFloat (&Uncertainty, &cmd->buf[12]);
-}
-void cmd_0x8E4Bq (TSIPPKT *cmd)
-/* 8F-4B query survey limit */
-{
- cmd->len = 1;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x4B;
-}
-
-
-/* poll for UTC superpacket */
-void cmd_0x8EADq (TSIPPKT *cmd)
-/* 8E-AD to query 8F-AD controls */
-{
- cmd->len = 1;
- cmd->code = 0x8E;
- cmd->buf[0] = 0xAD;
-}
-
-/* all outomatic packet output off */
-void cmd_0x8E4Ds (TSIPPKT *cmd,
- unsigned long AutoOutputMask)
-{
- cmd->len = 5;
- cmd->code = 0x8E;
- cmd->buf[0] = 0x4D;
- bPutULong (&AutoOutputMask, &cmd->buf[1]);
-}
-
-
-
-
-/* for DOS machines, reverse order of bytes as they come through the
- * serial port. */
-#ifdef BYTESWAP
-static short bGetShort (unsigned char *bp)
-{
- short outval;
- unsigned char *optr;
-
- optr = (unsigned char*)&outval + 1;
- *optr-- = *bp++;
- *optr = *bp;
- return outval;
-}
-
-#ifdef TRIMBLE_OUTPUT_FUNC
-static unsigned short bGetUShort (unsigned char *bp)
-{
- unsigned short outval;
- unsigned char *optr;
-
- optr = (unsigned char*)&outval + 1;
- *optr-- = *bp++;
- *optr = *bp;
- return outval;
-}
-
-static long bGetLong (unsigned char *bp)
-{
- long outval;
- unsigned char *optr;
-
- optr = (unsigned char*)&outval + 3;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr = *bp;
- return outval;
-}
-
-static unsigned long bGetULong (unsigned char *bp)
-{
- unsigned long outval;
- unsigned char *optr;
-
- optr = (unsigned char*)&outval + 3;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr = *bp;
- return outval;
-}
-#endif /* TRIMBLE_OUTPUT_FUNC */
-
-static float bGetSingle (unsigned char *bp)
-{
- float outval;
- unsigned char *optr;
-
- optr = (unsigned char*)&outval + 3;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr = *bp;
- return outval;
-}
-
-static double bGetDouble (unsigned char *bp)
-{
- double outval;
- unsigned char *optr;
-
- optr = (unsigned char*)&outval + 7;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr-- = *bp++;
- *optr = *bp;
- return outval;
-}
-
-#else /* not BYTESWAP */
-
-#define bGetShort(bp) (*(short*)(bp))
-#define bGetLong(bp) (*(long*)(bp))
-#define bGetULong(bp) (*(unsigned long*)(bp))
-#define bGetSingle(bp) (*(float*)(bp))
-#define bGetDouble(bp) (*(double*)(bp))
-
-#endif /* BYTESWAP */
-/*
- * Byte-reversal is necessary for little-endian (Intel-based) machines.
- * TSIP streams are Big-endian (Motorola-based).
- */
-#ifdef BYTESWAP
-
-void
-bPutFloat (float *in, unsigned char *out)
-{
- unsigned char *inptr;
-
- inptr = (unsigned char*)in + 3;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out = *inptr;
-}
-
-static void
-bPutULong (unsigned long *in, unsigned char *out)
-{
- unsigned char *inptr;
-
- inptr = (unsigned char*)in + 3;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out = *inptr;
-}
-
-static void
-bPutDouble (double *in, unsigned char *out)
-{
- unsigned char *inptr;
-
- inptr = (unsigned char*)in + 7;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out++ = *inptr--;
- *out = *inptr;
-}
-
-#else /* not BYTESWAP */
-
-void bPutShort (short a, unsigned char *cmdbuf) {*(short*) cmdbuf = a;}
-void bPutULong (long a, unsigned char *cmdbuf) {*(long*) cmdbuf = a;}
-void bPutFloat (float a, unsigned char *cmdbuf) {*(float*) cmdbuf = a;}
-void bPutDouble (double a, unsigned char *cmdbuf){*(double*) cmdbuf = a;}
-
-#endif /* BYTESWAP */
-
-/*
- * Parse primary utc time packet
- * and fill refclock structure
- * from results.
- *
- * 0 = success
- * -1 = errors
- */
-
-static int
-parse0x8FAD(rpt, peer)
- TSIPPKT *rpt;
- struct peer *peer;
-{
- register struct refclockproc *pp;
- register struct ripencc_unit *up;
-
- unsigned day, month, year; /* data derived from received timecode */
- unsigned hour, minute, second;
- unsigned char trackstat, utcflags;
-
- static char logbuf[1024]; /* logging string buffer */
- int i;
- unsigned char *buf;
-
- buf = rpt->buf;
- pp = peer->procptr;
-
- if (rpt->len != 22)
- return (-1);
-
- if (bGetShort(&buf[1]) != 0) {
-#ifdef DEBUG_NCC
- if (debug)
- printf("parse0x8FAD: event count != 0\n");
-#endif /* DEBUG_NCC */
- return(-1);
- }
-
-
- if (bGetDouble(&buf[3]) != 0.0) {
-#ifdef DEBUG_NCC
- if (debug)
- printf("parse0x8FAD: fracsecs != 0\n");
-#endif /* DEBUG_NCC */
- return(-1);
- }
-
- hour = (unsigned int) buf[11];
- minute = (unsigned int) buf[12];
- second = (unsigned int) buf[13];
- day = (unsigned int) buf[14];
- month = (unsigned int) buf[15];
- year = bGetShort(&buf[16]);
- trackstat = buf[18];
- utcflags = buf[19];
-
-
- sprintf(logbuf, "U1 %d.%d.%d %02d:%02d:%02d %d %02x",
- day, month, year, hour, minute, second, trackstat, utcflags);
-
-#ifdef DEBUG_NCC
- if (debug)
- puts(logbuf);
-#endif /* DEBUG_NCC */
-
- record_clock_stats(&peer->srcadr, logbuf);
-
- if (!utcflags & UTCF_UTC_AVAIL)
- return(-1);
-
- /* poll for UTC parameters once and then if UTC flag changed */
- up = (struct ripencc_unit *) pp->unitptr;
- if (utcflags != up->utcflags) {
- TSIPPKT spt; /* local structure for send packet */
- cmd_0x2F (&spt); /* request UTC params */
- ripencc_send(peer,spt);
- up->utcflags = utcflags;
- }
-
- /*
- * If we hit the leap second, we choose to skip this sample
- * rather than rely on other code to be perfectly correct.
- * No offense, just defense ;-).
- */
- if (second == 60)
- return(-1);
-
- /* now check and convert the time we received */
-
- pp->year = year;
- if (month < 1 || month > 12 || day < 1 || day > 31)
- return(-1);
-
- if (pp->year % 4) {
- if (day > day1tab[month - 1])
- return(-1);
- for (i = 0; i < month - 1; i++)
- day += day1tab[i];
- } else {
- if (day > day2tab[month - 1])
- return(-1);
- for (i = 0; i < month - 1; i++)
- day += day2tab[i];
- }
- pp->day = day;
- pp->hour = hour;
- pp->minute = minute;
- pp-> second = second;
- pp->nsec = 0;
-
- if ((utcflags&UTCF_LEAP_PNDG) && up->leapdelta != 0)
- pp-> leap = (up->leapdelta > 0 ? LEAP_ADDSECOND : LEAP_DELSECOND);
- else
- pp-> leap = LEAP_NOWARNING;
-
- return (0);
-}
-
-/*
- * Parse comprehensive time packet
- *
- * 0 = success
- * -1 = errors
- */
-
-int parse0x8F0B(rpt, peer)
- TSIPPKT *rpt;
- struct peer *peer;
-{
- register struct refclockproc *pp;
-
- unsigned day, month, year; /* data derived from received timecode */
- unsigned hour, minute, second;
- unsigned utcoff;
- unsigned char mode;
- double bias, rate;
- float biasunc, rateunc;
- double lat, lon, alt;
- short lat_deg, lon_deg;
- float lat_min, lon_min;
- unsigned char north_south, east_west;
- char sv[9];
-
- static char logbuf[1024]; /* logging string buffer */
- unsigned char b;
- int i;
- unsigned char *buf;
- double tow;
-
- buf = rpt->buf;
- pp = peer->procptr;
-
- if (rpt->len != 74)
- return (-1);
-
- if (bGetShort(&buf[1]) != 0)
- return(-1);;
-
- tow = bGetDouble(&buf[3]);
-
- if (tow == -1.0) {
- return(-1);
- }
- else if ((tow >= 604800.0) || (tow < 0.0)) {
- return(-1);
- }
- else
- {
- if (tow < 604799.9) tow = tow + .00000001;
- second = (unsigned int) fmod(tow, 60.);
- minute = (unsigned int) fmod(tow/60., 60.);
- hour = (unsigned int )fmod(tow / 3600., 24.);
- }
-
-
- day = (unsigned int) buf[11];
- month = (unsigned int) buf[12];
- year = bGetShort(&buf[13]);
- mode = buf[15];
- utcoff = bGetShort(&buf[16]);
- bias = bGetDouble(&buf[18]) / GPS_C * 1e9; /* ns */
- rate = bGetDouble(&buf[26]) / GPS_C * 1e9; /* ppb */
- biasunc = bGetSingle(&buf[34]) / GPS_C * 1e9; /* ns */
- rateunc = bGetSingle(&buf[38]) / GPS_C * 1e9; /* ppb */
- lat = bGetDouble(&buf[42]) * R2D;
- lon = bGetDouble(&buf[50]) * R2D;
- alt = bGetDouble(&buf[58]);
-
- if (lat < 0.0) {
- north_south = 'S';
- lat = -lat;
- }
- else {
- north_south = 'N';
- }
- lat_deg = (short)lat;
- lat_min = (lat - lat_deg) * 60.0;
-
- if (lon < 0.0) {
- east_west = 'W';
- lon = -lon;
- }
- else {
- east_west = 'E';
- }
-
- lon_deg = (short)lon;
- lon_min = (lon - lon_deg) * 60.0;
-
- for (i=0; i<8; i++) {
- sv[i] = buf[i + 66];
- if (sv[i]) {
- TSIPPKT spt; /* local structure for sendpacket */
- b = (unsigned char) (sv[i]<0 ? -sv[i] : sv[i]);
- /* request tracking status */
- cmd_0x3C (&spt, b);
- ripencc_send(peer,spt);
- }
- }
-
-
- sprintf(logbuf, "C1 %02d%02d%04d %02d%02d%02d %d %7.0f %.1f %.0f %.1f %d %02d%09.6f %c %02d%09.6f %c %.0f %d %d %d %d %d %d %d %d",
- day, month, year, hour, minute, second, mode, bias, biasunc, rate, rateunc, utcoff,
- lat_deg, lat_min, north_south, lon_deg, lon_min, east_west, alt,
- sv[0], sv[1], sv[2], sv[3], sv[4], sv[5], sv[6], sv[7]);
-
-#ifdef DEBUG_NCC
- if (debug)
- puts(logbuf);
-#endif /* DEBUG_NCC */
-
- record_clock_stats(&peer->srcadr, logbuf);
-
- return (0);
-}
-
-#ifdef TRIMBLE_OUTPUT_FUNC
-/*
- * Parse any packet using Trimble machinery
- */
-int parseany(rpt, peer)
- TSIPPKT *rpt;
- struct peer *peer;
-{
- static char logbuf[1024]; /* logging string buffer */
-
- TranslateTSIPReportToText (rpt, logbuf); /* anything else */
-#ifdef DEBUG_NCC
- if (debug)
- puts(&logbuf[1]);
-#endif /* DEBUG_NCC */
- record_clock_stats(&peer->srcadr, &logbuf[1]);
- return(0);
-}
-#endif /* TRIMBLE_OUTPUT_FUNC */
-
-
-/*
- * Parse UTC Parameter Packet
- *
- * See the IDE for documentation!
- *
- * 0 = success
- * -1 = errors
- */
-
-int parse0x4F(rpt, peer)
- TSIPPKT *rpt;
- struct peer *peer;
-{
- register struct ripencc_unit *up;
-
- double a0;
- float a1, tot;
- int dt_ls, wn_t, wn_lsf, dn, dt_lsf;
-
- static char logbuf[1024]; /* logging string buffer */
- unsigned char *buf;
-
- buf = rpt->buf;
-
- if (rpt->len != 26)
- return (-1);
- a0 = bGetDouble (buf);
- a1 = bGetSingle (&buf[8]);
- dt_ls = bGetShort (&buf[12]);
- tot = bGetSingle (&buf[14]);
- wn_t = bGetShort (&buf[18]);
- wn_lsf = bGetShort (&buf[20]);
- dn = bGetShort (&buf[22]);
- dt_lsf = bGetShort (&buf[24]);
-
- sprintf(logbuf, "L1 %d %d %d %g %g %g %d %d %d",
- dt_lsf - dt_ls, dt_ls, dt_lsf, a0, a1, tot, wn_t, wn_lsf, dn);
-
-#ifdef DEBUG_NCC
- if (debug)
- puts(logbuf);
-#endif /* DEBUG_NCC */
-
- record_clock_stats(&peer->srcadr, logbuf);
-
- up = (struct ripencc_unit *) peer->procptr->unitptr;
- up->leapdelta = dt_lsf - dt_ls;
-
- return (0);
-}
-
-/*
- * Parse Tracking Status packet
- *
- * 0 = success
- * -1 = errors
- */
-
-int parse0x5C(rpt, peer)
- TSIPPKT *rpt;
- struct peer *peer;
-{
- unsigned char prn, channel, aqflag, ephstat;
- float snr, azinuth, elevation;
-
- static char logbuf[1024]; /* logging string buffer */
- unsigned char *buf;
-
- buf = rpt->buf;
-
- if (rpt->len != 24)
- return(-1);
-
- prn = buf[0];
- channel = (unsigned char)(buf[1] >> 3);
- if (channel == 0x10)
- channel = 2;
- else
- channel++;
- aqflag = buf[2];
- ephstat = buf[3];
- snr = bGetSingle(&buf[4]);
- elevation = bGetSingle(&buf[12]) * R2D;
- azinuth = bGetSingle(&buf[16]) * R2D;
-
- sprintf(logbuf, "S1 %02d %d %d %02x %4.1f %5.1f %4.1f",
- prn, channel, aqflag, ephstat, snr, azinuth, elevation);
-
-#ifdef DEBUG_NCC
- if (debug)
- puts(logbuf);
-#endif /* DEBUG_NCC */
-
- record_clock_stats(&peer->srcadr, logbuf);
-
- return (0);
-}
-
-/******* Code below is from Trimble Tsipchat *************/
-
-/*
- * *************************************************************************
- *
- * Trimble Navigation, Ltd.
- * OEM Products Development Group
- * P.O. Box 3642
- * 645 North Mary Avenue
- * Sunnyvale, California 94088-3642
- *
- * Corporate Headquarter:
- * Telephone: (408) 481-8000
- * Fax: (408) 481-6005
- *
- * Technical Support Center:
- * Telephone: (800) 767-4822 (U.S. and Canada)
- * (408) 481-6940 (outside U.S. and Canada)
- * Fax: (408) 481-6020
- * BBS: (408) 481-7800
- * e-mail: trimble_support@trimble.com
- * ftp://ftp.trimble.com/pub/sct/embedded/bin
- *
- * *************************************************************************
- *
- * ------- BYTE-SWAPPING -------
- * TSIP is big-endian (Motorola) protocol. To use on little-endian (Intel)
- * systems, the bytes of all multi-byte types (shorts, floats, doubles, etc.)
- * must be reversed. This is controlled by the MACRO BYTESWAP; if defined, it
- * assumes little-endian protocol.
- * --------------------------------
- *
- * T_PARSER.C and T_PARSER.H contains primitive functions that interpret
- * reports received from the receiver. A second source file pair,
- * T_FORMAT.C and T_FORMAT.H, contin the matching TSIP command formatters.
- *
- * The module is in very portable, basic C language. It can be used as is, or
- * with minimal changes if a TSIP communications application is needed separate
- * from TSIPCHAT. The construction of most argument lists avoid the use of
- * structures, but the developer is encouraged to reconstruct them using such
- * definitions to meet project requirements. Declarations of T_PARSER.C
- * functions are included in T_PARSER.H to provide prototyping definitions.
- *
- * There are two types of functions: a serial input processing routine,
- * tsip_input_proc()
- * which assembles incoming bytes into a TSIPPKT structure, and the
- * report parsers, rpt_0x??().
- *
- * 1) The function tsip_input_proc() accumulates bytes from the receiver,
- * strips control bytes (DLE), and checks if the report end sequence (DLE ETX)
- * has been received. rpt.status is defined as TSIP_PARSED_FULL (== 1)
- * if a complete packet is available.
- *
- * 2) The functions rpt_0x??() are report string interpreters patterned after
- * the document called "Trimble Standard Interface Protocol". It should be
- * noted that if the report buffer is sent into the receiver with the wrong
- * length (byte count), the rpt_0x??() returns the Boolean equivalence for
- * TRUE.
- *
- * *************************************************************************
- *
- */
-
-
-/**/
-static void tsip_input_proc (
- TSIPPKT *rpt,
- int inbyte)
-/* reads bytes until serial buffer is empty or a complete report
- * has been received; end of report is signified by DLE ETX.
- */
-{
- unsigned char newbyte;
-
- if (inbyte < 0 || inbyte > 0xFF) return;
-
- newbyte = (unsigned char)(inbyte);
- switch (rpt->status)
- {
- case TSIP_PARSED_DLE_1:
- switch (newbyte)
- {
- case 0:
- case ETX:
- /* illegal TSIP IDs */
- rpt->len = 0;
- rpt->status = TSIP_PARSED_EMPTY;
- break;
- case DLE:
- /* try normal message start again */
- rpt->len = 0;
- rpt->status = TSIP_PARSED_DLE_1;
- break;
- default:
- /* legal TSIP ID; start message */
- rpt->code = newbyte;
- rpt->len = 0;
- rpt->status = TSIP_PARSED_DATA;
- break;
- }
- break;
- case TSIP_PARSED_DATA:
- switch (newbyte) {
- case DLE:
- /* expect DLE or ETX next */
- rpt->status = TSIP_PARSED_DLE_2;
- break;
- default:
- /* normal data byte */
- rpt->buf[rpt->len] = newbyte;
- rpt->len++;
- /* no change in rpt->status */
- break;
- }
- break;
- case TSIP_PARSED_DLE_2:
- switch (newbyte) {
- case DLE:
- /* normal data byte */
- rpt->buf[rpt->len] = newbyte;
- rpt->len++;
- rpt->status = TSIP_PARSED_DATA;
- break;
- case ETX:
- /* end of message; return TRUE here. */
- rpt->status = TSIP_PARSED_FULL;
- break;
- default:
- /* error: treat as TSIP_PARSED_DLE_1; start new report packet */
- rpt->code = newbyte;
- rpt->len = 0;
- rpt->status = TSIP_PARSED_DATA;
- }
- break;
- case TSIP_PARSED_FULL:
- case TSIP_PARSED_EMPTY:
- default:
- switch (newbyte) {
- case DLE:
- /* normal message start */
- rpt->len = 0;
- rpt->status = TSIP_PARSED_DLE_1;
- break;
- default:
- /* error: ignore newbyte */
- rpt->len = 0;
- rpt->status = TSIP_PARSED_EMPTY;
- }
- break;
- }
- if (rpt->len > MAX_RPTBUF) {
- /* error: start new report packet */
- rpt->status = TSIP_PARSED_EMPTY;
- rpt->len = 0;
- }
-}
-
-#ifdef TRIMBLE_OUTPUT_FUNC
-
-/**/
-short rpt_0x3D (TSIPPKT *rpt,
- unsigned char *tx_baud_index,
- unsigned char *rx_baud_index,
- unsigned char *char_format_index,
- unsigned char *stop_bits,
- unsigned char *tx_mode_index,
- unsigned char *rx_mode_index)
-/* Channel A configuration for dual port operation */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 6) return TRUE;
- *tx_baud_index = buf[0];
- *rx_baud_index = buf[1];
- *char_format_index = buf[2];
- *stop_bits = (unsigned char)((buf[3] == 0x07) ? 1 : 2);
- *tx_mode_index = buf[4];
- *rx_mode_index = buf[5];
- return FALSE;
-}
-
-/**/
-short rpt_0x40 (TSIPPKT *rpt,
- unsigned char *sv_prn,
- short *week_num,
- float *t_zc,
- float *eccentricity,
- float *t_oa,
- float *i_0,
- float *OMEGA_dot,
- float *sqrt_A,
- float *OMEGA_0,
- float *omega,
- float *M_0)
-/* almanac data for specified satellite */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 39) return TRUE;
- *sv_prn = buf[0];
- *t_zc = bGetSingle (&buf[1]);
- *week_num = bGetShort (&buf[5]);
- *eccentricity = bGetSingle (&buf[7]);
- *t_oa = bGetSingle (&buf[11]);
- *i_0 = bGetSingle (&buf[15]);
- *OMEGA_dot = bGetSingle (&buf[19]);
- *sqrt_A = bGetSingle (&buf[23]);
- *OMEGA_0 = bGetSingle (&buf[27]);
- *omega = bGetSingle (&buf[31]);
- *M_0 = bGetSingle (&buf[35]);
- return FALSE;
-}
-
-short rpt_0x41 (TSIPPKT *rpt,
- float *time_of_week,
- float *UTC_offset,
- short *week_num)
-/* GPS time */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 10) return TRUE;
- *time_of_week = bGetSingle (buf);
- *week_num = bGetShort (&buf[4]);
- *UTC_offset = bGetSingle (&buf[6]);
- return FALSE;
-}
-
-short rpt_0x42 (TSIPPKT *rpt,
- float pos_ECEF[3],
- float *time_of_fix)
-/* position in ECEF, single precision */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 16) return TRUE;
- pos_ECEF[0] = bGetSingle (buf);
- pos_ECEF[1]= bGetSingle (&buf[4]);
- pos_ECEF[2]= bGetSingle (&buf[8]);
- *time_of_fix = bGetSingle (&buf[12]);
- return FALSE;
-}
-
-short rpt_0x43 (TSIPPKT *rpt,
- float ECEF_vel[3],
- float *freq_offset,
- float *time_of_fix)
-/* velocity in ECEF, single precision */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 20) return TRUE;
- ECEF_vel[0] = bGetSingle (buf);
- ECEF_vel[1] = bGetSingle (&buf[4]);
- ECEF_vel[2] = bGetSingle (&buf[8]);
- *freq_offset = bGetSingle (&buf[12]);
- *time_of_fix = bGetSingle (&buf[16]);
- return FALSE;
-}
-
-short rpt_0x45 (TSIPPKT *rpt,
- unsigned char *major_nav_version,
- unsigned char *minor_nav_version,
- unsigned char *nav_day,
- unsigned char *nav_month,
- unsigned char *nav_year,
- unsigned char *major_dsp_version,
- unsigned char *minor_dsp_version,
- unsigned char *dsp_day,
- unsigned char *dsp_month,
- unsigned char *dsp_year)
-/* software versions */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 10) return TRUE;
- *major_nav_version = buf[0];
- *minor_nav_version = buf[1];
- *nav_day = buf[2];
- *nav_month = buf[3];
- *nav_year = buf[4];
- *major_dsp_version = buf[5];
- *minor_dsp_version = buf[6];
- *dsp_day = buf[7];
- *dsp_month = buf[8];
- *dsp_year = buf[9];
- return FALSE;
-}
-
-short rpt_0x46 (TSIPPKT *rpt,
- unsigned char *status1,
- unsigned char *status2)
-/* receiver health and status */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 2) return TRUE;
- *status1 = buf[0];
- *status2 = buf[1];
- return FALSE;
-}
-
-short rpt_0x47 (TSIPPKT *rpt,
- unsigned char *nsvs, unsigned char *sv_prn,
- float *snr)
-/* signal levels for all satellites tracked */
-{
- short isv;
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 1 + 5*buf[0]) return TRUE;
- *nsvs = buf[0];
- for (isv = 0; isv < (*nsvs); isv++) {
- sv_prn[isv] = buf[5*isv + 1];
- snr[isv] = bGetSingle (&buf[5*isv + 2]);
- }
- return FALSE;
-}
-
-short rpt_0x48 (TSIPPKT *rpt,
- unsigned char *message)
-/* GPS system message */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 22) return TRUE;
- memcpy (message, buf, 22);
- message[22] = 0;
- return FALSE;
-}
-
-short rpt_0x49 (TSIPPKT *rpt,
- unsigned char *sv_health)
-/* health for all satellites from almanac health page */
-{
- short i;
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 32) return TRUE;
- for (i = 0; i < 32; i++) sv_health [i]= buf[i];
- return FALSE;
-}
-
-short rpt_0x4A (TSIPPKT *rpt,
- float *lat,
- float *lon,
- float *alt,
- float *clock_bias,
- float *time_of_fix)
-/* position in lat-lon-alt, single precision */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 20) return TRUE;
- *lat = bGetSingle (buf);
- *lon = bGetSingle (&buf[4]);
- *alt = bGetSingle (&buf[8]);
- *clock_bias = bGetSingle (&buf[12]);
- *time_of_fix = bGetSingle (&buf[16]);
- return FALSE;
-}
-
-short rpt_0x4A_2 (TSIPPKT *rpt,
- float *alt, float *dummy , unsigned char *alt_flag)
-/* reference altitude parameters */
-{
- unsigned char *buf;
-
- buf = rpt->buf;
-
- if (rpt->len != 9) return TRUE;
- *alt = bGetSingle (buf);
- *dummy = bGetSingle (&buf[4]);
- *alt_flag = buf[8];
- return FALSE;
-}
-
-short rpt_0x4B (TSIPPKT *rpt,
- unsigned char *machine_id,
- unsigned char *status3,
- unsigned char *status4)
-/* machine ID code, status */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 3) return TRUE;
- *machine_id = buf[0];
- *status3 = buf[1];
- *status4 = buf[2];
- return FALSE;
-}
-
-short rpt_0x4C (TSIPPKT *rpt,
- unsigned char *dyn_code,
- float *el_mask,
- float *snr_mask,
- float *dop_mask,
- float *dop_switch)
-/* operating parameters and masks */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 17) return TRUE;
- *dyn_code = buf[0];
- *el_mask = bGetSingle (&buf[1]);
- *snr_mask = bGetSingle (&buf[5]);
- *dop_mask = bGetSingle (&buf[9]);
- *dop_switch = bGetSingle (&buf[13]);
- return FALSE;
-}
-
-short rpt_0x4D (TSIPPKT *rpt,
- float *osc_offset)
-/* oscillator offset */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 4) return TRUE;
- *osc_offset = bGetSingle (buf);
- return FALSE;
-}
-
-short rpt_0x4E (TSIPPKT *rpt,
- unsigned char *response)
-/* yes/no response to command to set GPS time */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 1) return TRUE;
- *response = buf[0];
- return FALSE;
-}
-
-short rpt_0x4F (TSIPPKT *rpt,
- double *a0,
- float *a1,
- float *time_of_data,
- short *dt_ls,
- short *wn_t,
- short *wn_lsf,
- short *dn,
- short *dt_lsf)
-/* UTC data */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 26) return TRUE;
- *a0 = bGetDouble (buf);
- *a1 = bGetSingle (&buf[8]);
- *dt_ls = bGetShort (&buf[12]);
- *time_of_data = bGetSingle (&buf[14]);
- *wn_t = bGetShort (&buf[18]);
- *wn_lsf = bGetShort (&buf[20]);
- *dn = bGetShort (&buf[22]);
- *dt_lsf = bGetShort (&buf[24]);
- return FALSE;
-}
-
-/**/
-short rpt_0x54 (TSIPPKT *rpt,
- float *clock_bias,
- float *freq_offset,
- float *time_of_fix)
-/* clock offset and frequency offset in 1-SV (0-D) mode */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 12) return TRUE;
- *clock_bias = bGetSingle (buf);
- *freq_offset = bGetSingle (&buf[4]);
- *time_of_fix = bGetSingle (&buf[8]);
- return FALSE;
-}
-
-short rpt_0x55 (TSIPPKT *rpt,
- unsigned char *pos_code,
- unsigned char *vel_code,
- unsigned char *time_code,
- unsigned char *aux_code)
-/* I/O serial options */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 4) return TRUE;
- *pos_code = buf[0];
- *vel_code = buf[1];
- *time_code = buf[2];
- *aux_code = buf[3];
- return FALSE;
-}
-
-short rpt_0x56 (TSIPPKT *rpt,
- float vel_ENU[3], float *freq_offset, float *time_of_fix)
-/* velocity in east-north-up coordinates */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 20) return TRUE;
- /* east */
- vel_ENU[0] = bGetSingle (buf);
- /* north */
- vel_ENU[1] = bGetSingle (&buf[4]);
- /* up */
- vel_ENU[2] = bGetSingle (&buf[8]);
- *freq_offset = bGetSingle (&buf[12]);
- *time_of_fix = bGetSingle (&buf[16]);
- return FALSE;
-}
-
-short rpt_0x57 (TSIPPKT *rpt,
- unsigned char *source_code, unsigned char *diag_code,
- short *week_num,
- float *time_of_fix)
-/* info about last computed fix */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 8) return TRUE;
- *source_code = buf[0];
- *diag_code = buf[1];
- *time_of_fix = bGetSingle (&buf[2]);
- *week_num = bGetShort (&buf[6]);
- return FALSE;
-}
-
-short rpt_0x58 (TSIPPKT *rpt,
- unsigned char *op_code, unsigned char *data_type, unsigned char *sv_prn,
- unsigned char *data_length, unsigned char *data_packet)
-/* GPS system data or acknowledgment of GPS system data load */
-{
- unsigned char *buf, *buf4;
- short dl;
- ALM_INFO* alminfo;
- ION_INFO* ioninfo;
- UTC_INFO* utcinfo;
- NAV_INFO* navinfo;
-
- buf = rpt->buf;
-
- if (buf[0] == 2) {
- if (rpt->len < 4) return TRUE;
- if (rpt->len != 4+buf[3]) return TRUE;
- }
- else if (rpt->len != 3) {
- return TRUE;
- }
- *op_code = buf[0];
- *data_type = buf[1];
- *sv_prn = buf[2];
- if (*op_code == 2) {
- dl = buf[3];
- *data_length = (unsigned char)dl;
- buf4 = &buf[4];
- switch (*data_type) {
- case 2:
- /* Almanac */
- if (*data_length != sizeof (ALM_INFO)) return TRUE;
- alminfo = (ALM_INFO*)data_packet;
- alminfo->t_oa_raw = buf4[0];
- alminfo->SV_health = buf4[1];
- alminfo->e = bGetSingle(&buf4[2]);
- alminfo->t_oa = bGetSingle(&buf4[6]);
- alminfo->i_0 = bGetSingle(&buf4[10]);
- alminfo->OMEGADOT = bGetSingle(&buf4[14]);
- alminfo->sqrt_A = bGetSingle(&buf4[18]);
- alminfo->OMEGA_0 = bGetSingle(&buf4[22]);
- alminfo->omega = bGetSingle(&buf4[26]);
- alminfo->M_0 = bGetSingle(&buf4[30]);
- alminfo->a_f0 = bGetSingle(&buf4[34]);
- alminfo->a_f1 = bGetSingle(&buf4[38]);
- alminfo->Axis = bGetSingle(&buf4[42]);
- alminfo->n = bGetSingle(&buf4[46]);
- alminfo->OMEGA_n = bGetSingle(&buf4[50]);
- alminfo->ODOT_n = bGetSingle(&buf4[54]);
- alminfo->t_zc = bGetSingle(&buf4[58]);
- alminfo->weeknum = bGetShort(&buf4[62]);
- alminfo->wn_oa = bGetShort(&buf4[64]);
- break;
-
- case 3:
- /* Almanac health page */
- if (*data_length != sizeof (ALH_PARMS) + 3) return TRUE;
-
- /* this record is returned raw */
- memcpy (data_packet, buf4, dl);
- break;
-
- case 4:
- /* Ionosphere */
- if (*data_length != sizeof (ION_INFO) + 8) return TRUE;
- ioninfo = (ION_INFO*)data_packet;
- ioninfo->alpha_0 = bGetSingle (&buf4[8]);
- ioninfo->alpha_1 = bGetSingle (&buf4[12]);
- ioninfo->alpha_2 = bGetSingle (&buf4[16]);
- ioninfo->alpha_3 = bGetSingle (&buf4[20]);
- ioninfo->beta_0 = bGetSingle (&buf4[24]);
- ioninfo->beta_1 = bGetSingle (&buf4[28]);
- ioninfo->beta_2 = bGetSingle (&buf4[32]);
- ioninfo->beta_3 = bGetSingle (&buf4[36]);
- break;
-
- case 5:
- /* UTC */
- if (*data_length != sizeof (UTC_INFO) + 13) return TRUE;
- utcinfo = (UTC_INFO*)data_packet;
- utcinfo->A_0 = bGetDouble (&buf4[13]);
- utcinfo->A_1 = bGetSingle (&buf4[21]);
- utcinfo->delta_t_LS = bGetShort (&buf4[25]);
- utcinfo->t_ot = bGetSingle(&buf4[27]);
- utcinfo->WN_t = bGetShort (&buf4[31]);
- utcinfo->WN_LSF = bGetShort (&buf4[33]);
- utcinfo->DN = bGetShort (&buf4[35]);
- utcinfo->delta_t_LSF = bGetShort (&buf4[37]);
- break;
-
- case 6:
- /* Ephemeris */
- if (*data_length != sizeof (NAV_INFO) - 1) return TRUE;
-
- navinfo = (NAV_INFO*)data_packet;
-
- navinfo->sv_number = buf4[0];
- navinfo->t_ephem = bGetSingle (&buf4[1]);
- navinfo->ephclk.weeknum = bGetShort (&buf4[5]);
-
- navinfo->ephclk.codeL2 = buf4[7];
- navinfo->ephclk.L2Pdata = buf4[8];
- navinfo->ephclk.SVacc_raw = buf4[9];
- navinfo->ephclk.SV_health = buf4[10];
- navinfo->ephclk.IODC = bGetShort (&buf4[11]);
- navinfo->ephclk.T_GD = bGetSingle (&buf4[13]);
- navinfo->ephclk.t_oc = bGetSingle (&buf4[17]);
- navinfo->ephclk.a_f2 = bGetSingle (&buf4[21]);
- navinfo->ephclk.a_f1 = bGetSingle (&buf4[25]);
- navinfo->ephclk.a_f0 = bGetSingle (&buf4[29]);
- navinfo->ephclk.SVacc = bGetSingle (&buf4[33]);
-
- navinfo->ephorb.IODE = buf4[37];
- navinfo->ephorb.fit_interval = buf4[38];
- navinfo->ephorb.C_rs = bGetSingle (&buf4[39]);
- navinfo->ephorb.delta_n = bGetSingle (&buf4[43]);
- navinfo->ephorb.M_0 = bGetDouble (&buf4[47]);
- navinfo->ephorb.C_uc = bGetSingle (&buf4[55]);
- navinfo->ephorb.e = bGetDouble (&buf4[59]);
- navinfo->ephorb.C_us = bGetSingle (&buf4[67]);
- navinfo->ephorb.sqrt_A = bGetDouble (&buf4[71]);
- navinfo->ephorb.t_oe = bGetSingle (&buf4[79]);
- navinfo->ephorb.C_ic = bGetSingle (&buf4[83]);
- navinfo->ephorb.OMEGA_0 = bGetDouble (&buf4[87]);
- navinfo->ephorb.C_is = bGetSingle (&buf4[95]);
- navinfo->ephorb.i_0 = bGetDouble (&buf4[99]);
- navinfo->ephorb.C_rc = bGetSingle (&buf4[107]);
- navinfo->ephorb.omega = bGetDouble (&buf4[111]);
- navinfo->ephorb.OMEGADOT=bGetSingle (&buf4[119]);
- navinfo->ephorb.IDOT = bGetSingle (&buf4[123]);
- navinfo->ephorb.Axis = bGetDouble (&buf4[127]);
- navinfo->ephorb.n = bGetDouble (&buf4[135]);
- navinfo->ephorb.r1me2 = bGetDouble (&buf4[143]);
- navinfo->ephorb.OMEGA_n=bGetDouble (&buf4[151]);
- navinfo->ephorb.ODOT_n = bGetDouble (&buf4[159]);
- break;
- }
- }
- return FALSE;
-}
-
-short rpt_0x59 (TSIPPKT *rpt,
- unsigned char *code_type,
- unsigned char status_code[32])
-/* satellite enable/disable or health heed/ignore list */
-{
- short iprn;
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 33) return TRUE;
- *code_type = buf[0];
- for (iprn = 0; iprn < 32; iprn++)
- status_code[iprn] = buf[iprn + 1];
- return FALSE;
-}
-
-short rpt_0x5A (TSIPPKT *rpt,
- unsigned char *sv_prn,
- float *sample_length,
- float *signal_level,
- float *code_phase,
- float *Doppler,
- double *time_of_fix)
-/* raw measurement data - code phase/Doppler */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 25) return TRUE;
- *sv_prn = buf[0];
- *sample_length = bGetSingle (&buf[1]);
- *signal_level = bGetSingle (&buf[5]);
- *code_phase = bGetSingle (&buf[9]);
- *Doppler = bGetSingle (&buf[13]);
- *time_of_fix = bGetDouble (&buf[17]);
- return FALSE;
-}
-
-short rpt_0x5B (TSIPPKT *rpt,
- unsigned char *sv_prn,
- unsigned char *sv_health,
- unsigned char *sv_iode,
- unsigned char *fit_interval_flag,
- float *time_of_collection,
- float *time_of_eph,
- float *sv_accy)
-/* satellite ephorb status */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 16) return TRUE;
- *sv_prn = buf[0];
- *time_of_collection = bGetSingle (&buf[1]);
- *sv_health = buf[5];
- *sv_iode = buf[6];
- *time_of_eph = bGetSingle (&buf[7]);
- *fit_interval_flag = buf[11];
- *sv_accy = bGetSingle (&buf[12]);
- return FALSE;
-}
-
-short rpt_0x5C (TSIPPKT *rpt,
- unsigned char *sv_prn,
- unsigned char *slot,
- unsigned char *chan,
- unsigned char *acq_flag,
- unsigned char *eph_flag,
- float *signal_level,
- float *time_of_last_msmt,
- float *elev,
- float *azim,
- unsigned char *old_msmt_flag,
- unsigned char *integer_msec_flag,
- unsigned char *bad_data_flag,
- unsigned char *data_collect_flag)
-/* satellite tracking status */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 24) return TRUE;
- *sv_prn = buf[0];
- *slot = (unsigned char)((buf[1] & 0x07) + 1);
- *chan = (unsigned char)(buf[1] >> 3);
- if (*chan == 0x10) *chan = 2;
- else (*chan)++;
- *acq_flag = buf[2];
- *eph_flag = buf[3];
- *signal_level = bGetSingle (&buf[4]);
- *time_of_last_msmt = bGetSingle (&buf[8]);
- *elev = bGetSingle (&buf[12]);
- *azim = bGetSingle (&buf[16]);
- *old_msmt_flag = buf[20];
- *integer_msec_flag = buf[21];
- *bad_data_flag = buf[22];
- *data_collect_flag = buf[23];
- return FALSE;
-}
-
-/**/
-short rpt_0x6D (TSIPPKT *rpt,
- unsigned char *manual_mode,
- unsigned char *nsvs,
- unsigned char *ndim,
- unsigned char sv_prn[],
- float *pdop,
- float *hdop,
- float *vdop,
- float *tdop)
-/* over-determined satellite selection for position fixes, PDOP, fix mode */
-{
- short islot;
- unsigned char *buf;
- buf = rpt->buf;
-
- *nsvs = (unsigned char)((buf[0] & 0xF0) >> 4);
- if ((*nsvs)>8) return TRUE;
- if (rpt->len != 17 + (*nsvs) ) return TRUE;
-
- *manual_mode = (unsigned char)(buf[0] & 0x08);
- *ndim = (unsigned char)((buf[0] & 0x07));
- *pdop = bGetSingle (&buf[1]);
- *hdop = bGetSingle (&buf[5]);
- *vdop = bGetSingle (&buf[9]);
- *tdop = bGetSingle (&buf[13]);
- for (islot = 0; islot < (*nsvs); islot++)
- sv_prn[islot] = buf[islot + 17];
- return FALSE;
-}
-
-/**/
-short rpt_0x82 (TSIPPKT *rpt,
- unsigned char *diff_mode)
-/* differential fix mode */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 1) return TRUE;
- *diff_mode = buf[0];
- return FALSE;
-}
-
-short rpt_0x83 (TSIPPKT *rpt,
- double ECEF_pos[3],
- double *clock_bias,
- float *time_of_fix)
-/* position, ECEF double precision */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 36) return TRUE;
- ECEF_pos[0] = bGetDouble (buf);
- ECEF_pos[1] = bGetDouble (&buf[8]);
- ECEF_pos[2] = bGetDouble (&buf[16]);
- *clock_bias = bGetDouble (&buf[24]);
- *time_of_fix = bGetSingle (&buf[32]);
- return FALSE;
-}
-
-short rpt_0x84 (TSIPPKT *rpt,
- double *lat,
- double *lon,
- double *alt,
- double *clock_bias,
- float *time_of_fix)
-/* position, lat-lon-alt double precision */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 36) return TRUE;
- *lat = bGetDouble (buf);
- *lon = bGetDouble (&buf[8]);
- *alt = bGetDouble (&buf[16]);
- *clock_bias = bGetDouble (&buf[24]);
- *time_of_fix = bGetSingle (&buf[32]);
- return FALSE;
-}
-
-short rpt_Paly0xBB(TSIPPKT *rpt,
- TSIP_RCVR_CFG *TsipxBB)
-{
-
- unsigned char *buf;
- buf = rpt->buf;
-
- /* Palisade is inconsistent with other TSIP, which has a kength of 40 */
- /* if (rpt->len != 40) return TRUE; */
- if (rpt->len != 43) return TRUE;
-
- TsipxBB->bSubcode = buf[0];
- TsipxBB->operating_mode = buf[1] ;
- TsipxBB->dyn_code = buf[3] ;
- TsipxBB->elev_mask = bGetSingle (&buf[5]);
- TsipxBB->cno_mask = bGetSingle (&buf[9]);
- TsipxBB->dop_mask = bGetSingle (&buf[13]);
- TsipxBB->dop_switch = bGetSingle (&buf[17]);
- return FALSE;
-}
-
-short rpt_0xBC (TSIPPKT *rpt,
- unsigned char *port_num,
- unsigned char *in_baud,
- unsigned char *out_baud,
- unsigned char *data_bits,
- unsigned char *parity,
- unsigned char *stop_bits,
- unsigned char *flow_control,
- unsigned char *protocols_in,
- unsigned char *protocols_out,
- unsigned char *reserved)
-/* Receiver serial port configuration */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 10) return TRUE;
- *port_num = buf[0];
- *in_baud = buf[1];
- *out_baud = buf[2];
- *data_bits = buf[3];
- *parity = buf[4];
- *stop_bits = buf[5];
- *flow_control = buf[6];
- *protocols_in = buf[7];
- *protocols_out = buf[8];
- *reserved = buf[9];
-
- return FALSE;
-}
-
-/**** Superpackets ****/
-
-short rpt_0x8F0B(TSIPPKT *rpt,
- unsigned short *event,
- double *tow,
- unsigned char *date,
- unsigned char *month,
- short *year,
- unsigned char *dim_mode,
- short *utc_offset,
- double *bias,
- double *drift,
- float *bias_unc,
- float *dr_unc,
- double *lat,
- double *lon,
- double *alt,
- char sv_id[8])
-{
- short local_index;
- unsigned char *buf;
-
- buf = rpt->buf;
- if (rpt->len != 74) return TRUE;
- *event = bGetShort(&buf[1]);
- *tow = bGetDouble(&buf[3]);
- *date = buf[11];
- *month = buf[12];
- *year = bGetShort(&buf[13]);
- *dim_mode = buf[15];
- *utc_offset = bGetShort(&buf[16]);
- *bias = bGetDouble(&buf[18]);
- *drift = bGetDouble(&buf[26]);
- *bias_unc = bGetSingle(&buf[34]);
- *dr_unc = bGetSingle(&buf[38]);
- *lat = bGetDouble(&buf[42]);
- *lon = bGetDouble(&buf[50]);
- *alt = bGetDouble(&buf[58]);
-
- for (local_index=0; local_index<8; local_index++) sv_id[local_index] = buf[local_index + 66];
- return FALSE;
-}
-
-short rpt_0x8F14 (TSIPPKT *rpt,
- short *datum_idx,
- double datum_coeffs[5])
-/* datum index and coefficients */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 43) return TRUE;
- *datum_idx = bGetShort(&buf[1]);
- datum_coeffs[0] = bGetDouble (&buf[3]);
- datum_coeffs[1] = bGetDouble (&buf[11]);
- datum_coeffs[2] = bGetDouble (&buf[19]);
- datum_coeffs[3] = bGetDouble (&buf[27]);
- datum_coeffs[4] = bGetDouble (&buf[35]);
- return FALSE;
-}
-
-
-short rpt_0x8F15 (TSIPPKT *rpt,
- short *datum_idx,
- double datum_coeffs[5])
-/* datum index and coefficients */
-{
- unsigned char *buf;
- buf = rpt->buf;
-
- if (rpt->len != 43) return TRUE;
- *datum_idx = bGetShort(&buf[1]);
- datum_coeffs[0] = bGetDouble (&buf[3]);
- datum_coeffs[1] = bGetDouble (&buf[11]);
- datum_coeffs[2] = bGetDouble (&buf[19]);
- datum_coeffs[3] = bGetDouble (&buf[27]);
- datum_coeffs[4] = bGetDouble (&buf[35]);
- return FALSE;
-}
-
-
-#define MAX_LONG (2147483648.) /* 2**31 */
-
-short rpt_0x8F20 (TSIPPKT *rpt,
- unsigned char *info,
- double *lat,
- double *lon,
- double *alt,
- double vel_enu[],
- double *time_of_fix,
- short *week_num,
- unsigned char *nsvs,
- unsigned char sv_prn[],
- short sv_IODC[],
- short *datum_index)
-{
- short
- isv;
- unsigned char
- *buf, prnx, iode;
- unsigned long
- ulongtemp;
- long
- longtemp;
- double
- vel_scale;
-
- buf = rpt->buf;
-
- if (rpt->len != 56) return TRUE;
-
- vel_scale = (buf[24]&1)? 0.020 : 0.005;
- vel_enu[0] = bGetShort (buf+2)*vel_scale;
- vel_enu[1] = bGetShort (buf+4)*vel_scale;
- vel_enu[2] = bGetShort (buf+6)*vel_scale;
-
- *time_of_fix = bGetULong (buf+8)*.001;
-
- longtemp = bGetLong (buf+12);
- *lat = longtemp*(GPS_PI/MAX_LONG);
-
- ulongtemp = bGetULong (buf+16);
- *lon = ulongtemp*(GPS_PI/MAX_LONG);
- if (*lon > GPS_PI) *lon -= 2.0*GPS_PI;
-
- *alt = bGetLong (buf+20)*.001;
- /* 25 blank; 29 = UTC */
- (*datum_index) = (short)((short)buf[26]-1);
- *info = buf[27];
- *nsvs = buf[28];
- *week_num = bGetShort (&buf[30]);
- for (isv = 0; isv < 8; isv++) {
- prnx = buf[32+2*isv];
- sv_prn[isv] = (unsigned char)(prnx&0x3F);
- iode = buf[33+2*isv];
- sv_IODC[isv] = (short)(iode | ((prnx>>6)<<8));
- }
- return FALSE;
-}
-
-short rpt_0x8F41 (TSIPPKT *rpt,
- unsigned char *bSearchRange,
- unsigned char *bBoardOptions,
- unsigned long *iiSerialNumber,
- unsigned char *bBuildYear,
- unsigned char *bBuildMonth,
- unsigned char *bBuildDay,
- unsigned char *bBuildHour,
- float *fOscOffset,
- unsigned short *iTestCodeId)
-{
- if(rpt->len != 17) return FALSE;
- *bSearchRange = rpt->buf[1];
- *bBoardOptions = rpt->buf[2];
- *iiSerialNumber = bGetLong(&rpt->buf[3]);
- *bBuildYear = rpt->buf[7];
- *bBuildMonth = rpt->buf[8];
- *bBuildDay = rpt->buf[9];
- *bBuildHour = rpt->buf[10];
- *fOscOffset = bGetSingle(&rpt->buf[11]);
- *iTestCodeId = bGetShort(&rpt->buf[15]);
-/* Tsipx8E41Data = *Tsipx8E41; */
- return TRUE;
-}
-
-short rpt_0x8F42 (TSIPPKT *rpt,
- unsigned char *bProdOptionsPre,
- unsigned char *bProdNumberExt,
- unsigned short *iCaseSerialNumberPre,
- unsigned long *iiCaseSerialNumber,
- unsigned long *iiProdNumber,
- unsigned short *iPremiumOptions,
- unsigned short *iMachineID,
- unsigned short *iKey)
-{
- if(rpt->len != 19) return FALSE;
- *bProdOptionsPre = rpt->buf[1];
- *bProdNumberExt = rpt->buf[2];
- *iCaseSerialNumberPre = bGetShort(&rpt->buf[3]);
- *iiCaseSerialNumber = bGetLong(&rpt->buf[5]);
- *iiProdNumber = bGetLong(&rpt->buf[9]);
- *iPremiumOptions = bGetShort(&rpt->buf[13]);
- *iMachineID = bGetShort(&rpt->buf[15]);
- *iKey = bGetShort(&rpt->buf[17]);
- return TRUE;
-}
-
-short rpt_0x8F45(TSIPPKT *rpt,
- unsigned char *bSegMask)
-{
- if(rpt->len != 2) return FALSE;
- *bSegMask = rpt->buf[1];
- return TRUE;
-}
-
-short rpt_0x8F4A_16(TSIPPKT *rpt,
- unsigned char *pps_enabled,
- unsigned char *pps_timebase,
- unsigned char *pos_polarity,
- double *pps_offset,
- float *bias_unc_threshold)
-/* Stinger PPS definition */
-{
- unsigned char
- *buf;
-
- buf = rpt->buf;
- if (rpt->len != 16) return TRUE;
- *pps_enabled = buf[1];
- *pps_timebase = buf[2];
- *pos_polarity = buf[3];
- *pps_offset = bGetDouble(&buf[4]);
- *bias_unc_threshold = bGetSingle(&buf[12]);
- return FALSE;
-}
-
-short rpt_0x8F4B(TSIPPKT *rpt,
- unsigned long *decorr_max)
-{
- unsigned char
- *buf;
-
- buf = rpt->buf;
- if (rpt->len != 5) return TRUE;
- *decorr_max = bGetLong(&buf[1]);
- return FALSE;
-}
-
-short rpt_0x8F4D(TSIPPKT *rpt,
- unsigned long *event_mask)
-{
- unsigned char
- *buf;
-
- buf = rpt->buf;
- if (rpt->len != 5) return TRUE;
- *event_mask = bGetULong (&buf[1]);
- return FALSE;
-}
-
-short rpt_0x8FA5(TSIPPKT *rpt,
- unsigned char *spktmask)
-{
- unsigned char
- *buf;
-
- buf = rpt->buf;
- if (rpt->len != 5) return TRUE;
- spktmask[0] = buf[1];
- spktmask[1] = buf[2];
- spktmask[2] = buf[3];
- spktmask[3] = buf[4];
- return FALSE;
-}
-
-short rpt_0x8FAD (TSIPPKT *rpt,
- unsigned short *COUNT,
- double *FracSec,
- unsigned char *Hour,
- unsigned char *Minute,
- unsigned char *Second,
- unsigned char *Day,
- unsigned char *Month,
- unsigned short *Year,
- unsigned char *Status,
- unsigned char *Flags)
-{
-
- if (rpt->len != 22) return TRUE;
-
- *COUNT = bGetUShort(&rpt->buf[1]);
- *FracSec = bGetDouble(&rpt->buf[3]);
- *Hour = rpt->buf[11];
- *Minute = rpt->buf[12];
- *Second = rpt->buf[13];
- *Day = rpt->buf[14];
- *Month = rpt->buf[15];
- *Year = bGetUShort(&rpt->buf[16]);
- *Status = rpt->buf[18];
- *Flags = rpt->buf[19];
- return FALSE;
-}
-
-
-/*
- * *************************************************************************
- *
- * Trimble Navigation, Ltd.
- * OEM Products Development Group
- * P.O. Box 3642
- * 645 North Mary Avenue
- * Sunnyvale, California 94088-3642
- *
- * Corporate Headquarter:
- * Telephone: (408) 481-8000
- * Fax: (408) 481-6005
- *
- * Technical Support Center:
- * Telephone: (800) 767-4822 (U.S. and Canada)
- * (408) 481-6940 (outside U.S. and Canada)
- * Fax: (408) 481-6020
- * BBS: (408) 481-7800
- * e-mail: trimble_support@trimble.com
- * ftp://ftp.trimble.com/pub/sct/embedded/bin
- *
- * *************************************************************************
- *
- * T_REPORT.C consists of a primary function TranslateTSIPReportToText()
- * called by main().
- *
- * This function takes a character buffer that has been received as a report
- * from a TSIP device and interprets it. The character buffer has been
- * assembled using tsip_input_proc() in T_PARSER.C.
- *
- * A large case statement directs processing to one of many mid-level
- * functions. The mid-level functions specific to the current report
- * code passes the report buffer to the appropriate report decoder
- * rpt_0x?? () in T_PARSER.C, which converts the byte stream in rpt.buf
- * to data values approporaite for use.
- *
- * *************************************************************************
- *
- */
-
-
-#define GOOD_PARSE 0
-#define BADID_PARSE 1
-#define BADLEN_PARSE 2
-#define BADDATA_PARSE 3
-
-#define B_TSIP 0x02
-#define B_NMEA 0x04
-
-
-/* pbuf is the pointer to the current location of the text output */
-static char
- *pbuf;
-
-/* keep track of whether the message has been successfully parsed */
-static short
- parsed;
-
-
-/* convert time of week into day-hour-minute-second and print */
-char* show_time (float time_of_week)
-{
- short days, hours, minutes;
- float seconds;
- double tow = 0;
- static char timestring [80];
-
- if (time_of_week == -1.0)
- {
- sprintf(timestring, " <No time yet> ");
- }
- else if ((time_of_week >= 604800.0) || (time_of_week < 0.0))
- {
- sprintf(timestring, " <Bad time> ");
- }
- else
- {
- if (time_of_week < 604799.9)
- tow = time_of_week + .00000001;
- seconds = (float)fmod(tow, 60.);
- minutes = (short) fmod(tow/60., 60.);
- hours = (short)fmod(tow / 3600., 24.);
- days = (short)(tow / 86400.0);
- sprintf(timestring, " %s %02d:%02d:%05.2f ",
- dayname[days], hours, minutes, seconds);
- }
- return timestring;
-}
-
-/**/
-/* 0x3D */
-static void rpt_chan_A_config (TSIPPKT *rpt)
-{
- unsigned char
- tx_baud_index, rx_baud_index,
- char_format_index, stop_bits,
- tx_mode_index, rx_mode_index,
- databits, parity;
- int
- i, nbaud;
-
- /* unload rptbuf */
- if (rpt_0x3D (rpt,
- &tx_baud_index, &rx_baud_index, &char_format_index,
- &stop_bits, &tx_mode_index, &rx_mode_index)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nChannel A Configuration");
-
- nbaud = sizeof(old_baudnum);
-
- for (i = 0; i < nbaud; ++i) if (tx_baud_index == old_baudnum[i]) break;
- pbuf += sprintf(pbuf, "\n Transmit speed: %s at %s",
- old_output_ch[tx_mode_index], st_baud_text_app[i]);
-
- for (i = 0; i < nbaud; ++i) if (rx_baud_index == old_baudnum[i]) break;
- pbuf += sprintf(pbuf, "\n Receive speed: %s at %s",
- old_input_ch[rx_mode_index], st_baud_text_app[i]);
-
- databits = (unsigned char)((char_format_index & 0x03) + 5);
-
- parity = (unsigned char)(char_format_index >> 2);
- if (parity > 4) parity = 2;
-
- pbuf += sprintf(pbuf, "\n Character format (bits/char, parity, stop bits): %d-%s-%d",
- databits, old_parity_text[parity], stop_bits);
-}
-
-/**/
-/* 0x40 */
-static void rpt_almanac_data_page (TSIPPKT *rpt)
-{
- unsigned char
- sv_prn;
- short
- week_num;
- float
- t_zc,
- eccentricity,
- t_oa,
- i_0,
- OMEGA_dot,
- sqrt_A,
- OMEGA_0,
- omega,
- M_0;
-
- /* unload rptbuf */
- if (rpt_0x40 (rpt,
- &sv_prn, &week_num, &t_zc, &eccentricity, &t_oa,
- &i_0, &OMEGA_dot, &sqrt_A, &OMEGA_0, &omega, &M_0)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nAlmanac for SV %02d", sv_prn);
- pbuf += sprintf(pbuf, "\n Captured:%15.0f %s",
- t_zc, show_time (t_zc));
- pbuf += sprintf(pbuf, "\n week:%15d", week_num);
- pbuf += sprintf(pbuf, "\n Eccentricity:%15g", eccentricity);
- pbuf += sprintf(pbuf, "\n T_oa:%15.0f %s",
- t_oa, show_time (t_oa));
- pbuf += sprintf(pbuf, "\n i 0:%15g", i_0);
- pbuf += sprintf(pbuf, "\n OMEGA dot:%15g", OMEGA_dot);
- pbuf += sprintf(pbuf, "\n sqrt A:%15g", sqrt_A);
- pbuf += sprintf(pbuf, "\n OMEGA 0:%15g", OMEGA_0);
- pbuf += sprintf(pbuf, "\n omega:%15g", omega);
- pbuf += sprintf(pbuf, "\n M 0:%15g", M_0);
-}
-
-/* 0x41 */
-static void rpt_GPS_time (TSIPPKT *rpt)
-{
- float
- time_of_week, UTC_offset;
- short
- week_num;
-
- /* unload rptbuf */
- if (rpt_0x41 (rpt, &time_of_week, &UTC_offset, &week_num)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nGPS time:%s GPS week: %d UTC offset %.1f",
- show_time(time_of_week), week_num, UTC_offset);
-
-}
-
-/* 0x42 */
-static void rpt_single_ECEF_position (TSIPPKT *rpt)
-{
- float
- ECEF_pos[3], time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x42 (rpt, ECEF_pos, &time_of_fix)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nSXYZ: %15.0f %15.0f %15.0f %s",
- ECEF_pos[0], ECEF_pos[1], ECEF_pos[2],
- show_time(time_of_fix));
-}
-
-/* 0x43 */
-static void rpt_single_ECEF_velocity (TSIPPKT *rpt)
-{
-
- float
- ECEF_vel[3], freq_offset, time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x43 (rpt, ECEF_vel, &freq_offset, &time_of_fix)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nVelECEF: %11.3f %11.3f %11.3f %12.3f%s",
- ECEF_vel[0], ECEF_vel[1], ECEF_vel[2], freq_offset,
- show_time(time_of_fix));
-}
-
-/* 0x45 */
-static void rpt_SW_version (TSIPPKT *rpt) {
- unsigned char
- major_nav_version, minor_nav_version,
- nav_day, nav_month, nav_year,
- major_dsp_version, minor_dsp_version,
- dsp_day, dsp_month, dsp_year;
-
- /* unload rptbuf */
- if (rpt_0x45 (rpt,
- &major_nav_version, &minor_nav_version,
- &nav_day, &nav_month, &nav_year,
- &major_dsp_version, &minor_dsp_version,
- &dsp_day, &dsp_month, &dsp_year)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf,
-"\nFW Versions: Nav Proc %2d.%02d %2d/%2d/%2d Sig Proc %2d.%02d %2d/%2d/%2d",
- major_nav_version, minor_nav_version, nav_day, nav_month, nav_year,
- major_dsp_version, minor_dsp_version, dsp_day, dsp_month, dsp_year);
-}
-
-/* 0x46 */
-static void rpt_rcvr_health (TSIPPKT *rpt)
-{
- unsigned char
- status1, status2;
- static char
- *sc_text[] = {
- "Doing position fixes",
- "Don't have GPS time yet",
- "Waiting for almanac collection",
- "DOP too high ",
- "No satellites available",
- "Only 1 satellite available",
- "Only 2 satellites available",
- "Only 3 satellites available",
- "No satellites usable ",
- "Only 1 satellite usable",
- "Only 2 satellites usable",
- "Only 3 satellites usable",
- "Chosen satellite unusable"};
-
-
- /* unload rptbuf */
- if (rpt_0x46 (rpt, &status1, &status2))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nRcvr status1: %s (%02Xh); ",
- sc_text[rpt->buf[0]], status1);
-
- pbuf += sprintf(pbuf, "status2: %s, %s (%02Xh)",
- (status2 & 0x01)?"No BBRAM":"BBRAM OK",
- (status2 & 0x10)?"No Ant":"Ant OK",
- status2);
-}
-
-/* 0x47 */
-static void rpt_SNR_all_SVs (TSIPPKT *rpt)
-{
- unsigned char
- nsvs, sv_prn[12];
- short
- isv;
- float
- snr[12];
-
- /* unload rptbuf */
- if (rpt_0x47 (rpt, &nsvs, sv_prn, snr))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nSNR for satellites: %d", nsvs);
- for (isv = 0; isv < nsvs; isv++)
- {
- pbuf += sprintf(pbuf, "\n SV %02d %6.2f",
- sv_prn[isv], snr[isv]);
- }
-}
-
-/* 0x48 */
-static void rpt_GPS_system_message (TSIPPKT *rpt)
-{
- unsigned char
- message[23];
-
- /* unload rptbuf */
- if (rpt_0x48 (rpt, message))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nGPS message: %s", message);
-}
-
-/* 0x49 */
-static void rpt_almanac_health_page (TSIPPKT *rpt)
-{
- short
- iprn;
- unsigned char
- sv_health [32];
-
- /* unload rptbuf */
- if (rpt_0x49 (rpt, sv_health))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nAlmanac health page:");
- for (iprn = 0; iprn < 32; iprn++)
- {
- if (!(iprn%5)) *pbuf++ = '\n';
- pbuf += sprintf(pbuf, " SV%02d %2X",
- (iprn+1) , sv_health[iprn]);
- }
-}
-
-/* 0x4A */
-static void rpt_single_lla_position (TSIPPKT *rpt) {
- short
- lat_deg, lon_deg;
- float
- lat, lon,
- alt, clock_bias, time_of_fix;
- double lat_min, lon_min;
- unsigned char
- north_south, east_west;
-
- if (rpt_0x4A (rpt,
- &lat, &lon, &alt, &clock_bias, &time_of_fix))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- /* convert from radians to degrees */
- lat *= (float)R2D;
- north_south = 'N';
- if (lat < 0.0)
- {
- north_south = 'S';
- lat = -lat;
- }
- lat_deg = (short)lat;
- lat_min = (lat - lat_deg) * 60.0;
-
- lon *= (float)R2D;
- east_west = 'E';
- if (lon < 0.0)
- {
- east_west = 'W';
- lon = -lon;
- }
- lon_deg = (short)lon;
- lon_min = (lon - lon_deg) * 60.0;
-
- pbuf += sprintf(pbuf, "\nSLLA: %4d: %06.3f %c%5d:%06.3f %c%10.2f %12.2f%s",
- lat_deg, lat_min, north_south,
- lon_deg, lon_min, east_west,
- alt, clock_bias,
- show_time(time_of_fix));
-}
-
-/* 0x4A */
-static void rpt_ref_alt (TSIPPKT *rpt) {
-
- float
- alt, dummy;
- unsigned char
- alt_flag;
-
- if (rpt_0x4A_2 (rpt,
- &alt, &dummy, &alt_flag))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nReference Alt: %.1f m; %s",
- alt, alt_flag?"ON":"OFF");
-}
-
-/* 0x4B */
-static void rpt_rcvr_id_and_status (TSIPPKT *rpt)
-{
-
- unsigned char
- machine_id, status3, status4;
-
- /* unload rptbuf */
- if (rpt_0x4B (rpt, &machine_id, &status3, &status4))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nRcvr Machine ID: %d; Status3 = %s, %s (%02Xh)",
- machine_id,
- (status3 & 0x02)?"No RTC":"RTC OK",
- (status3 & 0x08)?"No Alm":"Alm OK",
- status3);
-}
-
-/* 0x4C */
-static void rpt_operating_parameters (TSIPPKT *rpt)
-{
- unsigned char
- dyn_code;
- float
- el_mask, snr_mask, dop_mask, dop_switch;
-
- /* unload rptbuf */
- if (rpt_0x4C (rpt, &dyn_code, &el_mask,
- &snr_mask, &dop_mask, &dop_switch))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nOperating Parameters:");
- pbuf += sprintf(pbuf, "\n Dynamics code = %d %s",
- dyn_code, dyn_text[dyn_code]);
- pbuf += sprintf(pbuf, "\n Elevation mask = %.2fø", el_mask * R2D);
- pbuf += sprintf(pbuf, "\n SNR mask = %.2f", snr_mask);
- pbuf += sprintf(pbuf, "\n DOP mask = %.2f", dop_mask);
- pbuf += sprintf(pbuf, "\n DOP switch = %.2f", dop_switch);
-}
-
-/* 0x4D */
-static void rpt_oscillator_offset (TSIPPKT *rpt)
-{
- float
- osc_offset;
-
- /* unload rptbuf */
- if (rpt_0x4D (rpt, &osc_offset))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nOscillator offset: %.2f Hz = %.3f PPM",
- osc_offset, osc_offset/1575.42);
-}
-
-/* 0x4E */
-static void rpt_GPS_time_set_response (TSIPPKT *rpt)
-{
-
- unsigned char
- response;
-
- /* unload rptbuf */
- if (rpt_0x4E (rpt, &response))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- switch (response)
- {
- case 'Y':
- pbuf += sprintf(pbuf, "\nTime set accepted");
- break;
-
- case 'N':
- pbuf += sprintf(pbuf, "\nTime set rejected or not required");
- break;
-
- default:
- parsed = BADDATA_PARSE;
- }
-}
-
-/* 0x4F */
-static void rpt_UTC_offset (TSIPPKT *rpt)
-{
- double
- a0;
- float
- a1, time_of_data;
- short
- dt_ls, wn_t, wn_lsf, dn, dt_lsf;
-
- /* unload rptbuf */
- if (rpt_0x4F (rpt, &a0, &a1, &time_of_data,
- &dt_ls, &wn_t, &wn_lsf, &dn, &dt_lsf)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nUTC Correction Data");
- pbuf += sprintf(pbuf, "\n A_0 = %g ", a0);
- pbuf += sprintf(pbuf, "\n A_1 = %g ", a1);
- pbuf += sprintf(pbuf, "\n delta_t_LS = %d ", dt_ls);
- pbuf += sprintf(pbuf, "\n t_ot = %.0f ", time_of_data);
- pbuf += sprintf(pbuf, "\n WN_t = %d ", wn_t );
- pbuf += sprintf(pbuf, "\n WN_LSF = %d ", wn_lsf );
- pbuf += sprintf(pbuf, "\n DN = %d ", dn );
- pbuf += sprintf(pbuf, "\n delta_t_LSF = %d ", dt_lsf );
-}
-
-/**/
-/* 0x54 */
-static void rpt_1SV_bias (TSIPPKT *rpt)
-{
- float
- clock_bias, freq_offset, time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x54 (rpt, &clock_bias, &freq_offset, &time_of_fix)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf (pbuf, "\nTime Fix Clock Bias: %6.2f m Freq Bias: %6.2f m/s%s",
- clock_bias, freq_offset, show_time (time_of_fix));
-}
-
-/* 0x55 */
-static void rpt_io_opt (TSIPPKT *rpt)
-{
- unsigned char
- pos_code, vel_code, time_code, aux_code;
-
- /* unload rptbuf */
- if (rpt_0x55 (rpt,
- &pos_code, &vel_code, &time_code, &aux_code)) {
- parsed = BADLEN_PARSE;
- return;
- }
- /* rptbuf unloaded */
-
- pbuf += sprintf(pbuf, "\nI/O Options: %2X %2X %2X %2X",
- pos_code, vel_code, time_code, aux_code);
-
- if (pos_code & 0x01) {
- pbuf += sprintf(pbuf, "\n ECEF XYZ position output");
- }
-
- if (pos_code & 0x02) {
- pbuf += sprintf(pbuf, "\n LLA position output");
- }
-
- pbuf += sprintf(pbuf, (pos_code & 0x04)?
- "\n MSL altitude output (Geoid height) ":
- "\n WGS-84 altitude output");
-
- pbuf += sprintf(pbuf, (pos_code & 0x08)?
- "\n MSL altitude input":
- "\n WGS-84 altitude input");
-
- pbuf += sprintf(pbuf, (pos_code & 0x10)?
- "\n Double precision":
- "\n Single precision");
-
- if (pos_code & 0x20) {
- pbuf += sprintf(pbuf, "\n All Enabled Superpackets");
- }
-
- if (vel_code & 0x01) {
- pbuf += sprintf(pbuf, "\n ECEF XYZ velocity output");
- }
-
- if (vel_code & 0x02) {
- pbuf += sprintf(pbuf, "\n ENU velocity output");
- }
-
- pbuf += sprintf(pbuf, (time_code & 0x01)?
- "\n Time tags in UTC":
- "\n Time tags in GPS time");
-
- if (time_code & 0x02) {
- pbuf += sprintf(pbuf, "\n Fixes delayed to integer seconds");
- }
-
- if (time_code & 0x04) {
- pbuf += sprintf(pbuf, "\n Fixes sent only on request");
- }
-
- if (time_code & 0x08) {
- pbuf += sprintf(pbuf, "\n Synchronized measurements");
- }
-
- if (time_code & 0x10) {
- pbuf += sprintf(pbuf, "\n Minimize measurement propagation");
- }
-
- pbuf += sprintf(pbuf, (time_code & 0x20) ?
- "\n PPS output at all times" :
- "\n PPS output during fixes");
-
- if (aux_code & 0x01) {
- pbuf += sprintf(pbuf, "\n Raw measurement output");
- }
-
- if (aux_code & 0x02) {
- pbuf += sprintf(pbuf, "\n Code-phase smoothed before output");
- }
-
- if (aux_code & 0x04) {
- pbuf += sprintf(pbuf, "\n Additional fix status");
- }
-
- pbuf += sprintf(pbuf, (aux_code & 0x08)?
- "\n Signal Strength Output as dBHz" :
- "\n Signal Strength Output as AMU");
-}
-
-/* 0x56 */
-static void rpt_ENU_velocity (TSIPPKT *rpt)
-{
- float
- vel_ENU[3], freq_offset, time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x56 (rpt, vel_ENU, &freq_offset, &time_of_fix)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nVel ENU: %11.3f %11.3f %11.3f %12.3f%s",
- vel_ENU[0], vel_ENU[1], vel_ENU[2], freq_offset,
- show_time (time_of_fix));
-}
-
-/* 0x57 */
-static void rpt_last_fix_info (TSIPPKT *rpt)
-{
- unsigned char
- source_code, diag_code;
- short
- week_num;
- float
- time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x57 (rpt, &source_code, &diag_code, &week_num, &time_of_fix)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\n source code %d; diag code: %2Xh",
- source_code, diag_code);
- pbuf += sprintf(pbuf, "\n Time of last fix:%s", show_time(time_of_fix));
- pbuf += sprintf(pbuf, "\n Week of last fix: %d", week_num);
-}
-
-/* 0x58 */
-static void rpt_GPS_system_data (TSIPPKT *rpt)
-{
- unsigned char
- iprn,
- op_code, data_type, sv_prn,
- data_length, data_packet[250];
- ALM_INFO
- *almanac;
- ALH_PARMS
- *almh;
- UTC_INFO
- *utc;
- ION_INFO
- *ionosphere;
- EPHEM_CLOCK
- *cdata;
- EPHEM_ORBIT
- *edata;
- NAV_INFO
- *nav_data;
- unsigned char
- curr_t_oa;
- unsigned short
- curr_wn_oa;
- static char
- *datname[] =
- {"", "", "Almanac Orbit",
- "Health Page & Ref Time", "Ionosphere", "UTC ",
- "Ephemeris"};
-
- /* unload rptbuf */
- if (rpt_0x58 (rpt, &op_code, &data_type, &sv_prn,
- &data_length, data_packet))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nSystem data [%d]: %s SV%02d",
- data_type, datname[data_type], sv_prn);
- switch (op_code)
- {
- case 1:
- pbuf += sprintf(pbuf, " Acknowledgment");
- break;
- case 2:
- pbuf += sprintf(pbuf, " length = %d bytes", data_length);
- switch (data_type) {
- case 2:
- /* Almanac */
- if (sv_prn == 0 || sv_prn > 32) {
- pbuf += sprintf(pbuf, " Binary PRN invalid");
- return;
- }
- almanac = (ALM_INFO*)data_packet;
- pbuf += sprintf(pbuf, "\n t_oa_raw = % -12d SV_hlth = % -12d ",
- almanac->t_oa_raw , almanac->SV_health );
- pbuf += sprintf(pbuf, "\n e = % -12g t_oa = % -12g ",
- almanac->e , almanac->t_oa );
- pbuf += sprintf(pbuf, "\n i_0 = % -12g OMEGADOT = % -12g ",
- almanac->i_0 , almanac->OMEGADOT );
- pbuf += sprintf(pbuf, "\n sqrt_A = % -12g OMEGA_0 = % -12g ",
- almanac->sqrt_A , almanac->OMEGA_0 );
- pbuf += sprintf(pbuf, "\n omega = % -12g M_0 = % -12g ",
- almanac->omega , almanac->M_0 );
- pbuf += sprintf(pbuf, "\n a_f0 = % -12g a_f1 = % -12g ",
- almanac->a_f0 , almanac->a_f1 );
- pbuf += sprintf(pbuf, "\n Axis = % -12g n = % -12g ",
- almanac->Axis , almanac->n );
- pbuf += sprintf(pbuf, "\n OMEGA_n = % -12g ODOT_n = % -12g ",
- almanac->OMEGA_n , almanac->ODOT_n );
- pbuf += sprintf(pbuf, "\n t_zc = % -12g weeknum = % -12d ",
- almanac->t_zc , almanac->weeknum );
- pbuf += sprintf(pbuf, "\n wn_oa = % -12d", almanac->wn_oa );
- break;
-
- case 3:
- /* Almanac health page */
- almh = (ALH_PARMS*)data_packet;
- pbuf += sprintf(pbuf, "\n t_oa = %d, wn_oa&0xFF = %d ",
- almh->t_oa, almh->WN_a);
- pbuf += sprintf(pbuf, "\nAlmanac health page:");
- for (iprn = 0; iprn < 32; iprn++) {
- if (!(iprn%5)) *pbuf++ = '\n';
- pbuf += sprintf(pbuf, " SV%02d %2X",
- (iprn+1) , almh->SV_health[iprn]);
- }
- curr_t_oa = data_packet[34];
- curr_wn_oa = (unsigned short)((data_packet[35]<<8) + data_packet[36]);
- pbuf += sprintf(pbuf, "\n current t_oa = %d, wn_oa = %d ",
- curr_t_oa, curr_wn_oa);
- break;
-
- case 4:
- /* Ionosphere */
- ionosphere = (ION_INFO*)data_packet;
- pbuf += sprintf(pbuf, "\n alpha_0 = % -12g alpha_1 = % -12g ",
- ionosphere->alpha_0, ionosphere->alpha_1);
- pbuf += sprintf(pbuf, "\n alpha_2 = % -12g alpha_3 = % -12g ",
- ionosphere->alpha_2, ionosphere->alpha_3);
- pbuf += sprintf(pbuf, "\n beta_0 = % -12g beta_1 = % -12g ",
- ionosphere->beta_0, ionosphere->beta_1);
- pbuf += sprintf(pbuf, "\n beta_2 = % -12g beta_3 = % -12g ",
- ionosphere->beta_2, ionosphere->beta_3);
- break;
-
- case 5:
- /* UTC */
- utc = (UTC_INFO*)data_packet;
- pbuf += sprintf(pbuf, "\n A_0 = %g ", utc->A_0);
- pbuf += sprintf(pbuf, "\n A_1 = %g ", utc->A_1);
- pbuf += sprintf(pbuf, "\n delta_t_LS = %d ", utc->delta_t_LS);
- pbuf += sprintf(pbuf, "\n t_ot = %.0f ", utc->t_ot );
- pbuf += sprintf(pbuf, "\n WN_t = %d ", utc->WN_t );
- pbuf += sprintf(pbuf, "\n WN_LSF = %d ", utc->WN_LSF );
- pbuf += sprintf(pbuf, "\n DN = %d ", utc->DN );
- pbuf += sprintf(pbuf, "\n delta_t_LSF = %d ", utc->delta_t_LSF );
- break;
-
- case 6: /* Ephemeris */
- if (sv_prn == 0 || sv_prn > 32) {
- pbuf += sprintf(pbuf, " Binary PRN invalid");
- return;
- }
- nav_data = (NAV_INFO*)data_packet;
-
- pbuf += sprintf(pbuf, "\n SV_PRN = % -12d . t_ephem = % -12g . ",
- nav_data->sv_number , nav_data->t_ephem );
- cdata = &(nav_data->ephclk);
- pbuf += sprintf(pbuf,
- "\n weeknum = % -12d . codeL2 = % -12d . L2Pdata = % -12d",
- cdata->weeknum , cdata->codeL2 , cdata->L2Pdata );
- pbuf += sprintf(pbuf,
- "\n SVacc_raw = % -12d .SV_health = % -12d . IODC = % -12d",
- cdata->SVacc_raw, cdata->SV_health, cdata->IODC );
- pbuf += sprintf(pbuf,
- "\n T_GD = % -12g . t_oc = % -12g . a_f2 = % -12g",
- cdata->T_GD, cdata->t_oc, cdata->a_f2 );
- pbuf += sprintf(pbuf,
- "\n a_f1 = % -12g . a_f0 = % -12g . SVacc = % -12g",
- cdata->a_f1, cdata->a_f0, cdata->SVacc );
- edata = &(nav_data->ephorb);
- pbuf += sprintf(pbuf,
- "\n IODE = % -12d .fit_intvl = % -12d . C_rs = % -12g",
- edata->IODE, edata->fit_interval, edata->C_rs );
- pbuf += sprintf(pbuf,
- "\n delta_n = % -12g . M_0 = % -12g . C_uc = % -12g",
- edata->delta_n, edata->M_0, edata->C_uc );
- pbuf += sprintf(pbuf,
- "\n ecc = % -12g . C_us = % -12g . sqrt_A = % -12g",
- edata->e, edata->C_us, edata->sqrt_A );
- pbuf += sprintf(pbuf,
- "\n t_oe = % -12g . C_ic = % -12g . OMEGA_0 = % -12g",
- edata->t_oe, edata->C_ic, edata->OMEGA_0 );
- pbuf += sprintf(pbuf,
- "\n C_is = % -12g . i_0 = % -12g . C_rc = % -12g",
- edata->C_is, edata->i_0, edata->C_rc );
- pbuf += sprintf(pbuf,
- "\n omega = % -12g . OMEGADOT = % -12g . IDOT = % -12g",
- edata->omega, edata->OMEGADOT, edata->IDOT );
- pbuf += sprintf(pbuf,
- "\n Axis = % -12g . n = % -12g . r1me2 = % -12g",
- edata->Axis, edata->n, edata->r1me2 );
- pbuf += sprintf(pbuf,
- "\n OMEGA_n = % -12g . ODOT_n = % -12g",
- edata->OMEGA_n, edata->ODOT_n );
- break;
- }
- }
-}
-
-
-/* 0x59: */
-static void rpt_SVs_enabled (TSIPPKT *rpt)
-{
- unsigned char
- numsvs,
- code_type,
- status_code[32];
- short
- iprn;
-
- /* unload rptbuf */
- if (rpt_0x59 (rpt, &code_type, status_code))
- {
- parsed = BADLEN_PARSE;
- return;
- }
- switch (code_type)
- {
- case 3: pbuf += sprintf(pbuf, "\nSVs Disabled:\n"); break;
- case 6: pbuf += sprintf(pbuf, "\nSVs with Health Ignored:\n"); break;
- default: return;
- }
- numsvs = 0;
- for (iprn=0; iprn<32; iprn++)
- {
- if (status_code[iprn])
- {
- pbuf += sprintf(pbuf, " %02d", iprn+1);
- numsvs++;
- }
- }
- if (numsvs == 0) pbuf += sprintf(pbuf, "None");
-}
-
-
-/* 0x5A */
-static void rpt_raw_msmt (TSIPPKT *rpt)
-{
- unsigned char
- sv_prn;
- float
- sample_length, signal_level, code_phase, Doppler;
- double
- time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x5A (rpt, &sv_prn, &sample_length, &signal_level,
- &code_phase, &Doppler, &time_of_fix))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\n %02d %5.0f %7.1f %10.2f %10.2f %12.3f %s",
- sv_prn, sample_length, signal_level, code_phase, Doppler, time_of_fix,
- show_time ((float)time_of_fix));
-}
-
-/* 0x5B */
-static void rpt_SV_ephemeris_status (TSIPPKT *rpt)
-{
- unsigned char
- sv_prn, sv_health, sv_iode, fit_interval_flag;
- float
- time_of_collection, time_of_eph, sv_accy;
-
- /* unload rptbuf */
- if (rpt_0x5B (rpt, &sv_prn, &sv_health, &sv_iode, &fit_interval_flag,
- &time_of_collection, &time_of_eph, &sv_accy))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\n SV%02d %s %2Xh %2Xh ",
- sv_prn, show_time (time_of_collection), sv_health, sv_iode);
- /* note: cannot use show_time twice in same call */
- pbuf += sprintf(pbuf, "%s %1d %4.1f",
- show_time (time_of_eph), fit_interval_flag, sv_accy);
-}
-
-/* 0x5C */
-static void rpt_SV_tracking_status (TSIPPKT *rpt)
-{
- unsigned char
- sv_prn, chan, slot, acq_flag, eph_flag,
- old_msmt_flag, integer_msec_flag, bad_data_flag,
- data_collect_flag;
- float
- signal_level, time_of_last_msmt,
- elev, azim;
-
- /* unload rptbuf */
- if (rpt_0x5C (rpt,
- &sv_prn, &slot, &chan, &acq_flag, &eph_flag,
- &signal_level, &time_of_last_msmt, &elev, &azim,
- &old_msmt_flag, &integer_msec_flag, &bad_data_flag,
- &data_collect_flag))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf,
-"\n SV%2d %1d %1d %1d %4.1f %s %5.1f %5.1f",
- sv_prn, chan,
- acq_flag, eph_flag, signal_level,
- show_time(time_of_last_msmt),
- elev*R2D, azim*R2D);
-}
-
-/**/
-/* 0x6D */
-static void rpt_allSV_selection (TSIPPKT *rpt)
-{
- unsigned char
- manual_mode, nsvs, sv_prn[8], ndim;
- short
- islot;
- float
- pdop, hdop, vdop, tdop;
-
- /* unload rptbuf */
- if (rpt_0x6D (rpt,
- &manual_mode, &nsvs, &ndim, sv_prn,
- &pdop, &hdop, &vdop, &tdop))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- switch (ndim)
- {
- case 0:
- pbuf += sprintf(pbuf, "\nMode: Searching, %d-SV:", nsvs);
- break;
- case 1:
- pbuf += sprintf(pbuf, "\nMode: One-SV Timing:");
- break;
- case 3: case 4:
- pbuf += sprintf(pbuf, "\nMode: %c-%dD, %d-SV:",
- manual_mode ? 'M' : 'A', ndim - 1, nsvs);
- break;
- case 5:
- pbuf += sprintf(pbuf, "\nMode: Timing, %d-SV:", nsvs);
- break;
- default:
- pbuf += sprintf(pbuf, "\nMode: Unknown = %d:", ndim);
- break;
- }
-
- for (islot = 0; islot < nsvs; islot++)
- {
- if (sv_prn[islot]) pbuf += sprintf(pbuf, " %02d", sv_prn[islot]);
- }
- if (ndim == 3 || ndim == 4)
- {
- pbuf += sprintf(pbuf, "; DOPs: P %.1f H %.1f V %.1f T %.1f",
- pdop, hdop, vdop, tdop);
- }
-}
-
-/**/
-/* 0x82 */
-static void rpt_DGPS_position_mode (TSIPPKT *rpt)
-{
- unsigned char
- diff_mode;
-
- /* unload rptbuf */
- if (rpt_0x82 (rpt, &diff_mode)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nFix is%s DGPS-corrected (%s mode) (%d)",
- (diff_mode&1) ? "" : " not",
- (diff_mode&2) ? "auto" : "manual",
- diff_mode);
-}
-
-/* 0x83 */
-static void rpt_double_ECEF_position (TSIPPKT *rpt)
-{
-
- double
- ECEF_pos[3], clock_bias;
- float
- time_of_fix;
-
- /* unload rptbuf */
- if (rpt_0x83 (rpt, ECEF_pos, &clock_bias, &time_of_fix))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nDXYZ:%12.2f %13.2f %13.2f %12.2f%s",
- ECEF_pos[0], ECEF_pos[1], ECEF_pos[2], clock_bias,
- show_time(time_of_fix));
-}
-
-/* 0x84 */
-static void rpt_double_lla_position (TSIPPKT *rpt)
-{
- short
- lat_deg, lon_deg;
- double
- lat, lon, lat_min, lon_min,
- alt, clock_bias;
- float
- time_of_fix;
- unsigned char
- north_south, east_west;
-
- /* unload rptbuf */
- if (rpt_0x84 (rpt,
- &lat, &lon, &alt, &clock_bias, &time_of_fix))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- lat *= R2D;
- lon *= R2D;
- if (lat < 0.0) {
- north_south = 'S';
- lat = -lat;
- } else {
- north_south = 'N';
- }
- lat_deg = (short)lat;
- lat_min = (lat - lat_deg) * 60.0;
-
- if (lon < 0.0) {
- east_west = 'W';
- lon = -lon;
- } else {
- east_west = 'E';
- }
- lon_deg = (short)lon;
- lon_min = (lon - lon_deg) * 60.0;
- pbuf += sprintf(pbuf, "\nDLLA: %2d:%08.5f %c; %3d:%08.5f %c; %10.2f %12.2f%s",
- lat_deg, lat_min, north_south,
- lon_deg, lon_min, east_west,
- alt, clock_bias,
- show_time(time_of_fix));
-}
-
-/* 0xBB */
-static void rpt_complete_rcvr_config (TSIPPKT *rpt)
-{
- TSIP_RCVR_CFG TsipxBB ;
- /* unload rptbuf */
- if (rpt_Paly0xBB (rpt, &TsipxBB))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\n operating mode: %s",
- NavModeText0xBB[TsipxBB.operating_mode]);
- pbuf += sprintf(pbuf, "\n dynamics: %s",
- dyn_text[TsipxBB.dyn_code]);
- pbuf += sprintf(pbuf, "\n elev angle mask: %g deg",
- TsipxBB.elev_mask * R2D);
- pbuf += sprintf(pbuf, "\n SNR mask: %g AMU",
- TsipxBB.cno_mask);
- pbuf += sprintf(pbuf, "\n DOP mask: %g",
- TsipxBB.dop_mask);
- pbuf += sprintf(pbuf, "\n DOP switch: %g",
- TsipxBB.dop_switch);
- return ;
-}
-
-/* 0xBC */
-static void rpt_rcvr_serial_port_config (TSIPPKT *rpt)
-{
- unsigned char
- port_num, in_baud, out_baud, data_bits, parity, stop_bits, flow_control,
- protocols_in, protocols_out, reserved;
- unsigned char known;
-
- /* unload rptbuf */
- if (rpt_0xBC (rpt, &port_num, &in_baud, &out_baud, &data_bits, &parity,
- &stop_bits, &flow_control, &protocols_in, &protocols_out, &reserved)) {
- parsed = BADLEN_PARSE;
- return;
- }
- /* rptbuf unloaded */
-
- pbuf += sprintf(pbuf, "\n RECEIVER serial port %s config:",
- rcvr_port_text[port_num]);
-
- pbuf += sprintf(pbuf, "\n I/O Baud %s/%s, %d - %s - %d",
- st_baud_text_app[in_baud],
- st_baud_text_app[out_baud],
- data_bits+5,
- parity_text[parity],
- stop_bits=1);
- pbuf += sprintf(pbuf, "\n Input protocols: ");
- known = FALSE;
- if (protocols_in&B_TSIP)
- {
- pbuf += sprintf(pbuf, "%s ", protocols_in_text[1]);
- known = TRUE;
- }
- if (known == FALSE) pbuf += sprintf(pbuf, "No known");
-
- pbuf += sprintf(pbuf, "\n Output protocols: ");
- known = FALSE;
- if (protocols_out&B_TSIP)
- {
- pbuf += sprintf(pbuf, "%s ", protocols_out_text[1]);
- known = TRUE;
- }
- if (protocols_out&B_NMEA)
- {
- pbuf += sprintf(pbuf, "%s ", protocols_out_text[2]);
- known = TRUE;
- }
- if (known == FALSE) pbuf += sprintf(pbuf, "No known");
- reserved = reserved;
-
- }
-
-/* 0x8F */
-/* 8F0B */
-static void rpt_8F0B(TSIPPKT *rpt)
-{
- const char
- *oprtng_dim[7] = {
- "horizontal (2-D)",
- "full position (3-D)",
- "single satellite (0-D)",
- "automatic",
- "N/A",
- "N/A",
- "overdetermined clock"};
- char
- sv_id[8];
- unsigned char
- month,
- date,
- dim_mode,
- north_south,
- east_west;
- unsigned short
- event;
- short
- utc_offset,
- year,
- local_index;
- short
- lat_deg,
- lon_deg;
- float
- bias_unc,
- dr_unc;
- double
- tow,
- bias,
- drift,
- lat,
- lon,
- alt,
- lat_min,
- lon_min;
- int
- numfix,
- numnotfix;
-
- if (rpt_0x8F0B(rpt,
- &event,
- &tow,
- &date,
- &month,
- &year,
- &dim_mode,
- &utc_offset,
- &bias,
- &drift,
- &bias_unc,
- &dr_unc,
- &lat,
- &lon,
- &alt,
- sv_id))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- if (event == 0)
- {
- pbuf += sprintf(pbuf, "\nNew partial+full meas");
- }
- else
- {
- pbuf += sprintf(pbuf, "\nEvent count: %5d", event);
- }
-
- pbuf += sprintf(pbuf, "\nGPS time : %s %2d/%2d/%2d (DMY)",
- show_time(tow), date, month, year);
- pbuf += sprintf(pbuf, "\nMode : %s", oprtng_dim[dim_mode]);
- pbuf += sprintf(pbuf, "\nUTC offset: %2d", utc_offset);
- pbuf += sprintf(pbuf, "\nClock Bias: %6.2f m", bias);
- pbuf += sprintf(pbuf, "\nFreq bias : %6.2f m/s", drift);
- pbuf += sprintf(pbuf, "\nBias unc : %6.2f m", bias_unc);
- pbuf += sprintf(pbuf, "\nFreq unc : %6.2f m/s", dr_unc);
-
- lat *= R2D; /* convert from radians to degrees */
- lon *= R2D;
- if (lat < 0.0)
- {
- north_south = 'S';
- lat = -lat;
- }
- else
- {
- north_south = 'N';
- }
-
- lat_deg = (short)lat;
- lat_min = (lat - lat_deg) * 60.0;
- if (lon < 0.0)
- {
- east_west = 'W';
- lon = -lon;
- }
- else
- {
- east_west = 'E';
- }
-
- lon_deg = (short)lon;
- lon_min = (lon - lon_deg) * 60.0;
- pbuf += sprintf(pbuf, "\nPosition :");
- pbuf += sprintf(pbuf, " %4d %6.3f %c", lat_deg, lat_min, north_south);
- pbuf += sprintf(pbuf, " %5d %6.3f %c", lon_deg, lon_min, east_west);
- pbuf += sprintf(pbuf, " %10.2f", alt);
-
- numfix = numnotfix = 0;
- for (local_index=0; local_index<8; local_index++)
- {
- if (sv_id[local_index] < 0) numnotfix++;
- if (sv_id[local_index] > 0) numfix++;
- }
- if (numfix > 0)
- {
- pbuf += sprintf(pbuf, "\nSVs used in fix : ");
- for (local_index=0; local_index<8; local_index++)
- {
- if (sv_id[local_index] > 0)
- {
- pbuf += sprintf(pbuf, "%2d ", sv_id[local_index]);
- }
- }
- }
- if (numnotfix > 0)
- {
- pbuf += sprintf(pbuf, "\nOther SVs tracked: ");
- for (local_index=0; local_index<8; local_index++)
- {
- if (sv_id[local_index] < 0)
- {
- pbuf += sprintf(pbuf, "%2d ", sv_id[local_index]);
- }
- }
- }
-}
-
-/* 0x8F14 */
-static void rpt_8F14 (TSIPPKT *rpt)
-/* Datum parameters */
-{
- double
- datum_coeffs[5];
- short
- datum_idx;
-
- /* unload rptbuf */
- if (rpt_0x8F14 (rpt, &datum_idx, datum_coeffs))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- if (datum_idx == -1)
- {
- pbuf += sprintf(pbuf, "\nUser-Entered Datum:");
- pbuf += sprintf(pbuf, "\n dx = %6.1f", datum_coeffs[0]);
- pbuf += sprintf(pbuf, "\n dy = %6.1f", datum_coeffs[1]);
- pbuf += sprintf(pbuf, "\n dz = %6.1f", datum_coeffs[2]);
- pbuf += sprintf(pbuf, "\n a-axis = %10.3f", datum_coeffs[3]);
- pbuf += sprintf(pbuf, "\n e-squared = %16.14f", datum_coeffs[4]);
- }
- else if (datum_idx == 0)
- {
- pbuf += sprintf(pbuf, "\nWGS-84 datum, Index 0 ");
- }
- else
- {
- pbuf += sprintf(pbuf, "\nStandard Datum, Index %3d ", datum_idx);
- }
-}
-
-/* 0x8F15 */
-static void rpt_8F15 (TSIPPKT *rpt)
-/* Datum parameters */
-{
- double
- datum_coeffs[5];
- short
- datum_idx;
-
- /* unload rptbuf */
- if (rpt_0x8F15 (rpt, &datum_idx, datum_coeffs)) {
- parsed = BADLEN_PARSE;
- return;
- }
-
- if (datum_idx == -1)
- {
- pbuf += sprintf(pbuf, "\nUser-Entered Datum:");
- pbuf += sprintf(pbuf, "\n dx = %6.1f", datum_coeffs[0]);
- pbuf += sprintf(pbuf, "\n dy = %6.1f", datum_coeffs[1]);
- pbuf += sprintf(pbuf, "\n dz = %6.1f", datum_coeffs[2]);
- pbuf += sprintf(pbuf, "\n a-axis = %10.3f", datum_coeffs[3]);
- pbuf += sprintf(pbuf, "\n e-squared = %16.14f", datum_coeffs[4]);
- }
- else if (datum_idx == 0)
- {
- pbuf += sprintf(pbuf, "\nWGS-84 datum, Index 0 ");
- }
- else
- {
- pbuf += sprintf(pbuf, "\nStandard Datum, Index %3d ", datum_idx);
- }
-}
-
-/* 0x8F20 */
-#define INFO_DGPS 0x02
-#define INFO_2D 0x04
-#define INFO_ALTSET 0x08
-#define INFO_FILTERED 0x10
-static void rpt_8F20 (TSIPPKT *rpt)
-{
- unsigned char
- info, nsvs, sv_prn[32];
- short
- week_num, datum_index, sv_IODC[32];
- double
- lat, lon, alt, time_of_fix;
- double
- londeg, latdeg, vel[3];
- short
- isv;
- char
- datum_string[20];
-
- /* unload rptbuf */
- if (rpt_0x8F20 (rpt,
- &info, &lat, &lon, &alt, vel,
- &time_of_fix,
- &week_num, &nsvs, sv_prn, sv_IODC, &datum_index))
- {
- parsed = BADLEN_PARSE;
- return;
- }
- pbuf += sprintf(pbuf,
- "\nFix at: %04d:%3s:%02d:%02d:%06.3f GPS (=UTC+%2ds) FixType: %s%s%s",
- week_num,
- dayname[(short)(time_of_fix/86400.0)],
- (short)fmod(time_of_fix/3600., 24.),
- (short)fmod(time_of_fix/60., 60.),
- fmod(time_of_fix, 60.),
- (char)rpt->buf[29], /* UTC offset */
- (info & INFO_DGPS)?"Diff":"",
- (info & INFO_2D)?"2D":"3D",
- (info & INFO_FILTERED)?"-Filtrd":"");
-
- if (datum_index > 0)
- {
- sprintf(datum_string, "Datum%3d", datum_index);
- }
- else if (datum_index)
- {
- sprintf(datum_string, "Unknown ");
- }
- else
- {
- sprintf(datum_string, "WGS-84");
- }
-
- /* convert from radians to degrees */
- latdeg = R2D * fabs(lat);
- londeg = R2D * fabs(lon);
- pbuf += sprintf(pbuf,
- "\n Pos: %4d:%09.6f %c %5d:%09.6f %c %10.2f m HAE (%s)",
- (short)latdeg, fmod (latdeg, 1.)*60.0,
- (lat<0.0)?'S':'N',
- (short)londeg, fmod (londeg, 1.)*60.0,
- (lon<0.0)?'W':'E',
- alt,
- datum_string);
- pbuf += sprintf(pbuf,
- "\n Vel: %9.3f E %9.3f N %9.3f U (m/sec)",
- vel[0], vel[1], vel[2]);
-
- pbuf += sprintf(pbuf,
- "\n SVs: ");
- for (isv = 0; isv < nsvs; isv++) {
- pbuf += sprintf(pbuf, " %02d", sv_prn[isv]);
- }
- pbuf += sprintf(pbuf, " (IODEs:");
- for (isv = 0; isv < nsvs; isv++) {
- pbuf += sprintf(pbuf, " %02X", sv_IODC[isv]&0xFF);
- }
- pbuf += sprintf(pbuf, ")");
-}
-
-/* 0x8F41 */
-static void rpt_8F41(TSIPPKT *rpt)
-{
- unsigned char
- bSearchRange,
- bBoardOptions,
- bBuildYear,
- bBuildMonth,
- bBuildDay,
- bBuildHour;
- float
- fOscOffset;
- unsigned short
- iTestCodeId;
- unsigned long
- iiSerialNumber;
-
- if (!rpt_0x8F41(rpt,
- &bSearchRange,
- &bBoardOptions,
- &iiSerialNumber,
- &bBuildYear,
- &bBuildMonth,
- &bBuildDay,
- &bBuildHour,
- &fOscOffset,
- &iTestCodeId))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\n search range: %d",
- bSearchRange);
- pbuf += sprintf(pbuf, "\n board options: %d",
- bBoardOptions);
- pbuf += sprintf(pbuf, "\n board serial #: %ld",
- iiSerialNumber);
- pbuf += sprintf(pbuf, "\n build date/hour: %02d/%02d/%02d %02d:00",
- bBuildDay, bBuildMonth, bBuildYear, bBuildHour);
- pbuf += sprintf(pbuf, "\n osc offset: %.3f PPM (%.0f Hz)",
- fOscOffset/1575.42, fOscOffset);
- pbuf += sprintf(pbuf, "\n test code: %d",
- iTestCodeId);
-}
-
-/* 0x8F42 */
-static void rpt_8F42(TSIPPKT *rpt)
-{
- unsigned char
- bProdOptionsPre,
- bProdNumberExt;
- unsigned short
- iCaseSerialNumberPre,
- iPremiumOptions,
- iMachineID,
- iKey;
- unsigned long
- iiCaseSerialNumber,
- iiProdNumber;
-
- if (!rpt_0x8F42(rpt,
- &bProdOptionsPre,
- &bProdNumberExt,
- &iCaseSerialNumberPre,
- &iiCaseSerialNumber,
- &iiProdNumber,
- &iPremiumOptions,
- &iMachineID,
- &iKey))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nProduct ID 8F42");
- pbuf += sprintf(pbuf, "\n extension: %d", bProdNumberExt);
- pbuf += sprintf(pbuf, "\n case serial # prefix: %d", iCaseSerialNumberPre);
- pbuf += sprintf(pbuf, "\n case serial #: %ld", iiCaseSerialNumber);
- pbuf += sprintf(pbuf, "\n prod. #: %ld", iiProdNumber);
- pbuf += sprintf(pbuf, "\n premium options: %Xh", iPremiumOptions);
- pbuf += sprintf(pbuf, "\n machine ID: %d", iMachineID);
- pbuf += sprintf(pbuf, "\n key: %Xh", iKey);
-}
-
-/* 0x8F45 */
-static void rpt_8F45(TSIPPKT *rpt)
-{
- unsigned char bSegMask;
-
- if (!rpt_0x8F45(rpt,
- &bSegMask))
- {
- parsed = BADLEN_PARSE;
- return;
- }
- pbuf += sprintf(pbuf, "\nCleared Segment Mask: %Xh", bSegMask);
-}
-
-static void rpt_8F4A(TSIPPKT *rpt)
-/* Stinger PPS def */
-{
- unsigned char
- pps_enabled,
- pps_timebase,
- pps_polarity;
- float
- bias_unc_threshold;
- double
- pps_offset;
-
- if (rpt_0x8F4A_16 (rpt,
- &pps_enabled,
- &pps_timebase,
- &pps_polarity,
- &pps_offset,
- &bias_unc_threshold))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nPPS is %s", pps_enabled?"enabled":"disabled");
- pbuf += sprintf(pbuf, "\n timebase: %s", PPSTimeBaseText[pps_timebase]);
- pbuf += sprintf(pbuf, "\n polarity: %s", PPSPolarityText[pps_polarity]);
- pbuf += sprintf(pbuf, "\n offset: %.1f ns, ", pps_offset*1.e9);
- pbuf += sprintf(pbuf, "\n biasunc: %.1f ns", bias_unc_threshold/GPS_C*1.e9);
-}
-
-static void rpt_8F4B(TSIPPKT *rpt)
-/* fast-SA decorrolation time for self-survey */
-{
- unsigned long
- decorr_max;
-
- if (rpt_0x8F4B(rpt, &decorr_max))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf,
- "\nMax # of position fixes for self-survey : %ld",
- decorr_max);
-}
-
-static void rpt_8F4D(TSIPPKT *rpt)
-{
- static char
- *linestart;
- unsigned long
- OutputMask;
- static unsigned long
- MaskBit[] = {
- 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020,
- 0x00000100L, 0x00000800L, 0x00001000L,
- 0x40000000L, 0x80000000L};
- int
- ichoice,
- numchoices;
-
- if (rpt_0x8F4D(rpt, &OutputMask))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nAuto-Report Mask: %02X %02X %02X %02X",
- (unsigned char)(OutputMask>>24),
- (unsigned char)(OutputMask>>16),
- (unsigned char)(OutputMask>>8),
- (unsigned char)OutputMask);
-
- numchoices = sizeof(MaskText)/sizeof(char*);
- pbuf += sprintf(pbuf, "\nAuto-Reports scheduled for Output:");
- linestart = pbuf;
- for (ichoice=0; ichoice<numchoices; ichoice++)
- {
- if (OutputMask&MaskBit[ichoice])
- {
- pbuf += sprintf(pbuf, "%s %s",
- (pbuf==linestart)?"\n ":",",
- MaskText[ichoice]);
- if (pbuf-linestart > 60) linestart = pbuf;
- }
- }
-
- pbuf += sprintf(pbuf, "\nAuto-Reports NOT scheduled for Output:");
- linestart = pbuf;
- for (ichoice=0; ichoice<numchoices; ichoice++)
- {
- if (OutputMask&MaskBit[ichoice]) continue;
- pbuf += sprintf(pbuf, "%s %s",
- (pbuf==linestart)?"\n ":",",
- MaskText[ichoice]);
- if (pbuf-linestart > 60) linestart = pbuf;
- }
-}
-
-static void rpt_8FA5(TSIPPKT *rpt)
-{
- unsigned char
- spktmask[4];
-
- if (rpt_0x8FA5(rpt, spktmask))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\nSuperpacket auto-output mask: %02X %02X %02X %02X",
- spktmask[0], spktmask[1], spktmask[2], spktmask[3]);
-
- if (spktmask[0]&0x01) pbuf+= sprintf (pbuf, "\n PPS 8F-0B");
- if (spktmask[0]&0x02) pbuf+= sprintf (pbuf, "\n Event 8F-0B");
- if (spktmask[0]&0x10) pbuf+= sprintf (pbuf, "\n PPS 8F-AD");
- if (spktmask[0]&0x20) pbuf+= sprintf (pbuf, "\n Event 8F-AD");
- if (spktmask[2]&0x01) pbuf+= sprintf (pbuf, "\n ppos Fix 8F-20");
-}
-
-static void rpt_8FAD (TSIPPKT *rpt)
-{
- unsigned short
- Count,
- Year;
- double
- FracSec;
- unsigned char
- Hour,
- Minute,
- Second,
- Day,
- Month,
- Status,
- Flags;
- static char* Status8FADText[] = {
- "CODE_DOING_FIXES",
- "CODE_GOOD_1_SV",
- "CODE_APPX_1SV",
- "CODE_NEED_TIME",
- "CODE_NEED_INITIALIZATION",
- "CODE_PDOP_HIGH",
- "CODE_BAD_1SV",
- "CODE_0SVS",
- "CODE_1SV",
- "CODE_2SVS",
- "CODE_3SVS",
- "CODE_NO_INTEGRITY",
- "CODE_DCORR_GEN",
- "CODE_OVERDET_CLK",
- "Invalid Status"},
- *LeapStatusText[] = {
- " UTC Avail", " ", " ", " ",
- " Scheduled", " Pending", " Warning", " In Progress"};
- int i;
-
- if (rpt_0x8FAD (rpt,
- &Count,
- &FracSec,
- &Hour,
- &Minute,
- &Second,
- &Day,
- &Month,
- &Year,
- &Status,
- &Flags))
- {
- parsed = BADLEN_PARSE;
- return;
- }
-
- pbuf += sprintf(pbuf, "\n8FAD Count: %d Status: %s",
- Count, Status8FADText[Status]);
-
- pbuf += sprintf(pbuf, "\n Leap Flags:");
- if (Flags)
- {
- for (i=0; i<8; i++)
- {
- if (Flags&(1<<i)) pbuf += sprintf(pbuf, LeapStatusText[i]);
- }
- }
- else
- {
- pbuf += sprintf(pbuf, " UTC info not available");
- }
-
- pbuf += sprintf(pbuf, "\n %02d/%02d/%04d (DMY) %02d:%02d:%02d.%09ld UTC",
- Day, Month, Year, Hour, Minute, Second, (long)(FracSec*1.e9));
-}
-
-
-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 occurrence of a series of reports */
- static int
- last_rptcode = 0;
- int
- numchars;
-
- numchars = 0;
- if (force || rptcode!=last_rptcode)
- {
- /* supply a header in console output */
- switch (rptcode)
- {
- case 0x5A:
- numchars = sprintf(HdrStr, "\nRaw Measurement Data");
- numchars += sprintf(HdrStr+numchars,
- "\n SV Sample SNR Code Phase Doppler Seconds Time of Meas");
- break;
-
- case 0x5B:
- numchars = sprintf(HdrStr, "\nEphemeris Status");
- numchars += sprintf(HdrStr+numchars,
- "\n SV Time collected Health IODE t oe Fit URA");
- break;
-
- case 0x5C:
- numchars = sprintf(HdrStr, "\nTracking Info");
- numchars += sprintf(HdrStr+numchars,
- "\n SV C Acq Eph SNR Time of Meas Elev Azim ");
- break;
-
- }
- }
- last_rptcode = rptcode;
- return (short)numchars;
-}
-
-static void unknown_rpt (TSIPPKT *rpt)
-{
- int i;
-
- /* app-specific rpt packets */
- if (parsed == BADLEN_PARSE)
- {
- pbuf += sprintf(pbuf, "\nTSIP report packet ID %2Xh, length %d: Bad length",
- rpt->code, rpt->len);
- }
- if (parsed == BADID_PARSE)
- {
- pbuf += sprintf(pbuf,
- "\nTSIP report packet ID %2Xh, length %d: translation not supported",
- rpt->code, rpt->len);
- }
-
- if (parsed == BADDATA_PARSE)
- {
- pbuf += sprintf(pbuf,
- "\nTSIP report packet ID %2Xh, length %d: data content incorrect",
- rpt->code, rpt->len);
- }
-
- for (i = 0; i < rpt->len; i++) {
- if ((i % 20) == 0) *pbuf++ = '\n';
- pbuf += sprintf(pbuf, " %02X", rpt->buf[i]);
- }
-}
-/**/
-/*
-** main subroutine, called from ProcessInputBytesWhileWaitingForKBHit()
-*/
-void TranslateTSIPReportToText (TSIPPKT *rpt, char *TextOutputBuffer)
-{
-
- /* pbuf is the pointer to the current location of the text output */
- pbuf = TextOutputBuffer;
-
- /* keep track of whether the message has been successfully parsed */
- parsed = GOOD_PARSE;
-
- /* print a header if this is the first of a series of messages */
- pbuf += print_msg_table_header (rpt->code, pbuf, FALSE);
-
- /* process incoming TSIP report according to code */
- switch (rpt->code)
- {
- case 0x3D: rpt_chan_A_config (rpt); break;
- case 0x40: rpt_almanac_data_page (rpt); break;
- case 0x41: rpt_GPS_time (rpt); break;
- case 0x42: rpt_single_ECEF_position (rpt); break;
- case 0x43: rpt_single_ECEF_velocity (rpt); break;
- case 0x45: rpt_SW_version (rpt); break;
- case 0x46: rpt_rcvr_health (rpt); break;
- case 0x47: rpt_SNR_all_SVs (rpt); break;
- case 0x48: rpt_GPS_system_message (rpt); break;
- case 0x49: rpt_almanac_health_page (rpt); break;
- case 0x4A: switch (rpt->len) {
- /*
- ** special case (=slip-up) in the TSIP protocol;
- ** parsing method depends on length
- */
- case 20: rpt_single_lla_position (rpt); break;
- case 9: rpt_ref_alt (rpt); break;
- } break;
- case 0x4B: rpt_rcvr_id_and_status (rpt);break;
- case 0x4C: rpt_operating_parameters (rpt); break;
- case 0x4D: rpt_oscillator_offset (rpt); break;
- case 0x4E: rpt_GPS_time_set_response (rpt); break;
- case 0x4F: rpt_UTC_offset (rpt); break;
- case 0x54: rpt_1SV_bias (rpt); break;
- case 0x55: rpt_io_opt (rpt); break;
- case 0x56: rpt_ENU_velocity (rpt); break;
- case 0x57: rpt_last_fix_info (rpt); break;
- case 0x58: rpt_GPS_system_data (rpt); break;
- case 0x59: rpt_SVs_enabled (rpt); break;
- case 0x5A: rpt_raw_msmt (rpt); break;
- case 0x5B: rpt_SV_ephemeris_status (rpt); break;
- case 0x5C: rpt_SV_tracking_status (rpt); break;
- case 0x6D: rpt_allSV_selection (rpt); break;
- case 0x82: rpt_DGPS_position_mode (rpt); break;
- case 0x83: rpt_double_ECEF_position (rpt); break;
- case 0x84: rpt_double_lla_position (rpt); break;
- case 0xBB: rpt_complete_rcvr_config (rpt); break;
- case 0xBC: rpt_rcvr_serial_port_config (rpt); break;
-
- case 0x8F: switch (rpt->buf[0])
- {
- /* superpackets; parsed according to subcodes */
- case 0x0B: rpt_8F0B(rpt); break;
- case 0x14: rpt_8F14(rpt); break;
- case 0x15: rpt_8F15(rpt); break;
- case 0x20: rpt_8F20(rpt); break;
- case 0x41: rpt_8F41(rpt); break;
- case 0x42: rpt_8F42(rpt); break;
- case 0x45: rpt_8F45(rpt); break;
- case 0x4A: rpt_8F4A(rpt); break;
- case 0x4B: rpt_8F4B(rpt); break;
- case 0x4D: rpt_8F4D(rpt); break;
- case 0xA5: rpt_8FA5(rpt); break;
- case 0xAD: rpt_8FAD(rpt); break;
- default: parsed = BADID_PARSE; break;
- }
- break;
-
- default: parsed = BADID_PARSE; break;
- }
-
- if (parsed != GOOD_PARSE)
- {
- /*
- **The message has TSIP structure (DLEs, etc.)
- ** but could not be parsed by above routines
- */
- unknown_rpt (rpt);
- }
-
- /* close TextOutputBuffer */
- pbuf = '\0';
-}
-
-#endif /* TRIMBLE_OUTPUT_FUNC */
-
-#else /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */
-int refclock_ripencc_bs;
-#endif /* defined(REFCLOCK) && defined(CLOCK_RIPENCC) */
-
diff --git a/contrib/ntp/ntpd/refclock_shm.c b/contrib/ntp/ntpd/refclock_shm.c
deleted file mode 100644
index 4ab0ede..0000000
--- a/contrib/ntp/ntpd/refclock_shm.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * refclock_shm - clock driver for utc via shared memory
- * - under construction -
- * To add new modes: Extend or union the shmTime-struct. Do not
- * extend/shrink size, because otherwise existing implementations
- * will specify wrong size of shared memory-segment
- * PB 18.3.97
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_SHM)
-
-#include "ntpd.h"
-#undef fileno
-#include "ntp_io.h"
-#undef fileno
-#include "ntp_refclock.h"
-#undef fileno
-#include "ntp_unixtime.h"
-#undef fileno
-#include "ntp_stdlib.h"
-
-#undef fileno
-#include <ctype.h>
-#undef fileno
-
-#ifndef SYS_WINNT
-# include <sys/ipc.h>
-# include <sys/shm.h>
-# include <assert.h>
-# include <unistd.h>
-# include <stdio.h>
-#endif
-
-/*
- * This driver supports a reference clock attached thru shared memory
- */
-
-/*
- * SHM interface definitions
- */
-#define PRECISION (-1) /* precision assumed (0.5 s) */
-#define REFID "SHM" /* reference ID */
-#define DESCRIPTION "SHM/Shared memory interface"
-
-#define NSAMPLES 3 /* stages of median filter */
-
-/*
- * Function prototypes
- */
-static int shm_start (int, struct peer *);
-static void shm_shutdown (int, struct peer *);
-static void shm_poll (int unit, struct peer *);
-
-/*
- * Transfer vector
- */
-struct refclock refclock_shm = {
- shm_start, /* start up driver */
- shm_shutdown, /* shut down driver */
- shm_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* initialize driver (not used) */
- noentry, /* not used */
- NOFLAGS /* not used */
-};
-struct shmTime {
- int mode; /* 0 - if valid set
- * use values,
- * clear valid
- * 1 - if valid set
- * if count before and after read of values is equal,
- * use values
- * clear valid
- */
- int count;
- time_t clockTimeStampSec;
- int clockTimeStampUSec;
- time_t receiveTimeStampSec;
- int receiveTimeStampUSec;
- int leap;
- int precision;
- int nsamples;
- int valid;
- int dummy[10];
-};
-
-struct shmTime *getShmTime(int);
-
-struct shmTime *getShmTime (int unit) {
-#ifndef SYS_WINNT
- int shmid=0;
-
- assert (unit<10); /* MAXUNIT is 4, so should never happen */
- shmid=shmget (0x4e545030+unit, sizeof (struct shmTime),
- IPC_CREAT|(unit<2?0700:0777));
- if (shmid==-1) { /*error */
- msyslog(LOG_ERR,"SHM shmget (unit %d): %s",unit,strerror(errno));
- return 0;
- }
- else { /* no error */
- struct shmTime *p=(struct shmTime *)shmat (shmid, 0, 0);
- if ((int)(long)p==-1) { /* error */
- msyslog(LOG_ERR,"SHM shmat (unit %d): %s",unit,strerror(errno));
- return 0;
- }
- return p;
- }
-#else
- char buf[10];
- LPSECURITY_ATTRIBUTES psec=0;
- HANDLE shmid=0;
- SECURITY_DESCRIPTOR sd;
- SECURITY_ATTRIBUTES sa;
- sprintf (buf,"NTP%d",unit);
- if (unit>=2) { /* world access */
- if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) {
- msyslog(LOG_ERR,"SHM InitializeSecurityDescriptor (unit %d): %m",unit);
- return 0;
- }
- if (!SetSecurityDescriptorDacl(&sd,1,0,0)) {
- msyslog(LOG_ERR,"SHM SetSecurityDescriptorDacl (unit %d): %m",unit);
- return 0;
- }
- sa.nLength=sizeof (SECURITY_ATTRIBUTES);
- sa.lpSecurityDescriptor=&sd;
- sa.bInheritHandle=0;
- psec=&sa;
- }
- shmid=CreateFileMapping ((HANDLE)0xffffffff, psec, PAGE_READWRITE,
- 0, sizeof (struct shmTime),buf);
- if (!shmid) { /*error*/
- char buf[1000];
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- 0, GetLastError (), 0, buf, sizeof (buf), 0);
- msyslog(LOG_ERR,"SHM CreateFileMapping (unit %d): %s",unit,buf);
- return 0;
- }
- else {
- struct shmTime *p=(struct shmTime *) MapViewOfFile (shmid,
- FILE_MAP_WRITE, 0, 0, sizeof (struct shmTime));
- if (p==0) { /*error*/
- char buf[1000];
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- 0, GetLastError (), 0, buf, sizeof (buf), 0);
- msyslog(LOG_ERR,"SHM MapViewOfFile (unit %d): %s",unit,buf);
- return 0;
- }
- return p;
- }
-#endif
-}
-/*
- * shm_start - attach to shared memory
- */
-static int
-shm_start(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- pp = peer->procptr;
- pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = -1;
- pp->unitptr = (caddr_t)getShmTime(unit);
-
- /*
- * Initialize miscellaneous peer variables
- */
- memcpy((char *)&pp->refid, REFID, 4);
- if (pp->unitptr!=0) {
- ((struct shmTime*)pp->unitptr)->precision=PRECISION;
- peer->precision = ((struct shmTime*)pp->unitptr)->precision;
- ((struct shmTime*)pp->unitptr)->valid=0;
- ((struct shmTime*)pp->unitptr)->nsamples=NSAMPLES;
- pp->clockdesc = DESCRIPTION;
- return (1);
- }
- else {
- return 0;
- }
-}
-
-
-/*
- * shm_shutdown - shut down the clock
- */
-static void
-shm_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct shmTime *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct shmTime *)pp->unitptr;
-#ifndef SYS_WINNT
- /* HMS: shmdt()wants char* or const void * */
- (void) shmdt (up);
-#else
- UnmapViewOfFile (up);
-#endif
-}
-
-
-/*
- * shm_poll - called by the transmit procedure
- */
-static void
-shm_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct shmTime *up;
- struct refclockproc *pp;
-
- /*
- * This is the main routine. It snatches the time from the shm
- * board and tacks on a local timestamp.
- */
- pp = peer->procptr;
- up = (struct shmTime*)pp->unitptr;
- if (up==0) { /* try to map again - this may succeed if meanwhile some-
- body has ipcrm'ed the old (unaccessible) shared mem
- segment */
- pp->unitptr = (caddr_t)getShmTime(unit);
- up = (struct shmTime*)pp->unitptr;
- }
- if (up==0) {
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
- if (up->valid) {
- struct timeval tvr;
- struct timeval tvt;
- struct tm *t;
- int ok=1;
- switch (up->mode) {
- case 0: {
- tvr.tv_sec=up->receiveTimeStampSec;
- tvr.tv_usec=up->receiveTimeStampUSec;
- tvt.tv_sec=up->clockTimeStampSec;
- tvt.tv_usec=up->clockTimeStampUSec;
- }
- break;
- case 1: {
- int cnt=up->count;
- tvr.tv_sec=up->receiveTimeStampSec;
- tvr.tv_usec=up->receiveTimeStampUSec;
- tvt.tv_sec=up->clockTimeStampSec;
- tvt.tv_usec=up->clockTimeStampUSec;
- ok=(cnt==up->count);
- }
- break;
- default:
- msyslog (LOG_ERR, "SHM: bad mode found in shared memory: %d",up->mode);
- }
- up->valid=0;
- if (ok) {
- TVTOTS(&tvr,&pp->lastrec);
- pp->lastrec.l_ui += JAN_1970;
- /* pp->lasttime = current_time; */
- pp->polls++;
- t=gmtime (&tvt.tv_sec);
- pp->day=t->tm_yday+1;
- pp->hour=t->tm_hour;
- pp->minute=t->tm_min;
- pp->second=t->tm_sec;
- pp->nsec=tvt.tv_usec * 1000;
- peer->precision=up->precision;
- pp->leap=up->leap;
- }
- else {
- refclock_report(peer, CEVNT_FAULT);
- msyslog (LOG_NOTICE, "SHM: access clash in shared memory");
- return;
- }
- }
- 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);
-}
-
-#else
-int refclock_shm_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_tpro.c b/contrib/ntp/ntpd/refclock_tpro.c
deleted file mode 100644
index 3c42568..0000000
--- a/contrib/ntp/ntpd/refclock_tpro.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * refclock_tpro - clock driver for the KSI/Odetics TPRO-S IRIG-B reader
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_TPRO)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "sys/tpro.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * This driver supports the KSI/Odetecs TPRO-S IRIG-B reader and TPRO-
- * SAT GPS receiver for the Sun Microsystems SBus. It requires that the
- * tpro.o device driver be installed and loaded.
- */
-
-/*
- * TPRO interface definitions
- */
-#define DEVICE "/dev/tpro%d" /* device name and unit */
-#define PRECISION (-20) /* precision assumed (1 us) */
-#define REFID "IRIG" /* reference ID */
-#define DESCRIPTION "KSI/Odetics TPRO/S IRIG Interface" /* WRU */
-
-/*
- * Unit control structure
- */
-struct tprounit {
- struct tproval tprodata; /* data returned from tpro read */
-};
-
-/*
- * Function prototypes
- */
-static int tpro_start P((int, struct peer *));
-static void tpro_shutdown P((int, struct peer *));
-static void tpro_poll P((int unit, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_tpro = {
- tpro_start, /* start up driver */
- tpro_shutdown, /* shut down driver */
- tpro_poll, /* transmit poll message */
- noentry, /* not used (old tpro_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old tpro_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * tpro_start - open the TPRO device and initialize data for processing
- */
-static int
-tpro_start(
- int unit,
- struct peer *peer
- )
-{
- register struct tprounit *up;
- struct refclockproc *pp;
- char device[20];
- int fd;
-
- /*
- * Open TPRO device
- */
- (void)sprintf(device, DEVICE, unit);
- fd = open(device, O_RDONLY | O_NDELAY, 0777);
- if (fd == -1) {
- msyslog(LOG_ERR, "tpro_start: open of %s: %m", device);
- return (0);
- }
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct tprounit *) emalloc(sizeof(struct tprounit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct tprounit));
- pp = peer->procptr;
- pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous peer variables
- */
- peer->precision = PRECISION;
- peer->burst = NSTAGE;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- return (1);
-}
-
-
-/*
- * tpro_shutdown - shut down the clock
- */
-static void
-tpro_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct tprounit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct tprounit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * tpro_poll - called by the transmit procedure
- */
-static void
-tpro_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct tprounit *up;
- struct refclockproc *pp;
- struct tproval *tp;
-
- /*
- * This is the main routine. It snatches the time from the TPRO
- * board and tacks on a local timestamp.
- */
- pp = peer->procptr;
- up = (struct tprounit *)pp->unitptr;
-
- tp = &up->tprodata;
- if (read(pp->io.fd, (char *)tp, sizeof(struct tproval)) < 0) {
- refclock_report(peer, CEVNT_FAULT);
- return;
- }
- get_systime(&pp->lastrec);
- pp->polls++;
-
- /*
- * 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. Note: we
- * 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",
- tp->day100, tp->day10, tp->day1, tp->hour10, tp->hour1,
- tp->min10, tp->min1, tp->sec10, tp->sec1, tp->ms100,
- tp->ms10, tp->ms1, tp->usec100, tp->usec10, tp->usec1,
- tp->status);
- pp->lencode = strlen(pp->a_lastcode);
-#ifdef DEBUG
- if (debug)
- printf("tpro: time %s timecode %d %s\n",
- ulfptoa(&pp->lastrec, 6), pp->lencode,
- pp->a_lastcode);
-#endif
- if (sscanf(pp->a_lastcode, "%3d %2d:%2d:%2d.%6ld", &pp->day,
- &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
- pp->leap = LEAP_NOWARNING;
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- if (peer->burst > 0)
- return;
- if (pp->coderecv == pp->codeproc) {
- 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;
-}
-
-#else
-int refclock_tpro_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_trak.c b/contrib/ntp/ntpd/refclock_trak.c
deleted file mode 100644
index 3a4a54e..0000000
--- a/contrib/ntp/ntpd/refclock_trak.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * refclock_trak - clock driver for the TRAK 8810 GPS Station Clock
- *
- * Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>
- * original version Dec, 1993
- * revised version Sep, 1994 for ntp3.4e or later
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_TRAK) && defined(PPS)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif
-
-/*
- * This driver supports the TRAK 8810/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.
- *
- * For best accuracy, this radio requires the LDISC_ACTS line
- * discipline, which captures a timestamp at the '*' 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 \r 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.
- *
- * Using the memus, 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. No provisions are included in this preliminary version of
- * the driver to read and record detailed internal radio status.
- *
- * In operation, this driver sends a RQTS\r 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:
- *
- * *RQTS U,ddd:hh:mm:ss.0,q<cr><lf>
- *
- * on-time = '*' * ddd = day of year
- * hh:mm:ss = hours, minutes, seconds
- * q = quality indicator (phase error), 0-6:
- * 0 > 20 us
- * 6 > 10 us
- * 5 > 1 us
- * 4 > 100 ns
- * 3 > 10 ns
- * 2 < 10 ns
- *
- * The alarm condition is indicated by '0' at Q, which means the radio
- * has a phase error than 20 usec relative to the broadcast time. The
- * absence of year, DST and leap-second warning in this format is also
- * alarming.
- *
- * The continuous time mode is disabled using the RQTX<cr> request,
- * following which the radio sends a RQTX DONE<cr><lf> response. In the
- * normal mode, other control and status requests are effective,
- * including the leap-second status request RQLS<cr>. The radio responds
- * wtih RQLS yy,mm,dd<cr><lf>, where yy,mm,dd are the year, month and
- * day. Presumably, this gives the epoch of the next leap second,
- * RQLS 00,00,00 if none is specified in the GPS message. Specified in
- * this form, the information is generally useless and is ignored by
- * the driver.
- *
- * Fudge Factors
- *
- * There are no special fudge factors other than the generic.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/trak%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS\0" /* reference ID */
-#define DESCRIPTION "TRACK 8810/8820 Station Clock" /* WRU */
-
-#define LENTRAK 24 /* timecode length */
-#define C_CTO "RQTS\r" /* start continuous time output */
-
-/*
- * Unit control structure
- */
-struct trakunit {
- int polled; /* poll message flag */
- l_fp tstamp; /* timestamp of last poll */
-};
-
-/*
- * Function prototypes
- */
-static int trak_start P((int, struct peer *));
-static void trak_shutdown P((int, struct peer *));
-static void trak_receive P((struct recvbuf *));
-static void trak_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_trak = {
- trak_start, /* start up driver */
- trak_shutdown, /* shut down driver */
- trak_poll, /* transmit poll message */
- noentry, /* not used (old trak_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old trak_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * trak_start - open the devices and initialize data for processing
- */
-static int
-trak_start(
- int unit,
- struct peer *peer
- )
-{
- register struct trakunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. The LDISC_ACTS line discipline inserts a
- * timestamp following the "*" on-time character of the
- * timecode.
- */
- (void)sprintf(device, DEVICE, unit);
- if (
-#ifdef PPS
- !(fd = refclock_open(device, SPEED232, LDISC_CLK))
-#else
- !(fd = refclock_open(device, SPEED232, 0))
-#endif /* PPS */
- )
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct trakunit *)
- emalloc(sizeof(struct trakunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct trakunit));
- pp = peer->procptr;
- pp->io.clock_recv = trak_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->polled = 0;
-
- /*
- * Start continuous time output. If something breaks, fold the
- * tent and go home.
- */
- if (write(pp->io.fd, C_CTO, sizeof(C_CTO)) != sizeof(C_CTO)) {
- refclock_report(peer, CEVNT_FAULT);
- (void) close(fd);
- free(up);
- return (0);
- }
- return (1);
-}
-
-
-/*
- * trak_shutdown - shut down the clock
- */
-static void
-trak_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct trakunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct trakunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * trak_receive - receive data from the serial interface
- */
-static void
-trak_receive(
- struct recvbuf *rbufp
- )
-{
- register struct trakunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- l_fp trtmp;
- char *dpt, *dpend;
- char qchar;
-#ifdef PPS
- struct ppsclockev ppsev;
- int request;
-#ifdef HAVE_CIOGETEV
- request = CIOGETEV;
-#endif
-#ifdef HAVE_TIOCGPPSEV
- request = TIOCGPPSEV;
-#endif
-#endif /* PPS */
-
- /*
- * Initialize pointers and read the timecode and timestamp. We
- * then chuck out everything, including runts, except one
- * message each poll interval.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct trakunit *)pp->unitptr;
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
- &pp->lastrec);
-
- /*
- * We get a buffer and timestamp following the '*' on-time
- * character. If a valid timestamp, we use that in place of the
- * buffer timestamp and edit out the timestamp for prettyprint
- * billboards.
- */
- dpt = pp->a_lastcode;
- dpend = dpt + pp->lencode;
- if (*dpt == '*' && buftvtots(dpt + 1, &trtmp)) {
- if (trtmp.l_i == pp->lastrec.l_i || trtmp.l_i ==
- pp->lastrec.l_i + 1) {
- pp->lastrec = trtmp;
- dpt += 9;
- while (dpt < dpend) {
- *(dpt - 8) = *dpt;
- ++dpt;
- }
- }
- }
- if (up->polled == 0) return;
- up->polled = 0;
-#ifndef PPS
- get_systime(&up->tstamp);
-#endif
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-#ifdef DEBUG
- if (debug)
- printf("trak: 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.
- */
- if (pp->lencode < LENTRAK) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Timecode format: "*RQTS U,ddd:hh:mm:ss.0,q"
- */
- if (sscanf(pp->a_lastcode, "*RQTS U,%3d:%2d:%2d:%2d.0,%c",
- &pp->day, &pp->hour, &pp->minute, &pp->second, &qchar) != 5) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Decode quality and leap characters. If unsynchronized, set
- * the leap bits accordingly and exit.
- */
- if (qchar == '0') {
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
-#ifdef PPS
- if(ioctl(fdpps,request,(caddr_t) &ppsev) >=0) {
- ppsev.tv.tv_sec += (u_int32) JAN_1970;
- TVTOTS(&ppsev.tv,&up->tstamp);
- }
-#endif /* PPS */
- /* record the last ppsclock event time stamp */
- pp->lastrec = up->tstamp;
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
-}
-
-
-/*
- * trak_poll - called by the transmit procedure
- */
-static void
-trak_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct trakunit *up;
- struct refclockproc *pp;
-
- /*
- * We don't really do anything here, except arm the receiving
- * side to capture a sample and check for timeouts.
- */
- pp = peer->procptr;
- up = (struct trakunit *)pp->unitptr;
- if (up->polled)
- refclock_report(peer, CEVNT_TIMEOUT);
- pp->polls++;
- up->polled = 1;
-}
-
-#else
-int refclock_trak_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_true.c b/contrib/ntp/ntpd/refclock_true.c
deleted file mode 100644
index dd355d9..0000000
--- a/contrib/ntp/ntpd/refclock_true.c
+++ /dev/null
@@ -1,873 +0,0 @@
-/*
- * refclock_true - clock driver for the Kinemetrics Truetime receivers
- * Receiver Version 3.0C - tested plain, with CLKLDISC
- * Developement work being done:
- * - Properly handle varying satellite positions (more acurately)
- * - Integrate GPSTM and/or OMEGA and/or TRAK and/or ??? drivers
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_TRUETIME)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/* This should be an atom clock but those are very hard to build.
- *
- * The PCL720 from P C Labs has an Intel 8253 lookalike, 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 uSecs since the last PPS upward swing, 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.)
- */
-#ifdef CLOCK_PPS720
-# undef min /* XXX */
-# undef max /* XXX */
-# include <machine/inline.h>
-# include <sys/pcl720.h>
-# include <sys/i8253.h>
-# define PCL720_IOB 0x2a0 /* XXX */
-# define PCL720_CTR 0 /* XXX */
-#endif
-
-/*
- * Support for Kinemetrics Truetime Receivers
- * GOES
- * GPS/TM-TMD
- * 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: getting stale ("OMEGA")
- *
- * Most of this code is originally from refclock_wwvb.c with thanks.
- * It has been so mangled that wwvb is not a recognizable ancestor.
- *
- * Timcode format: ADDD:HH:MM:SSQCL
- * 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
- * 468-DC GOES Receiver:
- * GPS-TM/TMD Receiver: (default quality codes for XL-DC)
- * ? +/- 1 milliseconds # +/- 100 microseconds
- * * +/- 10 microseconds . +/- 1 microsecond
- * space less than 1 microsecond
- * OM-DC OMEGA Receiver: (default quality codes for OMEGA)
- * WARNING OMEGA navigation system is no longer existent
- * > >+- 5 seconds
- * ? >+/- 500 milliseconds # >+/- 50 milliseconds
- * * >+/- 5 milliseconds . >+/- 1 millisecond
- * A-H less than 1 millisecond. Character indicates which station
- * is being received as follows:
- * A = Norway, B = Liberia, C = Hawaii, D = North Dakota,
- * E = La Reunion, F = Argentina, G = Australia, H = Japan.
- *
- * The carriage return start bit begins on 0 seconds and extends to 1 bit time.
- *
- * Notes on 468-DC and OMEGA receiver:
- *
- * Send the clock a 'R' or 'C' and once per second a timestamp will
- * appear. Send a 'P' to get the satellite position once (GOES only.)
- *
- * Notes on the 468-DC receiver:
- *
- * 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
- *
- * fudge 127.127.5.0 time1 +0.008 time2 -0.004
- *
- * This corrects the 4 milliseconds advance and 8 milliseconds retard
- * needed. The software will ask the clock which satellite it sees.
- *
- * Ntp.conf parameters:
- * time1 - offset applied to samples when reading WEST satellite (default = 0)
- * time2 - offset applied to samples when reading EAST satellite (default = 0)
- * val1 - stratum to assign to this clock (default = 0)
- * val2 - refid assigned to this clock (default = "TRUE", see below)
- * flag1 - will silence the clock side of ntpd, just reading the clock
- * without trying to write to it. (default = 0)
- * flag2 - generate a debug file /tmp/true%d.
- * flag3 - enable ppsclock streams module
- * flag4 - use the PCL-720 (BSD/OS only)
- */
-
-
-/*
- * Definitions
- */
-#define DEVICE "/dev/true%d"
-#define SPEED232 B9600 /* 9600 baud */
-
-/*
- * Radio interface parameters
- */
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "TRUE" /* reference id */
-#define DESCRIPTION "Kinemetrics/TrueTime Receiver"
-
-/*
- * Tags which station (satellite) we see
- */
-#define GOES_WEST 0 /* Default to WEST satellite and apply time1 */
-#define GOES_EAST 1 /* until you discover otherwise */
-
-/*
- * used by the state machine
- */
-enum true_event {e_Init, e_Huh, e_F18, e_F50, e_F51, e_Satellite,
- e_Poll, e_Location, e_TS, e_Max};
-const char *events[] = {"Init", "Huh", "F18", "F50", "F51", "Satellite",
- "Poll", "Location", "TS"};
-#define eventStr(x) (((int)x<(int)e_Max) ? events[(int)x] : "?")
-
-enum true_state {s_Base, s_InqTM, s_InqTCU, s_InqOmega, s_InqGOES,
- s_Init, s_F18, s_F50, s_Start, s_Auto, s_Max};
-const char *states[] = {"Base", "InqTM", "InqTCU", "InqOmega", "InqGOES",
- "Init", "F18", "F50", "Start", "Auto"};
-#define stateStr(x) (((int)x<(int)s_Max) ? states[(int)x] : "?")
-
-enum true_type {t_unknown, t_goes, t_tm, t_tcu, t_omega, t_Max};
-const char *types[] = {"unknown", "goes", "tm", "tcu", "omega"};
-#define typeStr(x) (((int)x<(int)t_Max) ? types[(int)x] : "?")
-
-/*
- * unit control structure
- */
-struct true_unit {
- unsigned int pollcnt; /* poll message counter */
- unsigned int station; /* which station we are on */
- unsigned int polled; /* Hand in a time sample? */
- enum true_state state; /* state machine */
- enum true_type type; /* what kind of clock is it? */
- int unit; /* save an extra copy of this */
- FILE *debug; /* debug logging file */
-#ifdef CLOCK_PPS720
- int pcl720init; /* init flag for PCL 720 */
-#endif
-};
-
-/*
- * Function prototypes
- */
-static int true_start P((int, struct peer *));
-static void true_shutdown P((int, struct peer *));
-static void true_receive P((struct recvbuf *));
-static void true_poll P((int, struct peer *));
-static void true_send P((struct peer *, const char *));
-static void true_doevent P((struct peer *, enum true_event));
-
-#ifdef CLOCK_PPS720
-static u_long true_sample720 P((void));
-#endif
-
-/*
- * Transfer vector
- */
-struct refclock refclock_true = {
- true_start, /* start up driver */
- true_shutdown, /* shut down driver */
- true_poll, /* transmit poll message */
- noentry, /* not used (old true_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old true_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-#if !defined(__STDC__)
-# define true_debug (void)
-#else
-static void
-true_debug(struct peer *peer, const char *fmt, ...)
-{
- va_list ap;
- int want_debugging, now_debugging;
- struct refclockproc *pp;
- struct true_unit *up;
-
- va_start(ap, fmt);
- pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
-
- want_debugging = (pp->sloppyclockflag & CLK_FLAG2) != 0;
- now_debugging = (up->debug != NULL);
- if (want_debugging != now_debugging)
- {
- if (want_debugging) {
- char filename[40];
- int fd;
-
- snprintf(filename, sizeof(filename), "/tmp/true%d.debug", up->unit);
- fd = open(filename, O_CREAT | O_WRONLY | O_EXCL, 0600);
- if (fd >= 0 && (up->debug = fdopen(fd, "r+"))) {
-#ifdef HAVE_SETVBUF
- static char buf[BUFSIZ];
- setvbuf(up->debug, buf, _IOLBF, BUFSIZ);
-#else
- setlinebuf(up->debug);
-#endif
- }
- } else {
- fclose(up->debug);
- up->debug = NULL;
- }
- }
-
- if (up->debug) {
- fprintf(up->debug, "true%d: ", up->unit);
- vfprintf(up->debug, fmt, ap);
- }
-}
-#endif /*STDC*/
-
-/*
- * true_start - open the devices and initialize data for processing
- */
-static int
-true_start(
- int unit,
- struct peer *peer
- )
-{
- register struct true_unit *up;
- struct refclockproc *pp;
- char device[40];
- int fd;
-
- /*
- * Open serial port
- */
- (void)snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct true_unit *)
- emalloc(sizeof(struct true_unit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct true_unit));
- pp = peer->procptr;
- pp->io.clock_recv = true_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->pollcnt = 2;
- up->type = t_unknown;
- up->state = s_Base;
- true_doevent(peer, e_Init);
- return (1);
-}
-
-/*
- * true_shutdown - shut down the clock
- */
-static void
-true_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct true_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * true_receive - receive data from the serial interface on a clock
- */
-static void
-true_receive(
- struct recvbuf *rbufp
- )
-{
- register struct true_unit *up;
- struct refclockproc *pp;
- struct peer *peer;
- u_short new_station;
- char synced;
- int i;
- int lat, lon, off; /* GOES Satellite position */
- /* Use these variable to hold data until we decide its worth keeping */
- char rd_lastcode[BMAX];
- l_fp rd_tmp;
- u_short rd_lencode;
-
- /*
- * Get the clock this applies to and pointers to the data.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
-
- /*
- * Read clock output. Automatically handles STREAMS, CLKLDISC.
- */
- rd_lencode = refclock_gtlin(rbufp, rd_lastcode, BMAX, &rd_tmp);
- rd_lastcode[rd_lencode] = '\0';
-
- /*
- * There is a case where <cr><lf> generates 2 timestamps.
- */
- if (rd_lencode == 0)
- return;
- pp->lencode = rd_lencode;
- strcpy(pp->a_lastcode, rd_lastcode);
- pp->lastrec = rd_tmp;
- true_debug(peer, "receive(%s) [%d]\n", pp->a_lastcode, pp->lencode);
-
- up->pollcnt = 2;
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
- /*
- * We get down to business, check the timecode format and decode
- * its contents. This code decodes a multitude of different
- * clock messages. Timecodes are processed if needed. All replies
- * will be run through the state machine to tweak driver options
- * and program the clock.
- */
-
- /*
- * Clock misunderstood our last command?
- */
- if (pp->a_lastcode[0] == '?' ||
- strcmp(pp->a_lastcode, "ERROR 05 NO SUCH FUNCTION") == 0) {
- true_doevent(peer, e_Huh);
- return;
- }
-
- /*
- * Timecode: "nnnnn+nnn-nnn"
- * (from GOES clock when asked about satellite position)
- */
- if ((pp->a_lastcode[5] == '+' || pp->a_lastcode[5] == '-') &&
- (pp->a_lastcode[9] == '+' || pp->a_lastcode[9] == '-') &&
- sscanf(pp->a_lastcode, "%5d%*c%3d%*c%3d", &lon, &lat, &off) == 3
- ) {
- const char *label = "Botch!";
-
- /*
- * This is less than perfect. Call the (satellite)
- * either EAST or WEST and adjust slop accodingly
- * Perfectionists would recalculate the exact delay
- * and adjust accordingly...
- */
- if (lon > 7000 && lon < 14000) {
- if (lon < 10000) {
- new_station = GOES_EAST;
- label = "EAST";
- } else {
- new_station = GOES_WEST;
- label = "WEST";
- }
-
- if (new_station != up->station) {
- double dtemp;
-
- dtemp = pp->fudgetime1;
- pp->fudgetime1 = pp->fudgetime2;
- pp->fudgetime2 = dtemp;
- up->station = new_station;
- }
- }
- else {
- /*refclock_report(peer, CEVNT_BADREPLY);*/
- label = "UNKNOWN";
- }
- true_debug(peer, "GOES: station %s\n", label);
- true_doevent(peer, e_Satellite);
- return;
- }
-
- /*
- * Timecode: "Fnn"
- * (from TM/TMD clock when it wants to tell us what it's up to.)
- */
- if (sscanf(pp->a_lastcode, "F%2d", &i) == 1 && i > 0 && i < 80) {
- switch (i) {
- case 50:
- true_doevent(peer, e_F50);
- break;
- case 51:
- true_doevent(peer, e_F51);
- break;
- default:
- true_debug(peer, "got F%02d - ignoring\n", i);
- break;
- }
- return;
- }
-
- /*
- * Timecode: " TRUETIME Mk III" or " TRUETIME XL"
- * (from a TM/TMD/XL clock during initialization.)
- */
- if (strcmp(pp->a_lastcode, " TRUETIME Mk III") == 0 ||
- strncmp(pp->a_lastcode, " TRUETIME XL", 12) == 0) {
- true_doevent(peer, e_F18);
- NLOG(NLOG_CLOCKSTATUS) {
- msyslog(LOG_INFO, "TM/TMD/XL: %s", pp->a_lastcode);
- }
- return;
- }
-
- /*
- * Timecode: "N03726428W12209421+000033"
- * 1 2
- * 0123456789012345678901234
- * (from a TCU during initialization)
- */
- if ((pp->a_lastcode[0] == 'N' || pp->a_lastcode[0] == 'S') &&
- (pp->a_lastcode[9] == 'W' || pp->a_lastcode[9] == 'E') &&
- pp->a_lastcode[18] == '+') {
- true_doevent(peer, e_Location);
- NLOG(NLOG_CLOCKSTATUS) {
- msyslog(LOG_INFO, "TCU-800: %s", pp->a_lastcode);
- }
- return;
- }
- /*
- * Timecode: "ddd:hh:mm:ssQ"
- * (from all clocks supported by this driver.)
- */
- if (pp->a_lastcode[3] == ':' &&
- pp->a_lastcode[6] == ':' &&
- pp->a_lastcode[9] == ':' &&
- sscanf(pp->a_lastcode, "%3d:%2d:%2d:%2d%c",
- &pp->day, &pp->hour, &pp->minute,
- &pp->second, &synced) == 5) {
-
- /*
- * Adjust the synchronize indicator according to timecode
- * say were OK, and then say not if we really are not OK
- */
- if (synced == '>' || synced == '#' || synced == '?')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
-
- true_doevent(peer, e_TS);
-
-#ifdef CLOCK_PPS720
- /* If it's taken more than 65ms to get here, we'll lose. */
- if ((pp->sloppyclockflag & CLK_FLAG4) && up->pcl720init) {
- l_fp off;
-
-#ifdef CLOCK_ATOM
- /*
- * find out what time it really is. Include
- * the count from the PCL720
- */
- if (!clocktime(pp->day, pp->hour, pp->minute,
- pp->second, GMT, pp->lastrec.l_ui,
- &pp->yearstart, &off.l_ui)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- off.l_uf = 0;
-#endif
-
- pp->usec = true_sample720();
-#ifdef CLOCK_ATOM
- TVUTOTSF(pp->usec, off.l_uf);
-#endif
-
- /*
- * Stomp all over the timestamp that was pulled out
- * of the input stream. It's irrelevant since we've
- * adjusted the input time to reflect now (via pp->usec)
- * rather than when the data was collected.
- */
- get_systime(&pp->lastrec);
-#ifdef CLOCK_ATOM
- /*
- * Create a true offset for feeding to pps_sample()
- */
- L_SUB(&off, &pp->lastrec);
-
- pps_sample(peer, &off);
-#endif
- true_debug(peer, "true_sample720: %luus\n", pp->usec);
- }
-#endif
-
- /*
- * 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)
- return;
-
- true_doevent(peer, e_Poll);
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- /*
- * If clock is good we send a NOMINAL message so that
- * any previous BAD messages are nullified
- */
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- refclock_report(peer, CEVNT_NOMINAL);
-
- /*
- * We have succedded in answering the poll.
- * Turn off the flag and return
- */
- up->polled = 0;
-
- return;
- }
-
- /*
- * No match to known timecodes, report failure and return
- */
- refclock_report(peer, CEVNT_BADREPLY);
- return;
-}
-
-
-/*
- * true_send - time to send the clock a signal to cough up a time sample
- */
-static void
-true_send(
- struct peer *peer,
- const char *cmd
- )
-{
- struct refclockproc *pp;
-
- pp = peer->procptr;
- if (!(pp->sloppyclockflag & CLK_FLAG1)) {
- register int len = strlen(cmd);
-
- true_debug(peer, "Send '%s'\n", cmd);
- if (write(pp->io.fd, cmd, (unsigned)len) != len)
- refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
- }
-}
-
-
-/*
- * state machine for initializing and controlling a clock
- */
-static void
-true_doevent(
- struct peer *peer,
- enum true_event event
- )
-{
- struct true_unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
- if (event != e_TS) {
- NLOG(NLOG_CLOCKSTATUS) {
- msyslog(LOG_INFO, "TRUE: clock %s, state %s, event %s",
- typeStr(up->type),
- stateStr(up->state),
- eventStr(event));
- }
- }
- true_debug(peer, "clock %s, state %s, event %s\n",
- typeStr(up->type), stateStr(up->state), eventStr(event));
- switch (up->type) {
- case t_goes:
- switch (event) {
- case e_Init: /* FALLTHROUGH */
- case e_Satellite:
- /*
- * Switch back to on-second time codes and return.
- */
- true_send(peer, "C");
- up->state = s_Start;
- break;
- case e_Poll:
- /*
- * After each poll, check the station (satellite).
- */
- true_send(peer, "P");
- /* No state change needed. */
- break;
- default:
- break;
- }
- /* FALLTHROUGH */
- case t_omega:
- switch (event) {
- case e_Init:
- true_send(peer, "C");
- up->state = s_Start;
- break;
- case e_TS:
- if (up->state != s_Start && up->state != s_Auto) {
- true_send(peer, "\03\r");
- break;
- }
- up->state = s_Auto;
- break;
- default:
- break;
- }
- break;
- case t_tm:
- switch (event) {
- case e_Init:
- true_send(peer, "F18\r");
- up->state = s_Init;
- break;
- case e_F18:
- true_send(peer, "F50\r");
- up->state = s_F18;
- break;
- case e_F50:
- true_send(peer, "F51\r");
- up->state = s_F50;
- break;
- case e_F51:
- true_send(peer, "F08\r");
- up->state = s_Start;
- break;
- case e_TS:
- if (up->state != s_Start && up->state != s_Auto) {
- true_send(peer, "\03\r");
- break;
- }
- up->state = s_Auto;
- break;
- default:
- break;
- }
- break;
- case t_tcu:
- switch (event) {
- case e_Init:
- true_send(peer, "MD3\r"); /* GPS Synch'd Gen. */
- true_send(peer, "TSU\r"); /* UTC, not GPS. */
- true_send(peer, "AU\r"); /* Auto Timestamps. */
- up->state = s_Start;
- break;
- case e_TS:
- if (up->state != s_Start && up->state != s_Auto) {
- true_send(peer, "\03\r");
- break;
- }
- up->state = s_Auto;
- break;
- default:
- break;
- }
- break;
- case t_unknown:
- switch (up->state) {
- case s_Base:
- if (event != e_Init)
- abort();
- true_send(peer, "P\r");
- up->state = s_InqGOES;
- break;
- case s_InqGOES:
- switch (event) {
- case e_Satellite:
- up->type = t_goes;
- true_doevent(peer, e_Init);
- break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh: /*FALLTHROUGH*/
- case e_TS:
- up->state = s_InqOmega;
- true_send(peer, "C\r");
- break;
- default:
- abort();
- }
- break;
- case s_InqOmega:
- switch (event) {
- case e_TS:
- up->type = t_omega;
- up->state = s_Auto; /* Inq side-effect. */
- break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh:
- up->state = s_InqTM;
- true_send(peer, "F18\r");
- break;
- default:
- abort();
- }
- break;
- case s_InqTM:
- switch (event) {
- case e_F18:
- up->type = t_tm;
- true_doevent(peer, e_Init);
- break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh:
- true_send(peer, "PO\r");
- up->state = s_InqTCU;
- break;
- default:
- abort();
- }
- break;
- case s_InqTCU:
- switch (event) {
- case e_Location:
- up->type = t_tcu;
- true_doevent(peer, e_Init);
- break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh:
- up->state = s_Base;
- sleep(1); /* XXX */
- break;
- default:
- abort();
- }
- break;
- /*
- * An expedient hack to prevent lint complaints,
- * these don't actually need to be used here...
- */
- case s_Init:
- case s_F18:
- case s_F50:
- case s_Start:
- case s_Auto:
- case s_Max:
- msyslog(LOG_INFO, "TRUE: state %s is unexpected!", stateStr(up->state));
- }
- break;
- default:
- abort();
- /* NOTREACHED */
- }
-
-#ifdef CLOCK_PPS720
- if ((pp->sloppyclockflag & CLK_FLAG4) && !up->pcl720init) {
- /* Make counter trigger on gate0, count down from 65535. */
- pcl720_load(PCL720_IOB, PCL720_CTR, i8253_oneshot, 65535);
- /*
- * (These constants are OK since
- * they represent hardware maximums.)
- */
- NLOG(NLOG_CLOCKINFO) {
- msyslog(LOG_NOTICE, "PCL-720 initialized");
- }
- up->pcl720init++;
- }
-#endif
-
-
-}
-
-/*
- * true_poll - called by the transmit procedure
- */
-static void
-true_poll(
- int unit,
- struct peer *peer
- )
-{
- struct true_unit *up;
- struct refclockproc *pp;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
- pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
- if (up->pollcnt > 0)
- up->pollcnt--;
- else {
- true_doevent(peer, e_Init);
- refclock_report(peer, CEVNT_TIMEOUT);
- }
-
- /*
- * polled every 64 seconds. Ask true_receive to hand in a
- * timestamp.
- */
- up->polled = 1;
- pp->polls++;
-}
-
-#ifdef CLOCK_PPS720
-/*
- * true_sample720 - sample the PCL-720
- */
-static u_long
-true_sample720(void)
-{
- unsigned long f;
-
- /* We wire the PCL-720's 8253.OUT0 to bit 0 of connector 3.
- * If it is not being held low now, we did not get called
- * within 65535us.
- */
- if (inb(pcl720_data_16_23(PCL720_IOB)) & 0x01) {
- NLOG(NLOG_CLOCKINFO) {
- msyslog(LOG_NOTICE, "PCL-720 out of synch");
- }
- return (0);
- }
- f = (65536 - pcl720_read(PCL720_IOB, PCL720_CTR));
-#ifdef PPS720_DEBUG
- msyslog(LOG_DEBUG, "PCL-720: %luus", f);
-#endif
- return (f);
-}
-#endif
-
-#else
-int refclock_true_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_tt560.c b/contrib/ntp/ntpd/refclock_tt560.c
deleted file mode 100644
index f3d7bc1..0000000
--- a/contrib/ntp/ntpd/refclock_tt560.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * refclock_tt560 - clock driver for the TrueTime 560 IRIG-B decoder
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_TT560)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "sys/tt560_api.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * This driver supports the TrueTime 560 IRIG-B decoder for the PCI bus.
- */
-
-/*
- * TT560 interface definitions
- */
-#define DEVICE "/dev/tt560%d" /* device name and unit */
-#define PRECISION (-20) /* precision assumed (1 us) */
-#define REFID "IRIG" /* reference ID */
-#define DESCRIPTION "TrueTime 560 IRIG-B PCI Decoder"
-
-/*
- * Unit control structure
- */
-struct tt560unit {
- tt_mem_space_t *tt_mem; /* mapped address of PCI board */
- time_freeze_reg_t tt560rawt; /* data returned from PCI board */
-};
-
-typedef union byteswap_u
-{
- unsigned int long_word;
- unsigned char byte[4];
-} byteswap_t;
-
-/*
- * Function prototypes
- */
-static int tt560_start P((int, struct peer *));
-static void tt560_shutdown P((int, struct peer *));
-static void tt560_poll P((int unit, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_tt560 = {
- tt560_start, /* clock_start */
- tt560_shutdown, /* clock_shutdown */
- tt560_poll, /* clock_poll */
- noentry, /* clock_control (not used) */
- noentry, /* clock_init (not used) */
- noentry, /* clock_buginfo (not used) */
- NOFLAGS /* clock_flags (not used) */
-};
-
-
-/*
- * tt560_start - open the TT560 device and initialize data for processing
- */
-static int
-tt560_start(
- int unit,
- struct peer *peer
- )
-{
- register struct tt560unit *up;
- struct refclockproc *pp;
- char device[20];
- int fd;
- caddr_t membase;
-
- /*
- * Open TT560 device
- */
- (void)sprintf(device, DEVICE, unit);
- fd = open(device, O_RDWR);
- if (fd == -1) {
- msyslog(LOG_ERR, "tt560_start: open of %s: %m", device);
- return (0);
- }
-
- /*
- * Map the device registers into user space.
- */
- membase = mmap ((caddr_t) 0, TTIME_MEMORY_SIZE,
- PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, (off_t)0);
-
- if (membase == (caddr_t) -1) {
- msyslog(LOG_ERR, "tt560_start: mapping of %s: %m", device);
- (void) close(fd);
- return (0);
- }
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct tt560unit *) emalloc(sizeof(struct tt560unit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct tt560unit));
- up->tt_mem = (tt_mem_space_t *)membase;
- pp = peer->procptr;
- pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous peer variables
- */
- peer->precision = PRECISION;
- peer->burst = NSTAGE;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- return (1);
-}
-
-
-/*
- * tt560_shutdown - shut down the clock
- */
-static void
-tt560_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct tt560unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct tt560unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * tt560_poll - called by the transmit procedure
- */
-static void
-tt560_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct tt560unit *up;
- struct refclockproc *pp;
- time_freeze_reg_t *tp;
- tt_mem_space_t *mp;
-
- int i;
- unsigned int *p_time_t, *tt_mem_t;
-
- /*
- * This is the main routine. It snatches the time from the TT560
- * board and tacks on a local timestamp.
- */
- pp = peer->procptr;
- up = (struct tt560unit *)pp->unitptr;
- mp = up->tt_mem;
- tp = &up->tt560rawt;
-
- p_time_t = (unsigned int *)tp;
- tt_mem_t = (unsigned int *)&mp->time_freeze_reg;
-
- *tt_mem_t = 0; /* update the time freeze register */
- /* and copy time stamp to memory */
- for (i=0; i < TIME_FREEZE_REG_LEN; i++) {
- *p_time_t = byte_swap(*tt_mem_t);
- p_time_t++;
- tt_mem_t++;
- }
-
- get_systime(&pp->lastrec);
- pp->polls++;
-
- /*
- * 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. Note: we
- * 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.
- */
- sprintf(pp->a_lastcode,
- "%1x%1x%1x %1x%1x:%1x%1x:%1x%1x.%1x%1x%1x%1x%1x%1x %1x",
- tp->hun_day, tp->tens_day, tp->unit_day,
- tp->tens_hour, tp->unit_hour,
- tp->tens_min, tp->unit_min,
- tp->tens_sec, tp->unit_sec,
- tp->hun_ms, tp->tens_ms, tp->unit_ms,
- tp->hun_us, tp->tens_us, tp->unit_us,
- tp->status);
- pp->lencode = strlen(pp->a_lastcode);
-#ifdef DEBUG
- if (debug)
- printf("tt560: time %s timecode %d %s\n",
- ulfptoa(&pp->lastrec, 6), pp->lencode,
- pp->a_lastcode);
-#endif
- if (sscanf(pp->a_lastcode, "%3d %2d:%2d:%2d.%6ld",
- &pp->day, &pp->hour, &pp->minute, &pp->second, &pp->usec)
- != 5) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- if ((tp->status & 0x6) != 0x6)
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
- 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;
-}
-
-/******************************************************************
- *
- * byte_swap
- *
- * Inputs: 32 bit integer
- *
- * Output: byte swapped 32 bit integer.
- *
- * This routine is used to compensate for the byte alignment
- * differences between big-endian and little-endian integers.
- *
- ******************************************************************/
-static unsigned int
-byte_swap(unsigned int input_num)
-{
- byteswap_t byte_swap;
- unsigned char temp;
-
- byte_swap.long_word = input_num;
-
- temp = byte_swap.byte[3];
- byte_swap.byte[3] = byte_swap.byte[0];
- byte_swap.byte[0] = temp;
-
- temp = byte_swap.byte[2];
- byte_swap.byte[2] = byte_swap.byte[1];
- byte_swap.byte[1] = temp;
-
- return (byte_swap.long_word);
-}
-
-#else
-int refclock_tt560_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_ulink.c b/contrib/ntp/ntpd/refclock_ulink.c
deleted file mode 100644
index 1f5e78a..0000000
--- a/contrib/ntp/ntpd/refclock_ulink.c
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * refclock_ulink - clock driver for Ultralink WWVB receiver
- *
- */
-
-/***********************************************************************
- * *
- * Copyright (c) David L. Mills 1992-1998 *
- * *
- * 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 "as is" without express or implied *
- * warranty. *
- **********************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_ULINK)
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-/*
- * This driver supports ultralink Model 320,330,331,332 WWVB radios
- *
- * this driver was based on the refclock_wwvb.c driver
- * in the ntp distribution.
- *
- * Fudge Factors
- *
- * fudge flag1 0 don't poll clock
- * 1 send poll character
- *
- * revision history:
- * 99/9/09 j.c.lang original edit's
- * 99/9/11 j.c.lang changed timecode parse to
- * match what the radio actually
- * sends.
- * 99/10/11 j.c.lang added support for continous
- * time code mode (dipsw2)
- * 99/11/26 j.c.lang added support for 320 decoder
- * (taken from Dave Strout's
- * Model 320 driver)
- * 99/11/29 j.c.lang added fudge flag 1 to control
- * clock polling
- * 99/12/15 j.c.lang fixed 320 quality flag
- * 01/02/21 s.l.smith fixed 33x quality flag
- * added more debugging stuff
- * updated 33x time code explanation
- *
- * Questions, bugs, ideas send to:
- * Joseph C. Lang
- * tcnojl1@earthlink.net
- *
- * Dave Strout
- * dstrout@linuxfoundry.com
- *
- *
- * on the Ultralink model 33X decoder Dip switch 2 controls
- * polled or continous timecode
- * set fudge flag1 if using polled (needed for model 320)
- * dont set fudge flag1 if dip switch 2 is set on model 33x decoder
-*/
-
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/wwvb%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-10) /* precision assumed (about 10 ms) */
-#define REFID "WWVB" /* reference ID */
-#define DESCRIPTION "Ultralink WWVB Receiver" /* WRU */
-
-#define LEN33X 32 /* timecode length Model 325 & 33X */
-#define LEN320 24 /* timecode length Model 320 */
-
-/*
- * unit control structure
- */
-struct ulinkunit {
- u_char tcswitch; /* timecode switch */
- l_fp laststamp; /* last receive timestamp */
-};
-
-/*
- * Function prototypes
- */
-static int ulink_start P((int, struct peer *));
-static void ulink_shutdown P((int, struct peer *));
-static void ulink_receive P((struct recvbuf *));
-static void ulink_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_ulink = {
- ulink_start, /* start up driver */
- ulink_shutdown, /* shut down driver */
- ulink_poll, /* transmit poll message */
- noentry, /* not used */
- noentry, /* not used */
- noentry, /* not used */
- NOFLAGS
-};
-
-
-/*
- * ulink_start - open the devices and initialize data for processing
- */
-static int
-ulink_start(
- int unit,
- struct peer *peer
- )
-{
- register struct ulinkunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct ulinkunit *)
- emalloc(sizeof(struct ulinkunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct ulinkunit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = ulink_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- peer->burst = NSTAGE;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- return (1);
-}
-
-
-/*
- * ulink_shutdown - shut down the clock
- */
-static void
-ulink_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct ulinkunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct ulinkunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * ulink_receive - receive data from the serial interface
- */
-static void
-ulink_receive(
- struct recvbuf *rbufp
- )
-{
- struct ulinkunit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- l_fp trtmp; /* arrival timestamp */
- int quality; /* quality indicator */
- int temp; /* int temp */
- char syncchar; /* synchronization indicator */
- char leapchar; /* leap indicator */
- char modechar; /* model 320 mode flag */
- char char_quality[2]; /* temp quality flag */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct ulinkunit *)pp->unitptr;
- temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-
- /*
- * Note we get a buffer and timestamp for both a <cr> and <lf>,
- * but only the <cr> timestamp is retained.
- */
- if (temp == 0) {
- if (up->tcswitch == 0) {
- up->tcswitch = 1;
- up->laststamp = trtmp;
- } else
- up->tcswitch = 0;
- return;
- }
- pp->lencode = temp;
- pp->lastrec = up->laststamp;
- up->laststamp = trtmp;
- up->tcswitch = 1;
-#ifdef DEBUG
- if (debug)
- printf("ulink: 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.
- */
- syncchar = leapchar = modechar = ' ';
- switch (pp->lencode ) {
- case LEN33X:
- /*
- * Model 33X decoder:
- * Timecode format from January 29, 2001 datasheet is:
- * <CR><LF>S9+D 00 YYYY+DDDUTCS HH:MM:SSL+5
- * S WWVB decoder sync indicator. S for in-sync(?)
- * or N for noisy signal.
- * 9+ RF signal level in S-units, 0-9 followed by
- * a space (0x20). The space turns to '+' if the
- * level is over 9.
- * D Data bit 0, 1, 2 (position mark), or
- * 3 (unknown).
- * space Space character (0x20)
- * 00 Hours since last good WWVB frame sync. Will
- * be 00-23 hrs, or '1d' to '7d'. Will be 'Lk'
- * if currently in sync.
- * space Space character (0x20)
- * YYYY Current year, 1990-2089
- * + Leap year indicator. '+' if a leap year,
- * a space (0x20) if not.
- * DDD Day of year, 001 - 366.
- * UTC Timezone (always 'UTC').
- * S Daylight savings indicator
- * S - standard time (STD) in effect
- * O - during STD to DST day 0000-2400
- * D - daylight savings time (DST) in effect
- * I - during DST to STD day 0000-2400
- * space Space character (0x20)
- * HH Hours 00-23
- * : This is the REAL in sync indicator (: = insync)
- * MM Minutes 00-59
- * : : = in sync ? = NOT in sync
- * SS Seconds 00-59
- * L Leap second flag. Changes from space (0x20)
- * to '+' or '-' during month preceding leap
- * second adjustment.
- * +5 UT1 correction (sign + digit ))
- */
-
- if (sscanf(pp->a_lastcode,
- "%*4c %2c %4d%*c%3d%*4c %2d%c%2d:%2d%c%*2c",
- char_quality, &pp->year, &pp->day,
- &pp->hour, &syncchar, &pp->minute, &pp->second,
- &leapchar) == 8) {
-
- if (char_quality[0] == 'L') {
- quality = 0;
- } else if (char_quality[0] == '0') {
- quality = (char_quality[1] & 0x0f);
- } else {
- quality = 99;
- }
-
-/*
-#ifdef DEBUG
- if (debug) {
- printf("ulink: char_quality %c %c\n",
- char_quality[0], char_quality[1]);
- printf("ulink: quality %d\n", quality);
- printf("ulink: syncchar %x\n", syncchar);
- printf("ulink: leapchar %x\n", leapchar);
- }
-#endif
-*/
-
- break;
- }
-
- case LEN320:
- /*
- * Model 320 Decoder
- * The timecode format is:
- *
- * <cr><lf>SQRYYYYDDD+HH:MM:SS.mmLT<cr>
- *
- * where:
- *
- * S = 'S' -- sync'd in last hour,
- * '0'-'9' - hours x 10 since last update,
- * '?' -- not in sync
- * 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' = insert, 'D'= delete
- * T = DST <-> STD transition indicators
- *
- */
- 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->nsec, &leapchar) == 10) {
- pp->nsec *= 10000000; /* M320 returns 10's of msecs */
- if (leapchar == 'I' ) leapchar = '+';
- if (leapchar == 'D' ) leapchar = '-';
- if (syncchar != '?' ) syncchar = ':';
-
- break;
- }
-
- default:
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
-
- /*
- * Decode quality indicator
- * For the 325 & 33x series, the lower the number the "better"
- * the time is. I used the dispersion as the measure of time
- * quality. The quality indicator in the 320 is the number of
- * correlating time frames (the more the better)
- */
-
- /*
- * The spec sheet for the 325 & 33x series states the clock will
- * maintain +/-0.002 seconds accuracy when locked to WWVB. This
- * is indicated by 'Lk' in the quality portion of the incoming
- * string. When not in lock, a drift of +/-0.015 seconds should
- * be allowed for.
- * With the quality indicator decoding scheme above, the 'Lk'
- * condition will produce a quality value of 0. If the quality
- * indicator starts with '0' then the second character is the
- * number of hours since we were last locked. If the first
- * character is anything other than 'L' or '0' then we have been
- * out of lock for more than 9 hours so we assume the worst and
- * force a quality value that selects the 'default' maximum
- * dispersion. The dispersion values below are what came with the
- * driver. They're not unreasonable so they've not been changed.
- */
-
- if (pp->lencode == LEN33X) {
- switch (quality) {
- case 0 :
- pp->disp=.002;
- break;
- case 1 :
- pp->disp=.02;
- break;
- case 2 :
- pp->disp=.04;
- break;
- case 3 :
- pp->disp=.08;
- break;
- default:
- pp->disp=MAXDISPERSE;
- break;
- }
- } else {
- switch (quality) {
- case 5 :
- pp->disp=.002;
- break;
- case 4 :
- pp->disp=.02;
- break;
- case 3 :
- pp->disp=.04;
- break;
- case 2 :
- pp->disp=.08;
- break;
- case 1 :
- pp->disp=.16;
- break;
- default:
- pp->disp=MAXDISPERSE;
- break;
- }
-
- }
-
- /*
- * Decode synchronization, and leap characters. If
- * unsynchronized, set the leap bits accordingly and exit.
- * Otherwise, set the leap bits according to the leap character.
- */
-
- if (syncchar != ':')
- pp->leap = LEAP_NOTINSYNC;
- else if (leapchar == '+')
- pp->leap = LEAP_ADDSECOND;
- else if (leapchar == '-')
- pp->leap = LEAP_DELSECOND;
- else
- pp->leap = LEAP_NOWARNING;
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- }
-
-}
-
-
-/*
- * ulink_poll - called by the transmit procedure
- */
-static void
-ulink_poll(
- int unit,
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- char pollchar;
-
- pp = peer->procptr;
- pollchar = 'T';
- if (pp->sloppyclockflag & CLK_FLAG1) {
- if (write(pp->io.fd, &pollchar, 1) != 1)
- refclock_report(peer, CEVNT_FAULT);
- else
- pp->polls++;
- }
- else
- pp->polls++;
-
- if (peer->burst > 0)
- return;
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
- peer->burst = NSTAGE;
-
-}
-
-#else
-int refclock_ulink_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_usno.c b/contrib/ntp/ntpd/refclock_usno.c
deleted file mode 100644
index 057eef9..0000000
--- a/contrib/ntp/ntpd/refclock_usno.c
+++ /dev/null
@@ -1,674 +0,0 @@
-/*
- * refclock_usno - clock driver for the Naval Observatory dialup
- * Michael Shields <shields@tembel.org> 1995/02/25
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_USNO)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-#include "ntp_control.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
-/*
- * This driver supports the Naval Observatory dialup at +1 202 653 0351.
- * It is a hacked-up version of the ACTS driver.
- *
- * This driver does not support the `phone' configuration because that
- * is needlessly global; it would clash with the ACTS driver.
- *
- * The Naval Observatory does not support the echo-delay measurement scheme.
- *
- * However, this driver *does* support UUCP port locking, allowing the
- * line to be shared with other processes when not actually dialing
- * for time.
- */
-
-/*
- * Interface definitions
- */
-
-#define DEVICE "/dev/cua%d" /* device name and unit */
-#define LOCKFILE "/var/lock/LCK..cua%d"
-/* #define LOCKFILE "/usr/spool/uucp/LCK..cua%d" */
-
-#define PHONE "atdt 202 653 0351"
-/* #define PHONE "atdt 1 202 653 0351" */
-
-#define SPEED232 B1200 /* uart speed (1200 cowardly baud) */
-#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define REFID "USNO" /* reference ID */
-#define DESCRIPTION "Naval Observatory dialup"
-
-#define MODE_AUTO 0 /* automatic mode */
-#define MODE_BACKUP 1 /* backup mode */
-#define MODE_MANUAL 2 /* manual mode */
-
-#define MSGCNT 10 /* we need this many time messages */
-#define SMAX 80 /* max token string length */
-#define LENCODE 20 /* length of valid timecode string */
-#define USNO_MINPOLL 10 /* log2 min poll interval (1024 s) */
-#define USNO_MAXPOLL 14 /* log2 max poll interval (16384 s) */
-#define MAXOUTAGE 3600 /* max before USNO kicks in (s) */
-
-/*
- * Modem control strings. These may have to be changed for some modems.
- *
- * AT command prefix
- * B1 initiate call negotiation using Bell 212A
- * &C1 enable carrier detect
- * &D2 hang up and return to command mode on DTR transition
- * E0 modem command echo disabled
- * l1 set modem speaker volume to low level
- * M1 speaker enabled untill carrier detect
- * Q0 return result codes
- * V1 return result codes as English words
- */
-#define MODEM_SETUP "ATB1&C1&D2E0L1M1Q0V1" /* modem setup */
-#define MODEM_HANGUP "ATH" /* modem disconnect */
-
-/*
- * Timeouts
- */
-#define IDLE 60 /* idle timeout (s) */
-#define WAIT 2 /* wait timeout (s) */
-#define ANSWER 30 /* answer timeout (s) */
-#define CONNECT 10 /* connect timeout (s) */
-#define TIMECODE (MSGCNT+16) /* timecode timeout (s) */
-
-/*
- * Unit control structure
- */
-struct usnounit {
- int pollcnt; /* poll message counter */
-
- int state; /* the first one was Delaware */
- int run; /* call program run switch */
- int msgcnt; /* count of time messages received */
- long redial; /* interval to next automatic call */
- int unit; /* unit number (= port) */
-};
-
-/*
- * Function prototypes
- */
-static int usno_start P((int, struct peer *));
-static void usno_shutdown P((int, struct peer *));
-static void usno_poll P((int, struct peer *));
-static void usno_disc P((struct peer *));
-#if 0
-static void usno_timeout P((struct peer *));
-static void usno_receive P((struct recvbuf *));
-static int usno_write P((struct peer *, const char *));
-#endif /* 0 */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_usno = {
- usno_start, /* start up driver */
- usno_shutdown, /* shut down driver */
- usno_poll, /* transmit poll message */
- noentry, /* not used (usno_control) */
- noentry, /* not used (usno_init) */
- noentry, /* not used (usno_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * usno_start - open the devices and initialize data for processing
- */
-static int
-usno_start(
- int unit,
- struct peer *peer
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
-
- /*
- * Initialize miscellaneous variables
- */
- pp = peer->procptr;
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- peer->minpoll = USNO_MINPOLL;
- peer->maxpoll = USNO_MAXPOLL;
- peer->sstclktype = CTL_SST_TS_TELEPHONE;
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct usnounit *)
- emalloc(sizeof(struct usnounit))))
- return (0);
- memset((char *)up, 0, sizeof(struct usnounit));
- up->unit = unit;
- pp->unitptr = (caddr_t)up;
-
- /*
- * Set up the driver timeout
- */
- peer->nextdate = current_time + WAIT;
- return (1);
-}
-
-
-/*
- * usno_shutdown - shut down the clock
- */
-static void
-usno_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
-
-#ifdef DEBUG
- if (debug)
- printf("usno: clock %s shutting down\n", ntoa(&peer->srcadr));
-#endif
- pp = peer->procptr;
- up = (struct usnounit *)pp->unitptr;
- usno_disc(peer);
- free(up);
-}
-
-
-#if 0
-/*
- * usno_receive - receive data from the serial interface
- */
-static void
-usno_receive(
- struct recvbuf *rbufp
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
- struct peer *peer;
- char str[SMAX];
- u_long mjd; /* Modified Julian Day */
- static int day, hour, minute, second;
-
- /*
- * Initialize pointers and read the timecode and timestamp. If
- * the OK modem status code, leave it where folks can find it.
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct usnounit *)pp->unitptr;
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
- &pp->lastrec);
- if (pp->lencode == 0) {
- if (strcmp(pp->a_lastcode, "OK") == 0)
- pp->lencode = 2;
- return;
- }
-#ifdef DEBUG
- if (debug)
- printf("usno: timecode %d %s\n", pp->lencode,
- pp->a_lastcode);
-#endif
-
- switch (up->state) {
-
- case 0:
-
- /*
- * State 0. We are not expecting anything. Probably
- * modem disconnect noise. Go back to sleep.
- */
- return;
-
- case 1:
-
- /*
- * State 1. We are about to dial. Just drop it.
- */
- return;
-
- case 2:
-
- /*
- * State 2. We are waiting for the call to be answered.
- * All we care about here is CONNECT as the first token
- * in the string. If the modem signals BUSY, ERROR, NO
- * ANSWER, NO CARRIER or NO DIALTONE, we immediately
- * hang up the phone. If CONNECT doesn't happen after
- * ANSWER seconds, hang up the phone. If everything is
- * okay, start the connect timeout and slide into state
- * 3.
- */
- (void)strncpy(str, strtok(pp->a_lastcode, " "), SMAX);
- if (strcmp(str, "BUSY") == 0 || strcmp(str, "ERROR") ==
- 0 || strcmp(str, "NO") == 0) {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s USNO modem status %s",
- ntoa(&peer->srcadr), pp->a_lastcode);
- usno_disc(peer);
- } else if (strcmp(str, "CONNECT") == 0) {
- peer->nextdate = current_time + CONNECT;
- up->msgcnt = 0;
- up->state++;
- } else {
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_WARNING,
- "clock %s USNO unknown modem status %s",
- ntoa(&peer->srcadr), pp->a_lastcode);
- }
- return;
-
- case 3:
-
- /*
- * State 3. The call has been answered and we are
- * waiting for the first message. If this doesn't
- * happen within the timecode timeout, hang up the
- * phone. We probably got a wrong number or they are
- * down.
- */
- peer->nextdate = current_time + TIMECODE;
- up->state++;
- return;
-
- case 4:
-
- /*
- * State 4. We are reading a timecode. It's an actual
- * timecode, or it's the `*' OTM.
- *
- * jjjjj nnn hhmmss UTC
- */
- if (pp->lencode == LENCODE) {
- if (sscanf(pp->a_lastcode, "%5ld %3d %2d%2d%2d UTC",
- &mjd, &day, &hour, &minute, &second) != 5) {
-#ifdef DEBUG
- if (debug)
- printf("usno: bad timecode format\n");
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- } else
- up->msgcnt++;
- return;
- } else if (pp->lencode != 1 || !up->msgcnt)
- return;
- /* else, OTM; drop out of switch */
- }
-
- pp->leap = LEAP_NOWARNING;
- pp->day = day;
- pp->hour = hour;
- pp->minute = minute;
- pp->second = second;
-
- /*
- * Colossal hack here. We process each sample in a trimmed-mean
- * filter and determine the reference clock offset and
- * dispersion. The fudge time1 value is added to each sample as
- * received.
- */
- if (!refclock_process(pp)) {
-#ifdef DEBUG
- if (debug)
- printf("usno: time rejected\n");
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- return;
- } else if (up->msgcnt < MSGCNT)
- return;
-
- /*
- * We have a filtered sample offset ready for peer processing.
- * 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. Finaly, we unhook the
- * timeout, arm for the next call, fold the tent and go home.
- */
- 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;
- usno_disc(peer);
-}
-#endif /* 0 */
-
-
-/*
- * usno_poll - called by the transmit routine
- */
-static void
-usno_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
-
- /*
- * If the driver is running, we set the enable flag (fudge
- * flag1), which causes the driver timeout routine to initiate a
- * call. If not, the enable flag can be set using
- * ntpdc. If this is the sustem peer, then follow the system
- * poll interval.
- */
- pp = peer->procptr;
- up = (struct usnounit *)pp->unitptr;
- if (up->run) {
- pp->sloppyclockflag |= CLK_FLAG1;
- if (peer == sys_peer)
- peer->hpoll = sys_poll;
- else
- peer->hpoll = peer->minpoll;
- }
-}
-
-
-#if 0
-/*
- * usno_timeout - called by the timer interrupt
- */
-static void
-usno_timeout(
- struct peer *peer
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
- char lockfile[128], pidbuf[8];
- int dtr = TIOCM_DTR;
-
- /*
- * If a timeout occurs in other than state 0, the call has
- * failed. If in state 0, we just see if there is other work to
- * do.
- */
- pp = peer->procptr;
- up = (struct usnounit *)pp->unitptr;
- if (up->state) {
- if (up->state != 1) {
- usno_disc(peer);
- return;
- }
- /*
- * Call, and start the answer timeout. We think it
- * strange if the OK status has not been received from
- * the modem, but plow ahead anyway.
- *
- * This code is *here* because we had to stick in a brief
- * delay to let the modem settle down after raising DTR,
- * and for the OK to be received. State machines are
- * contorted.
- */
- if (strcmp(pp->a_lastcode, "OK") != 0)
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "clock %s USNO no modem status",
- ntoa(&peer->srcadr));
- (void)usno_write(peer, PHONE);
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "clock %s USNO calling %s\n",
- ntoa(&peer->srcadr), PHONE);
- up->state = 2;
- up->pollcnt++;
- pp->polls++;
- peer->nextdate = current_time + ANSWER;
- return;
- }
- switch (peer->ttl) {
-
- /*
- * In manual mode the calling program is activated
- * by the ntpdc program using the enable flag (fudge
- * flag1), either manually or by a cron job.
- */
- case MODE_MANUAL:
- up->run = 0;
- break;
-
- /*
- * In automatic mode the calling program runs
- * continuously at intervals determined by the sys_poll
- * variable.
- */
- case MODE_AUTO:
- if (!up->run)
- pp->sloppyclockflag |= CLK_FLAG1;
- up->run = 1;
- break;
-
- /*
- * In backup mode the calling program is disabled,
- * unless no system peer has been selected for MAXOUTAGE
- * (3600 s). Once enabled, it runs until some other NTP
- * peer shows up.
- */
- case MODE_BACKUP:
- if (!up->run && sys_peer == 0) {
- if (current_time - last_time > MAXOUTAGE) {
- up->run = 1;
- peer->hpoll = peer->minpoll;
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s USNO backup started ",
- ntoa(&peer->srcadr));
- }
- } else if (up->run && sys_peer->sstclktype != CTL_SST_TS_TELEPHONE) {
- peer->hpoll = peer->minpoll;
- up->run = 0;
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s USNO backup stopped",
- ntoa(&peer->srcadr));
- }
- break;
-
- default:
- msyslog(LOG_ERR,
- "clock %s USNO invalid mode", ntoa(&peer->srcadr));
-
- }
-
- /*
- * The fudge flag1 is used as an enable/disable; if set either
- * by the code or via ntpdc, the calling program is
- * started; if reset, the phones stop ringing.
- */
- if (!(pp->sloppyclockflag & CLK_FLAG1)) {
- up->pollcnt = 0;
- peer->nextdate = current_time + IDLE;
- return;
- }
-
- /*
- * Lock the port.
- */
- (void)sprintf(lockfile, LOCKFILE, up->unit);
- fd = open(lockfile, O_WRONLY|O_CREAT|O_EXCL, 0644);
- if (fd < 0) {
- msyslog(LOG_ERR, "clock %s USNO port busy",
- ntoa(&peer->srcadr));
- return;
- }
- sprintf(pidbuf, "%d\n", (int) getpid());
- write(fd, pidbuf, strlen(pidbuf));
- close(fd);
-
- /*
- * Open serial port. Use ACTS line discipline, if available. It
- * pumps a timestamp into the data stream at every on-time
- * character '*' found. Note: the port must have modem control
- * or deep pockets for the phone bill. HP-UX 9.03 users should
- * have very deep pockets.
- */
- (void)sprintf(device, DEVICE, up->unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_ACTS))) {
- unlink(lockfile);
- return;
- }
- if (ioctl(fd, TIOCMBIC, (char *)&dtr) < 0)
- msyslog(LOG_WARNING, "usno_timeout: clock %s: couldn't clear DTR: %m",
- ntoa(&peer->srcadr));
-
- pp->io.clock_recv = usno_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- unlink(lockfile);
- free(up);
- return;
- }
-
- /*
- * Initialize modem and kill DTR. We skedaddle if this comes
- * bum.
- */
- if (!usno_write(peer, MODEM_SETUP)) {
- msyslog(LOG_ERR, "clock %s USNO couldn't write",
- ntoa(&peer->srcadr));
- io_closeclock(&pp->io);
- unlink(lockfile);
- free(up);
- return;
- }
-
- /*
- * Initiate a call to the Observatory. If we wind up here in
- * other than state 0, a successful call could not be completed
- * within minpoll seconds.
- */
- if (up->pollcnt) {
- refclock_report(peer, CEVNT_TIMEOUT);
- NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE,
- "clock %s USNO calling program terminated",
- ntoa(&peer->srcadr));
- pp->sloppyclockflag &= ~CLK_FLAG1;
- up->pollcnt = 0;
-#ifdef DEBUG
- if (debug)
- printf("usno: calling program terminated\n");
-#endif
- usno_disc(peer);
- return;
- }
-
- /*
- * Raise DTR, and let the modem settle. Then we'll dial.
- */
- if (ioctl(pp->io.fd, TIOCMBIS, (char *)&dtr) < -1)
- msyslog(LOG_INFO, "usno_timeout: clock %s: couldn't set DTR: %m",
- ntoa(&peer->srcadr));
- up->state = 1;
- peer->nextdate = current_time + WAIT;
-}
-#endif /* 0 */
-
-
-/*
- * usno_disc - disconnect the call and wait for the ruckus to cool
- */
-static void
-usno_disc(
- struct peer *peer
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
- int dtr = TIOCM_DTR;
- char lockfile[128];
-
- /*
- * We should never get here other than in state 0, unless a call
- * has timed out. We drop DTR, which will reliably get the modem
- * off the air, even while the modem is hammering away full tilt.
- */
- pp = peer->procptr;
- up = (struct usnounit *)pp->unitptr;
-
- if (ioctl(pp->io.fd, TIOCMBIC, (char *)&dtr) < 0)
- msyslog(LOG_INFO, "usno_disc: clock %s: couldn't clear DTR: %m",
- ntoa(&peer->srcadr));
-
- if (up->state > 0) {
- up->state = 0;
- msyslog(LOG_NOTICE, "clock %s USNO call failed %d",
- ntoa(&peer->srcadr), up->state);
-#ifdef DEBUG
- if (debug)
- printf("usno: call failed %d\n", up->state);
-#endif
- }
-
- io_closeclock(&pp->io);
- sprintf(lockfile, LOCKFILE, up->unit);
- unlink(lockfile);
-
- peer->nextdate = current_time + WAIT;
-}
-
-
-#if 0
-/*
- * usno_write - write a message to the serial port
- */
-static int
-usno_write(
- struct peer *peer,
- const char *str
- )
-{
- register struct usnounit *up;
- struct refclockproc *pp;
- int len;
- int code;
- char cr = '\r';
-
- /*
- * Not much to do here, other than send the message, handle
- * debug and report faults.
- */
- pp = peer->procptr;
- up = (struct usnounit *)pp->unitptr;
- len = strlen(str);
-#ifdef DEBUG
- if (debug)
- printf("usno: state %d send %d %s\n", up->state, len,
- str);
-#endif
- code = write(pp->io.fd, str, (unsigned)len) == len;
- code |= write(pp->io.fd, &cr, 1) == 1;
- if (!code)
- refclock_report(peer, CEVNT_FAULT);
- return (code);
-}
-#endif /* 0 */
-
-#else
-int refclock_usno_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_wwv.c b/contrib/ntp/ntpd/refclock_wwv.c
deleted file mode 100644
index 11aae7f..0000000
--- a/contrib/ntp/ntpd/refclock_wwv.c
+++ /dev/null
@@ -1,2859 +0,0 @@
-/*
- * refclock_wwv - clock driver for NIST WWV/H time/frequency station
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_WWV)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-#include "audio.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <math.h>
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif /* HAVE_SYS_IOCTL_H */
-
-#define ICOM 1
-
-#ifdef ICOM
-#include "icom.h"
-#endif /* ICOM */
-
-/*
- * Audio WWV/H demodulator/decoder
- *
- * 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. 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
- * program as propagation conditions change throughout the day and
- * night.
- *
- * The driver receives, demodulates and decodes the radio signals when
- * 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
- * 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
- * identification feature.
- *
- * The ICOM code is normally compiled in the driver. It isn't used,
- * unless the mode keyword on the server configuration command specifies
- * a nonzero ICOM ID select code. The C-IV trace is turned on if the
- * debug level is greater than one.
- */
-/*
- * 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 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. /* 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 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 MAXERR 30 /* max data bit errors in minute */
-#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)
- *
- * 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 and BGATE is set if a BCD digit
- * bit is invalid. SFLAG is set when during seconds 59, 0 and 1 while
- * 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 FGATE 0x0010 /* frequency gate */
-#define DGATE 0x0020 /* data bit error */
-#define BGATE 0x0040 /* BCD digit bit error */
-#define SFLAG 0x1000 /* probe flag */
-#define LEPDAY 0x2000 /* leap second day */
-#define LEPSEC 0x4000 /* leap second minute */
-
-/*
- * Station scoreboard bits
- *
- * These are used to establish the signal quality for each of the five
- * frequencies and two stations.
- */
-#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 */
-
-/*
- * Alarm status bits (alarm)
- *
- * These bits indicate various alarm conditions, which are decoded to
- * 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 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 */
-
-/*
- * 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 /* station acquisition timeout */
-#define DIGIT 30 /* minute unit digit 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 driver. The values defined here may be on the
- * adventurous side in the interest of the highest sensitivity.
- */
-#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. /* 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. The increments are for 4.5-deg sine
- * 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 */
-#define MAXAVG 1024 /* max time constant */
-#define TCONST 16 /* data bit/digit time constant */
-
-/*
- * Miscellaneous status bits (misc)
- *
- * These bits correspond to designated bits in the WWV/H timecode. The
- * bit probabilities are exponentially averaged over several minutes and
- * processed by a integrator and threshold.
- */
-#define DUT1 0x01 /* 56 DUT .1 */
-#define DUT2 0x02 /* 57 DUT .2 */
-#define DUT4 0x04 /* 58 DUT .4 */
-#define DUTS 0x08 /* 50 DUT sign */
-#define DST1 0x10 /* 55 DST1 leap warning */
-#define DST2 0x20 /* 2 DST2 DST1 delayed one day */
-#define SECWAR 0x40 /* 3 leap second warning */
-
-/*
- * 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 (.0011 + .0047 + .0002) /* net system delay (s) */
-
-/*
- * Table of sine values at 4.5-degree increments. This is used by the
- * synchronous matched filter demodulators. The integral of sine-squared
- * over one complete cycle is PI, so the table is normallized by 1 / PI.
- */
-double sintab[] = {
- 0.000000e+00, 2.497431e-02, 4.979464e-02, 7.430797e-02, /* 0-3 */
- 9.836316e-02, 1.218119e-01, 1.445097e-01, 1.663165e-01, /* 4-7 */
- 1.870979e-01, 2.067257e-01, 2.250791e-01, 2.420447e-01, /* 8-11 */
- 2.575181e-01, 2.714038e-01, 2.836162e-01, 2.940800e-01, /* 12-15 */
- 3.027307e-01, 3.095150e-01, 3.143910e-01, 3.173286e-01, /* 16-19 */
- 3.183099e-01, 3.173286e-01, 3.143910e-01, 3.095150e-01, /* 20-23 */
- 3.027307e-01, 2.940800e-01, 2.836162e-01, 2.714038e-01, /* 24-27 */
- 2.575181e-01, 2.420447e-01, 2.250791e-01, 2.067257e-01, /* 28-31 */
- 1.870979e-01, 1.663165e-01, 1.445097e-01, 1.218119e-01, /* 32-35 */
- 9.836316e-02, 7.430797e-02, 4.979464e-02, 2.497431e-02, /* 36-39 */
--0.000000e+00, -2.497431e-02, -4.979464e-02, -7.430797e-02, /* 40-43 */
--9.836316e-02, -1.218119e-01, -1.445097e-01, -1.663165e-01, /* 44-47 */
--1.870979e-01, -2.067257e-01, -2.250791e-01, -2.420447e-01, /* 48-51 */
--2.575181e-01, -2.714038e-01, -2.836162e-01, -2.940800e-01, /* 52-55 */
--3.027307e-01, -3.095150e-01, -3.143910e-01, -3.173286e-01, /* 56-59 */
--3.183099e-01, -3.173286e-01, -3.143910e-01, -3.095150e-01, /* 60-63 */
--3.027307e-01, -2.940800e-01, -2.836162e-01, -2.714038e-01, /* 64-67 */
--2.575181e-01, -2.420447e-01, -2.250791e-01, -2.067257e-01, /* 68-71 */
--1.870979e-01, -1.663165e-01, -1.445097e-01, -1.218119e-01, /* 72-75 */
--9.836316e-02, -7.430797e-02, -4.979464e-02, -2.497431e-02, /* 76-79 */
- 0.000000e+00}; /* 80 */
-
-/*
- * Decoder operations at the end of each second are driven by a state
- * machine. The transition matrix consists of a dispatch table indexed
- * by second number. Each entry in the table contains a case switch
- * number and argument.
- */
-struct progx {
- int sw; /* case switch number */
- int arg; /* argument */
-};
-
-/*
- * Case switch numbers
- */
-#define IDLE 0 /* no operation */
-#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
- */
-#define MN 0 /* minute digits (2) */
-#define HR 2 /* hour digits (2) */
-#define DA 4 /* day digits (3) */
-#define YR 7 /* year digits (2) */
-
-struct progx progx[] = {
- {SYNC2, 0}, /* 0 latch sync max */
- {SYNC3, 0}, /* 1 QSY data channel */
- {MSCBIT, DST2}, /* 2 dst2 */
- {MSCBIT, SECWAR}, /* 3 lw */
- {COEF, 0}, /* 4 1 year units */
- {COEF, 1}, /* 5 2 */
- {COEF, 2}, /* 6 4 */
- {COEF, 3}, /* 7 8 */
- {DECIM9, YR}, /* 8 */
- {IDLE, 0}, /* 9 p1 */
- {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 */
- {COEF, 2}, /* 17 40 */
- {COEF2, 3}, /* 18 80 (not used) */
- {DECIM6, MN + 1}, /* 19 p2 */
- {COEF, 0}, /* 20 1 hour units */
- {COEF, 1}, /* 21 2 */
- {COEF, 2}, /* 22 4 */
- {COEF, 3}, /* 23 8 */
- {DECIM9, HR}, /* 24 */
- {COEF, 0}, /* 25 10 hour tens */
- {COEF, 1}, /* 26 20 */
- {COEF2, 2}, /* 27 40 (not used) */
- {COEF2, 3}, /* 28 80 (not used) */
- {DECIM2, HR + 1}, /* 29 p3 */
- {COEF, 0}, /* 30 1 day units */
- {COEF, 1}, /* 31 2 */
- {COEF, 2}, /* 32 4 */
- {COEF, 3}, /* 33 8 */
- {DECIM9, DA}, /* 34 */
- {COEF, 0}, /* 35 10 day tens */
- {COEF, 1}, /* 36 20 */
- {COEF, 2}, /* 37 40 */
- {COEF, 3}, /* 38 80 */
- {DECIM9, DA + 1}, /* 39 p4 */
- {COEF, 0}, /* 40 100 day hundreds */
- {COEF, 1}, /* 41 200 */
- {COEF2, 2}, /* 42 400 (not used) */
- {COEF2, 3}, /* 43 800 (not used) */
- {DECIM3, DA + 2}, /* 44 */
- {IDLE, 0}, /* 45 */
- {IDLE, 0}, /* 46 */
- {IDLE, 0}, /* 47 */
- {IDLE, 0}, /* 48 */
- {IDLE, 0}, /* 49 p5 */
- {MSCBIT, DUTS}, /* 50 dut+- */
- {COEF, 0}, /* 51 10 year tens */
- {COEF, 1}, /* 52 20 */
- {COEF, 2}, /* 53 40 */
- {COEF, 3}, /* 54 80 */
- {MSC20, DST1}, /* 55 dst1 */
- {MSCBIT, DUT1}, /* 56 0.1 dut */
- {MSCBIT, DUT2}, /* 57 0.2 */
- {MSC21, DUT4}, /* 58 0.4 QSY probe channel */
- {MIN1, 0}, /* 59 p6 latch sync min */
- {MIN2, 0} /* 60 leap second */
-};
-
-/*
- * BCD coefficients for maximum likelihood digit decode
- */
-#define P15 1. /* max positive number */
-#define N15 -1. /* max negative number */
-
-/*
- * Digits 0-9
- */
-#define P9 (P15 / 4) /* mark (+1) */
-#define N9 (N15 / 4) /* space (-1) */
-
-double bcd9[][4] = {
- {N9, N9, N9, N9}, /* 0 */
- {P9, N9, N9, N9}, /* 1 */
- {N9, P9, N9, N9}, /* 2 */
- {P9, P9, N9, N9}, /* 3 */
- {N9, N9, P9, N9}, /* 4 */
- {P9, N9, P9, N9}, /* 5 */
- {N9, P9, P9, N9}, /* 6 */
- {P9, P9, P9, N9}, /* 7 */
- {N9, N9, N9, P9}, /* 8 */
- {P9, N9, N9, P9}, /* 9 */
- {0, 0, 0, 0} /* backstop */
-};
-
-/*
- * Digits 0-6 (minute tens)
- */
-#define P6 (P15 / 3) /* mark (+1) */
-#define N6 (N15 / 3) /* space (-1) */
-
-double bcd6[][4] = {
- {N6, N6, N6, 0}, /* 0 */
- {P6, N6, N6, 0}, /* 1 */
- {N6, P6, N6, 0}, /* 2 */
- {P6, P6, N6, 0}, /* 3 */
- {N6, N6, P6, 0}, /* 4 */
- {P6, N6, P6, 0}, /* 5 */
- {N6, P6, P6, 0}, /* 6 */
- {0, 0, 0, 0} /* backstop */
-};
-
-/*
- * Digits 0-3 (day hundreds)
- */
-#define P3 (P15 / 2) /* mark (+1) */
-#define N3 (N15 / 2) /* space (-1) */
-
-double bcd3[][4] = {
- {N3, N3, 0, 0}, /* 0 */
- {P3, N3, 0, 0}, /* 1 */
- {N3, P3, 0, 0}, /* 2 */
- {P3, P3, 0, 0}, /* 3 */
- {0, 0, 0, 0} /* backstop */
-};
-
-/*
- * Digits 0-2 (hour tens)
- */
-#define P2 (P15 / 2) /* mark (+1) */
-#define N2 (N15 / 2) /* space (-1) */
-
-double bcd2[][4] = {
- {N2, N2, 0, 0}, /* 0 */
- {P2, N2, 0, 0}, /* 1 */
- {N2, P2, 0, 0}, /* 2 */
- {0, 0, 0, 0} /* backstop */
-};
-
-/*
- * DST decode (DST2 DST1) for prettyprint
- */
-char dstcod[] = {
- 'S', /* 00 standard time */
- 'I', /* 01 set clock ahead at 0200 local */
- 'O', /* 10 set clock back at 0200 local */
- 'D' /* 11 daylight time */
-};
-
-/*
- * The decoding matrix consists of nine row vectors, one for each digit
- * of the timecode. The digits are stored from least to most significant
- * order. The maximum likelihood timecode is formed from the digits
- * corresponding to the maximum likelihood values reading in the
- * opposite order: yy ddd hh:mm.
- */
-struct decvec {
- int radix; /* radix (3, 4, 6, 10) */
- int digit; /* current clock digit */
- int mldigit; /* maximum likelihood digit */
- int phase; /* maximum likelihood digit phase */
- int count; /* match count */
- double digprb; /* max digit probability */
- double digsnr; /* likelihood function (dB) */
- double like[10]; /* likelihood integrator 0-9 */
-};
-
-/*
- * The station structure is used to acquire the minute pulse from WWV
- * and/or WWVH. These stations are distinguished by the frequency used
- * for the second and minute sync pulses, 1000 Hz for WWV and 1200 Hz
- * for WWVH. Other than frequency, the format is the same.
- */
-struct sync {
- 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; /* sync envelope at 59, 1 s */
- double synsnr; /* sync signal SNR */
- int count; /* bit counter */
- char refid[5]; /* reference identifier */
- int select; /* select bits */
- int reach; /* reachability register */
-};
-
-/*
- * The channel structure is used to mitigate between channels.
- */
-struct chan {
- int gain; /* audio gain */
- 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 */
-};
-
-/*
- * WWV unit control structure
- */
-struct wwvunit {
- l_fp timestamp; /* audio sample timestamp */
- l_fp tick; /* audio sample increment */
- double phase, freq; /* logical clock phase and frequency */
- double monitor; /* audio monitor point */
- int fd_icom; /* ICOM file descriptor */
- int errflg; /* error flags */
- 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 */
-#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; /* 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; /* second sample counter */
- long mphase; /* minute sample counter */
-
- /*
- * Variables used to mitigate which channel to use
- */
- struct chan mitig[NCHAN]; /* channel data */
- struct sync *sptr; /* station pointer */
- int dchan; /* data channel */
- int schan; /* probe channel */
- int achan; /* active channel */
-
- /*
- * Variables used by the clock state machine
- */
- struct decvec decvec[9]; /* decoding matrix */
- int rsec; /* seconds counter */
- int digcnt; /* count of digits synchronized */
-
- /*
- * Variables used to estimate signal levels and bit/digit
- * probabilities
- */
- double sigsig; /* data max signal */
- double sigamp; /* data max envelope (square) */
- double noiamp; /* data noise envelope (square) */
- double datsnr; /* data SNR (dB) */
-
- /*
- * Variables used to establish status and alarm conditions
- */
- int status; /* status bits */
- int alarm; /* alarm flashers */
- int misc; /* miscellaneous timecode bits */
- int errcnt; /* data bit error counter */
- int errbit; /* data bit errors in minute */
-};
-
-/*
- * Function prototypes
- */
-static int wwv_start P((int, struct peer *));
-static void wwv_shutdown P((int, struct peer *));
-static void wwv_receive P((struct recvbuf *));
-static void wwv_poll P((int, struct peer *));
-
-/*
- * More function prototypes
- */
-static void wwv_epoch P((struct peer *));
-static void wwv_rf P((struct peer *, double));
-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, int));
-static void wwv_corr4 P((struct peer *, struct decvec *,
- double [], double [][4]));
-static void wwv_gain P((struct peer *));
-static void wwv_tsec P((struct wwvunit *));
-static double wwv_data P((struct wwvunit *, double));
-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) */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_wwv = {
- wwv_start, /* start up driver */
- wwv_shutdown, /* shut down driver */
- wwv_poll, /* transmit poll message */
- noentry, /* not used (old wwv_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old wwv_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * wwv_start - open the devices and initialize data for processing
- */
-static int
-wwv_start(
- int unit, /* instance number (used by PCM) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
-#ifdef ICOM
- int temp;
-#endif /* ICOM */
-
- /*
- * Local variables
- */
- int fd; /* file descriptor */
- int i; /* index */
- double step; /* codec adjustment */
-
- /*
- * Open audio device
- */
- fd = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
- if (fd < 0)
- return (0);
-#ifdef DEBUG
- if (debug)
- audio_show();
-#endif
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct wwvunit *)emalloc(sizeof(struct wwvunit)))) {
- close(fd);
- return (0);
- }
- memset(up, 0, sizeof(struct wwvunit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = wwv_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
-
- /*
- * The companded samples are encoded sign-magnitude. The table
- * contains all the 256 values in the interest of speed.
- */
- up->comp[0] = up->comp[OFFSET] = 0.;
- up->comp[1] = 1; up->comp[OFFSET + 1] = -1.;
- up->comp[2] = 3; up->comp[OFFSET + 2] = -3.;
- step = 2.;
- for (i = 3; i < OFFSET; i++) {
- up->comp[i] = up->comp[i - 1] + step;
- up->comp[OFFSET + i] = -up->comp[i];
- if (i % 16 == 0)
- step *= 2.;
- }
- DTOLFP(1. / SECOND, &up->tick);
-
- /*
- * Initialize the decoding matrix with the radix for each digit
- * position.
- */
- up->decvec[MN].radix = 10; /* minutes */
- up->decvec[MN + 1].radix = 6;
- up->decvec[HR].radix = 10; /* hours */
- up->decvec[HR + 1].radix = 3;
- up->decvec[DA].radix = 10; /* days */
- up->decvec[DA + 1].radix = 10;
- up->decvec[DA + 2].radix = 4;
- up->decvec[YR].radix = 10; /* years */
- up->decvec[YR + 1].radix = 10;
- wwv_newgame(peer);
- up->schan = up->achan = 3;
-
- /*
- * Initialize autotune if available. Start out at 15 MHz. Note
- * that the ICOM select code must be less than 128, so the high
- * order bit can be used to select the line speed.
- */
-#ifdef ICOM
- temp = 0;
-#ifdef DEBUG
- if (debug > 1)
- temp = P_TRACE;
-#endif
- if (peer->ttl != 0) {
- if (peer->ttl & 0x80)
- up->fd_icom = icom_init("/dev/icom", B1200,
- temp);
- else
- up->fd_icom = icom_init("/dev/icom", B9600,
- temp);
- }
- if (up->fd_icom > 0) {
- if ((temp = wwv_qsy(peer, up->schan)) != 0) {
- NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT)
- 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 */
- return (1);
-}
-
-
-/*
- * wwv_shutdown - shut down the clock
- */
-static void
-wwv_shutdown(
- int unit, /* instance number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
- io_closeclock(&pp->io);
- if (up->fd_icom > 0)
- close(up->fd_icom);
- free(up);
-}
-
-
-/*
- * wwv_receive - receive data from the audio device
- *
- * This routine reads input samples and adjusts the logical clock to
- * track the A/D sample clock by dropping or duplicating codec samples.
- * It also controls the A/D signal level with an AGC loop to mimimize
- * quantization noise and avoid overload.
- */
-static void
-wwv_receive(
- struct recvbuf *rbufp /* receive buffer structure pointer */
- )
-{
- struct peer *peer;
- struct refclockproc *pp;
- struct wwvunit *up;
-
- /*
- * Local variables
- */
- double sample; /* codec sample */
- u_char *dpt; /* buffer pointer */
- int bufcnt; /* buffer counter */
- l_fp ltemp;
-
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
-
- /*
- * 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;
- 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,
- * increase the gain a tad; if the clips are too high,
- * decrease a tad.
- */
- if (sample > MAXSIG) {
- sample = MAXSIG;
- up->clipcnt++;
- } else if (sample < -MAXSIG) {
- sample = -MAXSIG;
- up->clipcnt++;
- }
-
- /*
- * 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) {
- up->phase += 1.;
- wwv_rf(peer, sample);
- wwv_rf(peer, sample);
- } else {
- wwv_rf(peer, sample);
- }
- L_ADD(&up->timestamp, &up->tick);
- }
-
- /*
- * 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)
- up->mongain = MONGAIN;
- else
- up->mongain = 0;
-}
-
-
-/*
- * wwv_poll - called by the transmit procedure
- *
- * 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(
- int unit, /* instance number (not used) */
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
- if (pp->coderecv == pp->codeproc)
- up->errflg = CEVNT_TIMEOUT;
- if (up->errflg)
- refclock_report(peer, up->errflg);
- up->errflg = 0;
- pp->polls++;
-}
-
-
-/*
- * wwv_rf - process signals and demodulate to baseband
- *
- * This routine grooms and filters decompanded raw audio samples. The
- * output signals include the 100-Hz baseband data signal in quadrature
- * form, plus the epoch index of the second sync signal and the second
- * index of the minute sync signal.
- *
- * 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.
- *
- * 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 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(
- struct peer *peer, /* peerstructure pointer */
- double isig /* input signal */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
- struct sync *sp;
-
- static double lpf[5]; /* 150-Hz lpf delay line */
- double data; /* lpf output */
- static double bpf[9]; /* 1000/1200-Hz bpf delay line */
- double syncx; /* bpf output */
- static double mf[41]; /* 1000/1200-Hz mf delay line */
- double mfsync; /* mf output */
-
- static int iptr; /* data channel pointer */
- static double ibuf[DATSIZ]; /* data I channel delay line */
- static double qbuf[DATSIZ]; /* data Q channel delay line */
-
- static int jptr; /* sync channel pointer */
- static double cibuf[SYNSIZ]; /* wwv I channel delay line */
- static double cqbuf[SYNSIZ]; /* wwv Q channel delay line */
- static double ciamp; /* wwv I channel amplitude */
- static double cqamp; /* wwv Q channel amplitude */
- static int csinptr; /* wwv channel phase */
- static double hibuf[SYNSIZ]; /* wwvh I channel delay line */
- static double hqbuf[SYNSIZ]; /* wwvh Q channel delay line */
- static double hiamp; /* wwvh I channel amplitude */
- static double hqamp; /* wwvh Q channel amplitude */
- static int hsinptr; /* wwvh channels phase */
-
- static double epobuf[SECOND]; /* epoch sync comb filter */
- static double epomax; /* epoch sync amplitude buffer */
- static int epopos; /* epoch sync position buffer */
-
- static int iniflg; /* initialization flag */
- 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));
- memset((char *)bpf, 0, sizeof(bpf));
- memset((char *)mf, 0, sizeof(mf));
- memset((char *)ibuf, 0, sizeof(ibuf));
- memset((char *)qbuf, 0, sizeof(qbuf));
- memset((char *)cibuf, 0, sizeof(cibuf));
- memset((char *)cqbuf, 0, sizeof(cqbuf));
- memset((char *)hibuf, 0, sizeof(hibuf));
- memset((char *)hqbuf, 0, sizeof(hqbuf));
- memset((char *)epobuf, 0, sizeof(epobuf));
- }
-
- /*
- * Baseband data demodulation. The 100-Hz subcarrier is
- * extracted using a 150-Hz IIR lowpass filter. This attenuates
- * the 1000/1200-Hz sync signals, as well as the 440-Hz and
- * 600-Hz tones and most of the noise and voice modulation
- * components.
- *
- * Matlab IIR 4th-order IIR elliptic, 150 Hz lowpass, 0.2 dB
- * passband ripple, -50 dB stopband ripple.
- */
- data = (lpf[4] = lpf[3]) * 8.360961e-01;
- data += (lpf[3] = lpf[2]) * -3.481740e+00;
- data += (lpf[2] = lpf[1]) * 5.452988e+00;
- data += (lpf[1] = lpf[0]) * -3.807229e+00;
- lpf[0] = isig - data;
- data = lpf[0] * 3.281435e-03
- + lpf[1] * -1.149947e-02
- + lpf[2] * 1.654858e-02
- + lpf[3] * -1.149947e-02
- + lpf[4] * 3.281435e-03;
-
- /*
- * The I and Q quadrature data signals are produced by
- * 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.
- */
- i = up->datapt;
- up->datapt = (up->datapt + IN100) % 80;
- dtemp = sintab[i] * data / DATSIZ * DGAIN;
- up->irig -= ibuf[iptr];
- ibuf[iptr] = dtemp;
- up->irig += dtemp;
- i = (i + 20) % 80;
- dtemp = sintab[i] * data / DATSIZ * DGAIN;
- up->qrig -= qbuf[iptr];
- qbuf[iptr] = dtemp;
- up->qrig += dtemp;
- iptr = (iptr + 1) % DATSIZ;
-
- /*
- * Baseband sync demodulation. The 1000/1200 sync signals are
- * extracted using a 600-Hz IIR bandpass filter. This removes
- * the 100-Hz data subcarrier, as well as the 440-Hz and 600-Hz
- * tones and most of the noise and voice modulation components.
- *
- * Matlab 4th-order IIR elliptic, 800-1400 Hz bandpass, 0.2 dB
- * passband ripple, -50 dB stopband ripple.
- */
- syncx = (bpf[8] = bpf[7]) * 4.897278e-01;
- syncx += (bpf[7] = bpf[6]) * -2.765914e+00;
- syncx += (bpf[6] = bpf[5]) * 8.110921e+00;
- syncx += (bpf[5] = bpf[4]) * -1.517732e+01;
- syncx += (bpf[4] = bpf[3]) * 1.975197e+01;
- syncx += (bpf[3] = bpf[2]) * -1.814365e+01;
- syncx += (bpf[2] = bpf[1]) * 1.159783e+01;
- syncx += (bpf[1] = bpf[0]) * -4.735040e+00;
- bpf[0] = isig - syncx;
- syncx = bpf[0] * 8.203628e-03
- + bpf[1] * -2.375732e-02
- + bpf[2] * 3.353214e-02
- + bpf[3] * -4.080258e-02
- + bpf[4] * 4.605479e-02
- + bpf[5] * -4.080258e-02
- + bpf[6] * 3.353214e-02
- + bpf[7] * -2.375732e-02
- + bpf[8] * 8.203628e-03;
-
- /*
- * The I and Q quadrature minute sync signals are produced by
- * multiplying the filtered signal by 1000-Hz (WWV) and 1200-Hz
- * (WWVH) sine and cosine signals, respectively. The resulting
- * 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;
- ciamp = ciamp - cibuf[jptr] + dtemp;
- cibuf[jptr] = dtemp;
- i = (i + 20) % 80;
- 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;
- 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;
- hiamp = hiamp - hibuf[jptr] + dtemp;
- hibuf[jptr] = dtemp;
- i = (i + 20) % 80;
- 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;
- 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) {
- up->watch++;
- 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.
- */
- 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);
- }
-#endif /* ICOM */
- }
- } else {
-
- /*
- * If the leap bit is set, set the minute epoch
- * back one second so the station processes
- * don't miss a beat.
- */
- if (up->status & LEPSEC) {
- up->mphase -= SECOND;
- if (up->mphase < 0)
- up->mphase += MINUTE;
- }
- }
- }
-
- /*
- * 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->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 (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) {
- pdelay = (int)(pp->fudgetime1 * SECOND);
-
- /*
- * WWV FIR matched filter, five cycles of 1000-Hz
- * sinewave.
- */
- mf[40] = mf[39];
- mfsync = (mf[39] = mf[38]) * 4.224514e-02;
- mfsync += (mf[38] = mf[37]) * 5.974365e-02;
- mfsync += (mf[37] = mf[36]) * 4.224514e-02;
- mf[36] = mf[35];
- mfsync += (mf[35] = mf[34]) * -4.224514e-02;
- mfsync += (mf[34] = mf[33]) * -5.974365e-02;
- mfsync += (mf[33] = mf[32]) * -4.224514e-02;
- mf[32] = mf[31];
- mfsync += (mf[31] = mf[30]) * 4.224514e-02;
- mfsync += (mf[30] = mf[29]) * 5.974365e-02;
- mfsync += (mf[29] = mf[28]) * 4.224514e-02;
- mf[28] = mf[27];
- mfsync += (mf[27] = mf[26]) * -4.224514e-02;
- mfsync += (mf[26] = mf[25]) * -5.974365e-02;
- mfsync += (mf[25] = mf[24]) * -4.224514e-02;
- mf[24] = mf[23];
- mfsync += (mf[23] = mf[22]) * 4.224514e-02;
- mfsync += (mf[22] = mf[21]) * 5.974365e-02;
- mfsync += (mf[21] = mf[20]) * 4.224514e-02;
- mf[20] = mf[19];
- mfsync += (mf[19] = mf[18]) * -4.224514e-02;
- mfsync += (mf[18] = mf[17]) * -5.974365e-02;
- mfsync += (mf[17] = mf[16]) * -4.224514e-02;
- mf[16] = mf[15];
- mfsync += (mf[15] = mf[14]) * 4.224514e-02;
- mfsync += (mf[14] = mf[13]) * 5.974365e-02;
- mfsync += (mf[13] = mf[12]) * 4.224514e-02;
- mf[12] = mf[11];
- mfsync += (mf[11] = mf[10]) * -4.224514e-02;
- mfsync += (mf[10] = mf[9]) * -5.974365e-02;
- mfsync += (mf[9] = mf[8]) * -4.224514e-02;
- mf[8] = mf[7];
- mfsync += (mf[7] = mf[6]) * 4.224514e-02;
- mfsync += (mf[6] = mf[5]) * 5.974365e-02;
- mfsync += (mf[5] = mf[4]) * 4.224514e-02;
- mf[4] = mf[3];
- mfsync += (mf[3] = mf[2]) * -4.224514e-02;
- mfsync += (mf[2] = mf[1]) * -5.974365e-02;
- mfsync += (mf[1] = mf[0]) * -4.224514e-02;
- mf[0] = syncx;
- } else if (up->status & SELH) {
- pdelay = (int)(pp->fudgetime2 * SECOND);
-
- /*
- * WWVH FIR matched filter, six cycles of 1200-Hz
- * sinewave.
- */
- mf[40] = mf[39];
- mfsync = (mf[39] = mf[38]) * 4.833363e-02;
- mfsync += (mf[38] = mf[37]) * 5.681959e-02;
- mfsync += (mf[37] = mf[36]) * 1.846180e-02;
- mfsync += (mf[36] = mf[35]) * -3.511644e-02;
- mfsync += (mf[35] = mf[34]) * -5.974365e-02;
- mfsync += (mf[34] = mf[33]) * -3.511644e-02;
- mfsync += (mf[33] = mf[32]) * 1.846180e-02;
- mfsync += (mf[32] = mf[31]) * 5.681959e-02;
- mfsync += (mf[31] = mf[30]) * 4.833363e-02;
- mf[30] = mf[29];
- mfsync += (mf[29] = mf[28]) * -4.833363e-02;
- mfsync += (mf[28] = mf[27]) * -5.681959e-02;
- mfsync += (mf[27] = mf[26]) * -1.846180e-02;
- mfsync += (mf[26] = mf[25]) * 3.511644e-02;
- mfsync += (mf[25] = mf[24]) * 5.974365e-02;
- mfsync += (mf[24] = mf[23]) * 3.511644e-02;
- mfsync += (mf[23] = mf[22]) * -1.846180e-02;
- mfsync += (mf[22] = mf[21]) * -5.681959e-02;
- mfsync += (mf[21] = mf[20]) * -4.833363e-02;
- mf[20] = mf[19];
- mfsync += (mf[19] = mf[18]) * 4.833363e-02;
- mfsync += (mf[18] = mf[17]) * 5.681959e-02;
- mfsync += (mf[17] = mf[16]) * 1.846180e-02;
- mfsync += (mf[16] = mf[15]) * -3.511644e-02;
- mfsync += (mf[15] = mf[14]) * -5.974365e-02;
- mfsync += (mf[14] = mf[13]) * -3.511644e-02;
- mfsync += (mf[13] = mf[12]) * 1.846180e-02;
- mfsync += (mf[12] = mf[11]) * 5.681959e-02;
- mfsync += (mf[11] = mf[10]) * 4.833363e-02;
- mf[10] = mf[9];
- mfsync += (mf[9] = mf[8]) * -4.833363e-02;
- mfsync += (mf[8] = mf[7]) * -5.681959e-02;
- mfsync += (mf[7] = mf[6]) * -1.846180e-02;
- mfsync += (mf[6] = mf[5]) * 3.511644e-02;
- mfsync += (mf[5] = mf[4]) * 5.974365e-02;
- mfsync += (mf[4] = mf[3]) * 3.511644e-02;
- mfsync += (mf[3] = mf[2]) * -1.846180e-02;
- mfsync += (mf[2] = mf[1]) * -5.681959e-02;
- mfsync += (mf[1] = mf[0]) * -4.833363e-02;
- mf[0] = syncx;
- } else {
- mfsync = 0;
- pdelay = 0;
- }
-
- /*
- * 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.
- */
- dtemp = (epobuf[epoch] += (mfsync - epobuf[epoch]) /
- up->avgint);
- if (dtemp > epomax) {
- epomax = dtemp;
- 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);
- }
-}
-
-
-/*
- * wwv_qrz - identify and acquire WWV/WWVH minute sync pulse
- *
- * 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
- * frequency in turn for the minute pulse from either station, which
- * 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. 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, /* peer structure pointer */
- struct sync *sp, /* sync channel structure */
- 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, fpoch;
- int isgood;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
-
- /*
- * Find the sample with peak energy, which defines the minute
- * 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;
-
- /*
- * 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->synmax, sp->synmin);
- isgood = isgood && sp->synmax > ATHR && snr > ASNR;
- 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 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 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 %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->lastpos = sp->pos;
- sp->maxamp = sp->noiamp = 0;
- }
-}
-
-
-/*
- * wwv_endpoc - identify and acquire second sync pulse
- *
- * 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).
- *
- * 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 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 */
- int epopos /* epoch max position */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
- static int epoch_mf[3]; /* epoch median filter */
- static int xepoch; /* last second epoch */
- static int zepoch; /* last averaging interval epoch */
- 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;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
- if (!iniflg) {
- iniflg = 1;
- memset((char *)epoch_mf, 0, sizeof(epoch_mf));
- }
-
- /*
- * A three-stage median filter is used to help denoise the
- * 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])
- 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])
- 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 signal amplitude or SNR fall below thresholds or if no
- * stations are heard, dim the second sync lamp and start over.
- */
- 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 {
- if (maxrun > 0 && mepoch == xepoch) {
- maxrun += syncnt;
- } else if (syncnt > maxrun) {
- maxrun = syncnt;
- mepoch = xepoch;
- }
- syncnt = 0;
- }
- if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status & (SSYNC |
- MSYNC))) {
- sprintf(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);
-#endif /* DEBUG */
- }
-
- /*
- * 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 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 codec clock
- * loop. It also affects the 100-Hz subcarrier loop and the bit
- * and digit comparison counter thresholds.
- */
- 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;
- }
- }
- }
- }
- 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);
-#endif /* DEBUG */
- }
- up->status |= FGATE;
- zepoch = mepoch;
- avgcnt = syncnt = maxrun = 0;
-}
-
-
-/*
- * wwv_epoch - epoch scanner
- *
- * 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
- * sync pulses. Therefore, the data subcarrier reference phase is
- * disciplined using the hardlimited quadrature-phase signal sampled at
- * the same time as the in-phase signal. The phase tracking loop uses
- * phase adjustments of plus-minus one sample (125 us).
- */
-static void
-wwv_epoch(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
- struct chan *cp;
- static double dpulse; /* data pulse length */
- double dtemp;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
-
- /*
- * Sample the minute sync pulse envelopes at epoch 800 for both
- * the WWV and WWVH stations. This will be used later for
- * 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.
- */
- if (up->rphase == 800 * MS) {
- up->repoch = up->yepoch;
- cp = &up->mitig[up->achan];
- cp->wwv.synamp = cp->wwv.amp;
- cp->wwvh.synamp = cp->wwvh.amp;
- }
-
- /*
- * 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;
-
- /*
- * 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;
-
- /*
- * 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.
- */
- } 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 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->mphase % SECOND == up->repoch) {
- up->datsnr = wwv_snr(up->sigsig, sqrt(up->noiamp));
- wwv_rsec(peer, dpulse);
- wwv_gain(peer);
- up->rphase = dpulse = 0;
- }
-}
-
-
-/*
- * wwv_rsec - process receiver second
- *
- * This routine is called at the end of each receiver second to
- * implement the per-second state machine. The machine assembles BCD
- * digit bits, decodes miscellaneous bits and dances the leap seconds.
- *
- * Normally, the minute has 60 seconds numbered 0-59. If the leap
- * warning bit is set, the last minute (1439) of 30 June (day 181 or 182
- * 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.
- */
-static void
-wwv_rsec(
- struct peer *peer, /* peer structure pointer */
- double dpulse
- )
-{
- static int iniflg; /* initialization flag */
- static double bcddld[4]; /* BCD data bits */
- static double bitvec[61]; /* bit integrator for misc bits */
- struct refclockproc *pp;
- 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;
- if (!iniflg) {
- iniflg = 1;
- memset((char *)bitvec, 0, sizeof(bitvec));
- }
-
- /*
- * The bit represents the probability of a hit on zero (negative
- * values), a hit on one (positive values) or a miss (zero
- * value). The likelihood vector is the exponential average of
- * these probabilities. Only the bits of this vector
- * corresponding to the miscellaneous bits of the timecode are
- * used, but it's easier to do them all. After that, crank the
- * seconds state machine.
- */
- nsec = up->rsec + 1;
- bit = wwv_data(up, dpulse);
- bitvec[up->rsec] += (bit - bitvec[up->rsec]) / TCONST;
- sw = progx[up->rsec].sw;
- arg = progx[up->rsec].arg;
- switch (sw) {
-
- /*
- * Ignore this second.
- */
- case IDLE: /* 9, 45-49 */
- break;
-
- /*
- * Probe channel stuff
- *
- * The WWV/H format contains data pulses in second 59 (position
- * 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];
- cp->wwv.synmax = sqrt(cp->wwv.synamp);
- cp->wwvh.synmax = sqrt(cp->wwvh.synamp);
- break;
-
- /*
- * 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];
- 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 = sqrt((sp->synmin + sp->synamp) / 2.);
- sp->synsnr = wwv_snr(sp->synmax, sp->synmin);
- sp->select &= ~(SYNCNG | DATANG | ERRRNG);
- if (sp->synmax < QTHR || sp->synsnr < QSNR)
- sp->select |= SYNCNG;
- 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 = sqrt((rp->synmin + rp->synamp) / 2.);
- rp->synsnr = wwv_snr(rp->synmax, rp->synmin);
- rp->select &= ~(SYNCNG | DATANG | ERRRNG);
- if (rp->synmax < QTHR || rp->synsnr < QSNR)
- rp->select |= SYNCNG;
- 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++;
- }
-
- /*
- * 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);
-#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;
-
- /*
- * Save the bit probability in the BCD data vector at the index
- * given by the argument. Note that all bits of the vector have
- * to be above the data gate threshold for the digit to be
- * considered valid. Bits not used in the digit are forced to
- * zero and not checked for errors.
- */
- 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;
- break;
-
- case COEF2: /* 18, 27-28, 42-43 */
- bcddld[arg] = 0;
- break;
-
- /*
- * Correlate coefficient vector with each valid digit vector and
- * save in decoding matrix. We step through the decoding matrix
- * digits correlating each with the coefficients and saving the
- * greatest and the next lower for later SNR calculation.
- */
- case DECIM2: /* 29 */
- wwv_corr4(peer, &up->decvec[arg], bcddld, bcd2);
- break;
-
- case DECIM3: /* 44 */
- wwv_corr4(peer, &up->decvec[arg], bcddld, bcd3);
- break;
-
- case DECIM6: /* 19 */
- wwv_corr4(peer, &up->decvec[arg], bcddld, bcd6);
- break;
-
- case DECIM9: /* 8, 14, 24, 34, 39 */
- wwv_corr4(peer, &up->decvec[arg], bcddld, bcd9);
- break;
-
- /*
- * 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. 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 */
- if (bitvec[up->rsec] > BTHR)
- up->misc |= arg;
- else if (bitvec[up->rsec] < -BTHR)
- up->misc &= ~arg;
- else
- 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 |= 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
- *
- * 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];
- cp->wwv.synmin = cp->wwv.synamp;
- cp->wwvh.synmin = cp->wwvh.synamp;
-
- /*
- * 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->status & SSYNC && up->digcnt >= 9)
- up->status |= INSYNC;
- if (up->status & LEPDAY) {
- pp->leap = LEAP_ADDSECOND;
- } else {
- pp->leap = LEAP_NOWARNING;
- 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;
-
- /*
- * 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 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.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 */
- }
-}
-
-
-/*
- * wwv_data - calculate bit probability
- *
- * This routine is called at the end of the receiver second to calculate
- * the probabilities that the previous second contained a zero (P0), one
- * (P1) or position indicator (P2) pulse. If not in sync or if the data
- * 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.
- *
- * 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(
- struct wwvunit *up, /* driver unit pointer */
- double pulse /* pulse length (sample units) */
- )
-{
- double p0, p1, p2; /* probabilities */
- double dpulse; /* pulse length in ms */
-
- p0 = p1 = p2 = 0;
- dpulse = pulse - DATSIZ / 2;
-
- /*
- * 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->status & (SELV | SELH)) || up->sigsig < DTHR ||
- up->datsnr < DSNR || dpulse < DATSIZ) {
- up->status |= DGATE;
- up->errcnt++;
- if (up->errcnt > MAXERR)
- up->alarm |= MODERR;
- return (0);
- }
-
- /*
- * The probability of P0 is one below 200 ms falling to zero at
- * 500 ms. The probability of P1 is zero below 200 ms rising to
- * one at 500 ms and falling to zero at 800 ms. The probability
- * of P2 is zero below 500 ms, rising to one above 800 ms.
- */
- up->status &= ~DGATE;
- if (dpulse < (200 * MS)) {
- p0 = 1;
- } else if (dpulse < 500 * MS) {
- dpulse -= 200 * MS;
- p1 = dpulse / (300 * MS);
- p0 = 1 - p1;
- } else if (dpulse < 800 * MS) {
- dpulse -= 500 * MS;
- p2 = dpulse / (300 * MS);
- p1 = 1 - p2;
- } else {
- p2 = 1;
- }
-
- /*
- * The ouput is a metric that ranges from -1 (P0), to +1 (P1)
- * scaled for convenience. An output of zero represents an
- * erasure, either because of a data error or pulse length
- * greater than 500 ms. At the moment, we don't use P2.
- */
- return ((p1 - p0) * MAXSIG);
-}
-
-
-/*
- * wwv_corr4 - determine maximum likelihood digit
- *
- * This routine correlates the received digit vector with the BCD
- * coefficient vectors corresponding to all valid digits at the given
- * position in the decoding matrix. The maximum value corresponds to the
- * maximum likelihood digit, while the ratio of this value to the next
- * lower value determines the likelihood function. Note that, if the
- * digit is invalid, the likelihood vector is averaged toward a miss.
- */
-static void
-wwv_corr4(
- struct peer *peer, /* peer unit pointer */
- struct decvec *vp, /* decoding table pointer */
- double data[], /* received data vector */
- double tab[][4] /* correlation vector array */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
-
- double topmax, nxtmax; /* metrics */
- double acc; /* accumulator */
- char tbuf[80]; /* monitor buffer */
- int mldigit; /* max likelihood digit */
- int diff; /* decoding difference */
- int i, j;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
-
- /*
- * Correlate digit vector with each BCD coefficient vector. If
- * any BCD digit bit is bad, consider all bits a miss.
- */
- mldigit = 0;
- topmax = nxtmax = -MAXSIG;
- for (i = 0; tab[i][0] != 0; i++) {
- acc = 0;
- for (j = 0; j < 4; j++) {
- if (!(up->status & BGATE))
- acc += data[j] * tab[i][j];
- }
- acc = (vp->like[i] += (acc - vp->like[i]) / TCONST);
- if (acc > topmax) {
- nxtmax = topmax;
- topmax = acc;
- mldigit = i;
- } else if (acc > nxtmax) {
- nxtmax = acc;
- }
- }
- vp->mldigit = mldigit;
- vp->digprb = topmax;
- vp->digsnr = wwv_snr(topmax, nxtmax);
-
- /*
- * The maximum likelihood digit is compared with the current
- * clock digit. The difference represents the decoding phase
- * 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->count = 0;
- vp->phase = diff;
- }
- if (vp->digsnr < BSNR) {
- vp->count = 0;
- 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 |= 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,
- vp->digit, vp->mldigit, vp->phase, vp->count,
- vp->digprb, vp->digsnr);
- record_clock_stats(&peer->srcadr, tbuf);
-#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
-#endif /* DEBUG */
- }
- up->status &= ~BGATE;
-}
-
-
-/*
- * wwv_tsec - transmitter minute processing
- *
- * 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.
- */
-static void
-wwv_tsec(
- struct wwvunit *up /* driver structure pointer */
- )
-{
- int minute, day, isleap;
- int temp;
-
- /*
- * Advance minute unit of the day.
- */
- temp = carry(&up->decvec[MN]); /* minute units */
-
- /*
- * Propagate carries through the day.
- */
- if (temp == 0) /* carry minutes */
- temp = carry(&up->decvec[MN + 1]);
- if (temp == 0) /* carry hours */
- temp = carry(&up->decvec[HR]);
- if (temp == 0)
- temp = carry(&up->decvec[HR + 1]);
-
- /*
- * 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 +
- 1].digit * 600;
- 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 (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
- * through the year.
- */
- if (minute != 1440)
- return;
- minute = 0;
- while (carry(&up->decvec[HR]) != 0); /* advance to minute 0 */
- while (carry(&up->decvec[HR + 1]) != 0);
- day++;
- temp = carry(&up->decvec[DA]); /* carry days */
- if (temp == 0)
- temp = carry(&up->decvec[DA + 1]);
- if (temp == 0)
- temp = carry(&up->decvec[DA + 2]);
-
- /*
- * Roll the year if this the first day and propagate carries
- * through the century.
- */
- if (day != (isleap ? 365 : 366))
- return;
- day = 1;
- while (carry(&up->decvec[DA]) != 1); /* advance to day 1 */
- while (carry(&up->decvec[DA + 1]) != 0);
- while (carry(&up->decvec[DA + 2]) != 0);
- temp = carry(&up->decvec[YR]); /* carry years */
- if (temp)
- carry(&up->decvec[YR + 1]);
-}
-
-
-/*
- * 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 or
- * zero if a carry occurred. Once synchronized, the clock digit will
- * match the maximum likelihood digit corresponding to that position.
- */
-static int
-carry(
- struct decvec *dp /* decoding table pointer */
- )
-{
- int temp;
- int j;
-
- dp->digit++; /* advance clock digit */
- if (dp->digit == dp->radix) { /* modulo radix */
- dp->digit = 0;
- }
- temp = dp->like[dp->radix - 1]; /* rotate likelihood vector */
- for (j = dp->radix - 1; j > 0; j--)
- dp->like[j] = dp->like[j - 1];
- dp->like[0] = temp;
- return (dp->digit);
-}
-
-
-/*
- * wwv_snr - compute SNR or likelihood function
- */
-static double
-wwv_snr(
- double signal, /* signal */
- double noise /* noise */
- )
-{
- double rval;
-
- /*
- * This is a little tricky. Due to the way things are measured,
- * either or both the signal or noise amplitude can be negative
- * or zero. The intent is that, if the signal is negative or
- * zero, the SNR must always be zero. This can happen with the
- * subcarrier SNR before the phase has been aligned. On the
- * other hand, in the likelihood function the "noise" is the
- * next maximum down from the peak and this could be negative.
- * However, in this case the SNR is truly stupendous, so we
- * simply cap at MAXSNR dB.
- */
- if (signal <= 0) {
- rval = 0;
- } else if (noise <= 0) {
- rval = MAXSNR;
- } else {
- rval = 20 * log10(signal / noise);
- if (rval > MAXSNR)
- rval = MAXSNR;
- }
- return (rval);
-}
-
-
-/*
- * wwv_newchan - change to new data channel
- *
- * 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(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
- struct sync *sp, *rp;
- double rank, dtemp;
- int i, j;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
-
- /*
- * 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 = NULL;
- rank = 0;
- for (i = 0; i < NCHAN; i++) {
- rp = &up->mitig[i].wwvh;
- dtemp = wwv_metric(rp);
- if (dtemp >= rank) {
- rank = dtemp;
- sp = rp;
- j = i;
- }
- rp = &up->mitig[i].wwv;
- dtemp = wwv_metric(rp);
- if (dtemp >= rank) {
- rank = dtemp;
- sp = rp;
- 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;
-
- /*
- * Initialize strategic values. Note we set the leap bits
- * NOTINSYNC and the refid "NONE".
- */
- 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
- *
- * This routine saves the AGC for the current channel, switches to a new
- * channel and restores the AGC for that channel. If a tunable receiver
- * is not available, just fake it.
- */
-static int
-wwv_qsy(
- struct peer *peer, /* peer structure pointer */
- int chan /* channel */
- )
-{
- int rval = 0;
- struct refclockproc *pp;
- struct wwvunit *up;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
- if (up->fd_icom > 0) {
- up->mitig[up->achan].gain = up->gain;
- rval = icom_freq(up->fd_icom, peer->ttl & 0x7f,
- qsy[chan]);
- up->achan = chan;
- up->gain = up->mitig[up->achan].gain;
- }
- return (rval);
-}
-#endif /* ICOM */
-
-
-/*
- * timecode - assemble timecode string and length
- *
- * Prettytime format - similar to Spectracom
- *
- * sq yy ddd hh:mm:ss ld dut lset agc iden sig errs freq avgt
- *
- * s sync indicator ('?' or ' ')
- * q error bits (hex 0-F)
- * yyyy year of century
- * ddd day of year
- * hh hour of day
- * mm minute of hour
- * 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 reference identifier (station and frequency)
- * sig signal quality (0-100)
- * errs bit errors in last minute
- * freq frequency offset (PPM)
- * avgt averaging time (s)
- */
-static int
-timecode(
- struct wwvunit *up, /* driver structure pointer */
- char *ptr /* target string */
- )
-{
- struct sync *sp;
- int year, day, hour, minute, second, dut;
- char synchar, leapchar, dst;
- char cptr[50];
-
-
- /*
- * Common fixed-format fields
- */
- synchar = (up->status & INSYNC) ? ' ' : '?';
- 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, 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;
- 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));
-}
-
-
-/*
- * wwv_gain - adjust codec gain
- *
- * 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.
- */
-static void
-wwv_gain(
- struct peer *peer /* peer structure pointer */
- )
-{
- struct refclockproc *pp;
- struct wwvunit *up;
-
- pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
-
- /*
- * Apparently, the codec uses only the high order bits of the
- * gain control field. Thus, it may take awhile for changes to
- * wiggle the hardware bits.
- */
- if (up->clipcnt == 0) {
- up->gain += 4;
- 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->mongain, up->port);
- up->clipcnt = 0;
-#if DEBUG
- if (debug > 1)
- audio_show();
-#endif
-}
-
-
-#else
-int refclock_wwv_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_wwvb.c b/contrib/ntp/ntpd/refclock_wwvb.c
deleted file mode 100644
index c5ef9f9..0000000
--- a/contrib/ntp/ntpd/refclock_wwvb.c
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * refclock_wwvb - clock driver for Spectracom WWVB receivers
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_SPECTRACOM)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-/*
- * This driver supports the Spectracom Model 8170 and Netclock/2 WWVB
- * Synchronized Clocks and the Netclock/GPS Master Clock. Both the WWVB
- * and GPS clocks have proven reliable sources of time; however, the
- * WWVB clocks have proven vulnerable to high ambient conductive RF
- * interference. The claimed accuracy of the WWVB clocks is 100 us
- * relative to the broadcast signal, while the claimed accuracy of the
- * GPS clock is 50 ns; however, in most cases the actual accuracy is
- * limited by the resolution of the timecode and the latencies of the
- * serial interface and operating system.
- *
- * The WWVB and GPS clocks should be configured for 24-hour display,
- * AUTO DST off, time zone 0 (UTC), data format 0 or 2 (see below) and
- * baud rate 9600. If the clock is to used as the source for the IRIG
- * Audio Decoder (refclock_irig.c in this distribution), it should be
- * configured for AM IRIG output and IRIG format 1 (IRIG B with
- * signature control). The GPS clock can be configured either to respond
- * to a 'T' poll character or left running continuously.
- *
- * There are two timecode formats used by these clocks. Format 0, which
- * is available with both the Netclock/2 and 8170, and format 2, which
- * is available only with the Netclock/2, specially modified 8170 and
- * GPS.
- *
- * Format 0 (22 ASCII printing characters):
- *
- * <cr><lf>i ddd hh:mm:ss TZ=zz<cr><lf>
- *
- * on-time = first <cr>
- * hh:mm:ss = hours, minutes, seconds
- * i = synchronization flag (' ' = in synch, '?' = out of synch)
- *
- * The alarm condition is indicated by other than ' ' at a, which occurs
- * during initial synchronization and when received signal is lost for
- * about ten hours.
- *
- * Format 2 (24 ASCII printing characters):
- *
- * <cr><lf>iqyy ddd hh:mm:ss.fff ld
- *
- * on-time = <cr>
- * i = synchronization flag (' ' = in synch, '?' = out of synch)
- * q = quality indicator (' ' = locked, 'A'...'D' = unlocked)
- * yy = year (as broadcast)
- * ddd = day of year
- * hh:mm:ss.fff = hours, minutes, seconds, milliseconds
- *
- * The alarm condition is indicated by other than ' ' at a, which occurs
- * during initial synchronization and when received signal is lost for
- * about ten hours. The unlock condition is indicated by other than ' '
- * at q.
- *
- * The q is normally ' ' when the time error is less than 1 ms and a
- * character in the set 'A'...'D' when the time error is less than 10,
- * 100, 500 and greater than 500 ms respectively. The l is normally ' ',
- * but is set to 'L' early in the month of an upcoming UTC leap second
- * and reset to ' ' on the first day of the following month. The d is
- * set to 'S' for standard time 'I' on the day preceding a switch to
- * daylight time, 'D' for daylight time and 'O' on the day preceding a
- * switch to standard time. The start bit of the first <cr> is
- * synchronized to the indicated time as returned.
- *
- * This driver does not need to be told which format is in use - it
- * figures out which one from the length of the message.The driver makes
- * no attempt to correct for the intrinsic jitter of the radio itself,
- * which is a known problem with the older radios.
- *
- * Fudge Factors
- *
- * This driver can retrieve a table of quality data maintained
- * internally by the Netclock/2 clock. If flag4 of the fudge
- * configuration command is set to 1, the driver will retrieve this
- * table and write it to the clockstats file on when the first timecode
- * message of a new day is received.
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/wwvb%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-13) /* precision assumed (about 100 us) */
-#define REFID "WWVB" /* reference ID */
-#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 */
-
-/*
- * WWVB unit control structure
- */
-struct wwvbunit {
- u_char tcswitch; /* timecode switch */
- l_fp laststamp; /* last receive timestamp */
- u_char lasthour; /* last hour (for monitor) */
- u_char linect; /* count ignored lines (for monitor */
-};
-
-/*
- * Function prototypes
- */
-static int wwvb_start P((int, struct peer *));
-static void wwvb_shutdown P((int, struct peer *));
-static void wwvb_receive P((struct recvbuf *));
-static void wwvb_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_wwvb = {
- wwvb_start, /* start up driver */
- wwvb_shutdown, /* shut down driver */
- wwvb_poll, /* transmit poll message */
- noentry, /* not used (old wwvb_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old wwvb_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * wwvb_start - open the devices and initialize data for processing
- */
-static int
-wwvb_start(
- int unit,
- struct peer *peer
- )
-{
- register struct wwvbunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct wwvbunit *)
- emalloc(sizeof(struct wwvbunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct wwvbunit));
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
- pp->io.clock_recv = wwvb_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- peer->burst = MAXSTAGE;
- return (1);
-}
-
-
-/*
- * wwvb_shutdown - shut down the clock
- */
-static void
-wwvb_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct wwvbunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct wwvbunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * wwvb_receive - receive data from the serial interface
- */
-static void
-wwvb_receive(
- struct recvbuf *rbufp
- )
-{
- struct wwvbunit *up;
- struct refclockproc *pp;
- struct peer *peer;
-
- l_fp trtmp; /* arrival timestamp */
- int tz; /* time zone */
- int day, month; /* ddd conversion */
- int temp; /* int temp */
- char syncchar; /* synchronization indicator */
- char qualchar; /* quality indicator */
- char leapchar; /* leap indicator */
- char dstchar; /* daylight/standard indicator */
- char tmpchar; /* trashbin */
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct wwvbunit *)pp->unitptr;
- temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
-
- /*
- * Note we get a buffer and timestamp for both a <cr> and <lf>,
- * but only the <cr> timestamp is retained. Note: in format 0 on
- * a Netclock/2 or upgraded 8170 the start bit is delayed 100
- * +-50 us relative to the pps; however, on an unmodified 8170
- * the start bit can be delayed up to 10 ms. In format 2 the
- * reading precision is only to the millisecond. Thus, unless
- * you have a pps gadget and don't have to have the year, format
- * 0 provides the lowest jitter.
- */
- if (temp == 0) {
- if (up->tcswitch == 0) {
- up->tcswitch = 1;
- up->laststamp = trtmp;
- } else
- up->tcswitch = 0;
- return;
- }
- pp->lencode = temp;
- pp->lastrec = up->laststamp;
- up->laststamp = trtmp;
- up->tcswitch = 1;
-
- /*
- * We get down to business, check the timecode format and decode
- * its contents. This code uses the timecode length to determine
- * format 0, 2 or 3. If the timecode has invalid length or is
- * not in proper format, we declare bad format and exit.
- */
- syncchar = qualchar = leapchar = dstchar = ' ';
- tz = 0;
- switch (pp->lencode) {
-
- case LENWWVB0:
-
- /*
- * Timecode format 0: "I ddd hh:mm:ss DTZ=nn"
- */
- if (sscanf(pp->a_lastcode,
- "%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:
-
- /*
- * Timecode format 2: "IQyy ddd hh:mm:ss.mmm LD" */
- if (sscanf(pp->a_lastcode,
- "%c%c %2d %3d %2d:%2d:%2d.%3ld %c",
- &syncchar, &qualchar, &pp->year, &pp->day,
- &pp->hour, &pp->minute, &pp->second, &pp->nsec,
- &leapchar) == 9)
- pp->nsec *= 1000000;
- break;
-
- case LENWWVB3:
-
- /*
- * Timecode format 3: "0003I yyyymmdd hhmmss+0000SL#"
- */
- if (sscanf(pp->a_lastcode,
- "0003%c %4d%2d%2d %2d%2d%2d+0000%c%c",
- &syncchar, &pp->year, &month, &day, &pp->hour,
- &pp->minute, &pp->second, &dstchar, &leapchar) == 8)
- {
- pp->day = ymd2yd(pp->year, month, day);
- pp->nsec = 0;
- break;
- }
-
- default:
-
- /*
- * Unknown format: If dumping internal table, record
- * stats; otherwise, declare bad format.
- */
- if (up->linect > 0) {
- up->linect--;
- record_clock_stats(&peer->srcadr,
- pp->a_lastcode);
- } else {
- refclock_report(peer, CEVNT_BADREPLY);
- }
- return;
- }
-
- /*
- * Decode synchronization, quality and leap characters. If
- * unsynchronized, set the leap bits accordingly and exit.
- * Otherwise, set the leap bits according to the leap character.
- * Once synchronized, the dispersion depends only on the
- * quality character.
- */
- switch (qualchar) {
-
- case ' ':
- pp->disp = .001;
- pp->lastref = pp->lastrec;
- break;
-
- case 'A':
- pp->disp = .01;
- break;
-
- case 'B':
- pp->disp = .1;
- break;
-
- case 'C':
- pp->disp = .5;
- break;
-
- case 'D':
- pp->disp = MAXDISPERSE;
- break;
-
- default:
- pp->disp = MAXDISPERSE;
- refclock_report(peer, CEVNT_BADREPLY);
- break;
- }
- if (syncchar != ' ')
- pp->leap = LEAP_NOTINSYNC;
- else if (leapchar == 'L')
- pp->leap = LEAP_ADDSECOND;
- else
- pp->leap = LEAP_NOWARNING;
-
- /*
- * Process the new sample in the median filter and determine the
- * timecode timestamp.
- */
- if (!refclock_process(pp))
- refclock_report(peer, CEVNT_BADTIME);
-}
-
-
-/*
- * wwvb_poll - called by the transmit procedure
- */
-static void
-wwvb_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct wwvbunit *up;
- struct refclockproc *pp;
- char pollchar; /* character sent to clock */
-
- /*
- * Time to poll the clock. The Spectracom clock responds to a
- * 'T' by returning a timecode in the format(s) specified 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 wwvbunit *)pp->unitptr;
- if (up->linect > 0)
- pollchar = 'R';
- else
- pollchar = 'T';
- if (write(pp->io.fd, &pollchar, 1) != 1)
- refclock_report(peer, CEVNT_FAULT);
- if (peer->burst > 0)
- return;
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- refclock_receive(peer);
- 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
- * quality table at the first timecode beginning the day.
- */
- if (pp->sloppyclockflag & CLK_FLAG4 && pp->hour <
- (int)up->lasthour)
- up->linect = MONLIN;
- up->lasthour = pp->hour;
-}
-
-#else
-int refclock_wwvb_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpd/refclock_zyfer.c b/contrib/ntp/ntpd/refclock_zyfer.c
deleted file mode 100644
index 44f2c4d..0000000
--- a/contrib/ntp/ntpd/refclock_zyfer.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * refclock_zyfer - clock driver for the Zyfer GPSTarplus Clock
- *
- * Harlan Stenn, Jan 2002
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#if defined(REFCLOCK) && defined(CLOCK_ZYFER)
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-#include "ntp_unixtime.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef HAVE_SYS_TERMIOS_H
-# include <sys/termios.h>
-#endif
-#ifdef HAVE_SYS_PPSCLOCK_H
-# include <sys/ppsclock.h>
-#endif
-
-/*
- * This driver provides support for the TOD serial port of a Zyfer GPStarplus.
- * This clock also provides PPS as well as IRIG outputs.
- * Precision is limited by the serial driver, etc.
- *
- * If I was really brave I'd hack/generalize the serial driver to deal
- * with arbitrary on-time characters. This clock *begins* the stream with
- * `!`, the on-time character, and the string is *not* EOL-terminated.
- *
- * Configure the beast for 9600, 8N1. While I see leap-second stuff
- * in the documentation, the published specs on the TOD format only show
- * the seconds going to '59'. I see no leap warning in the TOD format.
- *
- * The clock sends the following message once per second:
- *
- * !TIME,2002,017,07,59,32,2,4,1
- * YYYY DDD HH MM SS m T O
- *
- * ! On-time character
- * YYYY Year
- * DDD 001-366 Day of Year
- * HH 00-23 Hour
- * MM 00-59 Minute
- * SS 00-59 Second (probably 00-60)
- * m 1-5 Time Mode:
- * 1 = GPS time
- * 2 = UTC time
- * 3 = LGPS time (Local GPS)
- * 4 = LUTC time (Local UTC)
- * 5 = Manual time
- * T 4-9 Time Figure Of Merit:
- * 4 x <= 1us
- * 5 1us < x <= 10 us
- * 6 10us < x <= 100us
- * 7 100us < x <= 1ms
- * 8 1ms < x <= 10ms
- * 9 10ms < x
- * O 0-4 Operation Mode:
- * 0 Warm-up
- * 1 Time Locked
- * 2 Coasting
- * 3 Recovering
- * 4 Manual
- *
- */
-
-/*
- * Interface definitions
- */
-#define DEVICE "/dev/zyfer%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
-#define PRECISION (-20) /* precision assumed (about 1 us) */
-#define REFID "GPS\0" /* reference ID */
-#define DESCRIPTION "Zyfer GPStarplus" /* WRU */
-
-#define LENZYFER 29 /* timecode length */
-
-/*
- * Unit control structure
- */
-struct zyferunit {
- u_char Rcvbuf[LENZYFER + 1];
- u_char polled; /* poll message flag */
- int pollcnt;
- l_fp tstamp; /* timestamp of last poll */
- int Rcvptr;
-};
-
-/*
- * Function prototypes
- */
-static int zyfer_start P((int, struct peer *));
-static void zyfer_shutdown P((int, struct peer *));
-static void zyfer_receive P((struct recvbuf *));
-static void zyfer_poll P((int, struct peer *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_zyfer = {
- zyfer_start, /* start up driver */
- zyfer_shutdown, /* shut down driver */
- zyfer_poll, /* transmit poll message */
- noentry, /* not used (old zyfer_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old zyfer_buginfo) */
- NOFLAGS /* not used */
-};
-
-
-/*
- * zyfer_start - open the devices and initialize data for processing
- */
-static int
-zyfer_start(
- int unit,
- struct peer *peer
- )
-{
- register struct zyferunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port.
- * Something like LDISC_ACTS that looked for ! would be nice...
- */
- (void)sprintf(device, DEVICE, unit);
- if ( !(fd = refclock_open(device, SPEED232, LDISC_RAW)) )
- return (0);
-
- msyslog(LOG_NOTICE, "zyfer(%d) fd: %d dev <%s>", unit, fd, device);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct zyferunit *)
- emalloc(sizeof(struct zyferunit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct zyferunit));
- pp = peer->procptr;
- pp->io.clock_recv = zyfer_receive;
- pp->io.srcclock = (caddr_t)peer;
- pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = PRECISION;
- pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
- up->pollcnt = 2;
- up->polled = 0; /* May not be needed... */
-
- return (1);
-}
-
-
-/*
- * zyfer_shutdown - shut down the clock
- */
-static void
-zyfer_shutdown(
- int unit,
- struct peer *peer
- )
-{
- register struct zyferunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct zyferunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
-}
-
-
-/*
- * zyfer_receive - receive data from the serial interface
- */
-static void
-zyfer_receive(
- struct recvbuf *rbufp
- )
-{
- register struct zyferunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- int tmode; /* Time mode */
- int tfom; /* Time Figure Of Merit */
- int omode; /* Operation mode */
- u_char *p;
-#ifdef PPS
- struct ppsclockev ppsev;
- int request;
-#ifdef HAVE_CIOGETEV
- request = CIOGETEV;
-#endif
-#ifdef HAVE_TIOCGPPSEV
- request = TIOCGPPSEV;
-#endif
-#endif /* PPS */
-
- peer = (struct peer *)rbufp->recv_srcclock;
- pp = peer->procptr;
- up = (struct zyferunit *)pp->unitptr;
- p = (u_char *) &rbufp->recv_space;
- /*
- * If lencode is 0:
- * - if *rbufp->recv_space is !
- * - - call refclock_gtlin to get things going
- * - else flush
- * else stuff it on the end of lastcode
- * If we don't have LENZYFER bytes
- * - wait for more data
- * Crack the beast, and if it's OK, process it.
- *
- * We use refclock_gtlin() because we might use LDISC_CLK.
- *
- * Under FreeBSD, we get the ! followed by two 14-byte packets.
- */
-
- if (pp->lencode >= LENZYFER)
- pp->lencode = 0;
-
- if (!pp->lencode) {
- if (*p == '!')
- pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode,
- BMAX, &pp->lastrec);
- else
- return;
- } else {
- memcpy(pp->a_lastcode + pp->lencode, p, rbufp->recv_length);
- pp->lencode += rbufp->recv_length;
- pp->a_lastcode[pp->lencode] = '\0';
- }
-
- if (pp->lencode < LENZYFER)
- return;
-
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
- /*
- * 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.
- */
-
- if (pp->lencode != LENZYFER) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Timecode sample: "!TIME,2002,017,07,59,32,2,4,1"
- */
- if (sscanf(pp->a_lastcode, "!TIME,%4d,%3d,%2d,%2d,%2d,%d,%d,%d",
- &pp->year, &pp->day, &pp->hour, &pp->minute, &pp->second,
- &tmode, &tfom, &omode) != 8) {
- refclock_report(peer, CEVNT_BADREPLY);
- return;
- }
-
- if (tmode != 2) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /* Should we make sure tfom is 4? */
-
- if (omode != 1) {
- pp->leap = LEAP_NOTINSYNC;
- return;
- }
-#ifdef PPS
- if(ioctl(fdpps,request,(caddr_t) &ppsev) >=0) {
- ppsev.tv.tv_sec += (u_int32) JAN_1970;
- TVTOTS(&ppsev.tv,&up->tstamp);
- }
- /* record the last ppsclock event time stamp */
- pp->lastrec = up->tstamp;
-#endif /* PPS */
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Good place for record_clock_stats()
- */
- up->pollcnt = 2;
-
- if (up->polled) {
- up->polled = 0;
- refclock_receive(peer);
- }
-}
-
-
-/*
- * zyfer_poll - called by the transmit procedure
- */
-static void
-zyfer_poll(
- int unit,
- struct peer *peer
- )
-{
- register struct zyferunit *up;
- struct refclockproc *pp;
-
- /*
- * We don't really do anything here, except arm the receiving
- * side to capture a sample and check for timeouts.
- */
- pp = peer->procptr;
- up = (struct zyferunit *)pp->unitptr;
- if (!up->pollcnt)
- refclock_report(peer, CEVNT_TIMEOUT);
- else
- up->pollcnt--;
- pp->polls++;
- up->polled = 1;
-}
-
-#else
-int refclock_zyfer_bs;
-#endif /* REFCLOCK */
diff --git a/contrib/ntp/ntpdate/Makefile.am b/contrib/ntp/ntpdate/Makefile.am
deleted file mode 100644
index bfe3fea..0000000
--- a/contrib/ntp/ntpdate/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-#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
-DISTCLEANFILES = .version version.c stamp-v
-noinst_HEADERS = ntpdate.h
-#EXTRA_DIST = ntpdate.mak
-ETAGS_ARGS = Makefile.am
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-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
deleted file mode 100644
index 391f494..0000000
--- a/contrib/ntp/ntpdate/Makefile.in
+++ /dev/null
@@ -1,481 +0,0 @@
-# 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
-#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
-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 =
-EXTRA_PROGRAMS = ntptimeset$(EXEEXT)
-bin_PROGRAMS = ntpdate$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-ntpdate_SOURCES = ntpdate.c
-ntpdate_OBJECTS = ntpdate$U.$(OBJEXT)
-ntpdate_LDADD = $(LDADD)
-ntpdate_DEPENDENCIES = version.o ../libntp/libntp.a
-ntpdate_LDFLAGS =
-am_ntptimeset_OBJECTS = ntptimeset$U.$(OBJEXT) \
- ntptime_config$U.$(OBJEXT)
-ntptimeset_OBJECTS = $(am_ntptimeset_OBJECTS)
-ntptimeset_LDADD = $(LDADD)
-ntptimeset_DEPENDENCIES = version.o ../libntp/libntp.a
-ntptimeset_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = ntpdate.c $(ntptimeset_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
- Makefile.am
-SOURCES = ntpdate.c $(ntptimeset_SOURCES)
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-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)
-ntpdate$(EXEEXT): $(ntpdate_OBJECTS) $(ntpdate_DEPENDENCIES)
- @rm -f ntpdate$(EXEEXT)
- $(LINK) $(ntpdate_LDFLAGS) $(ntpdate_OBJECTS) $(ntpdate_LDADD) $(LIBS)
-ntptimeset$(EXEEXT): $(ntptimeset_OBJECTS) $(ntptimeset_DEPENDENCIES)
- @rm -f ntptimeset$(EXEEXT)
- $(LINK) $(ntptimeset_LDFLAGS) $(ntptimeset_OBJECTS) $(ntptimeset_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -test "$U" = "" || 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@
-
-.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`
-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) > $@ || 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) > $@ || 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) > $@ || 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) $(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 $(PROGRAMS) $(HEADERS)
-
-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)
- -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."
-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-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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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 pdf pdf-am ps ps-am tags \
- uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
-
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-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.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/ntp/ntpdate/README b/contrib/ntp/ntpdate/README
deleted file mode 100644
index 27b51ed..0000000
--- a/contrib/ntp/ntpdate/README
+++ /dev/null
@@ -1,7 +0,0 @@
-README file for directory ./ntpdate of the NTP Version 4 distribution
-
-This directory contains the sources for the ntpdate utility program. See
-the README and RELNOTES files in the parent directory for directions on
-how to make and install this program. The current version number of this
-program is in the version.c file.
-
diff --git a/contrib/ntp/ntpdate/ntpdate.c b/contrib/ntp/ntpdate/ntpdate.c
deleted file mode 100644
index b2cbe7e..0000000
--- a/contrib/ntp/ntpdate/ntpdate.c
+++ /dev/null
@@ -1,2225 +0,0 @@
-/*
- * ntpdate - set the time of day by polling one or more NTP servers
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_NETINFO
-#include <netinfo/ni.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntpdate.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#endif
-#ifndef SYS_WINNT
-# include <netdb.h>
-# ifdef HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-# else
-# include <signal.h>
-# endif
-# ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-# endif
-#endif /* SYS_WINNT */
-#ifdef HAVE_SYS_RESOURCE_H
-# 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"
-# include "timers.h"
-
-/* select wants a zero structure ... */
-struct timeval timeout = {0,0};
-#else
-struct timeval timeout = {60,0};
-#endif
-
-#ifdef HAVE_NETINFO
-#include <netinfo/ni.h>
-#endif
-
-#include "recvbuff.h"
-
-#ifdef SYS_WINNT
-#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 */
-
-/*
- * Scheduling priority we run at
- */
-#ifndef SYS_VXWORKS
-# define NTPDATE_PRIO (-12)
-#else
-# define NTPDATE_PRIO (100)
-#endif
-
-#if defined(HAVE_TIMER_SETTIME) || defined (HAVE_TIMER_CREATE)
-/* POSIX TIMERS - vxWorks doesn't have itimer - casey */
-static timer_t ntpdate_timerid;
-#endif
-
-/*
- * Compatibility stuff for Version 2
- */
-#define NTP_MAXSKW 0x28f /* 0.01 sec in fp format */
-#define NTP_MINDIST 0x51f /* 0.02 sec in fp format */
-#define PEER_MAXDISP (64*FP_SECOND) /* maximum dispersion (fp 64) */
-#define NTP_INFIN 15 /* max stratum, infinity a la Bellman-Ford */
-#define NTP_MAXWGT (8*FP_SECOND) /* maximum select weight 8 seconds */
-#define NTP_MAXLIST 5 /* maximum select list size */
-#define PEER_SHIFT 8 /* 8 suitable for crystal time base */
-
-/*
- * Debugging flag
- */
-volatile int debug = 0;
-
-/*
- * File descriptor masks etc. for call to select
- */
-
-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[MAX_AF];
-#else
-fd_set fdmask;
-int maxfd;
-#endif
-int polltest = 0;
-
-/*
- * Initializing flag. All async routines watch this and only do their
- * thing when it is clear.
- */
-int initializing = 1;
-
-/*
- * Alarm flag. Set when an alarm occurs
- */
-volatile int alarm_flag = 0;
-
-/*
- * Simple query flag.
- */
-int simple_query = 0;
-
-/*
- * Unpriviledged port flag.
- */
-int unpriv_port = 0;
-
-/*
- * Time to spend measuring drift rate
- */
-int rate = 0;
-
-/*
- * Program name.
- */
-char *progname;
-
-/*
- * Systemwide parameters and flags
- */
-int sys_samples = DEFSAMPLES; /* number of samples/server */
-u_long sys_timeout = DEFTIMEOUT; /* timeout time, in TIMER_HZ units */
-struct server *sys_servers; /* the server list */
-int sys_numservers = 0; /* number of servers to poll */
-int sys_authenticate = 0; /* true when authenticating */
-u_int32 sys_authkey = 0; /* set to authentication key in use */
-u_long sys_authdelay = 0; /* authentication delay */
-int sys_version = NTP_VERSION; /* version to poll with */
-
-/*
- * The current internal time
- */
-u_long current_time = 0;
-
-/*
- * Counter for keeping track of completed servers
- */
-int complete_servers = 0;
-
-/*
- * File of encryption keys
- */
-
-#ifndef KEYFILE
-# ifndef SYS_WINNT
-#define KEYFILE "/etc/ntp.keys"
-# else
-#define KEYFILE "%windir%\\ntp.keys"
-# endif /* SYS_WINNT */
-#endif /* KEYFILE */
-
-#ifndef SYS_WINNT
-const char *key_file = KEYFILE;
-#else
-char key_file_storage[MAX_PATH+1], *key_file ;
-#endif /* SYS_WINNT */
-
-/*
- * Miscellaneous flags
- */
-int verbose = 0;
-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));
-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_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_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 void printserver P((struct server *, FILE *));
-
-#ifdef SYS_WINNT
-int on = 1;
-WORD wVersionRequested;
-WSADATA wsaData;
-HANDLE TimerThreadHandle = NULL;
-#endif /* SYS_WINNT */
-
-#ifdef NO_MAIN_ALLOWED
-CALL(ntpdate,"ntpdate",ntpdatemain);
-
-void clear_globals()
-{
- /*
- * Debugging flag
- */
- debug = 0;
-
- ntp_optind = 0;
- /*
- * Initializing flag. All async routines watch this and only do their
- * thing when it is clear.
- */
- initializing = 1;
-
- /*
- * Alarm flag. Set when an alarm occurs
- */
- alarm_flag = 0;
-
- /*
- * Simple query flag.
- */
- simple_query = 0;
-
- /*
- * Unpriviledged port flag.
- */
- unpriv_port = 0;
-
- /*
- * Time to spend measuring drift rate
- */
- rate = 0;
- /*
- * Systemwide parameters and flags
- */
- sys_numservers = 0; /* number of servers to poll */
- sys_authenticate = 0; /* true when authenticating */
- sys_authkey = 0; /* set to authentication key in use */
- sys_authdelay = 0; /* authentication delay */
- sys_version = NTP_VERSION; /* version to poll with */
-
- /*
- * The current internal time
- */
- current_time = 0;
-
- /*
- * Counter for keeping track of completed servers
- */
- complete_servers = 0;
- verbose = 0;
- always_step = 0;
- never_step = 0;
-}
-#endif
-
-#ifdef HAVE_NETINFO
-static ni_namelist *getnetinfoservers P((void));
-#endif
-
-/*
- * Main program. Initialize us and loop waiting for I/O and/or
- * timer expiries.
- */
-#ifndef NO_MAIN_ALLOWED
-int
-main(
- int argc,
- char *argv[]
- )
-{
- return ntpdatemain (argc, argv);
-}
-#endif /* NO_MAIN_ALLOWED */
-
-int
-ntpdatemain (
- int argc,
- char *argv[]
- )
-{
- int was_alarmed;
- struct recvbuf *rbuflist;
- struct recvbuf *rbuf;
- l_fp tmp;
- int errflg;
- int c;
- int nfound;
-
-#ifdef HAVE_NETINFO
- ni_namelist *netinfoservers;
-#endif
-#ifdef SYS_WINNT
- HANDLE process_handle;
-
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData)) {
- netsyslog(LOG_ERR, "No useable winsock.dll: %m");
- exit(1);
- }
-
- key_file = key_file_storage;
-
- if (!ExpandEnvironmentStrings(KEYFILE, key_file, MAX_PATH))
- {
- msyslog(LOG_ERR, "ExpandEnvironmentStrings(KEYFILE) failed: %m\n");
- }
-#endif /* SYS_WINNT */
-
-#ifdef NO_MAIN_ALLOWED
- clear_globals();
-#endif
-
- errflg = 0;
- progname = argv[0];
- syslogit = 0;
-
- /*
- * Decode argument list
- */
- 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;
- sys_authkey = c;
- break;
- case 'b':
- always_step++;
- never_step = 0;
- break;
- case 'B':
- never_step++;
- always_step = 0;
- break;
- case 'd':
- ++debug;
- break;
- case 'e':
- if (!atolfp(ntp_optarg, &tmp)
- || tmp.l_ui != 0) {
- (void) fprintf(stderr,
- "%s: encryption delay %s is unlikely\n",
- progname, ntp_optarg);
- errflg++;
- } else {
- sys_authdelay = tmp.l_uf;
- }
- break;
- case 'k':
- key_file = ntp_optarg;
- break;
- case 'o':
- sys_version = atoi(ntp_optarg);
- break;
- case 'p':
- c = atoi(ntp_optarg);
- if (c <= 0 || c > NTP_SHIFT) {
- (void) fprintf(stderr,
- "%s: number of samples (%d) is invalid\n",
- progname, c);
- errflg++;
- } else {
- sys_samples = c;
- }
- break;
- case 'q':
- simple_query = 1;
- break;
- case 'r':
- c = atoi(ntp_optarg);
- if (c <= 0 || c > (60 * 60)) {
- (void) fprintf(stderr,
- "%s: rate (%d) is invalid: 0 - %d\n",
- progname, c, (60 * 60));
- errflg++;
- } else {
- rate = c;
- }
- break;
- case 's':
- syslogit = 1;
- break;
- case 't':
- if (!atolfp(ntp_optarg, &tmp)) {
- (void) fprintf(stderr,
- "%s: timeout %s is undecodeable\n",
- progname, ntp_optarg);
- errflg++;
- } else {
- sys_timeout = ((LFPTOFP(&tmp) * TIMER_HZ)
- + 0x8000) >> 16;
- if (sys_timeout == 0)
- sys_timeout = 1;
- }
- break;
- case 'v':
- verbose = 1;
- break;
- case 'u':
- unpriv_port = 1;
- break;
- case '?':
- ++errflg;
- break;
- default:
- break;
- }
-
- if (errflg) {
- (void) fprintf(stderr,
- "usage: %s [-46bBdqsuv] [-a key#] [-e delay] [-k file] [-p samples] [-o version#] [-r rate] [-t timeo] server ...\n",
- progname);
- exit(2);
- }
-
- if (debug || simple_query) {
-#ifdef HAVE_SETVBUF
- static char buf[BUFSIZ];
- setvbuf(stdout, buf, _IOLBF, BUFSIZ);
-#else
- setlinebuf(stdout);
-#endif
- }
-
- /*
- * Logging. Open the syslog if we have to
- */
- if (syslogit) {
-#if !defined (SYS_WINNT) && !defined (SYS_VXWORKS) && !defined SYS_CYGWIN32
-# ifndef LOG_DAEMON
- openlog("ntpdate", LOG_PID);
-# else
-
-# ifndef LOG_NTP
-# define LOG_NTP LOG_DAEMON
-# endif
- openlog("ntpdate", LOG_PID | LOG_NDELAY, LOG_NTP);
- if (debug)
- setlogmask(LOG_UPTO(LOG_DEBUG));
- else
- setlogmask(LOG_UPTO(LOG_INFO));
-# endif /* LOG_DAEMON */
-#endif /* SYS_WINNT */
- }
-
- if (debug || verbose)
- msyslog(LOG_NOTICE, "%s", Version);
-
- /*
- * Add servers we are going to be polling
- */
-#ifdef HAVE_NETINFO
- netinfoservers = getnetinfoservers();
-#endif
-
- for ( ; ntp_optind < argc; ntp_optind++)
- addserver(argv[ntp_optind]);
-
-#ifdef HAVE_NETINFO
- if (netinfoservers) {
- if ( netinfoservers->ni_namelist_len &&
- *netinfoservers->ni_namelist_val ) {
- u_int servercount = 0;
- while (servercount < netinfoservers->ni_namelist_len) {
- if (debug) msyslog(LOG_DEBUG,
- "Adding time server %s from NetInfo configuration.",
- netinfoservers->ni_namelist_val[servercount]);
- addserver(netinfoservers->ni_namelist_val[servercount++]);
- }
- }
- ni_namelist_free(netinfoservers);
- free(netinfoservers);
- }
-#endif
-
- if (sys_numservers == 0) {
- msyslog(LOG_ERR, "no servers can be used, exiting");
- exit(1);
- }
-
- /*
- * Initialize the time of day routines and the I/O subsystem
- */
- if (sys_authenticate) {
- init_auth();
- if (!authreadkeys(key_file)) {
- msyslog(LOG_ERR, "no key file <%s>, exiting", key_file);
- exit(1);
- }
- authtrust(sys_authkey, 1);
- if (!authistrusted(sys_authkey)) {
- char buf[10];
-
- (void) sprintf(buf, "%lu", (unsigned long)sys_authkey);
- msyslog(LOG_ERR, "authentication key %s unknown", buf);
- exit(1);
- }
- }
- init_io();
- init_alarm();
-
- /*
- * Set the priority.
- */
-#ifdef SYS_VXWORKS
- taskPrioritySet( taskIdSelf(), NTPDATE_PRIO);
-#endif
-#if defined(HAVE_ATT_NICE)
- nice (NTPDATE_PRIO);
-#endif
-#if defined(HAVE_BSD_NICE)
- (void) setpriority(PRIO_PROCESS, 0, NTPDATE_PRIO);
-#endif
-#ifdef SYS_WINNT
- process_handle = GetCurrentProcess();
- if (!SetPriorityClass(process_handle, (DWORD) REALTIME_PRIORITY_CLASS)) {
- msyslog(LOG_ERR, "SetPriorityClass failed: %m");
- }
-#endif /* SYS_WINNT */
-
-
-
- initializing = 0;
- was_alarmed = 0;
- rbuflist = (struct recvbuf *)0;
-
- while (complete_servers < sys_numservers) {
-#ifdef HAVE_POLL_H
- struct pollfd* rdfdes;
- rdfdes = fdmask;
-#else
- fd_set rdfdes;
- rdfdes = fdmask;
-#endif
-
- if (alarm_flag) { /* alarmed? */
- was_alarmed = 1;
- alarm_flag = 0;
- }
- rbuflist = getrecvbufs(); /* get received buffers */
-
- if (!was_alarmed && rbuflist == (struct recvbuf *)0) {
- /*
- * Nothing to do. Wait for something.
- */
-#ifdef HAVE_POLL_H
- nfound = poll(rdfdes, (unsigned int)nbsock, timeout.tv_sec * 1000);
-
-#else
- nfound = select(maxfd, &rdfdes, (fd_set *)0,
- (fd_set *)0, &timeout);
-#endif
- if (nfound > 0)
- input_handler();
- else if (
-#ifndef SYS_WINNT
- nfound == -1
-#else
- nfound == SOCKET_ERROR
-#endif /* SYS_WINNT */
- ) {
-#ifndef SYS_WINNT
- if (errno != EINTR)
-#endif
- netsyslog(LOG_ERR,
-#ifdef HAVE_POLL_H
- "poll() error: %m"
-#else
- "select() error: %m"
-#endif
- );
- } else {
-#ifndef SYS_VXWORKS
- netsyslog(LOG_DEBUG,
-#ifdef HAVE_POLL_H
- "poll(): nfound = %d, error: %m",
-#else
- "select(): nfound = %d, error: %m",
-#endif
- nfound);
-#endif
- }
- if (alarm_flag) { /* alarmed? */
- was_alarmed = 1;
- alarm_flag = 0;
- }
- rbuflist = getrecvbufs(); /* get received buffers */
- }
-
- /*
- * Out here, signals are unblocked. Call receive
- * procedure for each incoming packet.
- */
- while (rbuflist != (struct recvbuf *)0) {
- rbuf = rbuflist;
- rbuflist = rbuf->next;
- receive(rbuf);
- freerecvbuf(rbuf);
- }
-
- /*
- * Call timer to process any timeouts
- */
- if (was_alarmed) {
- timer();
- was_alarmed = 0;
- }
-
- /*
- * Go around again
- */
- }
-
- /*
- * When we get here we've completed the polling of all servers.
- * Adjust the clock, then exit.
- */
-#ifdef SYS_WINNT
- WSACleanup();
-#endif
-#ifdef SYS_VXWORKS
- close (fd);
- timer_delete(ntpdate_timerid);
-#endif
-
- return clock_adjust();
-}
-
-
-/*
- * transmit - transmit a packet to the given server, or mark it completed.
- * This is called by the timeout routine and by the receive
- * procedure.
- */
-static void
-transmit(
- register struct server *server
- )
-{
- struct pkt xpkt;
-
- if (debug)
- printf("transmit(%s)\n", stoa(&(server->srcadr)));
-
- if (server->filter_nextpt < server->xmtcnt) {
- l_fp ts;
- /*
- * Last message to this server timed out. Shift
- * zeros into the filter.
- */
- L_CLR(&ts);
- server_data(server, 0, &ts, 0);
- }
-
- if ((int)server->filter_nextpt >= sys_samples) {
- /*
- * Got all the data we need. Mark this guy
- * completed and return.
- */
- server->event_time = 0;
- complete_servers++;
- return;
- }
-
- /*
- * If we're here, send another message to the server. Fill in
- * the packet and let 'er rip.
- */
- xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
- sys_version, MODE_CLIENT);
- xpkt.stratum = STRATUM_TO_PKT(STRATUM_UNSPEC);
- xpkt.ppoll = NTP_MINPOLL;
- xpkt.precision = NTPDATE_PRECISION;
- xpkt.rootdelay = htonl(NTPDATE_DISTANCE);
- xpkt.rootdispersion = htonl(NTPDATE_DISP);
- xpkt.refid = htonl(NTPDATE_REFID);
- L_CLR(&xpkt.reftime);
- L_CLR(&xpkt.org);
- L_CLR(&xpkt.rec);
-
- /*
- * Determine whether to authenticate or not. If so,
- * fill in the extended part of the packet and do it.
- * If not, just timestamp it and send it away.
- */
- if (sys_authenticate) {
- int len;
-
- xpkt.exten[0] = htonl(sys_authkey);
- get_systime(&server->xmt);
- L_ADDUF(&server->xmt, sys_authdelay);
- HTONL_FP(&server->xmt, &xpkt.xmt);
- len = authencrypt(sys_authkey, (u_int32 *)&xpkt, LEN_PKT_NOMAC);
- sendpkt(&(server->srcadr), &xpkt, (int)(LEN_PKT_NOMAC + len));
-
- if (debug > 1)
- printf("transmit auth to %s\n",
- 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", stoa(&(server->srcadr)));
- }
-
- /*
- * Update the server timeout and transmit count
- */
- server->event_time = current_time + sys_timeout;
- server->xmtcnt++;
-}
-
-
-/*
- * receive - receive and process an incoming frame
- */
-static void
-receive(
- struct recvbuf *rbufp
- )
-{
- register struct pkt *rpkt;
- register struct server *server;
- register s_fp di;
- l_fp t10, t23, tmp;
- l_fp org;
- l_fp rec;
- l_fp ci;
- int has_mac;
- int is_authentic;
-
- if (debug)
- printf("receive(%s)\n", stoa(&rbufp->recv_srcadr));
- /*
- * Check to see if the packet basically looks like something
- * intended for us.
- */
- if (rbufp->recv_length == LEN_PKT_NOMAC)
- has_mac = 0;
- else if (rbufp->recv_length >= LEN_PKT_NOMAC)
- has_mac = 1;
- else {
- if (debug)
- printf("receive: packet length %d\n",
- rbufp->recv_length);
- return; /* funny length packet */
- }
-
- rpkt = &(rbufp->recv_pkt);
- if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION ||
- PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) {
- return;
- }
-
- if ((PKT_MODE(rpkt->li_vn_mode) != MODE_SERVER
- && PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE)
- || rpkt->stratum >= STRATUM_UNSPEC) {
- if (debug)
- printf("receive: mode %d stratum %d\n",
- PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
- return;
- }
-
- /*
- * So far, so good. See if this is from a server we know.
- */
- server = findserver(&(rbufp->recv_srcadr));
- if (server == NULL) {
- if (debug)
- printf("receive: server not found\n");
- return;
- }
-
- /*
- * Decode the org timestamp and make sure we're getting a response
- * to our last request.
- */
- NTOHL_FP(&rpkt->org, &org);
- if (!L_ISEQU(&org, &server->xmt)) {
- if (debug)
- printf("receive: pkt.org and peer.xmt differ\n");
- return;
- }
-
- /*
- * Check out the authenticity if we're doing that.
- */
- if (!sys_authenticate)
- is_authentic = 1;
- else {
- is_authentic = 0;
-
- if (debug > 3)
- printf("receive: rpkt keyid=%ld sys_authkey=%ld decrypt=%ld\n",
- (long int)ntohl(rpkt->exten[0]), (long int)sys_authkey,
- (long int)authdecrypt(sys_authkey, (u_int32 *)rpkt,
- LEN_PKT_NOMAC, (int)(rbufp->recv_length - LEN_PKT_NOMAC)));
-
- if (has_mac && ntohl(rpkt->exten[0]) == sys_authkey &&
- authdecrypt(sys_authkey, (u_int32 *)rpkt, LEN_PKT_NOMAC,
- (int)(rbufp->recv_length - LEN_PKT_NOMAC)))
- is_authentic = 1;
- if (debug)
- printf("receive: authentication %s\n",
- is_authentic ? "passed" : "failed");
- }
- server->trust <<= 1;
- if (!is_authentic)
- server->trust |= 1;
-
- /*
- * Looks good. Record info from the packet.
- */
- server->leap = PKT_LEAP(rpkt->li_vn_mode);
- server->stratum = PKT_TO_STRATUM(rpkt->stratum);
- server->precision = rpkt->precision;
- server->rootdelay = ntohl(rpkt->rootdelay);
- server->rootdispersion = ntohl(rpkt->rootdispersion);
- server->refid = rpkt->refid;
- NTOHL_FP(&rpkt->reftime, &server->reftime);
- NTOHL_FP(&rpkt->rec, &rec);
- NTOHL_FP(&rpkt->xmt, &server->org);
-
- /*
- * Make sure the server is at least somewhat sane. If not, try
- * again.
- */
- if (L_ISZERO(&rec) || !L_ISHIS(&server->org, &rec)) {
- transmit(server);
- return;
- }
-
- /*
- * Calculate the round trip delay (di) and the clock offset (ci).
- * We use the equations (reordered from those in the spec):
- *
- * d = (t2 - t3) - (t1 - t0)
- * c = ((t2 - t3) + (t1 - t0)) / 2
- */
- t10 = server->org; /* pkt.xmt == t1 */
- L_SUB(&t10, &rbufp->recv_time); /* recv_time == t0*/
-
- t23 = rec; /* pkt.rec == t2 */
- L_SUB(&t23, &org); /* pkt->org == t3 */
-
- /* now have (t2 - t3) and (t0 - t1). Calculate (ci) and (di) */
- /*
- * Calculate (ci) = ((t1 - t0) / 2) + ((t2 - t3) / 2)
- * For large offsets this may prevent an overflow on '+'
- */
- ci = t10;
- L_RSHIFT(&ci);
- tmp = t23;
- L_RSHIFT(&tmp);
- L_ADD(&ci, &tmp);
-
- /*
- * Calculate di in t23 in full precision, then truncate
- * to an s_fp.
- */
- L_SUB(&t23, &t10);
- di = LFPTOFP(&t23);
-
- if (debug > 3)
- printf("offset: %s, delay %s\n", lfptoa(&ci, 6), fptoa(di, 5));
-
- di += (FP_SECOND >> (-(int)NTPDATE_PRECISION))
- + (FP_SECOND >> (-(int)server->precision)) + NTP_MAXSKW;
-
- if (di <= 0) { /* value still too raunchy to use? */
- L_CLR(&ci);
- di = 0;
- } else {
- di = max(di, NTP_MINDIST);
- }
-
- /*
- * Shift this data in, then transmit again.
- */
- server_data(server, (s_fp) di, &ci, 0);
- transmit(server);
-}
-
-
-/*
- * server_data - add a sample to the server's filter registers
- */
-static void
-server_data(
- register struct server *server,
- s_fp d,
- l_fp *c,
- u_fp e
- )
-{
- u_short i;
-
- i = server->filter_nextpt;
- if (i < NTP_SHIFT) {
- server->filter_delay[i] = d;
- server->filter_offset[i] = *c;
- server->filter_soffset[i] = LFPTOFP(c);
- server->filter_error[i] = e;
- server->filter_nextpt = (u_short)(i + 1);
- }
-}
-
-
-/*
- * clock_filter - determine a server's delay, dispersion and offset
- */
-static void
-clock_filter(
- register struct server *server
- )
-{
- register int i, j;
- int ord[NTP_SHIFT];
-
- /*
- * Sort indices into increasing delay order
- */
- for (i = 0; i < sys_samples; i++)
- ord[i] = i;
-
- for (i = 0; i < (sys_samples-1); i++) {
- for (j = i+1; j < sys_samples; j++) {
- if (server->filter_delay[ord[j]] == 0)
- continue;
- if (server->filter_delay[ord[i]] == 0
- || (server->filter_delay[ord[i]]
- > server->filter_delay[ord[j]])) {
- register int tmp;
-
- tmp = ord[i];
- ord[i] = ord[j];
- ord[j] = tmp;
- }
- }
- }
-
- /*
- * Now compute the dispersion, and assign values to delay and
- * offset. If there are no samples in the register, delay and
- * offset go to zero and dispersion is set to the maximum.
- */
- if (server->filter_delay[ord[0]] == 0) {
- server->delay = 0;
- L_CLR(&server->offset);
- server->soffset = 0;
- server->dispersion = PEER_MAXDISP;
- } else {
- register s_fp d;
-
- server->delay = server->filter_delay[ord[0]];
- server->offset = server->filter_offset[ord[0]];
- server->soffset = LFPTOFP(&server->offset);
- server->dispersion = 0;
- for (i = 1; i < sys_samples; i++) {
- if (server->filter_delay[ord[i]] == 0)
- d = PEER_MAXDISP;
- else {
- d = server->filter_soffset[ord[i]]
- - server->filter_soffset[ord[0]];
- if (d < 0)
- d = -d;
- if (d > PEER_MAXDISP)
- d = PEER_MAXDISP;
- }
- /*
- * XXX This *knows* PEER_FILTER is 1/2
- */
- server->dispersion += (u_fp)(d) >> i;
- }
- }
- /*
- * We're done
- */
-}
-
-
-/*
- * clock_select - select the pick-of-the-litter clock from the samples
- * we've got.
- */
-static struct server *
-clock_select(void)
-{
- register struct server *server;
- register int i;
- register int nlist;
- register s_fp d;
- register int j;
- register int n;
- s_fp local_threshold;
- struct server *server_list[NTP_MAXCLOCK];
- u_fp server_badness[NTP_MAXCLOCK];
- struct server *sys_server;
-
- /*
- * This first chunk of code is supposed to go through all
- * servers we know about to find the NTP_MAXLIST servers which
- * are most likely to succeed. We run through the list
- * doing the sanity checks and trying to insert anyone who
- * looks okay. We are at all times aware that we should
- * only keep samples from the top two strata and we only need
- * NTP_MAXLIST of them.
- */
- nlist = 0; /* none yet */
- for (server = sys_servers; server != NULL; server = server->next_server) {
- if (server->delay == 0) {
- if (debug)
- printf("%s: Server dropped: no data\n", ntoa(&server->srcadr));
- continue; /* no data */
- }
- if (server->stratum > NTP_INFIN) {
- if (debug)
- printf("%s: Server dropped: strata too high\n", ntoa(&server->srcadr));
- continue; /* stratum no good */
- }
- if (server->delay > NTP_MAXWGT) {
- if (debug)
- printf("%s: Server dropped: server too far away\n",
- ntoa(&server->srcadr));
- continue; /* too far away */
- }
- if (server->leap == LEAP_NOTINSYNC) {
- if (debug)
- printf("%s: Server dropped: Leap not in sync\n", ntoa(&server->srcadr));
- continue; /* he's in trouble */
- }
- if (!L_ISHIS(&server->org, &server->reftime)) {
- if (debug)
- printf("%s: Server dropped: server is very broken\n",
- ntoa(&server->srcadr));
- continue; /* very broken host */
- }
- if ((server->org.l_ui - server->reftime.l_ui)
- >= NTP_MAXAGE) {
- if (debug)
- printf("%s: Server dropped: Server has gone too long without sync\n",
- ntoa(&server->srcadr));
- continue; /* too long without sync */
- }
- if (server->trust != 0) {
- if (debug)
- printf("%s: Server dropped: Server is untrusted\n",
- ntoa(&server->srcadr));
- continue;
- }
-
- /*
- * This one seems sane. Find where he belongs
- * on the list.
- */
- d = server->dispersion + server->dispersion;
- for (i = 0; i < nlist; i++)
- if (server->stratum <= server_list[i]->stratum)
- break;
- for ( ; i < nlist; i++) {
- if (server->stratum < server_list[i]->stratum)
- break;
- if (d < (s_fp) server_badness[i])
- break;
- }
-
- /*
- * If i points past the end of the list, this
- * guy is a loser, else stick him in.
- */
- if (i >= NTP_MAXLIST)
- continue;
- for (j = nlist; j > i; j--)
- if (j < NTP_MAXLIST) {
- server_list[j] = server_list[j-1];
- server_badness[j]
- = server_badness[j-1];
- }
-
- server_list[i] = server;
- server_badness[i] = d;
- if (nlist < NTP_MAXLIST)
- nlist++;
- }
-
- /*
- * Got the five-or-less best. Cut the list where the number of
- * strata exceeds two.
- */
- j = 0;
- for (i = 1; i < nlist; i++)
- if (server_list[i]->stratum > server_list[i-1]->stratum)
- if (++j == 2) {
- nlist = i;
- break;
- }
-
- /*
- * Whew! What we should have by now is 0 to 5 candidates for
- * the job of syncing us. If we have none, we're out of luck.
- * If we have one, he's a winner. If we have more, do falseticker
- * detection.
- */
-
- if (nlist == 0)
- sys_server = 0;
- else if (nlist == 1) {
- sys_server = server_list[0];
- } else {
- /*
- * Re-sort by stratum, bdelay estimate quality and
- * server.delay.
- */
- for (i = 0; i < nlist-1; i++)
- for (j = i+1; j < nlist; j++) {
- if (server_list[i]->stratum
- < server_list[j]->stratum)
- break; /* already sorted by stratum */
- if (server_list[i]->delay
- < server_list[j]->delay)
- continue;
- server = server_list[i];
- server_list[i] = server_list[j];
- server_list[j] = server;
- }
-
- /*
- * Calculate the fixed part of the dispersion limit
- */
- local_threshold = (FP_SECOND >> (-(int)NTPDATE_PRECISION))
- + NTP_MAXSKW;
-
- /*
- * Now drop samples until we're down to one.
- */
- while (nlist > 1) {
- for (n = 0; n < nlist; n++) {
- server_badness[n] = 0;
- for (j = 0; j < nlist; j++) {
- if (j == n) /* with self? */
- continue;
- d = server_list[j]->soffset
- - server_list[n]->soffset;
- if (d < 0) /* absolute value */
- d = -d;
- /*
- * XXX This code *knows* that
- * NTP_SELECT is 3/4
- */
- for (i = 0; i < j; i++)
- d = (d>>1) + (d>>2);
- server_badness[n] += d;
- }
- }
-
- /*
- * We now have an array of nlist badness
- * coefficients. Find the badest. Find
- * the minimum precision while we're at
- * it.
- */
- i = 0;
- n = server_list[0]->precision;;
- for (j = 1; j < nlist; j++) {
- if (server_badness[j] >= server_badness[i])
- i = j;
- if (n > server_list[j]->precision)
- n = server_list[j]->precision;
- }
-
- /*
- * i is the index of the server with the worst
- * dispersion. If his dispersion is less than
- * the threshold, stop now, else delete him and
- * continue around again.
- */
- if ( (s_fp) server_badness[i] < (local_threshold
- + (FP_SECOND >> (-n))))
- break;
- for (j = i + 1; j < nlist; j++)
- server_list[j-1] = server_list[j];
- nlist--;
- }
-
- /*
- * What remains is a list of less than 5 servers. Take
- * the best.
- */
- sys_server = server_list[0];
- }
-
- /*
- * That's it. Return our server.
- */
- return sys_server;
-}
-
-
-/*
- * clock_adjust - process what we've received, and adjust the time
- * if we got anything decent.
- */
-static int
-clock_adjust(void)
-{
- register struct server *sp, *server;
- s_fp absoffset;
- int dostep;
-
- for (sp = sys_servers; sp != NULL; sp = sp->next_server)
- clock_filter(sp);
- server = clock_select();
-
- if (debug || simple_query) {
- for (sp = sys_servers; sp != NULL; sp = sp->next_server)
- printserver(sp, stdout);
- }
-
- if (server == 0) {
- msyslog(LOG_ERR,
- "no server suitable for synchronization found");
- return(1);
- }
-
- if (always_step) {
- dostep = 1;
- } else if (never_step) {
- dostep = 0;
- } else {
- absoffset = server->soffset;
- if (absoffset < 0)
- absoffset = -absoffset;
- dostep = (absoffset >= NTPDATE_THRESHOLD || absoffset < 0);
- }
-
- if (dostep) {
- if (simple_query || l_step_systime(&server->offset)) {
- msyslog(LOG_NOTICE, "step time server %s offset %s sec",
- 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",
- stoa(&server->srcadr),
- lfptoa(&server->offset, 6));
- }
-#else
- /* The NT SetSystemTimeAdjustment() call achieves slewing by
- * changing the clock frequency. This means that we cannot specify
- * it to slew the clock by a definite amount and then stop like
- * the Unix adjtime() routine. We can technically adjust the clock
- * frequency, have ntpdate sleep for a while, and then wake
- * up and reset the clock frequency, but this might cause some
- * grief if the user attempts to run ntpd immediately after
- * ntpdate and the socket is in use.
- */
- printf("\nThe -b option is required by ntpdate on Windows NT platforms\n");
- exit(1);
-#endif /* SYS_WINNT */
- }
- return(0);
-}
-
-
-/* XXX ELIMINATE: merge BIG slew into adj_systime in lib/systime.c */
-/*
- * addserver - determine a server's address and allocate a new structure
- * for it.
- */
-static void
-addserver(
- char *serv
- )
-{
- register struct server *server;
- /* 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;
-
-#ifdef DEBUG
- if (debug)
- printf("Looking for host %s and service %s\n", serv, service);
-#endif
-
- 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;
- }
-#ifdef DEBUG
- else if (debug) {
- fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr));
- }
-#endif
-
- server = (struct server *)emalloc(sizeof(struct server));
- memset((char *)server, 0, sizeof(struct server));
-
- /* 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;
- else {
- struct server *sp;
-
- for (sp = sys_servers; sp->next_server != NULL;
- sp = sp->next_server) ;
- sp->next_server = server;
- }
-}
-
-
-/*
- * 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_storage *addr
- )
-{
- struct server *server;
- struct server *mc_server;
-
- mc_server = NULL;
- if (htons(((struct sockaddr_in*)addr)->sin_port) != NTP_PORT)
- return 0;
-
- for (server = sys_servers; server != NULL;
- server = server->next_server) {
-
- if (memcmp(addr, &server->srcadr, SOCKLEN(addr))==0)
- return server;
- /* 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));
-
- 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;
- transmit(server);
- }
- return NULL;
-}
-
-
-/*
- * timer - process a timer interrupt
- */
-void
-timer(void)
-{
- struct server *server;
-
- /*
- * Bump the current idea of the time
- */
- current_time++;
-
- /*
- * Search through the server list looking for guys
- * who's event timers have expired. Give these to
- * the transmit routine.
- */
- for (server = sys_servers; server != NULL;
- server = server->next_server) {
- if (server->event_time != 0
- && server->event_time <= current_time)
- transmit(server);
- }
-}
-
-
-/*
- * The code duplication in the following subroutine sucks, but
- * we need to appease ansi2knr.
- */
-
-#ifndef SYS_WINNT
-/*
- * alarming - record the occurance of an alarm interrupt
- */
-static RETSIGTYPE
-alarming(
- int sig
- )
-{
- alarm_flag++;
-}
-#else
-void CALLBACK
-alarming(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
-{
- alarm_flag++;
-}
-#endif /* SYS_WINNT */
-
-
-/*
- * init_alarm - set up the timer interrupt
- */
-static void
-init_alarm(void)
-{
-#ifndef SYS_WINNT
-# ifndef HAVE_TIMER_SETTIME
- struct itimerval itimer;
-# else
- struct itimerspec ntpdate_itimer;
-# endif
-#else
- TIMECAPS tc;
- UINT wTimerRes, wTimerID;
-# endif /* SYS_WINNT */
-#if defined SYS_CYGWIN32 || defined SYS_WINNT
- HANDLE hToken;
- TOKEN_PRIVILEGES tkp;
- DWORD dwUser = 0;
-#endif /* SYS_WINNT */
-
- alarm_flag = 0;
-
-#ifndef SYS_WINNT
-# if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME)
- alarm_flag = 0;
- /* this code was put in as setitimer() is non existant this us the
- * POSIX "equivalents" setup - casey
- */
- /* ntpdate_timerid is global - so we can kill timer later */
- if (timer_create (CLOCK_REALTIME, NULL, &ntpdate_timerid) ==
-# ifdef SYS_VXWORKS
- ERROR
-# else
- -1
-# endif
- )
- {
- fprintf (stderr, "init_alarm(): timer_create (...) FAILED\n");
- return;
- }
-
- /* TIMER_HZ = (5)
- * Set up the alarm interrupt. The first comes 1/(2*TIMER_HZ)
- * seconds from now and they continue on every 1/TIMER_HZ seconds.
- */
- (void) signal_no_reset(SIGALRM, alarming);
- ntpdate_itimer.it_interval.tv_sec = ntpdate_itimer.it_value.tv_sec = 0;
- ntpdate_itimer.it_interval.tv_nsec = 1000000000/TIMER_HZ;
- ntpdate_itimer.it_value.tv_nsec = 1000000000/(TIMER_HZ<<1);
- timer_settime(ntpdate_timerid, 0 /* !TIMER_ABSTIME */, &ntpdate_itimer, NULL);
-# else
- /*
- * Set up the alarm interrupt. The first comes 1/(2*TIMER_HZ)
- * seconds from now and they continue on every 1/TIMER_HZ seconds.
- */
- (void) signal_no_reset(SIGALRM, alarming);
- 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
- /*
- * Get previleges needed for fiddling with the clock
- */
-
- /* get the current process token handle */
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
- msyslog(LOG_ERR, "OpenProcessToken failed: %m");
- exit(1);
- }
- /* get the LUID for system-time privilege. */
- LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1; /* one privilege to set */
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- /* get set-time privilege for this process. */
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,(PTOKEN_PRIVILEGES) NULL, 0);
- /* cannot test return value of AdjustTokenPrivileges. */
- if (GetLastError() != ERROR_SUCCESS)
- msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
-#endif
-#else /* SYS_WINNT */
- _tzset();
-
- /*
- * Get previleges needed for fiddling with the clock
- */
-
- /* get the current process token handle */
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
- msyslog(LOG_ERR, "OpenProcessToken failed: %m");
- exit(1);
- }
- /* get the LUID for system-time privilege. */
- LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1; /* one privilege to set */
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- /* get set-time privilege for this process. */
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,(PTOKEN_PRIVILEGES) NULL, 0);
- /* cannot test return value of AdjustTokenPrivileges. */
- if (GetLastError() != ERROR_SUCCESS)
- msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
-
- /*
- * Set up timer interrupts for every 2**EVENT_TIMEOUT seconds
- * Under Win/NT, expiry of timer interval leads to invocation
- * of a callback function (on a different thread) rather than
- * generating an alarm signal
- */
-
- /* determine max and min resolution supported */
- if(timeGetDevCaps(&tc, sizeof(TIMECAPS)) != TIMERR_NOERROR) {
- msyslog(LOG_ERR, "timeGetDevCaps failed: %m");
- exit(1);
- }
- wTimerRes = min(max(tc.wPeriodMin, TARGET_RESOLUTION), tc.wPeriodMax);
- /* establish the minimum timer resolution that we'll use */
- timeBeginPeriod(wTimerRes);
-
- /* start the timer event */
- wTimerID = timeSetEvent(
- (UINT) (1000/TIMER_HZ), /* Delay */
- wTimerRes, /* Resolution */
- (LPTIMECALLBACK) alarming, /* Callback function */
- (DWORD) dwUser, /* User data */
- TIME_PERIODIC); /* Event type (periodic) */
- if (wTimerID == 0) {
- msyslog(LOG_ERR, "timeSetEvent failed: %m");
- exit(1);
- }
-#endif /* SYS_WINNT */
-}
-
-
-
-
-/*
- * We do asynchronous input using the SIGIO facility. A number of
- * recvbuf buffers are preallocated for input. In the signal
- * handler we poll to see if the socket is ready and read the
- * packets from it into the recvbuf's along with a time stamp and
- * an indication of the source host and the interface it was received
- * through. This allows us to get as accurate receive time stamps
- * as possible independent of other processing going on.
- *
- * We allocate a number of recvbufs equal to the number of servers
- * plus 2. This should be plenty.
- */
-
-
-/*
- * init_io - initialize I/O data and open socket
- */
-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[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) {
- 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 */
- netsyslog(LOG_ERR,
- "the NTP socket is in use, exiting");
- else
- netsyslog(LOG_ERR, "bind() fails: %m");
- exit(1);
- }
- }
-
-#ifdef HAVE_POLL_H
- fdmask[nbsock].fd = fd[nbsock];
- fdmask[nbsock].events = POLLIN;
-#else
- FD_SET(fd[nbsock], &fdmask);
- if ((SOCKET) maxfd < fd[nbsock]+1) {
- maxfd = fd[nbsock]+1;
- }
-#endif
-
- /*
- * set non-blocking,
- */
-#ifndef SYS_WINNT
-# ifdef SYS_VXWORKS
- {
- int on = TRUE;
-
- 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[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[nbsock], F_SETFL, FNDELAY) < 0) {
- netsyslog(LOG_ERR, "fcntl(FNDELAY|FASYNC) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-# else /* FNDELAY */
-# include "Bletch: Need non blocking I/O"
-# endif /* FNDELAY */
-# endif /* not O_NONBLOCK */
-# endif /* SYS_VXWORKS */
-#else /* SYS_WINNT */
- 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_storage *dest,
- struct pkt *pkt,
- int len
- )
-{
- int i;
- int cc;
- SOCKET sock = 0;
-
-#ifdef SYS_WINNT
- DWORD err;
-#endif /* SYS_WINNT */
-
- /* 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)
-#else
- if (cc == SOCKET_ERROR) {
- err = WSAGetLastError();
- if (err != WSAEWOULDBLOCK && err != WSAENOBUFS)
-#endif /* SYS_WINNT */
- netsyslog(LOG_ERR, "sendto(%s): %m", stohost(dest));
- }
-}
-
-
-/*
- * input_handler - receive packets asynchronously
- */
-void
-input_handler(void)
-{
- register int n;
- register struct recvbuf *rb;
- struct timeval tvzero;
- int fromlen;
- l_fp ts;
- int i;
-#ifdef HAVE_POLL_H
- struct pollfd fds[MAX_AF];
-#else
- fd_set fds;
-#endif
- int fdc = 0;
-
- /*
- * Do a poll to see if we have data
- */
- for (;;) {
- tvzero.tv_sec = tvzero.tv_usec = 0;
-#ifdef HAVE_POLL_H
- 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
- 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
-
- /*
- * If nothing to do, just return. If an error occurred,
- * complain and return. If we've got some, freeze a
- * timestamp.
- */
- if (n == 0)
- return;
- else if (n == -1) {
- if (errno != EINTR)
- netsyslog(LOG_ERR,
-#ifdef HAVE_POLL_H
- "poll() error: %m"
-#else
- "select() error: %m"
-#endif
- );
- return;
- }
- get_systime(&ts);
-
- /*
- * 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 (initializing || free_recvbuffs() == 0) {
- char buf[100];
-
-
-#ifndef SYS_WINNT
- (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(fdc, buf, sizeof(buf), 0, (struct sockaddr *)0, NULL);
-#endif /* SYS_WINNT */
- continue;
- }
-
- rb = get_free_recv_buffer();
-
- 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) {
- freerecvbuf(rb);
- continue;
- }
-
- /*
- * Got one. Mark how and when it got here,
- * put it on the full list.
- */
- rb->recv_time = ts;
- add_full_recv_buffer(rb);
- }
-}
-
-
-#if !defined SYS_WINNT && !defined SYS_CYGWIN32
-/*
- * adj_systime - do a big long slew of the system time
- */
-static int
-l_adj_systime(
- l_fp *ts
- )
-{
- struct timeval adjtv, oadjtv;
- int isneg = 0;
- l_fp offset;
-#ifndef STEP_SLEW
- l_fp overshoot;
-#endif
-
- /*
- * Take the absolute value of the offset
- */
- offset = *ts;
- if (L_ISNEG(&offset)) {
- isneg = 1;
- L_NEG(&offset);
- }
-
-#ifndef STEP_SLEW
- /*
- * Calculate the overshoot. XXX N.B. This code *knows*
- * ADJ_OVERSHOOT is 1/2.
- */
- overshoot = offset;
- L_RSHIFTU(&overshoot);
- if (overshoot.l_ui != 0 || (overshoot.l_uf > ADJ_MAXOVERSHOOT)) {
- overshoot.l_ui = 0;
- overshoot.l_uf = ADJ_MAXOVERSHOOT;
- }
- L_ADD(&offset, &overshoot);
-#endif
- TSTOTV(&offset, &adjtv);
-
- if (isneg) {
- adjtv.tv_sec = -adjtv.tv_sec;
- adjtv.tv_usec = -adjtv.tv_usec;
- }
-
- if (adjtv.tv_usec != 0 && !debug) {
- if (adjtime(&adjtv, &oadjtv) < 0) {
- msyslog(LOG_ERR, "Can't adjust the time of day: %m");
- return 0;
- }
- }
- return 1;
-}
-#endif /* SYS_WINNT */
-
-
-/*
- * This fuction is not the same as lib/systime step_systime!!!
- */
-static int
-l_step_systime(
- l_fp *ts
- )
-{
- double dtemp;
-
-#ifdef SLEWALWAYS
-#ifdef STEP_SLEW
- l_fp ftmp;
- int isneg;
- int n;
-
- if (debug) return 1;
- /*
- * Take the absolute value of the offset
- */
- ftmp = *ts;
- if (L_ISNEG(&ftmp)) {
- L_NEG(&ftmp);
- isneg = 1;
- } else
- isneg = 0;
-
- if (ftmp.l_ui >= 3) { /* Step it and slew - we might win */
- LFPTOD(ts, dtemp);
- n = step_systime(dtemp);
- if (!n)
- return n;
- if (isneg)
- ts->l_ui = ~0;
- else
- ts->l_ui = ~0;
- }
- /*
- * Just add adjustment into the current offset. The update
- * routine will take care of bringing the system clock into
- * line.
- */
-#endif
- if (debug)
- return 1;
-#ifdef FORCE_NTPDATE_STEP
- LFPTOD(ts, dtemp);
- return step_systime(dtemp);
-#else
- l_adj_systime(ts);
- return 1;
-#endif
-#else /* SLEWALWAYS */
- if (debug)
- return 1;
- LFPTOD(ts, dtemp);
- return step_systime(dtemp);
-#endif /* SLEWALWAYS */
-}
-
-
-/* XXX ELIMINATE printserver similar in ntptrace.c, ntpdate.c */
-/*
- * printserver - print detail information for a server
- */
-static void
-printserver(
- register struct server *pp,
- FILE *fp
- )
-{
- register int i;
- char junk[5];
- char *str;
-
- if (!debug) {
- (void) fprintf(fp, "server %s, stratum %d, offset %s, delay %s\n",
- stoa(&pp->srcadr), pp->stratum,
- lfptoa(&pp->offset, 6), fptoa((s_fp)pp->delay, 5));
- return;
- }
-
- (void) fprintf(fp, "server %s, port %d\n",
- 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,
- pp->leap & 0x2 ? '1' : '0',
- pp->leap & 0x1 ? '1' : '0',
- pp->trust);
-
- if (pp->stratum == 1) {
- junk[4] = 0;
- memmove(junk, (char *)&pp->refid, 4);
- str = junk;
- } else {
- str = stoa(&pp->srcadr);
- }
- (void) fprintf(fp,
- "refid [%s], delay %s, dispersion %s\n",
- str, fptoa((s_fp)pp->delay, 5),
- ufptoa(pp->dispersion, 5));
-
- (void) fprintf(fp, "transmitted %d, in filter %d\n",
- pp->xmtcnt, pp->filter_nextpt);
-
- (void) fprintf(fp, "reference time: %s\n",
- prettydate(&pp->reftime));
- (void) fprintf(fp, "originate timestamp: %s\n",
- prettydate(&pp->org));
- (void) fprintf(fp, "transmit timestamp: %s\n",
- prettydate(&pp->xmt));
-
- (void) fprintf(fp, "filter delay: ");
- for (i = 0; i < NTP_SHIFT; i++) {
- (void) fprintf(fp, " %-8.8s", fptoa(pp->filter_delay[i], 5));
- if (i == (NTP_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
- (void) fprintf(fp, "filter offset:");
- for (i = 0; i < PEER_SHIFT; i++) {
- (void) fprintf(fp, " %-8.8s", lfptoa(&pp->filter_offset[i], 6));
- if (i == (PEER_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
- (void) fprintf(fp, "delay %s, dispersion %s\n",
- fptoa((s_fp)pp->delay, 5), ufptoa(pp->dispersion, 5));
-
- (void) fprintf(fp, "offset %s\n\n",
- lfptoa(&pp->offset, 6));
-}
-
-#if !defined(HAVE_VSPRINTF)
-int
-vsprintf(
- char *str,
- const char *fmt,
- va_list ap
- )
-{
- FILE f;
- int len;
-
- f._flag = _IOWRT+_IOSTRG;
- f._ptr = str;
- f._cnt = 32767;
- len = _doprnt(fmt, ap, &f);
- *f._ptr = 0;
- return (len);
-}
-#endif
-
-#if 0
-/* override function in library since SA_RESTART makes ALL syscalls restart */
-#ifdef SA_RESTART
-void
-signal_no_reset(
- int sig,
- void (*func)()
- )
-{
- int n;
- struct sigaction vec;
-
- vec.sa_handler = func;
- sigemptyset(&vec.sa_mask);
- vec.sa_flags = 0;
-
- while (1)
- {
- n = sigaction(sig, &vec, NULL);
- if (n == -1 && errno == EINTR)
- continue;
- break;
- }
- if (n == -1)
- {
- perror("sigaction");
- exit(1);
- }
-}
-#endif
-#endif
-
-#ifdef HAVE_NETINFO
-static ni_namelist *
-getnetinfoservers(void)
-{
- ni_status status;
- void *domain;
- ni_id confdir;
- ni_namelist *namelist = (ni_namelist*)malloc(sizeof(ni_namelist));
-
- /* Find a time server in NetInfo */
- if ((status = ni_open(NULL, ".", &domain)) != NI_OK) return NULL;
-
- while (status = ni_pathsearch(domain, &confdir, NETINFO_CONFIG_DIR) == NI_NODIR) {
- void *next_domain;
- if (ni_open(domain, "..", &next_domain) != NI_OK) break;
- ni_free(domain);
- domain = next_domain;
- }
- if (status != NI_OK) return NULL;
-
- NI_INIT(namelist);
- if (ni_lookupprop(domain, &confdir, "server", namelist) != NI_OK) {
- ni_namelist_free(namelist);
- free(namelist);
- return NULL;
- }
-
- return(namelist);
-}
-#endif
diff --git a/contrib/ntp/ntpdate/ntpdate.h b/contrib/ntp/ntpdate/ntpdate.h
deleted file mode 100644
index f3531b3..0000000
--- a/contrib/ntp/ntpdate/ntpdate.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * ntpdate.h - declarations for the ntpdate and ntptimeset programs
- */
-
-#include "ntp_malloc.h"
-
-extern void loadservers P((char *cfgpath));
-
-/*
- * The server structure is a much simplified version of the
- * peer structure, for ntpdate's use. Since we always send
- * in client mode and expect to receive in server mode, this
- * leaves only a very limited number of things we need to
- * remember about the server.
- */
-struct server {
- struct server *next_server; /* next server in build list */
- 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 */
- s_char precision; /* server's clock precision */
- u_char trust; /* trustability of the filtered data */
- u_fp rootdelay; /* distance from primary clock */
- u_fp rootdispersion; /* peer clock dispersion */
- u_int32 refid; /* peer reference ID */
- l_fp reftime; /* time of peer's last update */
- u_long event_time; /* time for next timeout */
- u_long last_xmit; /* time of last transmit */
- u_short xmtcnt; /* number of packets transmitted */
- u_short rcvcnt; /* number of packets received */
- u_char reach; /* reachability, NTP_WINDOW bits */
- u_short filter_nextpt; /* index into filter shift register */
- s_fp filter_delay[NTP_SHIFT]; /* delay part of shift register */
- l_fp filter_offset[NTP_SHIFT]; /* offset part of shift register */
- s_fp filter_soffset[NTP_SHIFT]; /* offset in s_fp format, for disp */
- u_fp filter_error[NTP_SHIFT]; /* error part of shift register */
- l_fp org; /* peer's originate time stamp */
- l_fp xmt; /* transmit time stamp */
- u_fp delay; /* filter estimated delay */
- u_fp dispersion; /* filter estimated dispersion */
- l_fp offset; /* filter estimated clock offset */
- s_fp soffset; /* fp version of above */
-};
-
-
-/*
- * ntpdate runs everything on a simple, short timeout. It sends a
- * packet and sets the timeout (by default, to a small value suitable
- * for a LAN). If it receives a response it sends another request.
- * If it times out it shifts zeroes into the filter and sends another
- * request.
- *
- * The timer routine is run often (once every 1/5 second currently)
- * so that time outs are done with reasonable precision.
- */
-#define TIMER_HZ (5) /* 5 per second */
-
-/*
- * ntpdate will make a long adjustment using adjtime() if the times
- * are close, or step the time if the times are farther apart. The
- * following defines what is "close".
- */
-#define NTPDATE_THRESHOLD (FP_SECOND >> 1) /* 1/2 second */
-
-#define NTP_MAXAGE 86400 /* one day in seconds */
-
-/*
- * When doing adjustments, ntpdate actually overadjusts (currently
- * by 50%, though this may change). While this will make it take longer
- * to reach a steady state condition, it will typically result in
- * the clock keeping more accurate time, on average. The amount of
- * overshoot is limited.
- */
-#ifdef NOTNOW
-#define ADJ_OVERSHOOT 1/2 /* this is hard coded */
-#endif /* NOTNOW */
-#define ADJ_MAXOVERSHOOT 0x10000000 /* 50 ms as a ts fraction */
-
-/*
- * Since ntpdate isn't aware of some of the things that normally get
- * put in an NTP packet, we fix some values.
- */
-#define NTPDATE_PRECISION (-6) /* use this precision */
-#define NTPDATE_DISTANCE FP_SECOND /* distance is 1 sec */
-#define NTPDATE_DISP FP_SECOND /* so is the dispersion */
-#define NTPDATE_REFID (0) /* reference ID to use */
-#define PEER_MAXDISP (64*FP_SECOND) /* maximum dispersion (fp 64) */
-
-
-/*
- * Some defaults
- */
-#define DEFTIMEOUT 5 /* 5 timer increments */
-#define DEFSAMPLES 4 /* get 4 samples per server */
-#define DEFPRECISION (-5) /* the precision we claim */
-#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/ntpdate/ntptime_config.c b/contrib/ntp/ntpdate/ntptime_config.c
deleted file mode 100644
index e784d28..0000000
--- a/contrib/ntp/ntpdate/ntptime_config.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * ntptime_config.c
- *
- * What follows is a simplified version of the config parsing code
- * in ntpd/ntp_config.c. We only parse a subset of the configuration
- * syntax, and don't bother whining about things we don't understand.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_filegen.h"
-#include "ntpdate.h"
-#include "ntp_syslog.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-
-/*
- * These routines are used to read the configuration file at
- * startup time. An entry in the file must fit on a single line.
- * Entries are processed as multiple tokens separated by white space
- * Lines are considered terminated when a '#' is encountered. Blank
- * lines are ignored.
- */
-
-/*
- * Configuration file name
- */
-#ifndef CONFIG_FILE
-# ifndef SYS_WINNT
-# define CONFIG_FILE "/etc/ntp.conf"
-# else /* SYS_WINNT */
-# define CONFIG_FILE "%windir%\\ntp.conf"
-# define ALT_CONFIG_FILE "%windir%\\ntp.ini"
-# endif /* SYS_WINNT */
-#endif /* not CONFIG_FILE */
-
-/*
- *
- * 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 ]
- * keys file_name
- */
-
-#define CONFIG_UNKNOWN 0
-
-#define CONFIG_PEER 1
-#define CONFIG_SERVER 2
-#define CONFIG_KEYS 8
-
-#define CONF_MOD_VERSION 1
-#define CONF_MOD_KEY 2
-#define CONF_MOD_MINPOLL 3
-#define CONF_MOD_MAXPOLL 4
-#define CONF_MOD_PREFER 5
-#define CONF_MOD_BURST 6
-#define CONF_MOD_SKEY 7
-#define CONF_MOD_TTL 8
-#define CONF_MOD_MODE 9
-
-/*
- * Translation table - keywords to function index
- */
-struct keyword {
- const char *text;
- int keytype;
-};
-
-/*
- * Command keywords
- */
-static struct keyword keywords[] = {
- { "peer", CONFIG_PEER },
- { "server", CONFIG_SERVER },
- { "keys", CONFIG_KEYS },
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * "peer", "server", "broadcast" modifier keywords
- */
-static struct keyword mod_keywords[] = {
- { "version", CONF_MOD_VERSION },
- { "key", CONF_MOD_KEY },
- { "minpoll", CONF_MOD_MINPOLL },
- { "maxpoll", CONF_MOD_MAXPOLL },
- { "prefer", CONF_MOD_PREFER },
- { "burst", CONF_MOD_BURST },
- { "autokey", CONF_MOD_SKEY },
- { "mode", CONF_MOD_MODE }, /* reference clocks */
- { "ttl", CONF_MOD_TTL }, /* NTP peers */
- { "", CONFIG_UNKNOWN }
-};
-
-/*
- * Limits on things
- */
-#define MAXTOKENS 20 /* 20 tokens on line */
-#define MAXLINE 1024 /* maximum length of line */
-#define MAXFILENAME 128 /* maximum length of a file name (alloca()?) */
-
-/*
- * Miscellaneous macros
- */
-#define STRSAME(s1, s2) (*(s1) == *(s2) && strcmp((s1), (s2)) == 0)
-#define ISEOL(c) ((c) == '#' || (c) == '\n' || (c) == '\0')
-#define ISSPACE(c) ((c) == ' ' || (c) == '\t')
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-/*
- * Systemwide parameters and flags
- */
-extern struct server **sys_servers; /* the server list */
-extern int sys_numservers; /* number of servers to poll */
-extern char *key_file;
-
-/*
- * Function prototypes
- */
-static int gettokens P((FILE *, char *, char **, int *));
-static int matchkey P((char *, struct keyword *));
-static int getnetnum P((const char *num, struct sockaddr_in *addr,
- int complain));
-
-
-/*
- * loadservers - load list of NTP servers from configuration file
- */
-void
-loadservers(
- char *cfgpath
- )
-{
- register int i;
- int errflg;
- int peerversion;
- int minpoll;
- int maxpoll;
- /* int ttl; */
- int srvcnt;
- /* u_long peerkey; */
- int peerflags;
- struct sockaddr_in peeraddr;
- FILE *fp;
- char line[MAXLINE];
- char *(tokens[MAXTOKENS]);
- int ntokens;
- int tok;
- const char *config_file;
-#ifdef SYS_WINNT
- char *alt_config_file;
- LPTSTR temp;
- char config_file_storage[MAX_PATH];
- char alt_config_file_storage[MAX_PATH];
-#endif /* SYS_WINNT */
- struct server *server, *srvlist;
-
- /*
- * Initialize, initialize
- */
- srvcnt = 0;
- srvlist = 0;
- errflg = 0;
-#ifdef DEBUG
- debug = 0;
-#endif /* DEBUG */
-#ifndef SYS_WINNT
- config_file = cfgpath ? cfgpath : CONFIG_FILE;
-#else
- if (cfgpath) {
- config_file = cfgpath;
- } else {
- temp = CONFIG_FILE;
- if (!ExpandEnvironmentStrings((LPCTSTR)temp, (LPTSTR)config_file_storage, (DWORD)sizeof(config_file_storage))) {
- msyslog(LOG_ERR, "ExpandEnvironmentStrings CONFIG_FILE failed: %m\n");
- exit(1);
- }
- config_file = config_file_storage;
- }
-
- temp = ALT_CONFIG_FILE;
- if (!ExpandEnvironmentStrings((LPCTSTR)temp, (LPTSTR)alt_config_file_storage, (DWORD)sizeof(alt_config_file_storage))) {
- msyslog(LOG_ERR, "ExpandEnvironmentStrings ALT_CONFIG_FILE failed: %m\n");
- exit(1);
- }
- alt_config_file = alt_config_file_storage;
-M
-#endif /* SYS_WINNT */
-
- if ((fp = fopen(FindConfig(config_file), "r")) == NULL)
- {
- fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig(config_file));
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(config_file));
-#ifdef SYS_WINNT
- /* Under WinNT try alternate_config_file name, first NTP.CONF, then NTP.INI */
-
- if ((fp = fopen(FindConfig(alt_config_file), "r")) == NULL) {
-
- /*
- * Broadcast clients can sometimes run without
- * a configuration file.
- */
-
- fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig(alt_config_file));
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(alt_config_file));
- return;
- }
-#else /* not SYS_WINNT */
- return;
-#endif /* not SYS_WINNT */
- }
-
- while ((tok = gettokens(fp, line, tokens, &ntokens))
- != CONFIG_UNKNOWN) {
- switch(tok) {
- case CONFIG_PEER:
- case CONFIG_SERVER:
-
- if (ntokens < 2) {
- msyslog(LOG_ERR,
- "No address for %s, line ignored",
- tokens[0]);
- break;
- }
-
- if (!getnetnum(tokens[1], &peeraddr, 1)) {
- /* Resolve now, or lose! */
- break;
- } else {
- errflg = 0;
-
- /* Shouldn't be able to specify multicast */
- if (IN_CLASSD(ntohl(peeraddr.sin_addr.s_addr))
- || ISBADADR(&peeraddr)) {
- msyslog(LOG_ERR,
- "attempt to configure invalid address %s",
- ntoa(&peeraddr));
- break;
- }
- }
-
- peerversion = NTP_VERSION;
- minpoll = NTP_MINDPOLL;
- maxpoll = NTP_MAXDPOLL;
- /* peerkey = 0; */
- peerflags = 0;
- /* ttl = 0; */
- for (i = 2; i < ntokens; i++)
- switch (matchkey(tokens[i], mod_keywords)) {
- case CONF_MOD_VERSION:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "peer/server version requires an argument");
- errflg = 1;
- break;
- }
- peerversion = atoi(tokens[++i]);
- if ((u_char)peerversion > NTP_VERSION
- || (u_char)peerversion < NTP_OLDVERSION) {
- msyslog(LOG_ERR,
- "inappropriate version number %s, line ignored",
- tokens[i]);
- errflg = 1;
- }
- break;
-
- case CONF_MOD_KEY:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "key: argument required");
- errflg = 1;
- break;
- }
- ++i;
- /* peerkey = (int)atol(tokens[i]); */
- peerflags |= FLAG_AUTHENABLE;
- break;
-
- case CONF_MOD_MINPOLL:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "minpoll: argument required");
- errflg = 1;
- break;
- }
- minpoll = atoi(tokens[++i]);
- if (minpoll < NTP_MINPOLL)
- minpoll = NTP_MINPOLL;
- break;
-
- case CONF_MOD_MAXPOLL:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "maxpoll: argument required"
- );
- errflg = 1;
- break;
- }
- maxpoll = atoi(tokens[++i]);
- if (maxpoll > NTP_MAXPOLL)
- maxpoll = NTP_MAXPOLL;
- break;
-
- case CONF_MOD_PREFER:
- peerflags |= FLAG_PREFER;
- break;
-
- case CONF_MOD_BURST:
- peerflags |= FLAG_BURST;
- break;
-
- case CONF_MOD_SKEY:
- peerflags |= FLAG_SKEY | FLAG_AUTHENABLE;
- break;
-
- case CONF_MOD_TTL:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "ttl: argument required");
- errflg = 1;
- break;
- }
- ++i;
- /* ttl = atoi(tokens[i]); */
- break;
-
- case CONF_MOD_MODE:
- if (i >= ntokens-1) {
- msyslog(LOG_ERR,
- "mode: argument required");
- errflg = 1;
- break;
- }
- ++i;
- /* ttl = atoi(tokens[i]); */
- break;
-
- case CONFIG_UNKNOWN:
- errflg = 1;
- break;
- }
- if (minpoll > maxpoll) {
- msyslog(LOG_ERR, "config error: minpoll > maxpoll");
- errflg = 1;
- }
- if (errflg == 0) {
- server = (struct server *)emalloc(sizeof(struct server));
- memset((char *)server, 0, sizeof(struct server));
- server->srcadr = peeraddr;
- server->version = peerversion;
- server->dispersion = PEER_MAXDISP;
- server->next_server = srvlist;
- srvlist = server;
- srvcnt++;
- }
- break;
-
- case CONFIG_KEYS:
- if (ntokens >= 2) {
- key_file = (char *) emalloc(strlen(tokens[1]) + 1);
- strcpy(key_file, tokens[1]);
- }
- break;
- }
- }
- (void) fclose(fp);
-
- /* build final list */
- sys_numservers = srvcnt;
- sys_servers = (struct server **)
- emalloc(sys_numservers * sizeof(struct server *));
- for(i=0;i<sys_numservers;i++) {
- sys_servers[i] = srvlist;
- srvlist = srvlist->next_server;
- }
-}
-
-
-
-/*
- * gettokens - read a line and return tokens
- */
-static int
-gettokens(
- FILE *fp,
- char *line,
- char **tokenlist,
- int *ntokens
- )
-{
- register char *cp;
- register int eol;
- register int ntok;
- register int quoted = 0;
-
- /*
- * Find start of first token
- */
- again:
- while ((cp = fgets(line, MAXLINE, fp)) != NULL) {
- cp = line;
- while (ISSPACE(*cp))
- cp++;
- if (!ISEOL(*cp))
- break;
- }
- if (cp == NULL) {
- *ntokens = 0;
- return CONFIG_UNKNOWN; /* hack. Is recognized as EOF */
- }
-
- /*
- * Now separate out the tokens
- */
- eol = 0;
- ntok = 0;
- while (!eol) {
- tokenlist[ntok++] = cp;
- while (!ISEOL(*cp) && (!ISSPACE(*cp) || quoted))
- quoted ^= (*cp++ == '"');
-
- if (ISEOL(*cp)) {
- *cp = '\0';
- eol = 1;
- } else { /* must be space */
- *cp++ = '\0';
- while (ISSPACE(*cp))
- cp++;
- if (ISEOL(*cp))
- eol = 1;
- }
- if (ntok == MAXTOKENS)
- eol = 1;
- }
-
- /*
- * Return the match
- */
- *ntokens = ntok;
- ntok = matchkey(tokenlist[0], keywords);
- if (ntok == CONFIG_UNKNOWN)
- goto again;
- return ntok;
-}
-
-
-
-/*
- * matchkey - match a keyword to a list
- */
-static int
-matchkey(
- register char *word,
- register struct keyword *keys
- )
-{
- for (;;) {
- if (keys->keytype == CONFIG_UNKNOWN) {
- return CONFIG_UNKNOWN;
- }
- if (STRSAME(word, keys->text))
- return keys->keytype;
- keys++;
- }
-}
-
-
-/*
- * getnetnum - return a net number (this is crude, but careful)
- */
-static int
-getnetnum(
- const char *num,
- struct sockaddr_in *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;
-
- 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("getnetnum %s step %d buf %s temp %d netnum %lu\n",
- num, i, buf, temp, (u_long)netnum);
-#endif
- }
-
- if (i < 4) {
- if (complain)
- msyslog(LOG_ERR,
- "getnetnum: \"%s\" invalid host number, line ignored",
- num);
-#ifdef DEBUG
- if (debug > 3)
- printf(
- "getnetnum: \"%s\" invalid host number, line ignored\n",
- num);
-#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);
-#ifdef DEBUG
- if (debug > 1)
- printf("getnetnum given %s, got %s (%lx)\n",
- num, ntoa(addr), (u_long)netnum);
-#endif
- return 1;
-}
diff --git a/contrib/ntp/ntpdate/ntptimeset.c b/contrib/ntp/ntpdate/ntptimeset.c
deleted file mode 100644
index 6d9332f..0000000
--- a/contrib/ntp/ntpdate/ntptimeset.c
+++ /dev/null
@@ -1,2171 +0,0 @@
-/*
- * ntptimeset - get/set the time via ntp
- *
- * GOAL:
- * The goal of ntptime is to set the current time on system startup
- * to the best possible time using the network very wisely. It is assumed
- * that after a resonable time has been sett then ntp daemon will
- * maintain it.
- *
- * PROBLEM DOMAIN:
- * We have three sets of issues related to acheiving the goal. The first
- * issue is using the network when normal traffic is happening or when
- * the entire network world is recovering from a campus wide power failure
- * and is restarting. The second issue is the class of machine whether it
- * is a user's office workstation being handled by an uneducated user or
- * a server computer being handled by a trained operations staff. The third
- * issue is whether the ratio of people to computers and whether the
- * environment is stable and viable or not.
- *
- * NETWORK USAGE:
- * The first issue of using the network wisely is a question of whether
- * the network load and time server load and state are normal. If things
- * are normal ntptime can do what ntpdate does of sending out 4 packets
- * quickly to each server (new transmit done with each ack). However
- * if network or time load is high then this scheme will simply contribute
- * to problems. Given we have minimal state, we simply weight lost packets
- * significantly and make sure we throttle output as much as possible
- * without performance lost for quick startups.
- *
- * TRAINING AND KNOWLEDGE:
- * The second issue of uneducated user of a office workstation versus a
- * trained operation staff of a server machine translates into simply an
- * issue of untrained and trained users.
- *
- * The training issue implies that for the sake of the users involved in the
- * handling of their office workstation, problems and options should be
- * communicated simply and effectively and not in terse expert related
- * descriptions without possible options to be taken. The operator's training
- * and education enables them to deal with either type of communication and
- * control.
- *
- * AUTOMATION AND MANUAL CONTROL:
- * The last issue boils down to a design problem. If the design tends to go
- * into a manual mode when the environment is non-viable then one person
- * handling many computers all at the same time will be heavily impacted. On
- * the other hand, if the design tends to be automatic and does not indicate
- * a way for the user to take over control then the computer will be
- * unavailable for the user until the proble is resolved by someone else or
- * the user.
- *
- * NOTE: Please do not have this program print out every minute some line,
- * of output. If this happens and the environment is in trouble then
- * many pages of paper on many different machines will be filled up.
- * Save some tress in your lifetime.
- *
- * CONCLUSION:
- * The behavior of the program derived from these three issues should be
- * that during normal situations it quickly sets the time and allow the
- * system to startup.
- *
- * However during abnormal conditions as detected by unresponsive servers,
- * out-of-sync or bad responses and other detections, it should print out
- * a simple but clear message and continue in a mellow way to get the best
- * possible time. It may never get the time and if so should also indicate
- * this.
- *
- * Rudy Nedved
- * 18-May-1993
- *
- ****************************************************************
- *
- * Much of the above is confusing or no longer relevant. For example,
- * it is rare these days for a machine's console to be a printing terminal,
- * so the comment about saving trees doesn't mean much. Nonetheless,
- * the basic principles still stand:
- *
- * - Work automatically, without human control or intervention. To
- * this end, we use the same configuration file as ntpd itself, so
- * you don't have to specify servers or other information on the
- * command line. We also recognize that sometimes we won't be able
- * to contact any servers, and give up in that event instead of
- * hanging forever.
- *
- * - Behave in a sane way, both internally and externally, even in the
- * face of insane conditions. That means we back off quickly when
- * we don't hear a response, to avoid network congestion. Like
- * ntpd, we verify responses from several servers before accepting
- * the new time data.
- *
- * However, we don't assume that the local clock is right, or even
- * close, because it might not be at boot time, and we want to catch
- * and correct that situation. This behaviour has saved us in several
- * instances. On HP-UX 9.0x, there used to be a bug in adjtimed which
- * would cause the time to be set to some wild value, making the machine
- * essentially unusable (we use Kerberos authentication pervasively,
- * and it requires workstations and servers to have a time within five
- * minutes of the Kerberos server). We also have problems on PC's
- * running both Linux and some Microsoft OS -- they tend to disagree
- * on what the BIOS clock should say, and who should update it, and
- * when. On those systems, we not only run ntptimeset at boot, we
- * also reset the BIOS clock based on the result, so the correct
- * time will be retained across reboots.
- *
- * For these reasons, and others, we have continued to use this tool
- * rather than ntpdate. It is run automatically at boot time on every
- * workstation and server in our facility.
- *
- * In the past, we called this program 'ntptime'. Unfortunately, the
- * ntp v4 distribution also includes a program with that name. In
- * order to avoid confusion, we have renamed our program 'ntptimeset',
- * which more accurately describes what it does.
- *
- * Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
- * School of Computer Science - Research Computing Facility
- * Carnegie Mellon University - Pittsburgh, PA
- * 16-Aug-1999
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "iosignal.h"
-#include "ntp_unixtime.h"
-#include "ntpdate.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#ifndef SYS_WINNT
-# include <netdb.h>
-# ifdef HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-# else
-# include <signal.h>
-# endif
-# include <sys/ioctl.h>
-#endif /* SYS_WINNT */
-
-#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif /* HAVE_SYS_RESOURCE_H */
-
-#ifdef SYS_VXWORKS
-# include "ioLib.h"
-# include "sockLib.h"
-# include "timers.h"
-#endif
-
-#include "recvbuff.h"
-
-#ifdef SYS_WINNT
-# define TARGET_RESOLUTION 1 /* Try for 1-millisecond accuracy
- on Windows NT timers. */
-#pragma comment(lib, "winmm")
-#endif /* SYS_WINNT */
-
-/*
- * Scheduling priority we run at
- */
-#ifndef SYS_VXWORKS
-# define NTPDATE_PRIO (-12)
-#else
-# define NTPDATE_PRIO (100)
-#endif
-
-#if defined(HAVE_TIMER_SETTIME) || defined (HAVE_TIMER_CREATE)
-/* POSIX TIMERS - vxWorks doesn't have itimer - casey */
-static timer_t ntpdate_timerid;
-#endif
-
-/*
- * Compatibility stuff for Version 2
- */
-#define NTP_MAXSKW 0x28f /* 0.01 sec in fp format */
-#define NTP_MINDIST 0x51f /* 0.02 sec in fp format */
-#define NTP_INFIN 15 /* max stratum, infinity a la Bellman-Ford */
-#define NTP_MAXWGT (8*FP_SECOND) /* maximum select weight 8 seconds */
-#define NTP_MAXLIST 5 /* maximum select list size */
-#define PEER_SHIFT 8 /* 8 suitable for crystal time base */
-
-/*
- * Debugging flag
- */
-volatile int debug = 0;
-
-/*
- * File descriptor masks etc. for call to select
- */
-int fd;
-fd_set fdmask;
-
-/*
- * Initializing flag. All async routines watch this and only do their
- * thing when it is clear.
- */
-int initializing = 1;
-
-/*
- * Alarm flag. Set when an alarm occurs
- */
-volatile int alarm_flag = 0;
-
-/*
- * Set the time if valid time determined
- */
-int set_time = 0;
-
-/*
- * transmission rate control
- */
-#define MINTRANSMITS (3) /* minimum total packets per server */
-#define MAXXMITCOUNT (2) /* maximum packets per time interrupt */
-
-/*
- * time setting constraints
- */
-#define DESIREDDISP (4*FP_SECOND) /* desired dispersion, (fp 4) */
-int max_period = DEFMAXPERIOD;
-int min_servers = DEFMINSERVERS;
-int min_valid = DEFMINVALID;
-
-/*
- * counters related to time setting constraints
- */
-int contacted = 0; /* # of servers we have sent to */
-int responding = 0; /* servers responding */
-int validcount = 0; /* servers with valid time */
-int valid_n_low = 0; /* valid time servers with low dispersion */
-
-/*
- * Unpriviledged port flag.
- */
-int unpriv_port = 0;
-
-/*
- * Program name.
- */
-char *progname;
-
-/*
- * Systemwide parameters and flags
- */
-struct server **sys_servers; /* the server list */
-int sys_numservers = 0; /* number of servers to poll */
-int sys_authenticate = 0; /* true when authenticating */
-u_int32 sys_authkey = 0; /* set to authentication key in use */
-u_long sys_authdelay = 0; /* authentication delay */
-
-/*
- * The current internal time
- */
-u_long current_time = 0;
-
-/*
- * File of encryption keys
- */
-
-#ifndef KEYFILE
-# ifndef SYS_WINNT
-#define KEYFILE "/etc/ntp.keys"
-# else
-#define KEYFILE "%windir%\\ntp.keys"
-# endif /* SYS_WINNT */
-#endif /* KEYFILE */
-
-#ifndef SYS_WINNT
-const char *key_file = KEYFILE;
-#else
-char key_file_storage[MAX_PATH+1], *key_file ;
-#endif /* SYS_WINNT */
-
-/*
- * total packet counts
- */
-u_long total_xmit = 0;
-u_long total_recv = 0;
-
-/*
- * Miscellaneous flags
- */
-int verbose = 0;
-#define HORRIBLEOK 3 /* how many packets to let out */
-int horrible = 0; /* how many packets we drop for testing */
-int secondhalf = 0; /* second half of timeout period */
-int printmsg = 0; /* print time response analysis */
-
-/*
- * The half time and finish time in internal time
- */
-u_long half_time = 0;
-u_long finish_time = 0;
-
-
-int ntptimesetmain P((int argc, char *argv[]));
-static void analysis P((int final));
-static int have_enough P((void));
-static void transmit P((register struct server *server));
-static void receive P((struct recvbuf *rbufp));
-static void clock_filter P((register struct server *server, s_fp d, l_fp *c));
-static void clock_count P((void));
-static struct server *clock_select P((void));
-static void set_local_clock P((void));
-static struct server *findserver P((struct sockaddr_in *addr));
-static void timer P((void));
-#ifndef SYS_WINNT
-static RETSIGTYPE alarming P((int sig));
-#endif /* SYS_WINNT */
-static void init_alarm P((void));
-static void init_io P((void));
-static int sendpkt P((struct sockaddr_in *dest, struct pkt *pkt, int len));
- void input_handler P((l_fp *xts));
-static void printserver P((register struct server *pp, FILE *fp));
-#if !defined(HAVE_VSPRINTF)
-int vsprintf P((char *str, const char *fmt, va_list ap));
-#endif
-
-#ifdef HAVE_SIGNALED_IO
-extern void wait_for_signal P((void));
-extern void unblock_io_and_alarm P((void));
-extern void block_io_and_alarm P((void));
-#endif
-
-
-#ifdef NO_MAIN_ALLOWED
-CALL(ntptimeset,"ntptimeset",ntptimesetmain);
-
-void clear_globals()
-{
- /*
- * Debugging flag
- */
- debug = 0;
-
- ntp_optind = 0;
-
- /*
- * Initializing flag. All async routines watch this and only do their
- * thing when it is clear.
- */
- initializing = 1;
-
- /*
- * Alarm flag. Set when an alarm occurs
- */
- alarm_flag = 0;
-
- /*
- * Unpriviledged port flag.
- */
- unpriv_port = 0;
-
- /*
- * Systemwide parameters and flags
- */
- sys_numservers = 0; /* number of servers to poll */
- sys_authenticate = 0; /* true when authenticating */
- sys_authkey = 0; /* set to authentication key in use */
- sys_authdelay = 0; /* authentication delay */
-
- /*
- * The current internal time
- */
- current_time = 0;
-
- verbose = 0;
-}
-#endif /* NO_MAIN_ALLOWED */
-
-/*
- * Main program. Initialize us and loop waiting for I/O and/or
- * timer expiries.
- */
-#ifndef NO_MAIN_ALLOWED
-int
-main(
- int argc,
- char *argv[]
- )
-{
- return ntptimesetmain(argc, argv);
-}
-#endif /* NO_MAIN_ALLOWED */
-
-
-int
-ntptimesetmain(
- int argc,
- char *argv[]
- )
-{
- int was_alarmed;
- struct recvbuf *rbuflist;
- struct recvbuf *rbuf;
- l_fp tmp;
- int errflg;
- int c;
- extern char *ntp_optarg;
- extern int ntp_optind;
- int ltmp;
- char *cfgpath;
-
-#ifdef SYS_WINNT
- HANDLE process_handle;
-
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData)) {
- msyslog(LOG_ERR, "No useable winsock.dll: %m");
- exit(1);
- }
-#endif /* SYS_WINNT */
-
-#ifdef NO_MAIN_ALLOWED
- clear_globals();
-#endif
-
- errflg = 0;
- cfgpath = 0;
- progname = argv[0];
- syslogit = 0;
-
- /*
- * Decode argument list
- */
- while ((c = ntp_getopt(argc, argv, "a:c:de:slt:uvHS:V:")) != EOF)
- switch (c)
- {
- case 'a':
- c = atoi(ntp_optarg);
- sys_authenticate = 1;
- sys_authkey = c;
- break;
- case 'c':
- cfgpath = ntp_optarg;
- break;
- case 'd':
- ++debug;
- break;
- case 'e':
- if (!atolfp(ntp_optarg, &tmp)
- || tmp.l_ui != 0) {
- (void) fprintf(stderr,
- "%s: encryption delay %s is unlikely\n",
- progname, ntp_optarg);
- errflg++;
- } else {
- sys_authdelay = tmp.l_uf;
- }
- break;
- case 's':
- set_time = 1;
- break;
- case 'l':
- syslogit = 1;
- break;
- case 't':
- ltmp = atoi(ntp_optarg);
- if (ltmp <= 0) {
- (void) fprintf(stderr,
- "%s: maximum time period (%d) is invalid\n",
- progname, ltmp);
- errflg++;
- }
- else
- max_period = ltmp;
- break;
- case 'u':
- unpriv_port = 1;
- break;
- case 'v':
- ++verbose;
- break;
- case 'H':
- horrible++;
- break;
- case 'S':
- ltmp = atoi(ntp_optarg);
- if (ltmp <= 0) {
- (void) fprintf(stderr,
- "%s: minimum responding (%d) is invalid\n",
- progname, ltmp);
- errflg++;
- }
- else
- min_servers = ltmp;
- break;
- case 'V':
- ltmp = atoi(ntp_optarg);
- if (ltmp <= 0) {
- (void) fprintf(stderr,
- "%s: minimum valid (%d) is invalid\n",
- progname, ltmp);
- errflg++;
- }
- else
- min_valid = ltmp;
- break;
- case '?':
- ++errflg;
- break;
- default:
- break;
- }
-
-
- if (errflg || ntp_optind < argc) {
- fprintf(stderr,"usage: %s [switches...]\n",progname);
- fprintf(stderr," -v (verbose)\n");
- fprintf(stderr," -c path (set config file path)\n");
- fprintf(stderr," -a key (authenticate using key)\n");
- fprintf(stderr," -e delay (authentication delay)\n");
- fprintf(stderr," -S num (# of servers that must respond)\n");
- fprintf(stderr," -V num (# of servers that must valid)\n");
- fprintf(stderr," -s (set the time based if okay)\n");
- fprintf(stderr," -t secs (time period before ending)\n");
- fprintf(stderr," -l (use syslog facility)\n");
- fprintf(stderr," -u (use unprivileged port)\n");
- fprintf(stderr," -H (drop packets for debugging)\n");
- fprintf(stderr," -d (debug output)\n");
- exit(2);
- }
-
- /*
- * Logging. Open the syslog if we have to
- */
- if (syslogit) {
-#if !defined (SYS_WINNT) && !defined (SYS_VXWORKS) && !defined SYS_CYGWIN32
-# ifndef LOG_DAEMON
- openlog("ntptimeset", LOG_PID);
-# else
-
-# ifndef LOG_NTP
-# define LOG_NTP LOG_DAEMON
-# endif
- openlog("ntptimeset", LOG_PID | LOG_NDELAY, LOG_NTP);
- if (debug)
- setlogmask(LOG_UPTO(LOG_DEBUG));
- else
- setlogmask(LOG_UPTO(LOG_INFO));
-# endif /* LOG_DAEMON */
-#endif /* SYS_WINNT */
- }
-
- if (debug || verbose)
- msyslog(LOG_INFO, "%s", Version);
-
- if (horrible)
- msyslog(LOG_INFO, "Dropping %d out of %d packets",
- horrible,horrible+HORRIBLEOK);
- /*
- * Add servers we are going to be polling
- */
- loadservers(cfgpath);
-
- if (sys_numservers < min_servers) {
- msyslog(LOG_ERR, "Found %d servers, require %d servers",
- sys_numservers,min_servers);
- exit(2);
- }
-
- /*
- * determine when we will end at least
- */
- finish_time = max_period * TIMER_HZ;
- half_time = finish_time >> 1;
-
- /*
- * Initialize the time of day routines and the I/O subsystem
- */
- if (sys_authenticate) {
- init_auth();
-#ifdef SYS_WINNT
- if (!key_file) key_file = KEYFILE;
- if (!ExpandEnvironmentStrings(key_file, key_file_storage, MAX_PATH))
- {
- msyslog(LOG_ERR, "ExpandEnvironmentStrings(%s) failed: %m\n",
- key_file);
- } else {
- key_file = key_file_storage;
- }
-#endif /* SYS_WINNT */
-
- if (!authreadkeys(key_file)) {
- msyslog(LOG_ERR, "no key file, exiting");
- exit(1);
- }
- if (!authistrusted(sys_authkey)) {
- char buf[10];
-
- (void) sprintf(buf, "%lu", (unsigned long)sys_authkey);
- msyslog(LOG_ERR, "authentication key %s unknown", buf);
- exit(1);
- }
- }
- init_io();
- init_alarm();
-
- /*
- * Set the priority.
- */
-#ifdef SYS_VXWORKS
- taskPrioritySet( taskIdSelf(), NTPDATE_PRIO);
-#endif
-#if defined(HAVE_ATT_NICE)
- nice (NTPDATE_PRIO);
-#endif
-#if defined(HAVE_BSD_NICE)
- (void) setpriority(PRIO_PROCESS, 0, NTPDATE_PRIO);
-#endif
-#ifdef SYS_WINNT
- process_handle = GetCurrentProcess();
- if (!SetPriorityClass(process_handle, (DWORD) REALTIME_PRIORITY_CLASS)) {
- msyslog(LOG_ERR, "SetPriorityClass failed: %m");
- }
-#endif /* SYS_WINNT */
-
- initializing = 0;
-
- /*
- * Use select() on all on all input fd's for unlimited
- * time. select() will terminate on SIGALARM or on the
- * reception of input. Using select() means we can't do
- * robust signal handling and we get a potential race
- * between checking for alarms and doing the select().
- * Mostly harmless, I think.
- * Keep going until we have enough information, or time is up.
- */
- /* On VMS, I suspect that select() can't be interrupted
- * by a "signal" either, so I take the easy way out and
- * have select() time out after one second.
- * System clock updates really aren't time-critical,
- * and - lacking a hardware reference clock - I have
- * yet to learn about anything else that is.
- */
- was_alarmed = 0;
- rbuflist = (struct recvbuf *)0;
- while (finish_time > current_time) {
-#if !defined(HAVE_SIGNALED_IO)
- fd_set rdfdes;
- int nfound;
-#elif defined(HAVE_SIGNALED_IO)
- block_io_and_alarm();
-#endif
-
- rbuflist = getrecvbufs(); /* get received buffers */
- if (printmsg) {
- printmsg = 0;
- analysis(0);
- }
- if (alarm_flag) { /* alarmed? */
- was_alarmed = 1;
- alarm_flag = 0;
- }
-
- if (!was_alarmed && rbuflist == (struct recvbuf *)0) {
- /*
- * Nothing to do. Wait for something.
- */
-#ifndef HAVE_SIGNALED_IO
- rdfdes = fdmask;
-# if defined(VMS) || defined(SYS_VXWORKS)
- /* make select() wake up after one second */
- {
- struct timeval t1;
-
- t1.tv_sec = 1; t1.tv_usec = 0;
- nfound = select(fd+1, &rdfdes, (fd_set *)0,
- (fd_set *)0, &t1);
- }
-# else
- nfound = select(fd+1, &rdfdes, (fd_set *)0,
- (fd_set *)0, (struct timeval *)0);
-# endif /* VMS */
- if (nfound > 0) {
- l_fp ts;
- get_systime(&ts);
- (void)input_handler(&ts);
- }
- else if (nfound == -1 && errno != EINTR)
- msyslog(LOG_ERR, "select() error: %m");
- else if (debug) {
-# if !defined SYS_VXWORKS && !defined SYS_CYGWIN32 /* to unclutter log */
- msyslog(LOG_DEBUG, "select(): nfound=%d, error: %m", nfound);
-# endif
- }
-#else /* HAVE_SIGNALED_IO */
-
- wait_for_signal();
-#endif /* HAVE_SIGNALED_IO */
- if (alarm_flag) /* alarmed? */
- {
- was_alarmed = 1;
- alarm_flag = 0;
- }
- rbuflist = getrecvbufs(); /* get received buffers */
- }
-#ifdef HAVE_SIGNALED_IO
- unblock_io_and_alarm();
-#endif /* HAVE_SIGNALED_IO */
-
- /*
- * Out here, signals are unblocked. Call timer routine
- * to process expiry.
- */
- if (was_alarmed)
- {
- timer();
- was_alarmed = 0;
- }
-
- /*
- * Call the data procedure to handle each received
- * packet.
- */
- while (rbuflist != (struct recvbuf *)0)
- {
- rbuf = rbuflist;
- rbuflist = rbuf->next;
- receive(rbuf);
- freerecvbuf(rbuf);
- }
-#if defined DEBUG && defined SYS_WINNT
- if (debug > 4)
- printf("getrecvbufs: %ld handler interrupts, %ld frames\n",
- handler_calls, handler_pkts);
-#endif
-
- /*
- * Do we have enough information to stop now?
- */
- if (have_enough())
- break; /* time to end */
-
- /*
- * Go around again
- */
- }
-
- /*
- * adjust the clock and exit accordingly
- */
- set_local_clock();
-
- /*
- * if we get here then we are in trouble
- */
- return(1);
-}
-
-
-/*
- * analysis - print a message indicating what is happening with time service
- * must mimic have_enough() procedure.
- */
-static void
-analysis(
- int final
- )
-{
- if (contacted < sys_numservers) {
- printf("%d servers of %d have been probed with %d packets\n",
- contacted,sys_numservers,MINTRANSMITS);
- return;
- }
- if (!responding) {
- printf("No response from any of %d servers, network problem?\n",
- sys_numservers);
- return;
- }
- else if (responding < min_servers) {
- printf("%d servers out of %d responding, need at least %d.\n",
- responding, sys_numservers, min_servers);
- return;
- }
- if (!validcount) {
- printf("%d servers responding but none have valid time\n",
- responding);
- return;
- }
- else if (validcount < min_valid) {
- printf("%d servers responding, %d are valid, need %d valid\n",
- responding,validcount,min_valid);
- return;
- }
- if (!final && valid_n_low != validcount) {
- printf("%d valid servers but only %d have low dispersion\n",
- validcount,valid_n_low);
- return;
- }
-}
-
-
-/* have_enough - see if we have enough information to terminate probing
- */
-static int
-have_enough(void)
-{
- /* have we contacted all servers yet? */
- if (contacted < sys_numservers)
- return 0; /* no...try some more */
-
- /* have we got at least minimum servers responding? */
- if (responding < min_servers)
- return 0; /* no...try some more */
-
- /* count the clocks */
- (void) clock_count();
-
- /* have we got at least minimum valid clocks? */
- if (validcount <= 0 || validcount < min_valid)
- return 0; /* no...try some more */
-
- /* do we have all valid servers with low dispersion */
- if (!secondhalf && valid_n_low != validcount)
- return 0;
-
- /* if we get into the secondhalf then we ignore dispersion */
-
- /* all conditions have been met...end */
- return 1;
-}
-
-
-/*
- * transmit - transmit a packet to the given server, or mark it completed.
- * This is called by the timeout routine and by the receive
- * procedure.
- */
-static void
-transmit(
- register struct server *server
- )
-{
- struct pkt xpkt;
- int timeout;
-
- if (debug > 2)
- printf("transmit(%s)\n", ntoa(&server->srcadr));
-
- if ((server->reach & 01) == 0) {
- l_fp ts;
- /*
- * Last message to this server timed out. Shift
- * zeros into the filter.
- */
- L_CLR(&ts);
- clock_filter(server, 0, &ts);
- }
-
- /*
- * shift reachable register over
- */
- server->reach <<= 1;
-
- /*
- * If we're here, send another message to the server. Fill in
- * the packet and let 'er rip.
- */
- xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
- server->version, MODE_CLIENT);
- xpkt.stratum = STRATUM_TO_PKT(STRATUM_UNSPEC);
- xpkt.ppoll = NTP_MINPOLL;
- xpkt.precision = NTPDATE_PRECISION;
- xpkt.rootdelay = htonl(NTPDATE_DISTANCE);
- xpkt.rootdispersion = htonl(NTPDATE_DISP);
- xpkt.refid = htonl(NTPDATE_REFID);
- L_CLR(&xpkt.reftime);
- L_CLR(&xpkt.org);
- L_CLR(&xpkt.rec);
-
- /*
- * Determine whether to authenticate or not. If so,
- * fill in the extended part of the packet and do it.
- * If not, just timestamp it and send it away.
- */
- if (sys_authenticate) {
- int len;
-
- xpkt.exten[0] = htonl(sys_authkey);
- get_systime(&server->xmt);
- L_ADDUF(&server->xmt, sys_authdelay);
- HTONL_FP(&server->xmt, &xpkt.xmt);
- len = authencrypt(sys_authkey, (u_int32 *)&xpkt, LEN_PKT_NOMAC);
- if (sendpkt(&(server->srcadr), &xpkt, (int)(LEN_PKT_NOMAC + len))) {
- if (debug > 1)
- printf("failed transmit auth to %s\n",
- ntoa(&(server->srcadr)));
- return;
- }
-
- if (debug > 1)
- printf("transmit auth to %s\n",
- ntoa(&(server->srcadr)));
- } else {
- get_systime(&(server->xmt));
- HTONL_FP(&server->xmt, &xpkt.xmt);
- if (sendpkt(&(server->srcadr), &xpkt, LEN_PKT_NOMAC)) {
- if (debug > 1)
- printf("failed transmit to %s\n",
- ntoa(&(server->srcadr)));
- return;
- }
-
- if (debug > 1)
- printf("transmit to %s\n", ntoa(&(server->srcadr)));
- }
-
- /*
- * count transmits, record contacted count and set transmit time
- */
- if (++server->xmtcnt == MINTRANSMITS)
- contacted++;
- server->last_xmit = current_time;
-
- /*
- * determine timeout for this packet. The more packets we send
- * to the host, the slower we get. If the host indicates that
- * it is not "sane" then we expect even less.
- */
- if (server->xmtcnt < MINTRANSMITS) {
- /* we have not sent enough */
- timeout = TIMER_HZ; /* 1 second probe */
- }
- else if (server->rcvcnt <= 0) {
- /* we have heard nothing */
- if (secondhalf)
- timeout = TIMER_HZ<<4; /* 16 second probe */
- else
- timeout = TIMER_HZ<<3; /* 8 second probe */
- }
- else {
- /* if we have low dispersion then probe infrequently */
- if (server->dispersion <= DESIREDDISP)
- timeout = TIMER_HZ<<4; /* 16 second probe */
- /* if the server is not in sync then let it alone */
- else if (server->leap == LEAP_NOTINSYNC)
- timeout = TIMER_HZ<<4; /* 16 second probe */
- /* if the server looks broken ignore it */
- else if (server->org.l_ui < server->reftime.l_ui)
- timeout = TIMER_HZ<<5; /* 32 second probe */
- else if (secondhalf)
- timeout = TIMER_HZ<<2; /* 4 second probe */
- else
- timeout = TIMER_HZ<<1; /* 2 second probe */
- }
-
- /*
- * set next transmit time based on timeout
- */
- server->event_time = current_time + timeout;
-}
-
-
-/*
- * receive - receive and process an incoming frame
- */
-static void
-receive(
- struct recvbuf *rbufp
- )
-{
- register struct pkt *rpkt;
- register struct server *server;
- register s_fp di;
- l_fp t10, t23;
- l_fp org;
- l_fp rec;
- l_fp ci;
- int has_mac;
- int is_authentic;
-
- if (debug > 2)
- printf("receive(%s)\n", ntoa(&rbufp->srcadr));
- /*
- * Check to see if the packet basically looks like something
- * intended for us.
- */
- if (rbufp->recv_length == LEN_PKT_NOMAC)
- has_mac = 0;
- else if (rbufp->recv_length >= LEN_PKT_NOMAC)
- has_mac = 1;
- else {
- if (debug > 2)
- printf("receive: packet length %d\n",
- rbufp->recv_length);
- return; /* funny length packet */
- }
-
- rpkt = &(rbufp->recv_pkt);
- if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION ||
- PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) {
- if (debug > 1)
- printf("receive: bad version %d\n",
- PKT_VERSION(rpkt->li_vn_mode));
- return;
- }
-
- if ((PKT_MODE(rpkt->li_vn_mode) != MODE_SERVER
- && PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE)
- || rpkt->stratum >=STRATUM_UNSPEC) {
- if (debug > 1)
- printf("receive: mode %d stratum %d\n",
- PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
- return;
- }
-
- /*
- * So far, so good. See if this is from a server we know.
- */
- server = findserver(&(rbufp->srcadr));
- if (server == NULL) {
- if (debug > 1)
- printf("receive: server not found\n");
- return;
- }
-
- /*
- * Decode the org timestamp and make sure we're getting a response
- * to our last request.
- */
- NTOHL_FP(&rpkt->org, &org);
- if (!L_ISEQU(&org, &server->xmt)) {
- if (debug > 1)
- printf("receive: pkt.org and peer.xmt differ\n");
- return;
- }
-
- /*
- * Check out the authenticity if we're doing that.
- */
- if (!sys_authenticate)
- is_authentic = 1;
- else {
- is_authentic = 0;
-
- if (debug > 3)
- printf("receive: rpkt keyid=%ld sys_authkey=%ld decrypt=%ld\n",
- (long int)ntohl(rpkt->exten[0]), (long int)sys_authkey,
- (long int)authdecrypt(sys_authkey, (u_int32 *)rpkt,
- LEN_PKT_NOMAC, (int)(rbufp->recv_length - LEN_PKT_NOMAC)));
-
- if (has_mac && ntohl(rpkt->exten[0]) == sys_authkey &&
- authdecrypt(sys_authkey, (u_int32 *)rpkt, LEN_PKT_NOMAC,
- (int)(rbufp->recv_length - LEN_PKT_NOMAC)))
- is_authentic = 1;
- if (debug)
- printf("receive: authentication %s\n",
- is_authentic ? "passed" : "failed");
- }
- server->trust <<= 1;
- if (!is_authentic)
- server->trust |= 1;
-
- /*
- * Looks good. Record info from the packet.
- */
- server->leap = PKT_LEAP(rpkt->li_vn_mode);
- server->stratum = PKT_TO_STRATUM(rpkt->stratum);
- server->precision = rpkt->precision;
- server->rootdelay = ntohl(rpkt->rootdelay);
- server->rootdispersion = ntohl(rpkt->rootdispersion);
- server->refid = rpkt->refid;
- NTOHL_FP(&rpkt->reftime, &server->reftime);
- NTOHL_FP(&rpkt->rec, &rec);
- NTOHL_FP(&rpkt->xmt, &server->org);
-
- /*
- * count this guy as responding
- */
- server->reach |= 1;
- if (server->rcvcnt++ == 0)
- responding++;
-
- /*
- * Make sure the server is at least somewhat sane. If not, ignore
- * it for later.
- */
- if (L_ISZERO(&rec) || !L_ISHIS(&server->org, &rec)) {
- if (debug > 1)
- printf("receive: pkt insane\n");
- return;
- }
-
- /*
- * Calculate the round trip delay (di) and the clock offset (ci).
- * We use the equations (reordered from those in the spec):
- *
- * d = (t2 - t3) - (t1 - t0)
- * c = ((t2 - t3) + (t1 - t0)) / 2
- */
- t10 = server->org; /* pkt.xmt == t1 */
- L_SUB(&t10, &rbufp->recv_time); /* recv_time == t0*/
-
- t23 = rec; /* pkt.rec == t2 */
- L_SUB(&t23, &org); /* pkt->org == t3 */
-
- /* now have (t2 - t3) and (t0 - t1). Calculate (ci) and (di) */
- ci = t10;
- L_ADD(&ci, &t23);
- L_RSHIFT(&ci);
-
- /*
- * Calculate di in t23 in full precision, then truncate
- * to an s_fp.
- */
- L_SUB(&t23, &t10);
- di = LFPTOFP(&t23);
-
- if (debug > 3)
- printf("offset: %s, delay %s\n", lfptoa(&ci, 6), fptoa(di, 5));
-
- di += (FP_SECOND >> (-(int)NTPDATE_PRECISION))
- + (FP_SECOND >> (-(int)server->precision)) + NTP_MAXSKW;
-
- if (di <= 0) { /* value still too raunchy to use? */
- L_CLR(&ci);
- di = 0;
- } else {
- di = max(di, NTP_MINDIST);
- }
-
-
- /*
- * This one is valid. Give it to clock_filter(),
- */
- clock_filter(server, di, &ci);
- if (debug > 1)
- printf("receive from %s\n", ntoa(&rbufp->srcadr));
-
- /*
- * See if we should goes the transmission. If not return now
- * otherwise have the next event time be shortened
- */
- if (server->stratum <= NTP_INFIN)
- return; /* server does not have a stratum */
- if (server->leap == LEAP_NOTINSYNC)
- return; /* just booted server or out of sync */
- if (!L_ISHIS(&server->org, &server->reftime))
- return; /* broken host */
- if (server->trust != 0)
- return; /* can not trust it */
-
- if (server->dispersion < DESIREDDISP)
- return; /* we have the desired dispersion */
-
- server->event_time -= (TIMER_HZ+1);
-}
-
-
-/*
- * clock_filter - add clock sample, determine a server's delay, dispersion
- * and offset
- */
-static void
-clock_filter(
- register struct server *server,
- s_fp di,
- l_fp *c
- )
-{
- register int i, j;
- int ord[NTP_SHIFT];
-
- /*
- * Insert sample and increment nextpt
- */
-
- i = server->filter_nextpt;
- server->filter_delay[i] = di;
- server->filter_offset[i] = *c;
- server->filter_soffset[i] = LFPTOFP(c);
- server->filter_nextpt++;
- if (server->filter_nextpt >= NTP_SHIFT)
- server->filter_nextpt = 0;
-
- /*
- * Sort indices into increasing delay order
- */
- for (i = 0; i < NTP_SHIFT; i++)
- ord[i] = i;
-
- for (i = 0; i < (NTP_SHIFT-1); i++) {
- for (j = i+1; j < NTP_SHIFT; j++) {
- if (server->filter_delay[ord[j]] == 0)
- continue;
- if (server->filter_delay[ord[i]] == 0
- || (server->filter_delay[ord[i]]
- > server->filter_delay[ord[j]])) {
- register int tmp;
-
- tmp = ord[i];
- ord[i] = ord[j];
- ord[j] = tmp;
- }
- }
- }
-
- /*
- * Now compute the dispersion, and assign values to delay and
- * offset. If there are no samples in the register, delay and
- * offset go to zero and dispersion is set to the maximum.
- */
- if (server->filter_delay[ord[0]] == 0) {
- server->delay = 0;
- L_CLR(&server->offset);
- server->soffset = 0;
- server->dispersion = PEER_MAXDISP;
- } else {
- register s_fp d;
-
- server->delay = server->filter_delay[ord[0]];
- server->offset = server->filter_offset[ord[0]];
- server->soffset = LFPTOFP(&server->offset);
- server->dispersion = 0;
- for (i = 1; i < NTP_SHIFT; i++) {
- if (server->filter_delay[ord[i]] == 0)
- d = PEER_MAXDISP;
- else {
- d = server->filter_soffset[ord[i]]
- - server->filter_soffset[ord[0]];
- if (d < 0)
- d = -d;
- if (d > PEER_MAXDISP)
- d = PEER_MAXDISP;
- }
- /*
- * XXX This *knows* PEER_FILTER is 1/2
- */
- server->dispersion += (u_fp)(d) >> i;
- }
- }
- /*
- * We're done
- */
-}
-
-
-/* clock_count - count the clock sources we have
- */
-static void
-clock_count(void)
-{
- register struct server *server;
- register int n;
-
- /* reset counts */
- validcount = valid_n_low = 0;
-
- /* go through the list of servers and count the clocks we believe
- * and that have low dispersion
- */
- for (n = 0; n < sys_numservers; n++) {
- server = sys_servers[n];
- if (server->delay == 0) {
- continue; /* no data */
- }
- if (server->stratum > NTP_INFIN) {
- continue; /* stratum no good */
- }
- if (server->delay > NTP_MAXWGT) {
- continue; /* too far away */
- }
- if (server->leap == LEAP_NOTINSYNC)
- continue; /* he's in trouble */
- if (!L_ISHIS(&server->org, &server->reftime)) {
- continue; /* very broken host */
- }
- if ((server->org.l_ui - server->reftime.l_ui) >= NTP_MAXAGE) {
- continue; /* too long without sync */
- }
- if (server->trust != 0) {
- continue;
- }
-
- /*
- * This one is a valid time source..
- */
- validcount++;
-
- /*
- * See if this one has a okay low dispersion
- */
- if (server->dispersion <= DESIREDDISP)
- valid_n_low++;
- }
-
- if (debug > 1)
- printf("have %d, valid %d, low %d\n",
- responding, validcount, valid_n_low);
-}
-
-
-/*
- * clock_select - select the pick-of-the-litter clock from the samples
- * we've got.
- */
-static struct server *
-clock_select(void)
-{
- register struct server *server;
- register int i;
- register int nlist;
- register s_fp d;
- register int j;
- register int n;
- s_fp local_threshold;
- struct server *server_list[NTP_MAXCLOCK];
- u_fp server_badness[NTP_MAXCLOCK];
- struct server *sys_server;
-
- /*
- * This first chunk of code is supposed to go through all
- * servers we know about to find the NTP_MAXLIST servers which
- * are most likely to succeed. We run through the list
- * doing the sanity checks and trying to insert anyone who
- * looks okay. We are at all times aware that we should
- * only keep samples from the top two strata and we only need
- * NTP_MAXLIST of them.
- */
- nlist = 0; /* none yet */
- for (n = 0; n < sys_numservers; n++) {
- server = sys_servers[n];
- if (server->delay == 0)
- continue; /* no data */
- if (server->stratum > NTP_INFIN)
- continue; /* stratum no good */
- if (server->delay > NTP_MAXWGT) {
- continue; /* too far away */
- }
- if (server->leap == LEAP_NOTINSYNC)
- continue; /* he's in trouble */
- if (!L_ISHIS(&server->org, &server->reftime)) {
- continue; /* very broken host */
- }
- if ((server->org.l_ui - server->reftime.l_ui)
- >= NTP_MAXAGE) {
- continue; /* too long without sync */
- }
- if (server->trust != 0) {
- continue;
- }
-
- /*
- * This one seems sane. Find where he belongs
- * on the list.
- */
- d = server->dispersion + server->dispersion;
- for (i = 0; i < nlist; i++)
- if (server->stratum <= server_list[i]->stratum)
- break;
- for ( ; i < nlist; i++) {
- if (server->stratum < server_list[i]->stratum)
- break;
- if (d < (s_fp) server_badness[i])
- break;
- }
-
- /*
- * If i points past the end of the list, this
- * guy is a loser, else stick him in.
- */
- if (i >= NTP_MAXLIST)
- continue;
- for (j = nlist; j > i; j--)
- if (j < NTP_MAXLIST) {
- server_list[j] = server_list[j-1];
- server_badness[j]
- = server_badness[j-1];
- }
-
- server_list[i] = server;
- server_badness[i] = d;
- if (nlist < NTP_MAXLIST)
- nlist++;
- }
-
- /*
- * Got the five-or-less best. Cut the list where the number of
- * strata exceeds two.
- */
- j = 0;
- for (i = 1; i < nlist; i++)
- if (server_list[i]->stratum > server_list[i-1]->stratum)
- if (++j == 2) {
- nlist = i;
- break;
- }
-
- /*
- * Whew! What we should have by now is 0 to 5 candidates for
- * the job of syncing us. If we have none, we're out of luck.
- * If we have one, he's a winner. If we have more, do falseticker
- * detection.
- */
-
- if (nlist == 0)
- sys_server = 0;
- else if (nlist == 1) {
- sys_server = server_list[0];
- } else {
- /*
- * Re-sort by stratum, bdelay estimate quality and
- * server.delay.
- */
- for (i = 0; i < nlist-1; i++)
- for (j = i+1; j < nlist; j++) {
- if (server_list[i]->stratum
- < server_list[j]->stratum)
- break; /* already sorted by stratum */
- if (server_list[i]->delay
- < server_list[j]->delay)
- continue;
- server = server_list[i];
- server_list[i] = server_list[j];
- server_list[j] = server;
- }
-
- /*
- * Calculate the fixed part of the dispersion limit
- */
- local_threshold = (FP_SECOND >> (-(int)NTPDATE_PRECISION))
- + NTP_MAXSKW;
-
- /*
- * Now drop samples until we're down to one.
- */
- while (nlist > 1) {
- for (n = 0; n < nlist; n++) {
- server_badness[n] = 0;
- for (j = 0; j < nlist; j++) {
- if (j == n) /* with self? */
- continue;
- d = server_list[j]->soffset
- - server_list[n]->soffset;
- if (d < 0) /* absolute value */
- d = -d;
- /*
- * XXX This code *knows* that
- * NTP_SELECT is 3/4
- */
- for (i = 0; i < j; i++)
- d = (d>>1) + (d>>2);
- server_badness[n] += d;
- }
- }
-
- /*
- * We now have an array of nlist badness
- * coefficients. Find the badest. Find
- * the minimum precision while we're at
- * it.
- */
- i = 0;
- n = server_list[0]->precision;;
- for (j = 1; j < nlist; j++) {
- if (server_badness[j] >= server_badness[i])
- i = j;
- if (n > server_list[j]->precision)
- n = server_list[j]->precision;
- }
-
- /*
- * i is the index of the server with the worst
- * dispersion. If his dispersion is less than
- * the threshold, stop now, else delete him and
- * continue around again.
- */
- if (server_badness[i] < (local_threshold
- + (FP_SECOND >> (-n))))
- break;
- for (j = i + 1; j < nlist; j++)
- server_list[j-1] = server_list[j];
- nlist--;
- }
-
- /*
- * What remains is a list of less than 5 servers. Take
- * the best.
- */
- sys_server = server_list[0];
- }
-
- /*
- * That's it. Return our server.
- */
- return sys_server;
-}
-
-
-/*
- * set_local_clock -- handle setting the local clock or displaying info.
- */
-static void
-set_local_clock(void)
-{
- register int i;
- register struct server *server;
- time_t tmp;
- double dtemp;
-
- /*
- * if setting time then print final analysis
- */
- if (set_time)
- analysis(1);
-
- /*
- * pick a clock
- */
- server = clock_select();
-
- /*
- * do some display of information
- */
- if (debug || verbose) {
- for (i = 0; i < sys_numservers; i++)
- printserver(sys_servers[i], stdout);
- if (debug)
- printf("packets sent %ld, received %ld\n",
- total_xmit, total_recv);
- }
-
- /*
- * see if we have a server to set the time with
- */
- if (server == 0) {
- if (!set_time || verbose)
- fprintf(stdout,"No servers available to sync time with\n");
- exit(1);
- }
-
- /*
- * we have a valid and selected time to use!!!!!
- */
-
- /*
- * if we are not setting the time then display offset and exit
- */
- if (!set_time) {
- fprintf(stdout,
- "Your clock is off by %s seconds. (%s) [%ld/%ld]\n",
- lfptoa(&server->offset, 7),
- ntoa(&server->srcadr),
- total_xmit, total_recv);
- exit(0);
- }
-
- /*
- * set the clock
- * XXX: Examine the more flexible approach used by ntpdate.
- * Note that a design consideration here is that we sometimes
- * _want_ to step the clock by a _huge_ amount in either
- * direction, because the local clock is completely bogus.
- * This condition must be recognized and dealt with, so
- * that we always get a good time when this completes.
- * -- jhutz+@cmu.edu, 16-Aug-1999
- */
- LFPTOD(&server->offset, dtemp);
- step_systime(dtemp);
- time(&tmp);
- fprintf(stdout,"Time set to %.20s [%s %s %ld/%ld]\n",
- ctime(&tmp)+4,
- ntoa(&server->srcadr),
- lfptoa(&server->offset, 7),
- total_xmit, total_recv);
- exit(0);
-}
-
-
-/*
- * findserver - find a server in the list given its address
- */
-static struct server *
-findserver(
- struct sockaddr_in *addr
- )
-{
- register int i;
- register u_int32 netnum;
-
- if (htons(addr->sin_port) != NTP_PORT)
- return 0;
- netnum = addr->sin_addr.s_addr;
-
- for (i = 0; i < sys_numservers; i++) {
- if (netnum == sys_servers[i]->srcadr.sin_addr.s_addr)
- return sys_servers[i];
- }
- return 0;
-}
-
-
-/*
- * timer - process a timer interrupt
- */
-static void
-timer(void)
-{
- register int k;
-
- /*
- * Bump the current idea of the time
- */
- current_time++;
-
- /*
- * see if we have reached half time
- */
- if (current_time >= half_time && !secondhalf) {
- secondhalf++;
- if (debug)
- printf("\nSecond Half of Timeout!\n");
- printmsg++;
- }
-
- /*
- * We only want to send a few packets per transmit interrupt
- * to throttle things
- */
- for(k = 0;k < MAXXMITCOUNT;k++) {
- register int i, oldi;
- register u_long oldxtime;
-
- /*
- * We want to send a packet out for a server that has an
- * expired event time. However to be mellow about this, we only
- * use one expired event timer and to avoid starvation we use
- * the one with the oldest last transmit time.
- */
- oldi = -1;
- oldxtime = 0;
- for (i = 0; i < sys_numservers; i++) {
- if (sys_servers[i]->event_time <= current_time) {
- if (oldi < 0 || oldxtime > sys_servers[i]->last_xmit) {
- oldxtime = sys_servers[i]->last_xmit;
- oldi = i;
- }
- }
- }
- if (oldi >= 0)
- transmit(sys_servers[oldi]);
- else
- break; /* no expired event */
- } /* end of transmit loop */
-}
-
-
-#ifndef SYS_WINNT
-/*
- * alarming - record the occurance of an alarm interrupt
- */
-static RETSIGTYPE
-alarming(
- int sig
- )
-#else
-void CALLBACK
-alarming(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
-#endif /* SYS_WINNT */
-{
- alarm_flag++;
-}
-
-
-/*
- * init_alarm - set up the timer interrupt
- */
-static void
-init_alarm(void)
-{
-#ifndef SYS_WINNT
-# ifndef HAVE_TIMER_SETTIME
- struct itimerval itimer;
-# else
- struct itimerspec ntpdate_itimer;
-# endif
-#else
- TIMECAPS tc;
- UINT wTimerRes, wTimerID;
-# endif /* SYS_WINNT */
-#if defined SYS_CYGWIN32 || defined SYS_WINNT
- HANDLE hToken;
- TOKEN_PRIVILEGES tkp;
- DWORD dwUser = 0;
-#endif /* SYS_WINNT */
-
- alarm_flag = 0;
-
-#ifndef SYS_WINNT
-# if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME)
- alarm_flag = 0;
- /* this code was put in as setitimer() is non existant this us the
- * POSIX "equivalents" setup - casey
- */
- /* ntpdate_timerid is global - so we can kill timer later */
- if (timer_create (CLOCK_REALTIME, NULL, &ntpdate_timerid) ==
-# ifdef SYS_VXWORKS
- ERROR
-# else
- -1
-# endif
- )
- {
- fprintf (stderr, "init_alarm(): timer_create (...) FAILED\n");
- return;
- }
-
- /* TIMER_HZ = (5)
- * Set up the alarm interrupt. The first comes 1/(2*TIMER_HZ)
- * seconds from now and they continue on every 1/TIMER_HZ seconds.
- */
- (void) signal_no_reset(SIGALRM, alarming);
- ntpdate_itimer.it_interval.tv_sec = ntpdate_itimer.it_value.tv_sec = 0;
- ntpdate_itimer.it_interval.tv_nsec = 1000000000/TIMER_HZ;
- ntpdate_itimer.it_value.tv_nsec = 1000000000/(TIMER_HZ<<1);
- timer_settime(ntpdate_timerid, 0 /* !TIMER_ABSTIME */, &ntpdate_itimer, NULL);
-# else
- /*
- * Set up the alarm interrupt. The first comes 1/(2*TIMER_HZ)
- * seconds from now and they continue on every 1/TIMER_HZ seconds.
- */
- (void) signal_no_reset(SIGALRM, alarming);
- 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
- /*
- * Get previleges needed for fiddling with the clock
- */
-
- /* get the current process token handle */
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
- msyslog(LOG_ERR, "OpenProcessToken failed: %m");
- exit(1);
- }
- /* get the LUID for system-time privilege. */
- LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1; /* one privilege to set */
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- /* get set-time privilege for this process. */
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,(PTOKEN_PRIVILEGES) NULL, 0);
- /* cannot test return value of AdjustTokenPrivileges. */
- if (GetLastError() != ERROR_SUCCESS)
- msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
-#endif
-#else /* SYS_WINNT */
- _tzset();
-
- /*
- * Get previleges needed for fiddling with the clock
- */
-
- /* get the current process token handle */
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
- msyslog(LOG_ERR, "OpenProcessToken failed: %m");
- exit(1);
- }
- /* get the LUID for system-time privilege. */
- LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1; /* one privilege to set */
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- /* get set-time privilege for this process. */
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,(PTOKEN_PRIVILEGES) NULL, 0);
- /* cannot test return value of AdjustTokenPrivileges. */
- if (GetLastError() != ERROR_SUCCESS)
- msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
-
- /*
- * Set up timer interrupts for every 2**EVENT_TIMEOUT seconds
- * Under Win/NT, expiry of timer interval leads to invocation
- * of a callback function (on a different thread) rather than
- * generating an alarm signal
- */
-
- /* determine max and min resolution supported */
- if(timeGetDevCaps(&tc, sizeof(TIMECAPS)) != TIMERR_NOERROR) {
- msyslog(LOG_ERR, "timeGetDevCaps failed: %m");
- exit(1);
- }
- wTimerRes = min(max(tc.wPeriodMin, TARGET_RESOLUTION), tc.wPeriodMax);
- /* establish the minimum timer resolution that we'll use */
- timeBeginPeriod(wTimerRes);
-
- /* start the timer event */
- wTimerID = timeSetEvent(
- (UINT) (1000/TIMER_HZ), /* Delay */
- wTimerRes, /* Resolution */
- (LPTIMECALLBACK) alarming, /* Callback function */
- (DWORD) dwUser, /* User data */
- TIME_PERIODIC); /* Event type (periodic) */
- if (wTimerID == 0) {
- msyslog(LOG_ERR, "timeSetEvent failed: %m");
- exit(1);
- }
-#endif /* SYS_WINNT */
-}
-
-
-/*
- * init_io - initialize I/O data and open socket
- */
-static void
-init_io(void)
-{
-#ifdef SYS_WINNT
- WORD wVersionRequested;
- WSADATA wsaData;
- init_transmitbuff();
-#endif /* SYS_WINNT */
-
- /*
- * Init buffer free list and stat counters
- */
- init_recvbuff(sys_numservers + 2);
-
-#if defined(HAVE_SIGNALED_IO)
- set_signal();
-#endif
-
-#ifdef SYS_WINNT
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData))
- {
- msyslog(LOG_ERR, "No useable winsock.dll: %m");
- exit(1);
- }
-#endif /* SYS_WINNT */
-
- BLOCKIO();
-
- /* create a datagram (UDP) socket */
- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- msyslog(LOG_ERR, "socket() failed: %m");
- exit(1);
- /*NOTREACHED*/
- }
-
- /*
- * bind the socket to the NTP port
- */
- if (!debug && set_time && !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) {
-#ifndef SYS_WINNT
- if (errno == EADDRINUSE)
-#else
- if (WSAGetLastError() == WSAEADDRINUSE)
-#endif
- msyslog(LOG_ERR,
- "the NTP socket is in use, exiting");
- else
- msyslog(LOG_ERR, "bind() fails: %m");
- exit(1);
- }
- }
-
- FD_ZERO(&fdmask);
- FD_SET(fd, &fdmask);
-
- /*
- * set non-blocking,
- */
-
-#ifdef USE_FIONBIO
- /* in vxWorks we use FIONBIO, but the others are defined for old systems, so
- * all hell breaks loose if we leave them defined
- */
-#undef O_NONBLOCK
-#undef FNDELAY
-#undef O_NDELAY
-#endif
-
-#if defined(O_NONBLOCK) /* POSIX */
- if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
- {
- msyslog(LOG_ERR, "fcntl(O_NONBLOCK) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-#elif defined(FNDELAY)
- if (fcntl(fd, F_SETFL, FNDELAY) < 0)
- {
- msyslog(LOG_ERR, "fcntl(FNDELAY) fails: %m");
- 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");
- exit(1);
- /*NOTREACHED*/
- }
-#elif defined(FIONBIO)
- if (
-# if defined(VMS)
- (ioctl(fd,FIONBIO,&1) < 0)
-# elif defined(SYS_WINNT)
- (ioctlsocket(fd,FIONBIO,(u_long *) &on) == SOCKET_ERROR)
-# else
- (ioctl(fd,FIONBIO,&on) < 0)
-# endif
- )
- {
- msyslog(LOG_ERR, "ioctl(FIONBIO) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-#elif defined(FIOSNBIO)
- if (ioctl(fd,FIOSNBIO,&on) < 0)
- {
- msyslog(LOG_ERR, "ioctl(FIOSNBIO) fails: %m");
- exit(1);
- /*NOTREACHED*/
- }
-#else
-# include "Bletch: Need non-blocking I/O!"
-#endif
-
-#ifdef HAVE_SIGNALED_IO
- init_socket_sig(fd);
-#endif /* not HAVE_SIGNALED_IO */
-
- UNBLOCKIO();
-}
-
-
-/*
- * sendpkt - send a packet to the specified destination
- */
-static int
-sendpkt(
- struct sockaddr_in *dest,
- struct pkt *pkt,
- int len
- )
-{
- int cc;
- static int horriblecnt = 0;
-#ifdef SYS_WINNT
- DWORD err;
-#endif /* SYS_WINNT */
-
- total_xmit++; /* count it */
-
- if (horrible) {
- if (++horriblecnt > HORRIBLEOK) {
- if (debug > 3)
- printf("dropping send (%s)\n", ntoa(dest));
- if (horriblecnt >= HORRIBLEOK+horrible)
- horriblecnt = 0;
- return 0;
- }
- }
-
-
- cc = sendto(fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
- sizeof(struct sockaddr_in));
-#ifndef SYS_WINNT
- if (cc == -1) {
- if (errno != EWOULDBLOCK && errno != ENOBUFS)
-#else
- if (cc == SOCKET_ERROR) {
- err = WSAGetLastError();
- if (err != WSAEWOULDBLOCK && err != WSAENOBUFS)
-#endif /* SYS_WINNT */
- msyslog(LOG_ERR, "sendto(%s): %m", ntoa(dest));
- return -1;
- }
- return 0;
-}
-
-
-/*
- * input_handler - receive packets asynchronously
- */
-void
-input_handler(l_fp *xts)
-{
- register int n;
- register struct recvbuf *rb;
- struct timeval tvzero;
- int fromlen;
- fd_set fds;
- l_fp ts;
- ts = *xts; /* we ignore xts, but make the compiler happy */
-
- /*
- * Do a poll to see if we have data
- */
- for (;;) {
- fds = fdmask;
- tvzero.tv_sec = tvzero.tv_usec = 0;
- n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
-
- /*
- * If nothing to do, just return. If an error occurred,
- * complain and return. If we've got some, freeze a
- * timestamp.
- */
- if (n == 0)
- return;
- else if (n == -1) {
- if (errno != EINTR) {
- msyslog(LOG_ERR, "select() error: %m");
- }
- return;
- }
- get_systime(&ts);
-
- /*
- * 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 (initializing || free_recvbuffs == 0) {
- char buf[100];
-
-#ifndef SYS_WINNT
- (void) read(fd, 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);
-#endif /* SYS_WINNT */
- continue;
- }
-
- rb = get_free_recv_buffer();
-
- fromlen = sizeof(struct sockaddr_in);
- rb->recv_length = recvfrom(fd, (char *)&rb->recv_pkt,
- sizeof(rb->recv_pkt), 0,
- (struct sockaddr *)&rb->srcadr, &fromlen);
- if (rb->recv_length == -1) {
- freerecvbuf(rb);
- continue;
- }
-
- /*
- * Got one. Mark how and when it got here,
- * put it on the full list.
- */
- rb->recv_time = ts;
- add_full_recv_buffer(rb);
- total_recv++; /* count it */
- }
-}
-
-
-/* XXX ELIMINATE printserver similar in ntptrace.c, ntpdate.c */
-/*
- * printserver - print detail information for a server
- */
-static void
-printserver(
- register struct server *pp,
- FILE *fp
- )
-{
- register int i;
- char junk[5];
- char *str;
-
- if (!debug) {
- (void) fprintf(fp,
- "%-15s %d/%d %03o v%d s%d offset %9s delay %s disp %s\n",
- ntoa(&pp->srcadr),
- pp->xmtcnt,pp->rcvcnt,pp->reach,
- pp->version,pp->stratum,
- lfptoa(&pp->offset, 6), ufptoa(pp->delay, 5),
- ufptoa(pp->dispersion, 4));
- return;
- }
-
- (void) fprintf(fp, "server %s, port %d\n",
- ntoa(&pp->srcadr), ntohs(pp->srcadr.sin_port));
-
- (void) fprintf(fp, "stratum %d, precision %d, leap %c%c, trust %03o\n",
- pp->stratum, pp->precision,
- pp->leap & 0x2 ? '1' : '0',
- pp->leap & 0x1 ? '1' : '0',
- pp->trust);
-
- if (pp->stratum == 1) {
- junk[4] = 0;
- memmove(junk, (char *)&pp->refid, 4);
- str = junk;
- } else {
- str = numtoa(pp->refid);
- }
- (void) fprintf(fp,
- "refid [%s], delay %s, dispersion %s\n",
- str, fptoa((s_fp)pp->delay, 5),
- ufptoa(pp->dispersion, 5));
-
- (void) fprintf(fp, "transmitted %d, received %d, reachable %03o\n",
- pp->xmtcnt, pp->rcvcnt, pp->reach);
-
- (void) fprintf(fp, "reference time: %s\n",
- prettydate(&pp->reftime));
- (void) fprintf(fp, "originate timestamp: %s\n",
- prettydate(&pp->org));
- (void) fprintf(fp, "transmit timestamp: %s\n",
- prettydate(&pp->xmt));
-
- (void) fprintf(fp, "filter delay: ");
- for (i = 0; i < NTP_SHIFT; i++) {
- (void) fprintf(fp, " %-8.8s", fptoa(pp->filter_delay[i], 5));
- if (i == (NTP_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
- (void) fprintf(fp, "filter offset:");
- for (i = 0; i < PEER_SHIFT; i++) {
- (void) fprintf(fp, " %-8.8s", lfptoa(&pp->filter_offset[i], 6));
- if (i == (PEER_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
- (void) fprintf(fp, "delay %s, dispersion %s\n",
- fptoa((s_fp)pp->delay, 5), ufptoa(pp->dispersion, 5));
-
- (void) fprintf(fp, "offset %s\n\n",
- lfptoa(&pp->offset, 6));
-}
-
-#if !defined(HAVE_VSPRINTF)
-int
-vsprintf(
- char *str,
- const char *fmt,
- va_list ap
- )
-{
- FILE f;
- int len;
-
- f._flag = _IOWRT+_IOSTRG;
- f._ptr = str;
- f._cnt = 32767;
- len = _doprnt(fmt, ap, &f);
- *f._ptr = 0;
- return (len);
-}
-#endif
diff --git a/contrib/ntp/ntpdc/Makefile.am b/contrib/ntp/ntpdc/Makefile.am
deleted file mode 100644
index f7a4d2a..0000000
--- a/contrib/ntp/ntpdc/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-#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
-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 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
deleted file mode 100644
index 8ad0e05..0000000
--- a/contrib/ntp/ntpdc/Makefile.in
+++ /dev/null
@@ -1,508 +0,0 @@
-# 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
-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
-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
-subdir = ntpdc
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-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_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 =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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) ntpdc-layout.c
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
- Makefile.am nl.pl.in
-SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
-
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(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)
- @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)
-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
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -test "$U" = "" || rm -f *_.c
-
-@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:
-@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`
-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) > $@ || 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) > $@ || 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) $(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: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
-
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir)
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) 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:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -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-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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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 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 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/README b/contrib/ntp/ntpdc/README
deleted file mode 100644
index 618e846..0000000
--- a/contrib/ntp/ntpdc/README
+++ /dev/null
@@ -1,6 +0,0 @@
-README file for directory ./xntpdc of the NTP Version 4 distribution
-
-This directory contains the sources for the xntpdc utility program. See
-the README and RELNOTES files in the parent directory for directions on
-how to make and install this program. The current version number of this
-program is in the version.c file.
diff --git a/contrib/ntp/ntpdc/layout.std b/contrib/ntp/ntpdc/layout.std
deleted file mode 100644
index 0a67b73..0000000
--- a/contrib/ntp/ntpdc/layout.std
+++ /dev/null
@@ -1,417 +0,0 @@
-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
deleted file mode 100755
index 6974fe2..0000000
--- a/contrib/ntp/ntpdc/nl.pl
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /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
deleted file mode 100644
index dfa79c2..0000000
--- a/contrib/ntp/ntpdc/nl.pl.in
+++ /dev/null
@@ -1,37 +0,0 @@
-#! @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
deleted file mode 100644
index 3df8c78..0000000
--- a/contrib/ntp/ntpdc/nl_in.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#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
deleted file mode 100644
index b05fbf3..0000000
--- a/contrib/ntp/ntpdc/ntpdc-layout.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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
deleted file mode 100644
index aa4f188..0000000
--- a/contrib/ntp/ntpdc/ntpdc.c
+++ /dev/null
@@ -1,1894 +0,0 @@
-/*
- * ntpdc - control and monitor your ntpd daemon
- */
-
-#include <stdio.h>
-
-#include "ntpdc.h"
-#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>
-#include <setjmp.h>
-#include <netdb.h>
-
-#ifdef SYS_WINNT
-# include <io.h>
-#else
-# define closesocket close
-#endif /* SYS_WINNT */
-
-#if defined(HAVE_LIBREADLINE) || defined (HAVE_LIBEDIT)
-# include <readline/readline.h>
-# include <readline/history.h>
-#endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */
-
-#ifdef SYS_VXWORKS
-/* vxWorks needs mode flag -casey*/
-#define open(name, flags) open(name, flags, 0777)
-#define SERVER_PORT_NUM 123
-#endif
-
-/*
- * Because we now potentially understand a lot of commands (and
- * it requires a lot of commands to talk to ntpd) we will run
- * interactive if connected to a terminal.
- */
-static int interactive = 0; /* set to 1 when we should prompt */
-static const char * prompt = "ntpdc> "; /* prompt to ask him about */
-
-/*
- * Keyid used for authenticated requests. Obtained on the fly.
- */
-static u_long info_auth_keyid;
-
-/*
- * Type of key md5
- */
-#define KEY_TYPE_MD5 4
-
-static int info_auth_keytype = KEY_TYPE_MD5; /* MD5 */
-u_long current_time; /* needed by authkeys; not used */
-
-int ntpdcmain P((int, char **));
-/*
- * Built in command handler declarations
- */
-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 **, int));
-static int sendrequest P((int, int, int, int, int, char *));
-static void getcmds P((void));
-static RETSIGTYPE abortcmd P((int));
-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 *, 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 *));
-#else
-static int helpsort P((char **, char **));
-#endif
-static void printusage P((struct xcmd *, FILE *));
-static void timeout P((struct parse *, FILE *));
-static void my_delay P((struct parse *, FILE *));
-static void host P((struct parse *, FILE *));
-static void keyid P((struct parse *, FILE *));
-static void keytype P((struct parse *, FILE *));
-static void passwd P((struct parse *, FILE *));
-static void hostnames P((struct parse *, FILE *));
-static void setdebug P((struct parse *, FILE *));
-static void quit P((struct parse *, FILE *));
-static void version P((struct parse *, FILE *));
-static void warning P((const char *, const char *, const char *));
-static void error P((const char *, const char *, const char *));
-static u_long getkeyid P((const char *));
-
-
-
-/*
- * Built-in commands we understand
- */
-static struct xcmd builtins[] = {
- { "?", help, { OPT|NTP_STR, NO, NO, NO },
- { "command", "", "", "" },
- "tell the use and syntax of commands" },
- { "help", help, { OPT|NTP_STR, NO, NO, NO },
- { "command", "", "", "" },
- "tell the use and syntax of commands" },
- { "timeout", timeout, { OPT|UINT, NO, NO, NO },
- { "msec", "", "", "" },
- "set the primary receive time out" },
- { "delay", my_delay, { OPT|INT, NO, NO, NO },
- { "msec", "", "", "" },
- "set the delay added to encryption time stamps" },
- { "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 },
- { "", "", "", "" },
- "specify a password to use for authenticated requests"},
- { "hostnames", hostnames, { OPT|NTP_STR, NO, NO, NO },
- { "yes|no", "", "", "" },
- "specify whether hostnames or net numbers are printed"},
- { "debug", setdebug, { OPT|NTP_STR, NO, NO, NO },
- { "no|more|less", "", "", "" },
- "set/change debugging level" },
- { "quit", quit, { NO, NO, NO, NO },
- { "", "", "", "" },
- "exit ntpdc" },
- { "exit", quit, { NO, NO, NO, NO },
- { "", "", "", "" },
- "exit ntpdc" },
- { "keyid", keyid, { OPT|UINT, NO, NO, NO },
- { "key#", "", "", "" },
- "set/show keyid to use for authenticated requests" },
- { "keytype", keytype, { OPT|NTP_STR, NO, NO, NO },
- { "(md5|des)", "", "", "" },
- "set/show key authentication type for authenticated requests (des|md5)" },
- { "version", version, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print version number" },
- { 0, 0, { NO, NO, NO, NO },
- { "", "", "", "" }, "" }
-};
-
-
-/*
- * Default values we use.
- */
-#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 "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 */
-#define MAXLINE 512 /* maximum line length */
-#define MAXTOKENS (1+1+MAXARGS+2) /* maximum number of usable tokens */
- /* command + -4|-6 + MAXARGS + */
- /* redirection */
-
-/*
- * Some variables used and manipulated locally
- */
-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 */
-int showhostnames = 1; /* show host names by default */
-
-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 */
-int s_port = 0;
-
-#if defined (SYS_WINNT) || defined (SYS_VXWORKS)
-char password[9];
-#endif /* SYS_WINNT || SYS_VXWORKS */
-
-#ifdef SYS_WINNT
-DWORD NumberOfBytesWritten;
-
-HANDLE TimerThreadHandle = NULL; /* 1998/06/03 - Used in ntplib/machines.c */
-void timer(void) { ; }; /* 1998/06/03 - Used in ntplib/machines.c */
-
-#endif /* SYS_WINNT */
-
-/*
- * Holds data returned from queries. We allocate INITDATASIZE
- * octets to begin with, increasing this as we need to.
- */
-#define INITDATASIZE (sizeof(struct resp_pkt) * 16)
-#define INCDATASIZE (sizeof(struct resp_pkt) * 8)
-
-static char *pktdata;
-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;
-
-/*
- * For commands typed on the command line (with the -c option)
- */
-static int numcmds = 0;
-static const char *ccmds[MAXCMDS];
-#define ADDCMD(cp) if (numcmds < MAXCMDS) ccmds[numcmds++] = (cp)
-
-/*
- * When multiple hosts are specified.
- */
-static int numhosts = 0;
-static const char *chosts[MAXHOSTS];
-#define ADDHOST(cp) if (numhosts < MAXHOSTS) chosts[numhosts++] = (cp)
-
-/*
- * Error codes for internal use
- */
-#define ERR_INCOMPLETE 16
-#define ERR_TIMEOUT 17
-
-/*
- * Macro definitions we use
- */
-#define ISSPACE(c) ((c) == ' ' || (c) == '\t')
-#define ISEOL(c) ((c) == '\n' || (c) == '\r' || (c) == '\0')
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-/*
- * For converting time stamps to dates
- */
-#define JAN_1970 2208988800 /* 1970 - 1900 in seconds */
-
-/*
- * Jump buffer for longjumping back to the command level
- */
-static jmp_buf interrupt_buf;
-static volatile int jump = 0;
-
-/*
- * Pointer to current output unit
- */
-static FILE *current_output;
-
-/*
- * Command table imported from ntpdc_ops.c
- */
-extern struct xcmd opcmds[];
-
-char *progname;
-volatile int debug;
-
-#ifdef NO_MAIN_ALLOWED
-CALL(ntpdc,"ntpdc",ntpdcmain);
-#else
-int
-main(
- int argc,
- char *argv[]
- )
-{
- return ntpdcmain(argc, argv);
-}
-#endif
-
-#ifdef SYS_VXWORKS
-void clear_globals(void)
-{
- extern int ntp_optind;
- extern char *ntp_optarg;
- showhostnames = 0; /* show host names by default */
- ntp_optind = 0;
- ntp_optarg = 0;
- havehost = 0; /* set to 1 when host open */
- numcmds = 0;
- numhosts = 0;
-}
-#endif
-
-/*
- * main - parse arguments and handle options
- */
-int
-ntpdcmain(
- int argc,
- char *argv[]
- )
-{
- int c;
- int errflg = 0;
- extern int ntp_optind;
- extern char *ntp_optarg;
-
- delay_time.l_ui = 0;
- delay_time.l_uf = DEFDELAY;
-
-#ifdef SYS_VXWORKS
- clear_globals();
- 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];
- 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;
- case 'd':
- ++debug;
- break;
- case 'i':
- interactive = 1;
- break;
- case 'l':
- ADDCMD("listpeers");
- break;
- case 'n':
- showhostnames = 0;
- break;
- case 'p':
- ADDCMD("peers");
- break;
- case 's':
- ADDCMD("dmpeers");
- break;
- default:
- errflg++;
- break;
- }
- if (errflg) {
- (void) fprintf(stderr,
- "usage: %s [-46dilnps] [-c cmd] host ...\n",
- progname);
- exit(2);
- }
- if (ntp_optind == argc) {
- ADDHOST(DEFHOST);
- } else {
- for (; ntp_optind < argc; ntp_optind++)
- ADDHOST(argv[ntp_optind]);
- }
-
- if (numcmds == 0 && interactive == 0
- && isatty(fileno(stdin)) && isatty(fileno(stderr))) {
- interactive = 1;
- }
-
-#ifndef SYS_WINNT /* Under NT cannot handle SIGINT, WIN32 spawns a handler */
- if (interactive)
- (void) signal_no_reset(SIGINT, abortcmd);
-#endif /* SYS_WINNT */
-
- /*
- * Initialize the packet data buffer
- */
- pktdata = (char *)malloc(INITDATASIZE);
- if (pktdata == NULL) {
- (void) fprintf(stderr, "%s: malloc() failed!\n", progname);
- exit(1);
- }
- pktdatasize = INITDATASIZE;
-
- if (numcmds == 0) {
- (void) openhost(chosts[0]);
- getcmds();
- } else {
- int ihost;
- int icmd;
-
- for (ihost = 0; ihost < numhosts; ihost++) {
- if (openhost(chosts[ihost]))
- for (icmd = 0; icmd < numcmds; icmd++) {
- if (numhosts > 1)
- printf ("--- %s ---\n",chosts[ihost]);
- docmd(ccmds[icmd]);
- }
- }
- }
-#ifdef SYS_WINNT
- WSACleanup();
-#endif
- return(0);
-} /* main end */
-
-
-/*
- * openhost - open a socket to a host
- */
-static int
-openhost(
- const char *hname
- )
-{
- char temphost[LENHOSTNAME];
- int a_info, i;
- struct addrinfo hints, *ai = NULL;
- register const char *cp;
- char name[LENHOSTNAME];
- char service[5];
-
- /*
- * 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 (debug > 2)
- printf("Opening host %s\n", temphost);
-
- if (havehost == 1) {
- if (debug > 2)
- printf("Closing old host %s\n", currenthost);
- (void) closesocket(sockfd);
- havehost = 0;
- }
- (void) strcpy(currenthost, temphost);
-
- /* 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
- {
- int optionValue = SO_SYNCHRONOUS_NONALERT;
- int err;
- err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&optionValue, sizeof(optionValue));
- if (err != NO_ERROR) {
- (void) fprintf(stderr, "cannot open nonoverlapped sockets\n");
- exit(1);
- }
- }
-
- sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
- if (sockfd == INVALID_SOCKET) {
- error("socket", "", "");
- exit(-1);
- }
-#else
- sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
- if (sockfd == -1)
- error("socket", "", "");
-#endif /* SYS_WINNT */
-
-
-#ifdef NEED_RCVBUF_SLOP
-# ifdef SO_RCVBUF
- {
- int rbufsize = INITDATASIZE + 2048; /* 2K for slop */
-
- if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
- &rbufsize, sizeof(int)) == -1)
- error("setsockopt", "", "");
- }
-# 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)
- freeaddrinfo(ai);
- havehost = 1;
- req_pkt_size = REQ_LEN_NOMAC;
- impl_ver = IMPL_XNTPD;
- return 1;
-}
-
-
-/* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */
-/*
- * sendpkt - send a packet to the remote host
- */
-static int
-sendpkt(
- char *xdata,
- int xdatalen
- )
-{
- if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
- warning("write to %s failed", currenthost, "");
- return -1;
- }
-
- return 0;
-}
-
-
-/*
- * growpktdata - grow the packet data area
- */
-static void
-growpktdata(void)
-{
- pktdatasize += INCDATASIZE;
- pktdata = (char *)realloc(pktdata, (unsigned)pktdatasize);
- if (pktdata == 0) {
- (void) fprintf(stderr, "%s: realloc() failed!\n", progname);
- exit(1);
- }
-}
-
-
-/*
- * getresponse - get a (series of) response packet(s) and return the data
- */
-static int
-getresponse(
- int implcode,
- int reqcode,
- int *ritems,
- int *rsize,
- 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;
- int numrecv;
- int seq;
- fd_set fds;
- int n;
- int pad;
-
- /*
- * This is pretty tricky. We may get between 1 and many packets
- * back in response to the request. We peel the data out of
- * each packet and collect it in one long block. When the last
- * packet in the sequence is received we'll know how many we
- * should have had. Note we use one long time out, should reconsider.
- */
- *ritems = 0;
- *rsize = 0;
- firstpkt = 1;
- numrecv = 0;
- *rdata = datap = pktdata;
- lastseq = 999; /* too big to be a sequence number */
- memset(haveseq, 0, sizeof(haveseq));
- FD_ZERO(&fds);
-
- again:
- if (firstpkt)
- tvo = tvout;
- else
- tvo = tvsout;
-
- FD_SET(sockfd, &fds);
- n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
-
- if (n == -1) {
- warning("select fails", "", "");
- return -1;
- }
- if (n == 0) {
- /*
- * Timed out. Return what we have
- */
- if (firstpkt) {
- (void) fprintf(stderr,
- "%s: timed out, nothing received\n", currenthost);
- return ERR_TIMEOUT;
- } else {
- (void) fprintf(stderr,
- "%s: timed out with incomplete data\n",
- currenthost);
- if (debug) {
- printf("Received sequence numbers");
- for (n = 0; n <= MAXSEQ; n++)
- if (haveseq[n])
- printf(" %d,", n);
- if (lastseq != 999)
- printf(" last frame received\n");
- else
- printf(" last frame not received\n");
- }
- return ERR_INCOMPLETE;
- }
- }
-
- n = recv(sockfd, (char *)&rpkt, sizeof(rpkt), 0);
- if (n == -1) {
- warning("read", "", "");
- return -1;
- }
-
-
- /*
- * Check for format errors. Bug proofing.
- */
- if (n < RESP_HEADER_SIZE) {
- if (debug)
- printf("Short (%d byte) packet received\n", n);
- goto again;
- }
- if (INFO_VERSION(rpkt.rm_vn_mode) > NTP_VERSION ||
- INFO_VERSION(rpkt.rm_vn_mode) < NTP_OLDVERSION) {
- if (debug)
- printf("Packet received with version %d\n",
- INFO_VERSION(rpkt.rm_vn_mode));
- goto again;
- }
- if (INFO_MODE(rpkt.rm_vn_mode) != MODE_PRIVATE) {
- if (debug)
- printf("Packet received with mode %d\n",
- INFO_MODE(rpkt.rm_vn_mode));
- goto again;
- }
- if (INFO_IS_AUTH(rpkt.auth_seq)) {
- if (debug)
- printf("Encrypted packet received\n");
- goto again;
- }
- if (!ISRESPONSE(rpkt.rm_vn_mode)) {
- if (debug)
- printf("Received request packet, wanted response\n");
- goto again;
- }
- if (INFO_MBZ(rpkt.mbz_itemsize) != 0) {
- if (debug)
- printf("Received packet with nonzero MBZ field!\n");
- goto again;
- }
-
- /*
- * Check implementation/request. Could be old data getting to us.
- */
- if (rpkt.implementation != implcode || rpkt.request != reqcode) {
- if (debug)
- printf(
- "Received implementation/request of %d/%d, wanted %d/%d",
- rpkt.implementation, rpkt.request,
- implcode, reqcode);
- goto again;
- }
-
- /*
- * Check the error code. If non-zero, return it.
- */
- if (INFO_ERR(rpkt.err_nitems) != INFO_OKAY) {
- if (debug && ISMORE(rpkt.rm_vn_mode)) {
- printf("Error code %d received on not-final packet\n",
- INFO_ERR(rpkt.err_nitems));
- }
- 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(
- "Received items %d, size %d (total %d), data in packet is %d\n",
- items, size, datasize, n-RESP_HEADER_SIZE);
- goto again;
- }
-
- /*
- * If this isn't our first packet, make sure the size matches
- * the other ones.
- */
- 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
- */
- seq = INFO_SEQ(rpkt.auth_seq);
- if (haveseq[seq]) {
- if (debug)
- printf("Received duplicate sequence number %d\n", seq);
- goto again;
- }
- haveseq[seq] = 1;
-
- /*
- * If this is the last in the sequence, record that.
- */
- if (!ISMORE(rpkt.rm_vn_mode)) {
- if (lastseq != 999) {
- printf("Received second end sequence packet\n");
- goto again;
- }
- lastseq = seq;
- }
-
- /*
- * So far, so good. Copy this data into the output array.
- */
- if ((datap + datasize + (pad * items)) > (pktdata + pktdatasize)) {
- int offset = datap - pktdata;
- growpktdata();
- *rdata = pktdata; /* might have been realloced ! */
- datap = pktdata + offset;
- }
- /*
- * 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 + pad;
- }
- *ritems += items;
-
- /*
- * Finally, check the count of received packets. If we've got them
- * all, return
- */
- ++numrecv;
- if (numrecv <= lastseq)
- goto again;
- return INFO_OKAY;
-}
-
-
-/*
- * sendrequest - format and send a request packet
- */
-static int
-sendrequest(
- int implcode,
- int reqcode,
- int auth,
- int qitems,
- int qsize,
- char *qdata
- )
-{
- struct req_pkt qpkt;
- int datasize;
-
- memset((char *)&qpkt, 0, sizeof qpkt);
-
- qpkt.rm_vn_mode = RM_VN_MODE(0, 0, 0);
- qpkt.implementation = (u_char)implcode;
- qpkt.request = (u_char)reqcode;
-
- datasize = qitems * qsize;
- if (datasize != 0 && qdata != NULL) {
- memmove((char *)qpkt.data, qdata, (unsigned)datasize);
- qpkt.err_nitems = ERR_NITEMS(0, qitems);
- qpkt.mbz_itemsize = MBZ_ITEMSIZE(qsize);
- } else {
- qpkt.err_nitems = ERR_NITEMS(0, 0);
- qpkt.mbz_itemsize = MBZ_ITEMSIZE(0);
- }
-
- if (!auth) {
- qpkt.auth_seq = AUTH_SEQ(0, 0);
- return sendpkt((char *)&qpkt, req_pkt_size);
- } else {
- l_fp ts;
- int maclen = 0;
- const char *pass = "\0";
- struct req_pkt_tail *qpktail;
-
- qpktail = (struct req_pkt_tail *)((char *)&qpkt + req_pkt_size
- + MAX_MAC_LEN - sizeof(struct req_pkt_tail));
-
- if (info_auth_keyid == 0) {
- maclen = getkeyid("Keyid: ");
- if (maclen == 0) {
- (void) fprintf(stderr,
- "Invalid key identifier\n");
- return 1;
- }
- info_auth_keyid = maclen;
- }
- if (!authistrusted(info_auth_keyid)) {
- pass = getpass("MD5 Password: ");
- if (*pass == '\0') {
- (void) fprintf(stderr,
- "Invalid password\n");
- return (1);
- }
- }
- authusekey(info_auth_keyid, info_auth_keytype, (const u_char *)pass);
- authtrust(info_auth_keyid, 1);
- qpkt.auth_seq = AUTH_SEQ(1, 0);
- qpktail->keyid = htonl(info_auth_keyid);
- get_systime(&ts);
- L_ADD(&ts, &delay_time);
- HTONL_FP(&ts, &qpktail->tstamp);
- maclen = authencrypt(info_auth_keyid, (u_int32 *)&qpkt,
- req_pkt_size);
- if (maclen == 0) {
- (void) fprintf(stderr, "Key not found\n");
- return (1);
- }
- return sendpkt((char *)&qpkt, (int)(req_pkt_size + maclen));
- }
- /*NOTREACHED*/
-}
-
-
-/*
- * doquery - send a request and process the response
- */
-int
-doquery(
- int implcode,
- int reqcode,
- int auth,
- int qitems,
- int qsize,
- char *qdata,
- int *ritems,
- int *rsize,
- char **rdata,
- int quiet_mask,
- int esize
- )
-{
- int res;
- char junk[512];
- fd_set fds;
- struct timeval tvzero;
-
- /*
- * Check to make sure host is open
- */
- if (!havehost) {
- (void) fprintf(stderr, "***No host open, use `host' command\n");
- return -1;
- }
-
- /*
- * Poll the socket and clear out any pending data
- */
-again:
- do {
- tvzero.tv_sec = tvzero.tv_usec = 0;
- FD_ZERO(&fds);
- FD_SET(sockfd, &fds);
- res = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
-
- if (res == -1) {
- warning("polling select", "", "");
- return -1;
- } else if (res > 0)
-
- (void) recv(sockfd, junk, sizeof junk, 0);
- } while (res > 0);
-
-
- /*
- * send a request
- */
- res = sendrequest(implcode, reqcode, auth, qitems, qsize, qdata);
- if (res != 0)
- return res;
-
- /*
- * Get the response. If we got a standard error, print a message
- */
- res = getresponse(implcode, reqcode, ritems, rsize, rdata, esize);
-
- /*
- * Try to be compatible with older implementations of ntpd.
- */
- if (res == INFO_ERR_FMT && req_pkt_size != 48) {
- int oldsize;
-
- oldsize = req_pkt_size;
-
- 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",
- oldsize, req_pkt_size);
- goto again;
- }
-
- /* log error message if not told to be quiet */
- 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;
- case INFO_ERR_REQ:
- (void) fprintf(stderr,
- "***Server doesn't implement this request\n");
- break;
- case INFO_ERR_FMT:
- (void) fprintf(stderr,
- "***Server reports a format error in the received packet (shouldn't happen)\n");
- break;
- case INFO_ERR_NODATA:
- (void) fprintf(stderr,
- "***Server reports data not found\n");
- break;
- case INFO_ERR_AUTH:
- (void) fprintf(stderr, "***Permission denied\n");
- break;
- case ERR_TIMEOUT:
- (void) fprintf(stderr, "***Request timed out\n");
- break;
- case ERR_INCOMPLETE:
- (void) fprintf(stderr,
- "***Response from server was incomplete\n");
- break;
- default:
- (void) fprintf(stderr,
- "***Server returns unknown error code %d\n", res);
- break;
- }
- }
- return res;
-}
-
-
-/*
- * getcmds - read commands from the standard input and execute them
- */
-static void
-getcmds(void)
-{
-#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
- char *line;
-
- for (;;) {
- if ((line = readline(interactive?prompt:"")) == NULL) return;
- if (*line) add_history(line);
- docmd(line);
- free(line);
- }
-#else /* not (HAVE_LIBREADLINE || HAVE_LIBEDIT) */
- char line[MAXLINE];
-
- for (;;) {
- if (interactive) {
-#ifdef VMS /* work around a problem with mixing stdout & stderr */
- fputs("",stdout);
-#endif
- (void) fputs(prompt, stderr);
- (void) fflush(stderr);
- }
-
- if (fgets(line, sizeof line, stdin) == NULL)
- return;
-
- docmd(line);
- }
-#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
- */
-static RETSIGTYPE
-abortcmd(
- int sig
- )
-{
-
- if (current_output == stdout)
- (void) fflush(stdout);
- putc('\n', stderr);
- (void) fflush(stderr);
- if (jump) longjmp(interrupt_buf, 1);
-}
-#endif /* SYS_WINNT */
-
-/*
- * docmd - decode the command line and execute a command
- */
-static void
-docmd(
- const char *cmdline
- )
-{
- char *tokens[1+MAXARGS+2];
- struct parse pcmd;
- int ntok;
- int i, ti;
- int rval;
- struct xcmd *xcmd;
-
- ai_fam_templ = ai_fam_default;
- /*
- * Tokenize the command line. If nothing on it, return.
- */
- tokenize(cmdline, tokens, &ntok);
- if (ntok == 0)
- return;
-
- /*
- * Find the appropriate command description.
- */
- i = findcmd(tokens[0], builtins, opcmds, &xcmd);
- if (i == 0) {
- (void) fprintf(stderr, "***Command `%s' unknown\n",
- tokens[0]);
- return;
- } else if (i >= 2) {
- (void) fprintf(stderr, "***Command `%s' ambiguous\n",
- tokens[0]);
- return;
- }
-
- /*
- * Save the keyword, then walk through the arguments, interpreting
- * as we go.
- */
- pcmd.keyword = tokens[0];
- pcmd.nargs = 0;
- 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+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 += ti;
- if (i < ntok && *tokens[i] == '>') {
- char *fname;
-
- if (*(tokens[i]+1) != '\0')
- fname = tokens[i]+1;
- else if ((i+1) < ntok)
- fname = tokens[i+1];
- else {
- (void) fprintf(stderr, "***No file for redirect\n");
- return;
- }
-
- current_output = fopen(fname, "w");
- if (current_output == NULL) {
- (void) fprintf(stderr, "***Error opening %s: ", fname);
- perror("");
- return;
- }
- } else {
- current_output = stdout;
- }
-
- if (interactive && setjmp(interrupt_buf)) {
- return;
- } else {
- jump = 1;
- (xcmd->handler)(&pcmd, current_output);
- jump = 0;
- if (current_output != stdout)
- (void) fclose(current_output);
- current_output = NULL;
- }
-}
-
-
-/*
- * tokenize - turn a command line into tokens
- */
-static void
-tokenize(
- const char *line,
- char **tokens,
- int *ntok
- )
-{
- register const char *cp;
- register char *sp;
- static char tspace[MAXLINE];
-
- sp = tspace;
- cp = line;
- for (*ntok = 0; *ntok < MAXTOKENS; (*ntok)++) {
- tokens[*ntok] = sp;
- while (ISSPACE(*cp))
- cp++;
- if (ISEOL(*cp))
- break;
- do {
- *sp++ = *cp++;
- } while (!ISSPACE(*cp) && !ISEOL(*cp));
-
- *sp++ = '\0';
- }
-}
-
-
-
-/*
- * findcmd - find a command in a command description table
- */
-static int
-findcmd(
- register char *str,
- struct xcmd *clist1,
- struct xcmd *clist2,
- struct xcmd **cmd
- )
-{
- register struct xcmd *cl;
- register int clen;
- int nmatch;
- struct xcmd *nearmatch = NULL;
- struct xcmd *clist;
-
- clen = strlen(str);
- nmatch = 0;
- if (clist1 != 0)
- clist = clist1;
- else if (clist2 != 0)
- clist = clist2;
- else
- return 0;
-
- again:
- for (cl = clist; cl->keyword != 0; cl++) {
- /* do a first character check, for efficiency */
- if (*str != *(cl->keyword))
- continue;
- if (strncmp(str, cl->keyword, (unsigned)clen) == 0) {
- /*
- * Could be extact match, could be approximate.
- * Is exact if the length of the keyword is the
- * same as the str.
- */
- if (*((cl->keyword) + clen) == '\0') {
- *cmd = cl;
- return 1;
- }
- nmatch++;
- nearmatch = cl;
- }
- }
-
- /*
- * See if there is more to do. If so, go again. Sorry about the
- * goto, too much looking at BSD sources...
- */
- if (clist == clist1 && clist2 != 0) {
- clist = clist2;
- goto again;
- }
-
- /*
- * If we got extactly 1 near match, use it, else return number
- * of matches.
- */
- if (nmatch == 1) {
- *cmd = nearmatch;
- return 1;
- }
- return nmatch;
-}
-
-
-/*
- * getarg - interpret an argument token
- *
- * return: 0 - failure
- * 1 - success
- * -1 - skip to next token
- */
-static int
-getarg(
- char *str,
- int code,
- arg_v *argp
- )
-{
- int isneg;
- char *cp, *np;
- static const char *digits = "0123456789";
-
- switch (code & ~OPT) {
- case NTP_STR:
- argp->string = str;
- break;
- case ADD:
- 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;
- case INT:
- case UINT:
- isneg = 0;
- np = str;
- if (*np == '-') {
- np++;
- isneg = 1;
- }
-
- argp->uval = 0;
- do {
- cp = strchr(digits, *np);
- if (cp == NULL) {
- (void) fprintf(stderr,
- "***Illegal integer value %s\n", str);
- return 0;
- }
- argp->uval *= 10;
- argp->uval += (cp - digits);
- } while (*(++np) != '\0');
-
- if (isneg) {
- if ((code & ~OPT) == UINT) {
- (void) fprintf(stderr,
- "***Value %s should be unsigned\n", str);
- return 0;
- }
- 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;
-}
-
-
-/*
- * getnetnum - given a host name, return its net number
- * and (optional) full name
- */
-static int
-getnetnum(
- const char *hname,
- struct sockaddr_storage *num,
- char *fullhost,
- int af
- )
-{
- 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) {
- getnameinfo((struct sockaddr *)num, sockaddr_len,
- fullhost, sizeof(fullhost), NULL, 0,
- NI_NUMERICHOST);
- }
- return 1;
- } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
- memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
- if (fullhost != 0)
- (void) strcpy(fullhost, ai->ai_canonname);
- return 1;
- } else {
- (void) fprintf(stderr, "***Can't find host %s\n", hname);
- return 0;
- }
- /*NOTREACHED*/
-}
-
-/*
- * nntohost - convert network number to host name. This routine enforces
- * the showhostnames setting.
- */
-char *
-nntohost(
- struct sockaddr_storage *netnum
- )
-{
- if (!showhostnames)
- return stoa(netnum);
-
- if ((netnum->ss_family == AF_INET) && ISREFCLOCKADR(netnum))
- return refnumtoa(netnum);
- return socktohost(netnum);
-}
-
-
-/*
- * Finally, the built in command handlers
- */
-
-/*
- * help - tell about commands, or details of a particular command
- */
-static void
-help(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int i;
- int n;
- struct xcmd *xcp;
- char *cmd;
- const char *cmdsort[100];
- int length[100];
- int maxlength;
- int numperline;
- static const char *spaces = " "; /* 20 spaces */
-
- if (pcmd->nargs == 0) {
- n = 0;
- for (xcp = builtins; xcp->keyword != 0; xcp++) {
- if (*(xcp->keyword) != '?')
- cmdsort[n++] = xcp->keyword;
- }
- for (xcp = opcmds; xcp->keyword != 0; xcp++)
- cmdsort[n++] = xcp->keyword;
-
-#ifdef QSORT_USES_VOID_P
- qsort(cmdsort, (size_t)n, sizeof(char *), helpsort);
-#else
- qsort((char *)cmdsort, (size_t)n, sizeof(char *), helpsort);
-#endif
-
- maxlength = 0;
- for (i = 0; i < n; i++) {
- length[i] = strlen(cmdsort[i]);
- if (length[i] > maxlength)
- maxlength = length[i];
- }
- maxlength++;
- numperline = 76 / maxlength;
-
- (void) fprintf(fp, "Commands available:\n");
- for (i = 0; i < n; i++) {
- if ((i % numperline) == (numperline-1)
- || i == (n-1))
- (void) fprintf(fp, "%s\n", cmdsort[i]);
- else
- (void) fprintf(fp, "%s%s", cmdsort[i],
- spaces+20-maxlength+length[i]);
- }
- } else {
- cmd = pcmd->argval[0].string;
- n = findcmd(cmd, builtins, opcmds, &xcp);
- if (n == 0) {
- (void) fprintf(stderr,
- "Command `%s' is unknown\n", cmd);
- return;
- } else if (n >= 2) {
- (void) fprintf(stderr,
- "Command `%s' is ambiguous\n", cmd);
- return;
- }
- (void) fprintf(fp, "function: %s\n", xcp->comment);
- printusage(xcp, fp);
- }
-}
-
-
-/*
- * helpsort - do hostname qsort comparisons
- */
-#ifdef QSORT_USES_VOID_P
-static int
-helpsort(
- const void *t1,
- const void *t2
- )
-{
- char const * const * name1 = (char const * const *)t1;
- char const * const * name2 = (char const * const *)t2;
-
- return strcmp(*name1, *name2);
-}
-#else
-static int
-helpsort(
- char **name1,
- char **name2
- )
-{
- return strcmp(*name1, *name2);
-}
-#endif
-
-
-/*
- * printusage - print usage information for a command
- */
-static void
-printusage(
- struct xcmd *xcp,
- FILE *fp
- )
-{
- 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
- (void) fprintf(fp, " %s", xcp->desc[i]);
- }
- (void) fprintf(fp, "\n");
-}
-
-
-/*
- * timeout - set time out time
- */
-static void
-timeout(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int val;
-
- if (pcmd->nargs == 0) {
- val = tvout.tv_sec * 1000 + tvout.tv_usec / 1000;
- (void) fprintf(fp, "primary timeout %d ms\n", val);
- } else {
- tvout.tv_sec = pcmd->argval[0].uval / 1000;
- tvout.tv_usec = (pcmd->argval[0].uval - (tvout.tv_sec * 1000))
- * 1000;
- }
-}
-
-
-/*
- * my_delay - set delay for auth requests
- */
-static void
-my_delay(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int isneg;
- u_long val;
-
- if (pcmd->nargs == 0) {
- val = delay_time.l_ui * 1000 + delay_time.l_uf / 4294967;
- (void) fprintf(fp, "delay %lu ms\n", val);
- } else {
- if (pcmd->argval[0].ival < 0) {
- isneg = 1;
- val = (u_long)(-pcmd->argval[0].ival);
- } else {
- isneg = 0;
- val = (u_long)pcmd->argval[0].ival;
- }
-
- delay_time.l_ui = val / 1000;
- val %= 1000;
- delay_time.l_uf = val * 4294967; /* 2**32/1000 */
-
- if (isneg)
- L_NEG(&delay_time);
- }
-}
-
-
-/*
- * host - set the host we are dealing with.
- */
-static void
-host(
- struct parse *pcmd,
- 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");
- 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)
- (void) fprintf(fp,
- "current host remains %s\n", currenthost);
- else
- (void) fprintf(fp, "still no current host\n");
- }
-}
-
-
-/*
- * keyid - get a keyid to use for authenticating requests
- */
-static void
-keyid(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- 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 {
- info_auth_keyid = pcmd->argval[0].uval;
- }
-}
-
-
-/*
- * keytype - get type of key to use for authenticating requests
- */
-static void
-keytype(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0)
- fprintf(fp, "keytype is %s\n",
- (info_auth_keytype == KEY_TYPE_MD5) ? "MD5" : "???");
- else
- switch (*(pcmd->argval[0].string)) {
- case 'm':
- case 'M':
- info_auth_keytype = KEY_TYPE_MD5;
- break;
-
- default:
- fprintf(fp, "keytype must be 'md5'\n");
- }
-}
-
-
-
-/*
- * passwd - get an authentication key
- */
-/*ARGSUSED*/
-static void
-passwd(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *pass;
-
- if (info_auth_keyid == 0) {
- info_auth_keyid = getkeyid("Keyid: ");
- if (info_auth_keyid == 0) {
- (void)fprintf(fp, "Keyid must be defined\n");
- return;
- }
- }
- if (!interactive) {
- authusekey(info_auth_keyid, info_auth_keytype,
- (u_char *)pcmd->argval[0].string);
- authtrust(info_auth_keyid, 1);
- } else {
- pass = getpass("MD5 Password: ");
- if (*pass == '\0')
- (void) fprintf(fp, "Password unchanged\n");
- else {
- authusekey(info_auth_keyid, info_auth_keytype,
- (u_char *)pass);
- authtrust(info_auth_keyid, 1);
- }
- }
-}
-
-
-/*
- * hostnames - set the showhostnames flag
- */
-static void
-hostnames(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- if (showhostnames)
- (void) fprintf(fp, "hostnames being shown\n");
- else
- (void) fprintf(fp, "hostnames not being shown\n");
- } else {
- if (STREQ(pcmd->argval[0].string, "yes"))
- showhostnames = 1;
- else if (STREQ(pcmd->argval[0].string, "no"))
- showhostnames = 0;
- else
- (void)fprintf(stderr, "What?\n");
- }
-}
-
-
-/*
- * setdebug - set/change debugging level
- */
-static void
-setdebug(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- (void) fprintf(fp, "debug level is %d\n", debug);
- return;
- } else if (STREQ(pcmd->argval[0].string, "no")) {
- debug = 0;
- } else if (STREQ(pcmd->argval[0].string, "more")) {
- debug++;
- } else if (STREQ(pcmd->argval[0].string, "less")) {
- debug--;
- } else {
- (void) fprintf(fp, "What?\n");
- return;
- }
- (void) fprintf(fp, "debug level set to %d\n", debug);
-}
-
-
-/*
- * quit - stop this nonsense
- */
-/*ARGSUSED*/
-static void
-quit(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (havehost)
- closesocket(sockfd);
- exit(0);
-}
-
-
-/*
- * version - print the current version number
- */
-/*ARGSUSED*/
-static void
-version(
- struct parse *pcmd,
- FILE *fp
- )
-{
-
- (void) fprintf(fp, "%s\n", Version);
- return;
-}
-
-
-/*
- * warning - print a warning message
- */
-static void
-warning(
- const char *fmt,
- const char *st1,
- const char *st2
- )
-{
- (void) fprintf(stderr, "%s: ", progname);
- (void) fprintf(stderr, fmt, st1, st2);
- (void) fprintf(stderr, ": ");
- perror("");
-}
-
-
-/*
- * error - print a message and exit
- */
-static void
-error(
- const char *fmt,
- const char *st1,
- const char *st2
- )
-{
- warning(fmt, st1, st2);
- exit(1);
-}
-
-/*
- * getkeyid - prompt the user for a keyid to use
- */
-static u_long
-getkeyid(
- const char *keyprompt
- )
-{
- register char *p;
- register int c;
- FILE *fi;
- char pbuf[20];
-
-#ifndef SYS_WINNT
- if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
-#else
- if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL)
-#endif /* SYS_WINNT */
- fi = stdin;
- else
- setbuf(fi, (char *)NULL);
- fprintf(stderr, "%s", keyprompt); fflush(stderr);
- for (p=pbuf; (c = getc(fi))!='\n' && c!=EOF;) {
- if (p < &pbuf[18])
- *p++ = (char) c;
- }
- *p = '\0';
- if (fi != stdin)
- fclose(fi);
- return (u_int32)atoi(pbuf);
-}
diff --git a/contrib/ntp/ntpdc/ntpdc.h b/contrib/ntp/ntpdc/ntpdc.h
deleted file mode 100644
index 589529f..0000000
--- a/contrib/ntp/ntpdc/ntpdc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * ntpdc.h - definitions of interest to ntpdc
- */
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_request.h"
-#include "ntp_string.h"
-#include "ntp_malloc.h"
-
-/*
- * Maximum number of arguments
- */
-#define MAXARGS 4
-
-/*
- * Flags for forming descriptors.
- */
-#define OPT 0x80 /* this argument is optional, or'd with type */
-
-#define NO 0x0
-#define NTP_STR 0x1 /* string argument */
-#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
- */
-typedef union {
- char *string;
- long ival;
- u_long uval;
- struct sockaddr_storage netnum;
-} arg_v;
-
-/*
- * Structure for passing parsed command line
- */
-struct parse {
- char *keyword;
- arg_v argval[MAXARGS];
- int nargs;
-};
-
-/*
- * ntpdc includes a command parser which could charitably be called
- * crude. The following structure is used to define the command
- * syntax.
- */
-struct xcmd {
- const char *keyword; /* command key word */
- void (*handler) P((struct parse *, FILE *)); /* command handler */
- u_char arg[MAXARGS]; /* descriptors for arguments */
- const char *desc[MAXARGS]; /* descriptions for arguments */
- const char *comment;
-};
-
-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
deleted file mode 100644
index 9fa3bd7..0000000
--- a/contrib/ntp/ntpdc/ntpdc_ops.c
+++ /dev/null
@@ -1,3012 +0,0 @@
-/*
- * ntpdc_ops.c - subroutines which are called to perform operations by xntpdc
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stddef.h>
-
-#include "ntpdc.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
-#include <ctype.h>
-#ifdef HAVE_SYS_TIMEX_H
-# include <sys/timex.h>
-#endif
-#include <netdb.h>
-#if !defined(__bsdi__) && !defined(apollo)
-#include <netinet/in.h>
-#endif
-
-#include <arpa/inet.h>
-
-/*
- * Declarations for command handlers in here
- */
-static int checkitems P((int, FILE *));
-static int checkitemsize P((int, int));
-static int check1item P((int, FILE *));
-static void peerlist P((struct parse *, FILE *));
-static void peers P((struct parse *, FILE *));
-static void doconfig P((struct parse *pcmd, FILE *fp, int mode, int refc));
-static void dmpeers P((struct parse *, FILE *));
-static void dopeers P((struct parse *, FILE *, int));
-static void printpeer P((struct info_peer *, FILE *));
-static void showpeer P((struct parse *, FILE *));
-static void peerstats P((struct parse *, FILE *));
-static void loopinfo P((struct parse *, FILE *));
-static void sysinfo P((struct parse *, FILE *));
-static void sysstats P((struct parse *, FILE *));
-static void iostats P((struct parse *, FILE *));
-static void memstats P((struct parse *, FILE *));
-static void timerstats P((struct parse *, FILE *));
-static void addpeer P((struct parse *, FILE *));
-static void addserver P((struct parse *, FILE *));
-static void addrefclock P((struct parse *, FILE *));
-static void broadcast P((struct parse *, FILE *));
-static void doconfig P((struct parse *, FILE *, int, int));
-static void unconfig P((struct parse *, FILE *));
-static void set P((struct parse *, FILE *));
-static void sys_clear P((struct parse *, FILE *));
-static void doset P((struct parse *, FILE *, int));
-static void reslist P((struct parse *, FILE *));
-static void new_restrict P((struct parse *, FILE *));
-static void unrestrict P((struct parse *, FILE *));
-static void delrestrict P((struct parse *, FILE *));
-static void do_restrict P((struct parse *, FILE *, int));
-static void monlist P((struct parse *, FILE *));
-static void reset P((struct parse *, FILE *));
-static void preset P((struct parse *, FILE *));
-static void readkeys P((struct parse *, FILE *));
-static void trustkey P((struct parse *, FILE *));
-static void untrustkey P((struct parse *, FILE *));
-static void do_trustkey P((struct parse *, FILE *, int));
-static void authinfo P((struct parse *, FILE *));
-static void traps P((struct parse *, FILE *));
-static void addtrap P((struct parse *, FILE *));
-static void clrtrap P((struct parse *, FILE *));
-static void do_addclr_trap P((struct parse *, FILE *, int));
-static void requestkey P((struct parse *, FILE *));
-static void controlkey P((struct parse *, FILE *));
-static void do_changekey P((struct parse *, FILE *, int));
-static void ctlstats P((struct parse *, FILE *));
-static void clockstat P((struct parse *, FILE *));
-static void fudge P((struct parse *, FILE *));
-static void clkbug P((struct parse *, FILE *));
-static void kerninfo P((struct parse *, FILE *));
-
-/*
- * Commands we understand. Ntpdc imports this.
- */
-struct xcmd opcmds[] = {
- { "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 },
- { "peer_address", "peer2_addr", "peer3_addr", "peer4_addr" },
- "display statistical information for one or more peers" },
- { "loopinfo", loopinfo, { OPT|NTP_STR, NO, NO, NO },
- { "oneline|multiline", "", "", "" },
- "display loop filter information" },
- { "sysinfo", sysinfo, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display local server information" },
- { "sysstats", sysstats, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display local server statistics" },
- { "memstats", memstats, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display peer memory usage statistics" },
- { "iostats", iostats, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display I/O subsystem statistics" },
- { "timerstats", timerstats, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display event timer subsystem statistics" },
- { "addpeer", addpeer, { ADD, OPT|UINT, OPT|UINT, OPT|NTP_STR },
- { "addr", "keyid", "version", "minpoll|prefer" },
- "configure a new peer association" },
- { "addserver", addserver, { ADD, OPT|UINT, OPT|UINT, OPT|NTP_STR },
- { "addr", "keyid", "version", "minpoll|prefer" },
- "configure a new server" },
- { "addrefclock",addrefclock, { ADD, OPT|UINT, OPT|NTP_STR, OPT|NTP_STR },
- { "addr", "mode", "minpoll|prefer", "minpoll|prefer" },
- "configure a new server" },
- { "broadcast", broadcast, { ADD, OPT|UINT, OPT|UINT, OPT|NTP_STR },
- { "addr", "keyid", "version", "minpoll" },
- "configure broadcasting time service" },
- { "unconfig", unconfig, { ADD, OPT|ADD, OPT|ADD, OPT|ADD },
- { "peer_address", "peer2_addr", "peer3_addr", "peer4_addr" },
- "unconfigure existing peer assocations" },
- { "enable", set, { NTP_STR, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR },
- { "auth|bclient|monitor|pll|kernel|stats", "...", "...", "..." },
- "set a system flag (auth, bclient, monitor, pll, kernel, stats)" },
- { "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, {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",
- "ntpport|ignore|noserve|notrust|noquery|nomodify|nopeer|version|kod",
- "..." },
- "create restrict entry/add flags to entry" },
- { "unrestrict", unrestrict, { ADD, ADD, NTP_STR, OPT|NTP_STR },
- { "address", "mask",
- "ntpport|ignore|noserve|notrust|noquery|nomodify|nopeer|version|kod",
- "..." },
- "remove flags from a restrict entry" },
- { "delrestrict", delrestrict, { ADD, ADD, OPT|NTP_STR, NO },
- { "address", "mask", "ntpport", "" },
- "delete a restrict entry" },
- { "monlist", monlist, { OPT|INT, NO, NO, NO },
- { "version", "", "", "" },
- "display data the server's monitor routines have collected" },
- { "reset", reset, { NTP_STR, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR },
- { "io|sys|mem|timer|auth|allpeers", "...", "...", "..." },
- "reset various subsystem statistics counters" },
- { "preset", preset, { ADD, OPT|ADD, OPT|ADD, OPT|ADD },
- { "peer_address", "peer2_addr", "peer3_addr", "peer4_addr" },
- "reset stat counters associated with particular peer(s)" },
- { "readkeys", readkeys, { NO, NO, NO, NO },
- { "", "", "", "" },
- "request a reread of the keys file and re-init of system keys" },
- { "trustedkey", trustkey, { UINT, OPT|UINT, OPT|UINT, OPT|UINT },
- { "keyid", "keyid", "keyid", "keyid" },
- "add one or more key ID's to the trusted list" },
- { "untrustedkey", untrustkey, { UINT, OPT|UINT, OPT|UINT, OPT|UINT },
- { "keyid", "keyid", "keyid", "keyid" },
- "remove one or more key ID's from the trusted list" },
- { "authinfo", authinfo, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display the state of the authentication code" },
- { "traps", traps, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display the traps set in the server" },
- { "addtrap", addtrap, { ADD, OPT|UINT, OPT|ADD, NO },
- { "address", "port", "interface", "" },
- "configure a trap in the server" },
- { "clrtrap", clrtrap, { ADD, OPT|UINT, OPT|ADD, NO },
- { "address", "port", "interface", "" },
- "remove a trap (configured or otherwise) from the server" },
- { "requestkey", requestkey, { UINT, NO, NO, NO },
- { "keyid", "", "", "" },
- "change the keyid the server uses to authenticate requests" },
- { "controlkey", controlkey, { UINT, NO, NO, NO },
- { "keyid", "", "", "" },
- "change the keyid the server uses to authenticate control messages" },
- { "ctlstats", ctlstats, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display packet count statistics from the control module" },
- { "clockstat", clockstat, { ADD, OPT|ADD, OPT|ADD, OPT|ADD },
- { "address", "address", "address", "address" },
- "display clock status information" },
- { "fudge", fudge, { ADD, NTP_STR, NTP_STR, NO },
- { "address", "time1|time2|val1|val2|flags", "value", "" },
- "set/change one of a clock's fudge factors" },
- { "clkbug", clkbug, { ADD, OPT|ADD, OPT|ADD, OPT|ADD },
- { "address", "address", "address", "address" },
- "display clock debugging information" },
- { "kerninfo", kerninfo, { NO, NO, NO, NO },
- { "", "", "", "" },
- "display the kernel pll/pps variables" },
-
- { 0, 0, { NO, NO, NO, NO },
- { "", "", "", "" }, "" }
-};
-
-/*
- * For quick string comparisons
- */
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-
-/*
- * checkitems - utility to print a message if no items were returned
- */
-static int
-checkitems(
- int items,
- FILE *fp
- )
-{
- if (items == 0) {
- (void) fprintf(fp, "No data returned in response to query\n");
- return 0;
- }
- return 1;
-}
-
-
-/*
- * checkitemsize - utility to print a message if the item size is wrong
- */
-static int
-checkitemsize(
- int itemsize,
- int expected
- )
-{
- if (itemsize != expected) {
- (void) fprintf(stderr,
- "***Incorrect item size returned by remote host (%d should be %d)\n",
- itemsize, expected);
- return 0;
- }
- return 1;
-}
-
-
-/*
- * check1item - check to make sure we have exactly one item
- */
-static int
-check1item(
- int items,
- FILE *fp
- )
-{
- if (items == 0) {
- (void) fprintf(fp, "No data returned in response to query\n");
- return 0;
- }
- if (items > 1) {
- (void) fprintf(fp, "Expected one item in response, got %d\n",
- items);
- return 0;
- }
- return 1;
-}
-
-
-
-/*
- * peerlist - get a short list of peers
- */
-/*ARGSUSED*/
-static void
-peerlist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_peer_list *plist;
- struct sockaddr_storage paddr;
- int items;
- int itemsize;
- int res;
-
-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)) &&
- !checkitemsize(itemsize, v4sizeof(struct info_peer_list)))
- return;
-
- while (items > 0) {
- 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--;
- }
-}
-
-
-/*
- * peers - show peer summary
- */
-static void
-peers(
- struct parse *pcmd,
- FILE *fp
- )
-{
- dopeers(pcmd, fp, 0);
-}
-
-/*
- * dmpeers - show peer summary, Dave Mills style
- */
-static void
-dmpeers(
- struct parse *pcmd,
- FILE *fp
- )
-{
- dopeers(pcmd, fp, 1);
-}
-
-
-/*
- * peers - show peer summary
- */
-/*ARGSUSED*/
-static void
-dopeers(
- struct parse *pcmd,
- FILE *fp,
- int dmstyle
- )
-{
- struct info_peer_summary *plist;
- struct sockaddr_storage dstadr;
- struct sockaddr_storage srcadr;
- int items;
- int itemsize;
- int ntp_poll;
- int res;
- int c;
- l_fp tempts;
-
-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)) &&
- !checkitemsize(itemsize, v4sizeof(struct info_peer_summary)))
- return;
-
- (void) fprintf(fp,
- " remote local st poll reach delay offset disp\n");
- (void) fprintf(fp,
- "=======================================================================\n");
- while (items > 0) {
- if (!dmstyle) {
- if (plist->flags & INFO_FLAG_SYSPEER)
- c = '*';
- else if (plist->hmode == MODE_ACTIVE)
- c = '+';
- else if (plist->hmode == MODE_PASSIVE)
- c = '-';
- else if (plist->hmode == MODE_CLIENT)
- c = '=';
- else if (plist->hmode == MODE_BROADCAST)
- c = '^';
- else if (plist->hmode == MODE_BCLIENT)
- c = '~';
- else
- c = ' ';
- } else {
- if (plist->flags & INFO_FLAG_SYSPEER)
- c = '*';
- else if (plist->flags & INFO_FLAG_SHORTLIST)
- c = '+';
- else if (plist->flags & INFO_FLAG_SEL_CANDIDATE)
- c = '.';
- else
- c = ' ';
- }
- NTOHL_FP(&(plist->offset), &tempts);
- ntp_poll = 1<<max(min3(plist->ppoll, plist->hpoll, NTP_MAXPOLL),
- NTP_MINPOLL);
- 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--;
- }
-}
-
-/* Convert a refid & stratum (in host order) to a string */
-static char*
-refid_string(
- u_int32 refid,
- int stratum
- )
-{
- if (stratum <= 1) {
- static char junk[5];
- junk[4] = 0;
- memmove(junk, (char *)&refid, 4);
- return junk;
- }
-
- return numtoa(refid);
-}
-
-/*
- * printpeer - print detail information for a peer
- */
-static void
-printpeer(
- register struct info_peer *pp,
- FILE *fp
- )
-{
- 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",
- 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);
-
- (void) fprintf(fp,
- "leap %c%c, refid [%s], rootdistance %s, rootdispersion %s\n",
- pp->leap & 0x2 ? '1' : '0',
- pp->leap & 0x1 ? '1' : '0',
- refid_string(pp->refid, pp->stratum), fptoa(NTOHS_FP(pp->rootdelay), 5),
- ufptoa(NTOHS_FP(pp->rootdispersion), 5));
-
- (void) fprintf(fp,
- "ppoll %d, hpoll %d, keyid %lu, version %d, association %u\n",
- pp->ppoll, pp->hpoll, (u_long)pp->keyid, pp->version, ntohs(pp->associd));
-
- (void) fprintf(fp,
- "reach %03o, unreach %d, flash 0x%04x, ",
- pp->reach, pp->unreach, pp->flash2);
-
- (void) fprintf(fp, "boffset %s, ttl/mode %d\n",
- fptoa(NTOHS_FP(pp->estbdelay), 5), pp->ttl);
-
- (void) fprintf(fp, "timer %lds, flags", (long)ntohl(pp->timer));
- if (pp->flags == 0) {
- (void) fprintf(fp, " none\n");
- } else {
- str = "";
- if (pp->flags & INFO_FLAG_SYSPEER) {
- (void) fprintf(fp, " system_peer");
- str = ",";
- }
- if (pp->flags & INFO_FLAG_CONFIG) {
- (void) fprintf(fp, "%s config", str);
- str = ",";
- }
- if (pp->flags & INFO_FLAG_REFCLOCK) {
- (void) fprintf(fp, "%s refclock", str);
- str = ",";
- }
- if (pp->flags & INFO_FLAG_AUTHENABLE) {
- (void) fprintf(fp, "%s auth", str);
- str = ",";
- }
- if (pp->flags & INFO_FLAG_BCLIENT) {
- (void) fprintf(fp, "%s bclient", str);
- str = ",";
- }
- if (pp->flags & INFO_FLAG_PREFER) {
- (void) fprintf(fp, "%s prefer", str);
- str = ",";
- }
- if (pp->flags & INFO_FLAG_BURST) {
- (void) fprintf(fp, "%s burst", str);
- }
- (void) fprintf(fp, "\n");
- }
-
- NTOHL_FP(&pp->reftime, &tempts);
- (void) fprintf(fp, "reference time: %s\n",
- prettydate(&tempts));
- NTOHL_FP(&pp->org, &tempts);
- (void) fprintf(fp, "originate timestamp: %s\n",
- prettydate(&tempts));
- NTOHL_FP(&pp->rec, &tempts);
- (void) fprintf(fp, "receive timestamp: %s\n",
- prettydate(&tempts));
- NTOHL_FP(&pp->xmt, &tempts);
- (void) fprintf(fp, "transmit timestamp: %s\n",
- prettydate(&tempts));
-
- (void) fprintf(fp, "filter delay: ");
- for (i = 0; i < NTP_SHIFT; i++) {
- (void) fprintf(fp, " %-8.8s",
- fptoa(NTOHS_FP(pp->filtdelay[i]), 5));
- if (i == (NTP_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
- (void) fprintf(fp, "filter offset:");
- for (i = 0; i < NTP_SHIFT; i++) {
- NTOHL_FP(&pp->filtoffset[i], &tempts);
- (void) fprintf(fp, " %-8.8s", lfptoa(&tempts, 6));
- if (i == (NTP_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
- (void) fprintf(fp, "filter order: ");
- for (i = 0; i < NTP_SHIFT; i++) {
- (void) fprintf(fp, " %-8d", pp->order[i]);
- if (i == (NTP_SHIFT>>1)-1)
- (void) fprintf(fp, "\n ");
- }
- (void) fprintf(fp, "\n");
-
-
- NTOHL_FP(&pp->offset, &tempts);
- (void) fprintf(fp,
- "offset %s, delay %s, error bound %s, filter error %s\n",
- lfptoa(&tempts, 6), fptoa(NTOHS_FP(pp->delay), 5),
- ufptoa(NTOHS_FP(pp->dispersion), 5),
- ufptoa(NTOHS_FP(pp->selectdisp), 5));
-}
-
-
-/*
- * showpeer - show detailed information for a peer
- */
-static void
-showpeer(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_peer *pp;
- /* 4 is the maximum number of peers which will fit in a packet */
- struct info_peer_list *pl, plist[min(MAXARGS, 4)];
- int qitems;
- int items;
- int itemsize;
- int res;
- 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_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)) &&
- !checkitemsize(itemsize, v4sizeof(struct info_peer)))
- return;
-
- while (items-- > 0) {
- printpeer(pp, fp);
- if (items > 0)
- (void) fprintf(fp, "\n");
- pp++;
- }
-}
-
-
-/*
- * peerstats - return statistics for a peer
- */
-static void
-peerstats(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_peer_stats *pp;
- /* 4 is the maximum number of peers which will fit in a packet */
- struct info_peer_list *pl, plist[min(MAXARGS, 4)];
- struct sockaddr_storage src, dst;
- int qitems;
- int items;
- int itemsize;
- int res;
- 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_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)) &&
- !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(&src));
- (void) fprintf(fp, "local interface: %s\n",
- stoa(&dst));
- (void) fprintf(fp, "time last received: %lds\n",
- (long)ntohl(pp->timereceived));
- (void) fprintf(fp, "time until next send: %lds\n",
- (long)ntohl(pp->timetosend));
- (void) fprintf(fp, "reachability change: %lds\n",
- (long)ntohl(pp->timereachable));
- (void) fprintf(fp, "packets sent: %ld\n",
- (long)ntohl(pp->sent));
- (void) fprintf(fp, "packets received: %ld\n",
- (long)ntohl(pp->processed));
- (void) fprintf(fp, "bad authentication: %ld\n",
- (long)ntohl(pp->badauth));
- (void) fprintf(fp, "bogus origin: %ld\n",
- (long)ntohl(pp->bogusorg));
- (void) fprintf(fp, "duplicate: %ld\n",
- (long)ntohl(pp->oldpkt));
- (void) fprintf(fp, "bad dispersion: %ld\n",
- (long)ntohl(pp->seldisp));
- (void) fprintf(fp, "bad reference time: %ld\n",
- (long)ntohl(pp->selbroken));
- (void) fprintf(fp, "candidate order: %d\n",
- (int)pp->candidate);
- if (items > 0)
- (void) fprintf(fp, "\n");
- pp++;
- }
-}
-
-
-/*
- * loopinfo - show loop filter information
- */
-static void
-loopinfo(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_loop *il;
- int items;
- int itemsize;
- int oneline = 0;
- int res;
- l_fp tempts;
-
- if (pcmd->nargs > 0) {
- if (STREQ(pcmd->argval[0].string, "oneline"))
- oneline = 1;
- else if (STREQ(pcmd->argval[0].string, "multiline"))
- oneline = 0;
- else {
- (void) fprintf(stderr, "How many lines?\n");
- return;
- }
- }
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_loop)))
- return;
-
- if (oneline) {
- l_fp temp2ts;
-
- NTOHL_FP(&il->last_offset, &tempts);
- NTOHL_FP(&il->drift_comp, &temp2ts);
-
- (void) fprintf(fp,
- "offset %s, frequency %s, time_const %ld, watchdog %ld\n",
- lfptoa(&tempts, 6),
- lfptoa(&temp2ts, 3),
- (u_long)ntohl(il->compliance),
- (u_long)ntohl(il->watchdog_timer));
- } else {
- NTOHL_FP(&il->last_offset, &tempts);
- (void) fprintf(fp, "offset: %s s\n",
- lfptoa(&tempts, 6));
- NTOHL_FP(&il->drift_comp, &tempts);
- (void) fprintf(fp, "frequency: %s ppm\n",
- lfptoa(&tempts, 3));
- (void) fprintf(fp, "poll adjust: %ld\n",
- (u_long)ntohl(il->compliance));
- (void) fprintf(fp, "watchdog timer: %ld s\n",
- (u_long)ntohl(il->watchdog_timer));
- }
-}
-
-
-/*
- * sysinfo - show current system state
- */
-/*ARGSUSED*/
-static void
-sysinfo(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_sys *is;
- struct sockaddr_storage peeraddr;
- int items;
- int itemsize;
- int res;
- l_fp tempts;
-
-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)) &&
- !checkitemsize(itemsize, v4sizeof(struct info_sys)))
- return;
-
- 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',
- is->leap & 0x1 ? '1' : '0');
- (void) fprintf(fp, "stratum: %d\n", (int)is->stratum);
- (void) fprintf(fp, "precision: %d\n", (int)is->precision);
- (void) fprintf(fp, "root distance: %s s\n",
- fptoa(NTOHS_FP(is->rootdelay), 5));
- (void) fprintf(fp, "root dispersion: %s s\n",
- ufptoa(NTOHS_FP(is->rootdispersion), 5));
- (void) fprintf(fp, "reference ID: [%s]\n",
- refid_string(is->refid, is->stratum));
- NTOHL_FP(&is->reftime, &tempts);
- (void) fprintf(fp, "reference time: %s\n", prettydate(&tempts));
-
- (void) fprintf(fp, "system flags: ");
- if ((is->flags & (INFO_FLAG_BCLIENT | INFO_FLAG_AUTHENABLE |
- INFO_FLAG_NTP | INFO_FLAG_KERNEL| INFO_FLAG_CAL |
- INFO_FLAG_PPS_SYNC | INFO_FLAG_MONITOR | INFO_FLAG_FILEGEN)) == 0) {
- (void) fprintf(fp, "none\n");
- } else {
- if (is->flags & INFO_FLAG_BCLIENT)
- (void) fprintf(fp, "bclient ");
- if (is->flags & INFO_FLAG_AUTHENTICATE)
- (void) fprintf(fp, "auth ");
- if (is->flags & INFO_FLAG_MONITOR)
- (void) fprintf(fp, "monitor ");
- if (is->flags & INFO_FLAG_NTP)
- (void) fprintf(fp, "ntp ");
- if (is->flags & INFO_FLAG_KERNEL)
- (void) fprintf(fp, "kernel ");
- if (is->flags & INFO_FLAG_FILEGEN)
- (void) fprintf(fp, "stats ");
- if (is->flags & INFO_FLAG_CAL)
- (void) fprintf(fp, "calibrate ");
- if (is->flags & INFO_FLAG_PPS_SYNC)
- (void) fprintf(fp, "pps ");
- (void) fprintf(fp, "\n");
- }
- (void) fprintf(fp, "jitter: %s s\n",
- fptoa(ntohl(is->frequency), 6));
- (void) fprintf(fp, "stability: %s ppm\n",
- ufptoa(ntohl(is->stability), 3));
- (void) fprintf(fp, "broadcastdelay: %s s\n",
- fptoa(NTOHS_FP(is->bdelay), 6));
- NTOHL_FP(&is->authdelay, &tempts);
- (void) fprintf(fp, "authdelay: %s s\n", lfptoa(&tempts, 6));
-}
-
-
-/*
- * sysstats - print system statistics
- */
-/*ARGSUSED*/
-static void
-sysstats(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_sys_stats *ss;
- int items;
- int itemsize;
- int res;
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (itemsize != sizeof(struct info_sys_stats) &&
- itemsize != sizeof(struct old_info_sys_stats)) {
- /* issue warning according to new structure size */
- checkitemsize(itemsize, sizeof(struct info_sys_stats));
- return;
- }
- 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;
-
- fprintf(fp, "rate exceeded: %ld\n",
- (u_long)ntohl(ss->limitrejected));
-}
-
-
-
-/*
- * iostats - print I/O statistics
- */
-/*ARGSUSED*/
-static void
-iostats(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_io_stats *io;
- int items;
- int itemsize;
- int res;
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_io_stats)))
- return;
-
- (void) fprintf(fp, "time since reset: %ld\n",
- (u_long)ntohl(io->timereset));
- (void) fprintf(fp, "receive buffers: %d\n",
- ntohs(io->totalrecvbufs));
- (void) fprintf(fp, "free receive buffers: %d\n",
- ntohs(io->freerecvbufs));
- (void) fprintf(fp, "used receive buffers: %d\n",
- ntohs(io->fullrecvbufs));
- (void) fprintf(fp, "low water refills: %d\n",
- ntohs(io->lowwater));
- (void) fprintf(fp, "dropped packets: %ld\n",
- (u_long)ntohl(io->dropped));
- (void) fprintf(fp, "ignored packets: %ld\n",
- (u_long)ntohl(io->ignored));
- (void) fprintf(fp, "received packets: %ld\n",
- (u_long)ntohl(io->received));
- (void) fprintf(fp, "packets sent: %ld\n",
- (u_long)ntohl(io->sent));
- (void) fprintf(fp, "packets not sent: %ld\n",
- (u_long)ntohl(io->notsent));
- (void) fprintf(fp, "interrupts handled: %ld\n",
- (u_long)ntohl(io->interrupts));
- (void) fprintf(fp, "received by int: %ld\n",
- (u_long)ntohl(io->int_received));
-}
-
-
-/*
- * memstats - print peer memory statistics
- */
-/*ARGSUSED*/
-static void
-memstats(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_mem_stats *mem;
- int i;
- int items;
- int itemsize;
- int res;
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_mem_stats)))
- return;
-
- (void) fprintf(fp, "time since reset: %ld\n",
- (u_long)ntohl(mem->timereset));
- (void) fprintf(fp, "total peer memory: %d\n",
- ntohs(mem->totalpeermem));
- (void) fprintf(fp, "free peer memory: %d\n",
- ntohs(mem->freepeermem));
- (void) fprintf(fp, "calls to findpeer: %ld\n",
- (u_long)ntohl(mem->findpeer_calls));
- (void) fprintf(fp, "new peer allocations: %ld\n",
- (u_long)ntohl(mem->allocations));
- (void) fprintf(fp, "peer demobilizations: %ld\n",
- (u_long)ntohl(mem->demobilizations));
-
- (void) fprintf(fp, "hash table counts: ");
- for (i = 0; i < HASH_SIZE; i++) {
- (void) fprintf(fp, "%4d", (int)mem->hashcount[i]);
- if ((i % 8) == 7 && i != (HASH_SIZE-1)) {
- (void) fprintf(fp, "\n ");
- }
- }
- (void) fprintf(fp, "\n");
-}
-
-
-
-/*
- * timerstats - print timer statistics
- */
-/*ARGSUSED*/
-static void
-timerstats(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_timer_stats *tim;
- int items;
- int itemsize;
- int res;
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_timer_stats)))
- return;
-
- (void) fprintf(fp, "time since reset: %ld\n",
- (u_long)ntohl(tim->timereset));
- (void) fprintf(fp, "alarms handled: %ld\n",
- (u_long)ntohl(tim->alarms));
- (void) fprintf(fp, "alarm overruns: %ld\n",
- (u_long)ntohl(tim->overflows));
- (void) fprintf(fp, "calls to transmit: %ld\n",
- (u_long)ntohl(tim->xmtcalls));
-}
-
-
-/*
- * addpeer - configure an active mode association
- */
-static void
-addpeer(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doconfig(pcmd, fp, MODE_ACTIVE, 0);
-}
-
-
-/*
- * addserver - configure a client mode association
- */
-static void
-addserver(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doconfig(pcmd, fp, MODE_CLIENT, 0);
-}
-
-/*
- * addrefclock - configure a reference clock association
- */
-static void
-addrefclock(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doconfig(pcmd, fp, MODE_CLIENT, 1);
-}
-
-/*
- * broadcast - configure a broadcast mode association
- */
-static void
-broadcast(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doconfig(pcmd, fp, MODE_BROADCAST, 0);
-}
-
-
-/*
- * config - configure a new peer association
- */
-static void
-doconfig(
- struct parse *pcmd,
- FILE *fp,
- int mode,
- int refc
- )
-{
- struct conf_peer cpeer;
- int items;
- int itemsize;
- char *dummy;
- u_long keyid;
- u_int version;
- u_char minpoll;
- u_int flags;
- u_char cmode;
- int res;
- int sendsize;
-
-again:
- keyid = 0;
- version = NTP_OLDVERSION + 1;
- flags = 0;
- res = 0;
- 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) {
- if (pcmd->nargs > 1) {
- cmode = (u_char) pcmd->argval[1].uval;
- items = 2;
- }
- } else {
- if (pcmd->nargs > 1) {
- keyid = pcmd->argval[1].uval;
- if (keyid > 0) {
- flags |= CONF_FLAG_AUTHENABLE;
- }
- if (pcmd->nargs > 2) {
- version = (u_int)pcmd->argval[2].uval;
- if (version > NTP_VERSION ||
- version < NTP_OLDVERSION) {
- (void)fprintf(fp,
- "invalid version number %u\n",
- version);
- res++;
- }
- items = 3;
- }
- }
- }
-
- while (pcmd->nargs > items) {
- if (STREQ(pcmd->argval[items].string, "prefer"))
- flags |= CONF_FLAG_PREFER;
- else if (STREQ(pcmd->argval[items].string, "burst"))
- flags |= CONF_FLAG_BURST;
- else {
- long val;
- if (!atoint(pcmd->argval[items].string, &val)) {
- (void) fprintf(fp,
- "%s not understood\n",
- pcmd->argval[items].string);
- res++;
- break;
- } else {
- if (val >= NTP_MINPOLL && val <= NTP_MAXPOLL) {
- minpoll = (u_char)val;
- } else {
- (void) fprintf(fp,
- "minpol must be within %d..%d\n",
- NTP_MINPOLL, NTP_MAXPOLL);
- res++;
- break;
- }
- }
- }
- items++;
- }
-
- if (res)
- return;
-
- memset((void *)&cpeer, 0, sizeof(cpeer));
-
- 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;
- cpeer.minpoll = minpoll;
- cpeer.maxpoll = NTP_MAXDPOLL;
- cpeer.flags = (u_char)flags;
- cpeer.ttl = cmode;
-
- 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_ver, REQ_CONFIG, 1, 1,
- sizeof(struct old_conf_peer), (char *)&cpeer,
- &items, &itemsize, &dummy, 0,
- sizeof(struct conf_peer));
- }
- if (res == 0)
- (void) fprintf(fp, "done!\n");
- return;
-}
-
-
-/*
- * unconfig - unconfigure some associations
- */
-static void
-unconfig(
- struct parse *pcmd,
- FILE *fp
- )
-{
- /* 8 is the maximum number of peers which will fit in a packet */
- struct conf_unpeer *pl, plist[min(MAXARGS, 8)];
- int qitems;
- int items;
- int itemsize;
- char *dummy;
- int res;
- 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_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");
-}
-
-
-/*
- * set - set some system flags
- */
-static void
-set(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doset(pcmd, fp, REQ_SET_SYS_FLAG);
-}
-
-
-/*
- * clear - clear some system flags
- */
-static void
-sys_clear(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doset(pcmd, fp, REQ_CLR_SYS_FLAG);
-}
-
-
-/*
- * doset - set/clear system flags
- */
-static void
-doset(
- struct parse *pcmd,
- FILE *fp,
- int req
- )
-{
- /* 8 is the maximum number of peers which will fit in a packet */
- struct conf_sys_flags sys;
- int items;
- int itemsize;
- char *dummy;
- int res;
-
- sys.flags = 0;
- res = 0;
- for (items = 0; items < pcmd->nargs; items++) {
- if (STREQ(pcmd->argval[items].string, "auth"))
- sys.flags |= SYS_FLAG_AUTH;
- else if (STREQ(pcmd->argval[items].string, "bclient"))
- sys.flags |= SYS_FLAG_BCLIENT;
- else if (STREQ(pcmd->argval[items].string, "calibrate"))
- sys.flags |= SYS_FLAG_CAL;
- else if (STREQ(pcmd->argval[items].string, "kernel"))
- sys.flags |= SYS_FLAG_KERNEL;
- else if (STREQ(pcmd->argval[items].string, "monitor"))
- sys.flags |= SYS_FLAG_MONITOR;
- else if (STREQ(pcmd->argval[items].string, "ntp"))
- sys.flags |= SYS_FLAG_NTP;
- else if (STREQ(pcmd->argval[items].string, "pps"))
- sys.flags |= SYS_FLAG_PPS;
- else if (STREQ(pcmd->argval[items].string, "stats"))
- sys.flags |= SYS_FLAG_FILEGEN;
- else {
- (void) fprintf(fp, "Unknown flag %s\n",
- pcmd->argval[items].string);
- res = 1;
- }
- }
-
- if (res || sys.flags == 0)
- return;
-
-again:
- res = doquery(impl_ver, req, 1, 1,
- sizeof(struct conf_sys_flags), (char *)&sys, &items,
- &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");
-}
-
-
-/*
- * data for printing/interrpreting the restrict flags
- */
-struct resflags {
- const char *str;
- int bit;
-};
-
-static struct resflags resflags[] = {
- { "ignore", RES_IGNORE },
- { "noserve", RES_DONTSERVE },
- { "notrust", RES_DONTTRUST },
- { "noquery", RES_NOQUERY },
- { "nomodify", RES_NOMODIFY },
- { "nopeer", RES_NOPEER },
- { "notrap", RES_NOTRAP },
- { "lptrap", RES_LPTRAP },
- { "limited", RES_LIMITED },
- { "version", RES_VERSION },
- { "kod", RES_DEMOBILIZE },
- { "timeout", RES_TIMEOUT },
-
- { "", 0 }
-};
-
-static struct resflags resmflags[] = {
- { "ntpport", RESM_NTPONLY },
- { "interface", RESM_INTERFACE },
- { "", 0 }
-};
-
-
-/*
- * reslist - obtain and print the server's restrict list
- */
-/*ARGSUSED*/
-static void
-reslist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- 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;
- u_int32 count;
- u_short flags;
- u_short mflags;
- char flagstr[300];
- static const char *comma = ", ";
-
-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)) &&
- !checkitemsize(itemsize, v4sizeof(struct info_restrict)))
- return;
-
- (void) fprintf(fp,
- " address mask count flags\n");
- (void) fprintf(fp,
- "=====================================================================\n");
-
- while (items > 0) {
- 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);
- flagstr[0] = '\0';
-
- res = 1;
- rf = &resmflags[0];
- while (rf->bit != 0) {
- if (mflags & rf->bit) {
- if (!res)
- (void) strcat(flagstr, comma);
- res = 0;
- (void) strcat(flagstr, rf->str);
- }
- rf++;
- }
-
- rf = &resflags[0];
- while (rf->bit != 0) {
- if (flags & rf->bit) {
- if (!res)
- (void) strcat(flagstr, comma);
- res = 0;
- (void) strcat(flagstr, rf->str);
- }
- rf++;
- }
-
- if (flagstr[0] == '\0')
- (void) strcpy(flagstr, "none");
-
- if (!skip)
- (void) fprintf(fp, "%-15.15s %-15.15s %9ld %s\n",
- addr, mask, (u_long)count, flagstr);
- rl++;
- items--;
- }
-}
-
-
-
-/*
- * new_restrict - create/add a set of restrictions
- */
-static void
-new_restrict(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_restrict(pcmd, fp, REQ_RESADDFLAGS);
-}
-
-
-/*
- * unrestrict - remove restriction flags from existing entry
- */
-static void
-unrestrict(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_restrict(pcmd, fp, REQ_RESSUBFLAGS);
-}
-
-
-/*
- * delrestrict - delete an existing restriction
- */
-static void
-delrestrict(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_restrict(pcmd, fp, REQ_UNRESTRICT);
-}
-
-
-/*
- * do_restrict - decode commandline restrictions and make the request
- */
-static void
-do_restrict(
- struct parse *pcmd,
- FILE *fp,
- int req_code
- )
-{
- struct conf_restrict cres;
- int items;
- int itemsize;
- char *dummy;
- u_int32 num;
- u_long bit;
- int i;
- int res;
- int err;
- int sendsize;
-
- /* 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;
- for (res = 2; res < pcmd->nargs; res++) {
- if (STREQ(pcmd->argval[res].string, "ntpport")) {
- cres.mflags |= RESM_NTPONLY;
- } else {
- for (i = 0; resflags[i].bit != 0; i++) {
- if (STREQ(pcmd->argval[res].string,
- resflags[i].str))
- break;
- }
- if (resflags[i].bit != 0) {
- cres.flags |= resflags[i].bit;
- if (req_code == REQ_UNRESTRICT) {
- (void) fprintf(fp,
- "Flag %s inappropriate\n",
- resflags[i].str);
- err++;
- }
- } else {
- (void) fprintf(fp, "Unknown flag %s\n",
- pcmd->argval[res].string);
- err++;
- }
- }
- }
-
- /*
- * Make sure mask for default address is zero. Otherwise,
- * make sure mask bits are contiguous.
- */
- 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_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;
-}
-
-
-/*
- * monlist - obtain and print the server's monitor data
- */
-/*ARGSUSED*/
-static void
-monlist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *struct_star;
- struct sockaddr_storage addr;
- struct sockaddr_storage dstadr;
- int items;
- int itemsize;
- int res;
- int version = -1;
-
- if (pcmd->nargs > 0) {
- version = pcmd->argval[0].ival;
- }
-
-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,
- 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_ver, REQ_MON_GETLIST, 0, 0, 0, (char *)NULL,
- &items, &itemsize, &struct_star, 0,
- sizeof(struct info_monitor));
-
- if (res != 0 && items == 0)
- return;
-
- if (!checkitems(items, fp))
- return;
-
- 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 code avgint lstint\n");
- (void) fprintf(fp,
- "===============================================================================\n");
- while (items > 0) {
- 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) ||
- itemsize == v4sizeof(struct info_monitor)) {
- struct info_monitor *ml = (struct info_monitor *) struct_star;
-
- (void) fprintf(fp,
- " address port count mode ver code avgint lstint\n");
- (void) fprintf(fp,
- "===============================================================================\n");
- while (items > 0) {
- 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--;
- }
- } else if (itemsize == sizeof(struct old_info_monitor)) {
- struct old_info_monitor *oml = (struct old_info_monitor *)struct_star;
- (void) fprintf(fp,
- " address port count mode version lasttime firsttime\n");
- (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(&dstadr),
- ntohs(oml->port),
- (u_long)ntohl(oml->count),
- oml->mode,
- oml->version,
- (u_long)ntohl(oml->lasttime),
- (u_long)ntohl(oml->firsttime));
- oml++;
- items--;
- }
- } else {
- /* issue warning according to new info_monitor size */
- checkitemsize(itemsize, sizeof(struct info_monitor));
- }
-}
-
-
-/*
- * Mapping between command line strings and stat reset flags
- */
-struct statreset {
- const char *str;
- int flag;
-} sreset[] = {
- { "io", RESET_FLAG_IO },
- { "sys", RESET_FLAG_SYS },
- { "mem", RESET_FLAG_MEM },
- { "timer", RESET_FLAG_TIMER },
- { "auth", RESET_FLAG_AUTH },
- { "allpeers", RESET_FLAG_ALLPEERS },
- { "", 0 }
-};
-
-/*
- * reset - reset statistic counters
- */
-static void
-reset(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct reset_flags rflags;
- int items;
- int itemsize;
- char *dummy;
- int i;
- int res;
- int err;
-
- err = 0;
- rflags.flags = 0;
- for (res = 0; res < pcmd->nargs; res++) {
- for (i = 0; sreset[i].flag != 0; i++) {
- if (STREQ(pcmd->argval[res].string, sreset[i].str))
- break;
- }
- if (sreset[i].flag == 0) {
- (void) fprintf(fp, "Flag %s unknown\n",
- pcmd->argval[res].string);
- err++;
- } else {
- rflags.flags |= sreset[i].flag;
- }
- }
-
- if (err) {
- (void) fprintf(fp, "Not done due to errors\n");
- return;
- }
-
-again:
- res = doquery(impl_ver, REQ_RESET_STATS, 1, 1,
- sizeof(struct reset_flags), (char *)&rflags, &items,
- &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;
-}
-
-
-
-/*
- * preset - reset stat counters for particular peers
- */
-static void
-preset(
- struct parse *pcmd,
- FILE *fp
- )
-{
- /* 8 is the maximum number of peers which will fit in a packet */
- struct conf_unpeer *pl, plist[min(MAXARGS, 8)];
- int qitems;
- int items;
- int itemsize;
- char *dummy;
- int res;
- 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_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");
-}
-
-
-/*
- * readkeys - request the server to reread the keys file
- */
-/*ARGSUSED*/
-static void
-readkeys(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int items;
- int itemsize;
- char *dummy;
- int res;
-
-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;
-}
-
-
-/*
- * trustkey - add some keys to the trusted key list
- */
-static void
-trustkey(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_trustkey(pcmd, fp, REQ_TRUSTKEY);
-}
-
-
-/*
- * untrustkey - remove some keys from the trusted key list
- */
-static void
-untrustkey(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_trustkey(pcmd, fp, REQ_UNTRUSTKEY);
-}
-
-
-/*
- * do_trustkey - do grunge work of adding/deleting keys
- */
-static void
-do_trustkey(
- struct parse *pcmd,
- FILE *fp,
- int req
- )
-{
- u_long keyids[MAXARGS];
- int i;
- int items;
- int itemsize;
- char *dummy;
- int ritems;
- int res;
-
- ritems = 0;
- for (i = 0; i < pcmd->nargs; i++) {
- keyids[ritems++] = pcmd->argval[i].uval;
- }
-
-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;
-}
-
-
-
-/*
- * authinfo - obtain and print info about authentication
- */
-/*ARGSUSED*/
-static void
-authinfo(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_auth *ia;
- int items;
- int itemsize;
- int res;
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_auth)))
- return;
-
- (void) fprintf(fp, "time since reset: %ld\n",
- (u_long)ntohl(ia->timereset));
- (void) fprintf(fp, "stored keys: %ld\n",
- (u_long)ntohl(ia->numkeys));
- (void) fprintf(fp, "free keys: %ld\n",
- (u_long)ntohl(ia->numfreekeys));
- (void) fprintf(fp, "key lookups: %ld\n",
- (u_long)ntohl(ia->keylookups));
- (void) fprintf(fp, "keys not found: %ld\n",
- (u_long)ntohl(ia->keynotfound));
- (void) fprintf(fp, "uncached keys: %ld\n",
- (u_long)ntohl(ia->keyuncached));
- (void) fprintf(fp, "encryptions: %ld\n",
- (u_long)ntohl(ia->encryptions));
- (void) fprintf(fp, "decryptions: %ld\n",
- (u_long)ntohl(ia->decryptions));
- (void) fprintf(fp, "expired keys: %ld\n",
- (u_long)ntohl(ia->expired));
-}
-
-
-
-/*
- * traps - obtain and print a list of traps
- */
-/*ARGSUSED*/
-static void
-traps(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int i;
- struct info_trap *it;
- struct sockaddr_storage trap_addr, local_addr;
- int items;
- int itemsize;
- int res;
-
-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)) &&
- !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",
- stoa(&trap_addr),
- ntohs(it->trap_port));
- (void) fprintf(fp, "interface: %s, ",
- (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)
- (void) fprintf(fp, "low priority\n");
- else
- (void) fprintf(fp, "normal priority\n");
-
- (void) fprintf(fp, "set for %ld secs, last set %ld secs ago\n",
- (long)ntohl(it->origtime),
- (long)ntohl(it->settime));
- (void) fprintf(fp, "sequence %d, number of resets %ld\n",
- ntohs(it->sequence),
- (long)ntohl(it->resets));
- }
-}
-
-
-/*
- * addtrap - configure a trap
- */
-static void
-addtrap(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_addclr_trap(pcmd, fp, REQ_ADD_TRAP);
-}
-
-
-/*
- * clrtrap - clear a trap from the server
- */
-static void
-clrtrap(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_addclr_trap(pcmd, fp, REQ_CLR_TRAP);
-}
-
-
-/*
- * do_addclr_trap - do grunge work of adding/deleting traps
- */
-static void
-do_addclr_trap(
- struct parse *pcmd,
- FILE *fp,
- int req
- )
-{
- struct conf_trap ctrap;
- int items;
- int itemsize;
- char *dummy;
- int res;
- 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;
-
- if (pcmd->nargs > 1) {
- ctrap.trap_port
- = htons((u_short)(pcmd->argval[1].uval & 0xffff));
- 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_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;
-}
-
-
-
-/*
- * requestkey - change the server's request key (a dangerous request)
- */
-static void
-requestkey(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_changekey(pcmd, fp, REQ_REQUEST_KEY);
-}
-
-
-/*
- * controlkey - change the server's control key
- */
-static void
-controlkey(
- struct parse *pcmd,
- FILE *fp
- )
-{
- do_changekey(pcmd, fp, REQ_CONTROL_KEY);
-}
-
-
-
-/*
- * do_changekey - do grunge work of changing keys
- */
-static void
-do_changekey(
- struct parse *pcmd,
- FILE *fp,
- int req
- )
-{
- u_long key;
- int items;
- int itemsize;
- char *dummy;
- int res;
-
-
- key = htonl((u_int32)pcmd->argval[0].uval);
-
-again:
- res = doquery(impl_ver, req, 1, 1, sizeof(u_int32),
- (char *)&key, &items, &itemsize, &dummy, 0,
- sizeof(dummy));
-
- if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
- impl_ver = IMPL_XNTPD_OLD;
- goto again;
- }
-
- if (res == 0)
- (void) fprintf(fp, "done!\n");
- return;
-}
-
-
-
-/*
- * ctlstats - obtain and print info about authentication
- */
-/*ARGSUSED*/
-static void
-ctlstats(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_control *ic;
- int items;
- int itemsize;
- int res;
-
-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;
-
- if (!check1item(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_control)))
- return;
-
- (void) fprintf(fp, "time since reset: %ld\n",
- (u_long)ntohl(ic->ctltimereset));
- (void) fprintf(fp, "requests received: %ld\n",
- (u_long)ntohl(ic->numctlreq));
- (void) fprintf(fp, "responses sent: %ld\n",
- (u_long)ntohl(ic->numctlresponses));
- (void) fprintf(fp, "fragments sent: %ld\n",
- (u_long)ntohl(ic->numctlfrags));
- (void) fprintf(fp, "async messages sent: %ld\n",
- (u_long)ntohl(ic->numasyncmsgs));
- (void) fprintf(fp, "error msgs sent: %ld\n",
- (u_long)ntohl(ic->numctlerrors));
- (void) fprintf(fp, "total bad pkts: %ld\n",
- (u_long)ntohl(ic->numctlbadpkts));
- (void) fprintf(fp, "packet too short: %ld\n",
- (u_long)ntohl(ic->numctltooshort));
- (void) fprintf(fp, "response on input: %ld\n",
- (u_long)ntohl(ic->numctlinputresp));
- (void) fprintf(fp, "fragment on input: %ld\n",
- (u_long)ntohl(ic->numctlinputfrag));
- (void) fprintf(fp, "error set on input: %ld\n",
- (u_long)ntohl(ic->numctlinputerr));
- (void) fprintf(fp, "bad offset on input: %ld\n",
- (u_long)ntohl(ic->numctlbadoffset));
- (void) fprintf(fp, "bad version packets: %ld\n",
- (u_long)ntohl(ic->numctlbadversion));
- (void) fprintf(fp, "data in pkt too short: %ld\n",
- (u_long)ntohl(ic->numctldatatooshort));
- (void) fprintf(fp, "unknown op codes: %ld\n",
- (u_long)ntohl(ic->numctlbadop));
-}
-
-
-/*
- * clockstat - get and print clock status information
- */
-static void
-clockstat(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_clock *cl;
- /* 8 is the maximum number of clocks which will fit in a packet */
- u_long clist[min(MAXARGS, 8)];
- int qitems;
- int items;
- int itemsize;
- int res;
- l_fp ts;
- struct clktype *clk;
- u_long ltemp;
-
- for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++)
- clist[qitems] = GET_INADDR(pcmd->argval[qitems].netnum);
-
-again:
- res = doquery(impl_ver, REQ_GET_CLOCKINFO, 0, qitems,
- sizeof(u_int32), (char *)clist, &items,
- &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;
-
- if (!checkitems(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_clock)))
- return;
-
- while (items-- > 0) {
- (void) fprintf(fp, "clock address: %s\n",
- numtoa(cl->clockadr));
- for (clk = clktypes; clk->code >= 0; clk++)
- if (clk->code == cl->type)
- break;
- if (clk->code >= 0)
- (void) fprintf(fp, "clock type: %s\n",
- clk->clocktype);
- else
- (void) fprintf(fp, "clock type: unknown type (%d)\n",
- cl->type);
- (void) fprintf(fp, "last event: %d\n",
- cl->lastevent);
- (void) fprintf(fp, "current status: %d\n",
- cl->currentstatus);
- (void) fprintf(fp, "number of polls: %lu\n",
- (u_long)ntohl(cl->polls));
- (void) fprintf(fp, "no response to poll: %lu\n",
- (u_long)ntohl(cl->noresponse));
- (void) fprintf(fp, "bad format responses: %lu\n",
- (u_long)ntohl(cl->badformat));
- (void) fprintf(fp, "bad data responses: %lu\n",
- (u_long)ntohl(cl->baddata));
- (void) fprintf(fp, "running time: %lu\n",
- (u_long)ntohl(cl->timestarted));
- NTOHL_FP(&cl->fudgetime1, &ts);
- (void) fprintf(fp, "fudge time 1: %s\n",
- lfptoa(&ts, 6));
- NTOHL_FP(&cl->fudgetime2, &ts);
- (void) fprintf(fp, "fudge time 2: %s\n",
- lfptoa(&ts, 6));
- (void) fprintf(fp, "stratum: %ld\n",
- (u_long)ntohl(cl->fudgeval1));
- ltemp = ntohl(cl->fudgeval2);
- (void) fprintf(fp, "reference ID: %s\n",
- (char *)&ltemp);
- (void) fprintf(fp, "fudge flags: 0x%x\n",
- cl->flags);
-
- if (items > 0)
- (void) fprintf(fp, "\n");
- cl++;
- }
-}
-
-
-/*
- * fudge - set clock fudge factors
- */
-static void
-fudge(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct conf_fudge fudgedata;
- int items;
- int itemsize;
- char *dummy;
- l_fp ts;
- int res;
- long val;
- u_long u_val;
- int err;
-
-
- err = 0;
- memset((char *)&fudgedata, 0, sizeof fudgedata);
- fudgedata.clockadr = GET_INADDR(pcmd->argval[0].netnum);
-
- if (STREQ(pcmd->argval[1].string, "time1")) {
- fudgedata.which = htonl(FUDGE_TIME1);
- if (!atolfp(pcmd->argval[2].string, &ts))
- err = 1;
- else
- NTOHL_FP(&ts, &fudgedata.fudgetime);
- } else if (STREQ(pcmd->argval[1].string, "time2")) {
- fudgedata.which = htonl(FUDGE_TIME2);
- if (!atolfp(pcmd->argval[2].string, &ts))
- err = 1;
- else
- NTOHL_FP(&ts, &fudgedata.fudgetime);
- } else if (STREQ(pcmd->argval[1].string, "val1")) {
- fudgedata.which = htonl(FUDGE_VAL1);
- if (!atoint(pcmd->argval[2].string, &val))
- err = 1;
- else
- fudgedata.fudgeval_flags = htonl(val);
- } else if (STREQ(pcmd->argval[1].string, "val2")) {
- fudgedata.which = htonl(FUDGE_VAL2);
- if (!atoint(pcmd->argval[2].string, &val))
- err = 1;
- else
- fudgedata.fudgeval_flags = htonl((u_int32)val);
- } else if (STREQ(pcmd->argval[1].string, "flags")) {
- fudgedata.which = htonl(FUDGE_FLAGS);
- if (!hextoint(pcmd->argval[2].string, &u_val))
- err = 1;
- else
- fudgedata.fudgeval_flags = htonl((u_int32)(u_val & 0xf));
- } else {
- (void) fprintf(stderr, "What fudge is %s?\n",
- pcmd->argval[1].string);
- return;
- }
-
- if (err) {
- (void) fprintf(stderr, "Unknown fudge parameter %s\n",
- pcmd->argval[2].string);
- return;
- }
-
-again:
- res = doquery(impl_ver, REQ_SET_CLKFUDGE, 1, 1,
- sizeof(struct conf_fudge), (char *)&fudgedata, &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;
-}
-
-/*
- * clkbug - get and print clock debugging information
- */
-static void
-clkbug(
- struct parse *pcmd,
- FILE *fp
- )
-{
- register int i;
- register int n;
- register u_int32 s;
- struct info_clkbug *cl;
- /* 8 is the maximum number of clocks which will fit in a packet */
- u_long clist[min(MAXARGS, 8)];
- u_int32 ltemp;
- int qitems;
- int items;
- int itemsize;
- int res;
- int needsp;
- l_fp ts;
-
- for (qitems = 0; qitems < min(pcmd->nargs, 8); qitems++)
- clist[qitems] = GET_INADDR(pcmd->argval[qitems].netnum);
-
-again:
- res = doquery(impl_ver, REQ_GET_CLKBUGINFO, 0, qitems,
- sizeof(u_int32), (char *)clist, &items,
- &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;
-
- if (!checkitems(items, fp))
- return;
-
- if (!checkitemsize(itemsize, sizeof(struct info_clkbug)))
- return;
-
- while (items-- > 0) {
- (void) fprintf(fp, "clock address: %s\n",
- numtoa(cl->clockadr));
- n = (int)cl->nvalues;
- (void) fprintf(fp, "values: %d", n);
- s = ntohs(cl->svalues);
- if (n > NUMCBUGVALUES)
- n = NUMCBUGVALUES;
- for (i = 0; i < n; i++) {
- ltemp = ntohl(cl->values[i]);
- ltemp &= 0xffffffff; /* HMS: This does nothing now */
- if ((i & 0x3) == 0)
- (void) fprintf(fp, "\n");
- if (s & (1 << i))
- (void) fprintf(fp, "%12ld", (u_long)ltemp);
- else
- (void) fprintf(fp, "%12lu", (u_long)ltemp);
- }
- (void) fprintf(fp, "\n");
-
- n = (int)cl->ntimes;
- (void) fprintf(fp, "times: %d", n);
- s = ntohl(cl->stimes);
- if (n > NUMCBUGTIMES)
- n = NUMCBUGTIMES;
- needsp = 0;
- for (i = 0; i < n; i++) {
- if ((i & 0x1) == 0) {
- (void) fprintf(fp, "\n");
- } else {
- for (;needsp > 0; needsp--)
- putc(' ', fp);
- }
- NTOHL_FP(&cl->times[i], &ts);
- if (s & (1 << i)) {
- (void) fprintf(fp, "%17s",
- lfptoa(&ts, 6));
- needsp = 22;
- } else {
- (void) fprintf(fp, "%37s",
- uglydate(&ts));
- needsp = 2;
- }
- }
- (void) fprintf(fp, "\n");
- if (items > 0) {
- cl++;
- (void) fprintf(fp, "\n");
- }
- }
-}
-
-
-/*
- * kerninfo - display the kernel pll/pps variables
- */
-static void
-kerninfo(
- struct parse *pcmd,
- FILE *fp
- )
-{
- struct info_kernel *ik;
- int items;
- int itemsize;
- int res;
- unsigned status;
- double tscale = 1e-6;
-
-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))
- return;
- if (!checkitemsize(itemsize, sizeof(struct info_kernel)))
- return;
-
- status = ntohs(ik->status) & 0xffff;
- /*
- * pll variables. We know more than we should about the NANO bit.
- */
-#ifdef STA_NANO
- if (status & STA_NANO)
- tscale = 1e-9;
-#endif
- (void)fprintf(fp, "pll offset: %g s\n",
- (long)ntohl(ik->offset) * tscale);
- (void)fprintf(fp, "pll frequency: %s ppm\n",
- fptoa((s_fp)ntohl(ik->freq), 3));
- (void)fprintf(fp, "maximum error: %g s\n",
- (u_long)ntohl(ik->maxerror) * 1e-6);
- (void)fprintf(fp, "estimated error: %g s\n",
- (u_long)ntohl(ik->esterror) * 1e-6);
- (void)fprintf(fp, "status: %04x ", status);
-#ifdef STA_PLL
- if (status & STA_PLL) (void)fprintf(fp, " pll");
-#endif
-#ifdef STA_PPSFREQ
- if (status & STA_PPSFREQ) (void)fprintf(fp, " ppsfreq");
-#endif
-#ifdef STA_PPSTIME
- if (status & STA_PPSTIME) (void)fprintf(fp, " ppstime");
-#endif
-#ifdef STA_FLL
- if (status & STA_FLL) (void)fprintf(fp, " fll");
-#endif
-#ifdef STA_INS
- if (status & STA_INS) (void)fprintf(fp, " ins");
-#endif
-#ifdef STA_DEL
- if (status & STA_DEL) (void)fprintf(fp, " del");
-#endif
-#ifdef STA_UNSYNC
- if (status & STA_UNSYNC) (void)fprintf(fp, " unsync");
-#endif
-#ifdef STA_FREQHOLD
- if (status & STA_FREQHOLD) (void)fprintf(fp, " freqhold");
-#endif
-#ifdef STA_PPSSIGNAL
- if (status & STA_PPSSIGNAL) (void)fprintf(fp, " ppssignal");
-#endif
-#ifdef STA_PPSJITTER
- if (status & STA_PPSJITTER) (void)fprintf(fp, " ppsjitter");
-#endif
-#ifdef STA_PPSWANDER
- if (status & STA_PPSWANDER) (void)fprintf(fp, " ppswander");
-#endif
-#ifdef STA_PPSERROR
- if (status & STA_PPSERROR) (void)fprintf(fp, " ppserror");
-#endif
-#ifdef STA_CLOCKERR
- if (status & STA_CLOCKERR) (void)fprintf(fp, " clockerr");
-#endif
-#ifdef STA_NANO
- if (status & STA_NANO) (void)fprintf(fp, " nano");
-#endif
-#ifdef STA_MODE
- if (status & STA_MODE) (void)fprintf(fp, " mode=fll");
-#endif
-#ifdef STA_CLK
- if (status & STA_CLK) (void)fprintf(fp, " src=B");
-#endif
- (void)fprintf(fp, "\n");
- (void)fprintf(fp, "pll time constant: %ld\n",
- (u_long)ntohl(ik->constant));
- (void)fprintf(fp, "precision: %g s\n",
- (u_long)ntohl(ik->precision) * tscale);
- (void)fprintf(fp, "frequency tolerance: %s ppm\n",
- fptoa((s_fp)ntohl(ik->tolerance), 0));
-
- /*
- * For backwards compatibility (ugh), we find the pps variables
- * only if the shift member is nonzero.
- */
- if (!ik->shift)
- return;
-
- /*
- * pps variables
- */
- (void)fprintf(fp, "pps frequency: %s ppm\n",
- fptoa((s_fp)ntohl(ik->ppsfreq), 3));
- (void)fprintf(fp, "pps stability: %s ppm\n",
- fptoa((s_fp)ntohl(ik->stabil), 3));
- (void)fprintf(fp, "pps jitter: %g s\n",
- (u_long)ntohl(ik->jitter) * tscale);
- (void)fprintf(fp, "calibration interval: %d s\n",
- 1 << ntohs(ik->shift));
- (void)fprintf(fp, "calibration cycles: %ld\n",
- (u_long)ntohl(ik->calcnt));
- (void)fprintf(fp, "jitter exceeded: %ld\n",
- (u_long)ntohl(ik->jitcnt));
- (void)fprintf(fp, "stability exceeded: %ld\n",
- (u_long)ntohl(ik->stbcnt));
- (void)fprintf(fp, "calibration errors: %ld\n",
- (u_long)ntohl(ik->errcnt));
-}
diff --git a/contrib/ntp/ntpq/Makefile.am b/contrib/ntp/ntpq/Makefile.am
deleted file mode 100644
index 0bd05fc..0000000
--- a/contrib/ntp/ntpq/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntpq
-INCLUDES = -I$(top_srcdir)/include
-# LDADD might need RESLIB and ADJLIB
-ntpq_LDADD = version.o ../libntp/libntp.a @READLINE_LIBS@
-DISTCLEANFILES = .version version.c
-noinst_HEADERS = ntpq.h
-#EXTRA_DIST = ntpq.mak
-ETAGS_ARGS = Makefile.am
-
-ntpq_SOURCES = ntpq.c ntpq_ops.c
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-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
deleted file mode 100644
index 7ddf4d3..0000000
--- a/contrib/ntp/ntpq/Makefile.in
+++ /dev/null
@@ -1,463 +0,0 @@
-# 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
-bin_PROGRAMS = ntpq
-INCLUDES = -I$(top_srcdir)/include
-# LDADD might need RESLIB and ADJLIB
-ntpq_LDADD = version.o ../libntp/libntp.a @READLINE_LIBS@
-DISTCLEANFILES = .version version.c
-noinst_HEADERS = ntpq.h
-#EXTRA_DIST = ntpq.mak
-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 =
-bin_PROGRAMS = ntpq$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am_ntpq_OBJECTS = ntpq$U.$(OBJEXT) ntpq_ops$U.$(OBJEXT)
-ntpq_OBJECTS = $(am_ntpq_OBJECTS)
-ntpq_DEPENDENCIES = version.o ../libntp/libntp.a
-ntpq_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(ntpq_SOURCES)
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
- Makefile.am
-SOURCES = $(ntpq_SOURCES)
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-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)
-ntpq$(EXEEXT): $(ntpq_OBJECTS) $(ntpq_DEPENDENCIES)
- @rm -f ntpq$(EXEEXT)
- $(LINK) $(ntpq_LDFLAGS) $(ntpq_OBJECTS) $(ntpq_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -test "$U" = "" || 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@
-
-.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`
-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) > $@ || 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) > $@ || 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) $(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 $(PROGRAMS) $(HEADERS)
-
-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)
- -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."
-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-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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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 pdf pdf-am ps ps-am tags \
- uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
-
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-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.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/contrib/ntp/ntpq/README b/contrib/ntp/ntpq/README
deleted file mode 100644
index d280f74..0000000
--- a/contrib/ntp/ntpq/README
+++ /dev/null
@@ -1,6 +0,0 @@
-README file for directory ./ntpq of the NTP Version 4 distribution
-
-This directory contains the sources for the ntpq utility program. See
-the README and RELNOTES files in the parent directory for directions on
-how to make and install this program. The current version number of this
-program is in the version.c file.
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
deleted file mode 100644
index bc12725..0000000
--- a/contrib/ntp/ntpq/ntpq.c
+++ /dev/null
@@ -1,3228 +0,0 @@
-/*
- * ntpq - query an NTP server using mode 6 commands
- */
-
-#include <stdio.h>
-
-#include "ntpq.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#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>
-#else
-#define closesocket close
-#endif /* SYS_WINNT */
-
-#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
-# include <readline/readline.h>
-# include <readline/history.h>
-#endif /* HAVE_LIBREADLINE || HAVE_LIBEDIT */
-
-#ifdef SYS_VXWORKS
-/* vxWorks needs mode flag -casey*/
-#define open(name, flags) open(name, flags, 0777)
-#define SERVER_PORT_NUM 123
-#endif
-
-/*
- * Because we potentially understand a lot of commands we will run
- * interactive if connected to a terminal.
- */
-int interactive = 0; /* set to 1 when we should prompt */
-const char *prompt = "ntpq> "; /* prompt to ask him about */
-
-
-/*
- * Keyid used for authenticated requests. Obtained on the fly.
- */
-u_long info_auth_keyid = 0;
-
-/*
- * Type of key md5
- */
-#define KEY_TYPE_MD5 4
-
-static int info_auth_keytype = KEY_TYPE_MD5; /* MD5 */
-u_long current_time; /* needed by authkeys; not used */
-
-/*
- * Flag which indicates we should always send authenticated requests
- */
-int always_auth = 0;
-
-/*
- * Flag which indicates raw mode output.
- */
-int rawmode = 0;
-
-/*
- * Packet version number we use
- */
-u_char pktversion = NTP_OLDVERSION + 1;
-
-/*
- * Don't jump if no set jmp.
- */
-volatile int jump = 0;
-
-/*
- * Format values
- */
-#define PADDING 0
-#define TS 1 /* time stamp */
-#define FL 2 /* l_fp type value */
-#define FU 3 /* u_fp type value */
-#define FS 4 /* s_fp type value */
-#define UI 5 /* unsigned integer value */
-#define SI 6 /* signed integer value */
-#define HA 7 /* host address */
-#define NA 8 /* network address */
-#define ST 9 /* string value */
-#define RF 10 /* refid (sometimes string, sometimes not) */
-#define LP 11 /* leap (print in binary) */
-#define OC 12 /* integer, print in octal */
-#define MD 13 /* mode */
-#define AR 14 /* array of times */
-#define FX 15 /* test flags */
-#define EOV 255 /* end of table */
-
-
-/*
- * System variable values. The array can be indexed by
- * the variable index to find the textual name.
- */
-struct ctl_var sys_var[] = {
- { 0, PADDING, "" }, /* 0 */
- { CS_LEAP, LP, "leap" }, /* 1 */
- { CS_STRATUM, UI, "stratum" }, /* 2 */
- { CS_PRECISION, SI, "precision" }, /* 3 */
- { CS_ROOTDELAY, FS, "rootdelay" }, /* 4 */
- { CS_ROOTDISPERSION, FU, "rootdispersion" }, /* 5 */
- { CS_REFID, RF, "refid" }, /* 6 */
- { CS_REFTIME, TS, "reftime" }, /* 7 */
- { CS_POLL, UI, "poll" }, /* 8 */
- { CS_PEERID, UI, "peer" }, /* 9 */
- { CS_STATE, UI, "state" }, /* 10 */
- { CS_OFFSET, FL, "offset" }, /* 11 */
- { CS_DRIFT, FS, "frequency" }, /* 12 */
- { CS_JITTER, FU, "jitter" }, /* 13 */
- { CS_CLOCK, TS, "clock" }, /* 14 */
- { CS_PROCESSOR, ST, "processor" }, /* 15 */
- { CS_SYSTEM, ST, "system" }, /* 16 */
- { CS_VERSION, ST, "version" }, /* 17 */
- { CS_STABIL, FS, "stability" }, /* 18 */
- { CS_VARLIST, ST, "sys_var_list" }, /* 19 */
- { 0, EOV, "" }
-};
-
-
-/*
- * Peer variable list
- */
-struct ctl_var peer_var[] = {
- { 0, PADDING, "" }, /* 0 */
- { CP_CONFIG, UI, "config" }, /* 1 */
- { CP_AUTHENABLE, UI, "authenable" }, /* 2 */
- { CP_AUTHENTIC, UI, "authentic" }, /* 3 */
- { CP_SRCADR, HA, "srcadr" }, /* 4 */
- { CP_SRCPORT, UI, "srcport" }, /* 5 */
- { CP_DSTADR, NA, "dstadr" }, /* 6 */
- { CP_DSTPORT, UI, "dstport" }, /* 7 */
- { CP_LEAP, LP, "leap" }, /* 8 */
- { CP_HMODE, MD, "hmode" }, /* 9 */
- { CP_STRATUM, UI, "stratum" }, /* 10 */
- { CP_PPOLL, UI, "ppoll" }, /* 11 */
- { CP_HPOLL, UI, "hpoll" }, /* 12 */
- { CP_PRECISION, SI, "precision" }, /* 13 */
- { CP_ROOTDELAY, FS, "rootdelay" }, /* 14 */
- { CP_ROOTDISPERSION, FU, "rootdispersion" }, /* 15 */
- { CP_REFID, RF, "refid" }, /* 16 */
- { CP_REFTIME, TS, "reftime" }, /* 17 */
- { CP_ORG, TS, "org" }, /* 18 */
- { CP_REC, TS, "rec" }, /* 19 */
- { CP_XMT, TS, "xmt" }, /* 20 */
- { CP_REACH, OC, "reach" }, /* 21 */
- { CP_VALID, UI, "valid" }, /* 22 */
- { CP_TIMER, UI, "timer" }, /* 23 */
- { CP_DELAY, FS, "delay" }, /* 24 */
- { CP_OFFSET, FL, "offset" }, /* 25 */
- { CP_JITTER, FU, "jitter" }, /* 26 */
- { CP_DISPERSION, FU, "dispersion" }, /* 27 */
- { CP_KEYID, UI, "keyid" }, /* 28 */
- { CP_FILTDELAY, AR, "filtdelay" }, /* 29 */
- { CP_FILTOFFSET, AR, "filtoffset" }, /* 30 */
- { CP_PMODE, ST, "pmode" }, /* 31 */
- { CP_RECEIVED, UI, "received" }, /* 32 */
- { CP_SENT, UI, "sent" }, /* 33 */
- { CP_FILTERROR, AR, "filtdisp" }, /* 34 */
- { CP_FLASH, FX, "flash" }, /* 35 */
- { CP_TTL, UI, "ttl" }, /* 36 */
- /*
- * These are duplicate entries so that we can
- * process deviant version of the ntp protocol.
- */
- { CP_SRCADR, HA, "peeraddr" }, /* 4 */
- { CP_SRCPORT, UI, "peerport" }, /* 5 */
- { CP_PPOLL, UI, "peerpoll" }, /* 11 */
- { CP_HPOLL, UI, "hostpoll" }, /* 12 */
- { CP_FILTERROR, AR, "filterror" }, /* 34 */
- { 0, EOV, "" }
-};
-
-
-/*
- * Clock variable list
- */
-struct ctl_var clock_var[] = {
- { 0, PADDING, "" }, /* 0 */
- { CC_TYPE, UI, "type" }, /* 1 */
- { CC_TIMECODE, ST, "timecode" }, /* 2 */
- { CC_POLL, UI, "poll" }, /* 3 */
- { CC_NOREPLY, UI, "noreply" }, /* 4 */
- { CC_BADFORMAT, UI, "badformat" }, /* 5 */
- { CC_BADDATA, UI, "baddata" }, /* 6 */
- { CC_FUDGETIME1, FL, "fudgetime1" }, /* 7 */
- { CC_FUDGETIME2, FL, "fudgetime2" }, /* 8 */
- { CC_FUDGEVAL1, UI, "stratum" }, /* 9 */
- { CC_FUDGEVAL2, RF, "refid" }, /* 10 */
- { CC_FLAGS, UI, "flags" }, /* 11 */
- { CC_DEVICE, ST, "device" }, /* 12 */
- { 0, EOV, "" }
-};
-
-
-/*
- * flasher bits
- */
-static const char *tstflagnames[] = {
- "dup_pkt", /* TEST1 */
- "bogus_pkt", /* TEST2 */
- "proto_unsync", /* TEST3 */
- "no_access", /* TEST4 */
- "bad_auth", /* TEST5 */
- "peer_unsync", /* TEST6 */
- "peer_stratum", /* TEST7 */
- "root_bounds", /* TEST8 */
- "peer_bounds", /* TEST9 */
- "bad_autokey", /* TEST10 */
- "not_proventic" /* TEST11*/
-};
-
-
-int ntpqmain P((int, char **));
-/*
- * Built in command handler declarations
- */
-static int openhost P((const char *));
-static int sendpkt P((char *, int));
-static int getresponse P((int, int, u_short *, int *, char **, int));
-static int sendrequest P((int, int, int, int, char *));
-static char * tstflags P((u_long));
-static void getcmds P((void));
-static RETSIGTYPE abortcmd P((int));
-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 rtdatetolfp P((char *, l_fp *));
-static int decodearr P((char *, int *, l_fp *));
-static void help P((struct parse *, FILE *));
-#ifdef QSORT_USES_VOID_P
-static int helpsort P((const void *, const void *));
-#else
-static int helpsort P((char **, char **));
-#endif
-static void printusage P((struct xcmd *, FILE *));
-static void timeout P((struct parse *, FILE *));
-static void auth_delay P((struct parse *, FILE *));
-static void host P((struct parse *, FILE *));
-static void ntp_poll P((struct parse *, FILE *));
-static void keyid P((struct parse *, FILE *));
-static void keytype P((struct parse *, FILE *));
-static void passwd P((struct parse *, FILE *));
-static void hostnames P((struct parse *, FILE *));
-static void setdebug P((struct parse *, FILE *));
-static void quit P((struct parse *, FILE *));
-static void version P((struct parse *, FILE *));
-static void raw P((struct parse *, FILE *));
-static void cooked P((struct parse *, FILE *));
-static void authenticate P((struct parse *, FILE *));
-static void ntpversion P((struct parse *, FILE *));
-static void warning P((const char *, const char *, const char *));
-static void error P((const char *, const char *, const char *));
-static u_long getkeyid P((const char *));
-static void atoascii P((int, char *, char *));
-static void makeascii P((int, char *, FILE *));
-static void rawprint P((int, int, char *, int, FILE *));
-static void startoutput P((void));
-static void output P((FILE *, char *, char *));
-static void endoutput P((FILE *));
-static void outputarr P((FILE *, char *, int, l_fp *));
-static void cookedprint P((int, int, char *, int, FILE *));
-#ifdef QSORT_USES_VOID_P
-static int assoccmp P((const void *, const void *));
-#else
-static int assoccmp P((struct association *, struct association *));
-#endif /* sgi || bsdi */
-
-
-/*
- * Built-in commands we understand
- */
-struct xcmd builtins[] = {
- { "?", help, { OPT|STR, NO, NO, NO },
- { "command", "", "", "" },
- "tell the use and syntax of commands" },
- { "help", help, { OPT|STR, NO, NO, NO },
- { "command", "", "", "" },
- "tell the use and syntax of commands" },
- { "timeout", timeout, { OPT|UINT, NO, NO, NO },
- { "msec", "", "", "" },
- "set the primary receive time out" },
- { "delay", auth_delay, { OPT|INT, NO, NO, NO },
- { "msec", "", "", "" },
- "set the delay added to encryption time stamps" },
- { "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", "", "" },
- "poll an NTP server in client mode `n' times" },
- { "passwd", passwd, { NO, NO, NO, NO },
- { "", "", "", "" },
- "specify a password to use for authenticated requests"},
- { "hostnames", hostnames, { OPT|STR, NO, NO, NO },
- { "yes|no", "", "", "" },
- "specify whether hostnames or net numbers are printed"},
- { "debug", setdebug, { OPT|STR, NO, NO, NO },
- { "no|more|less", "", "", "" },
- "set/change debugging level" },
- { "quit", quit, { NO, NO, NO, NO },
- { "", "", "", "" },
- "exit ntpq" },
- { "exit", quit, { NO, NO, NO, NO },
- { "", "", "", "" },
- "exit ntpq" },
- { "keyid", keyid, { OPT|UINT, NO, NO, NO },
- { "key#", "", "", "" },
- "set keyid to use for authenticated requests" },
- { "version", version, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print version number" },
- { "raw", raw, { NO, NO, NO, NO },
- { "", "", "", "" },
- "do raw mode variable output" },
- { "cooked", cooked, { NO, NO, NO, NO },
- { "", "", "", "" },
- "do cooked mode variable output" },
- { "authenticate", authenticate, { OPT|STR, NO, NO, NO },
- { "yes|no", "", "", "" },
- "always authenticate requests to this server" },
- { "ntpversion", ntpversion, { OPT|UINT, NO, NO, NO },
- { "version number", "", "", "" },
- "set the NTP version number to use for requests" },
- { "keytype", keytype, { OPT|STR, NO, NO, NO },
- { "key type (md5|des)", "", "", "" },
- "set key type to use for authenticated requests (des|md5)" },
- { 0, 0, { NO, NO, NO, NO },
- { "", "", "", "" }, "" }
-};
-
-
-/*
- * Default values we use.
- */
-#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 "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 */
-#define MAXLINE 512 /* maximum line length */
-#define MAXTOKENS (1+MAXARGS+2) /* maximum number of usable tokens */
-#define MAXVARLEN 256 /* maximum length of a variable name */
-#define MAXVALLEN 400 /* maximum length of a variable value */
-#define MAXOUTLINE 72 /* maximum length of an output line */
-
-/*
- * Some variables used and manipulated locally
- */
-struct timeval tvout = { DEFTIMEOUT, 0 }; /* time out for reads */
-struct timeval tvsout = { DEFSTIMEOUT, 0 }; /* secondary time out */
-l_fp delay_time; /* delay time */
-char currenthost[LENHOSTNAME]; /* current host name */
-struct sockaddr_in hostaddr = { 0 }; /* host address */
-int showhostnames = 1; /* show host names by default */
-
-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
-DWORD NumberOfBytesWritten;
-
-HANDLE TimerThreadHandle = NULL; /* 1998/06/03 - Used in ntplib/machines.c */
-void timer(void) { ; }; /* 1998/06/03 - Used in ntplib/machines.c */
-
-#endif /* SYS_WINNT */
-
-/*
- * Sequence number used for requests. It is incremented before
- * it is used.
- */
-u_short sequence;
-
-/*
- * Holds data returned from queries. Declare buffer long to be sure of
- * alignment.
- */
-#define MAXFRAGS 24 /* maximum number of fragments */
-#define DATASIZE (MAXFRAGS*480) /* maximum amount of data */
-long pktdata[DATASIZE/sizeof(long)];
-
-/*
- * Holds association data for use with the &n operator.
- */
-struct association assoc_cache[MAXASSOC];
-int numassoc = 0; /* number of cached associations */
-
-/*
- * For commands typed on the command line (with the -c option)
- */
-int numcmds = 0;
-const char *ccmds[MAXCMDS];
-#define ADDCMD(cp) if (numcmds < MAXCMDS) ccmds[numcmds++] = (cp)
-
-/*
- * When multiple hosts are specified.
- */
-int numhosts = 0;
-const char *chosts[MAXHOSTS];
-#define ADDHOST(cp) if (numhosts < MAXHOSTS) chosts[numhosts++] = (cp)
-
-/*
- * Error codes for internal use
- */
-#define ERR_UNSPEC 256
-#define ERR_INCOMPLETE 257
-#define ERR_TIMEOUT 258
-#define ERR_TOOMUCH 259
-
-/*
- * Macro definitions we use
- */
-#define ISSPACE(c) ((c) == ' ' || (c) == '\t')
-#define ISEOL(c) ((c) == '\n' || (c) == '\r' || (c) == '\0')
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-/*
- * Jump buffer for longjumping back to the command level
- */
-jmp_buf interrupt_buf;
-
-/*
- * Points at file being currently printed into
- */
-FILE *current_output;
-
-/*
- * Command table imported from ntpdc_ops.c
- */
-extern struct xcmd opcmds[];
-
-char *progname;
-volatile int debug;
-
-#ifdef NO_MAIN_ALLOWED
-CALL(ntpq,"ntpq",ntpqmain);
-
-void clear_globals(void)
-{
- extern int ntp_optind;
- extern char *ntp_optarg;
- showhostnames = 0; /* don'tshow 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 */
- numassoc = 0; /* number of cached associations */
- numcmds = 0;
- numhosts = 0;
-}
-#endif
-
-/*
- * main - parse arguments and handle options
- */
-#ifndef NO_MAIN_ALLOWED
-int
-main(
- int argc,
- char *argv[]
- )
-{
- return ntpqmain(argc, argv);
-}
-#endif
-
-int
-ntpqmain(
- int argc,
- char *argv[]
- )
-{
- int c;
- int errflg = 0;
- extern int ntp_optind;
- extern char *ntp_optarg;
-
-#ifdef NO_MAIN_ALLOWED
- clear_globals();
- taskPrioritySet(taskIdSelf(), 100 );
-#endif
- 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];
- 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;
- case 'd':
- ++debug;
- break;
- case 'i':
- interactive = 1;
- break;
- case 'n':
- showhostnames = 0;
- break;
- case 'p':
- ADDCMD("peers");
- break;
- default:
- errflg++;
- break;
- }
- if (errflg) {
- (void) fprintf(stderr,
- "usage: %s [-46dinp] [-c cmd] host ...\n",
- progname);
- exit(2);
- }
- if (ntp_optind == argc) {
- ADDHOST(DEFHOST);
- } else {
- for (; ntp_optind < argc; ntp_optind++)
- ADDHOST(argv[ntp_optind]);
- }
-
- if (numcmds == 0 && interactive == 0
- && isatty(fileno(stdin)) && isatty(fileno(stderr))) {
- interactive = 1;
- }
-
-#ifndef SYS_WINNT /* Under NT cannot handle SIGINT, WIN32 spawns a handler */
- if (interactive)
- (void) signal_no_reset(SIGINT, abortcmd);
-#endif /* SYS_WINNT */
-
- if (numcmds == 0) {
- (void) openhost(chosts[0]);
- getcmds();
- } else {
- int ihost;
- int icmd;
-
- for (ihost = 0; ihost < numhosts; ihost++) {
- if (openhost(chosts[ihost]))
- for (icmd = 0; icmd < numcmds; icmd++)
- docmd(ccmds[icmd]);
- }
- }
-#ifdef SYS_WINNT
- WSACleanup();
-#endif /* SYS_WINNT */
- return 0;
-}
-
-
-/*
- * openhost - open a socket to a host
- */
-static int
-openhost(
- const char *hname
- )
-{
- char temphost[LENHOSTNAME];
- int a_info, i;
- struct addrinfo hints, *ai = NULL;
- register const char *cp;
- char name[LENHOSTNAME];
- char service[5];
-
- /*
- * 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 (debug > 2)
- printf("Opening host %s\n", temphost);
-
- if (havehost == 1) {
- if (debug > 2)
- printf("Closing old host %s\n", currenthost);
- (void) closesocket(sockfd);
- havehost = 0;
- }
- (void) strcpy(currenthost, temphost);
-
- /* 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
- {
- int optionValue = SO_SYNCHRONOUS_NONALERT;
- int err;
- err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&optionValue, sizeof(optionValue));
- if (err != NO_ERROR) {
- (void) fprintf(stderr, "cannot open nonoverlapped sockets\n");
- exit(1);
- }
- }
-#endif /* SYS_WINNT */
-
- sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
- if (sockfd == INVALID_SOCKET) {
- error("socket", "", "");
- }
-
-
-#ifdef NEED_RCVBUF_SLOP
-# ifdef SO_RCVBUF
- { int rbufsize = DATASIZE + 2048; /* 2K for slop */
- if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
- &rbufsize, sizeof(int)) == -1)
- error("setsockopt", "", "");
- }
-# 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;
-}
-
-
-/* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */
-/*
- * sendpkt - send a packet to the remote host
- */
-static int
-sendpkt(
- char *xdata,
- int xdatalen
- )
-{
- if (debug >= 3)
- printf("Sending %d octets\n", xdatalen);
-
-
- if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
- warning("write to %s failed", currenthost, "");
- return -1;
- }
-
- if (debug >= 4) {
- int first = 8;
- printf("Packet data:\n");
- while (xdatalen-- > 0) {
- if (first-- == 0) {
- printf("\n");
- first = 7;
- }
- printf(" %02x", *xdata++ & 0xff);
- }
- printf("\n");
- }
- return 0;
-}
-
-
-
-/*
- * getresponse - get a (series of) response packet(s) and return the data
- */
-static int
-getresponse(
- int opcode,
- int associd,
- u_short *rstatus,
- int *rsize,
- char **rdata,
- int timeo
- )
-{
- struct ntp_control rpkt;
- struct timeval tvo;
- u_short offsets[MAXFRAGS+1];
- u_short counts[MAXFRAGS+1];
- u_short offset;
- u_short count;
- int numfrags;
- int seenlastfrag;
- fd_set fds;
- int n;
-
- /*
- * This is pretty tricky. We may get between 1 and MAXFRAG packets
- * back in response to the request. We peel the data out of
- * each packet and collect it in one long block. When the last
- * packet in the sequence is received we'll know how much data we
- * should have had. Note we use one long time out, should reconsider.
- */
- *rsize = 0;
- if (rstatus)
- *rstatus = 0;
- *rdata = (char *)pktdata;
-
- numfrags = 0;
- seenlastfrag = 0;
-
- FD_ZERO(&fds);
-
- again:
- if (numfrags == 0)
- tvo = tvout;
- else
- tvo = tvsout;
-
- FD_SET(sockfd, &fds);
- n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
-
-#if 0
- if (debug >= 1)
- printf("select() returns %d\n", n);
-#endif
-
- if (n == -1) {
- warning("select fails", "", "");
- return -1;
- }
- if (n == 0) {
- /*
- * Timed out. Return what we have
- */
- if (numfrags == 0) {
- if (timeo)
- (void) fprintf(stderr,
- "%s: timed out, nothing received\n",
- currenthost);
- return ERR_TIMEOUT;
- } else {
- if (timeo)
- (void) fprintf(stderr,
- "%s: timed out with incomplete data\n",
- currenthost);
- if (debug) {
- printf("Received fragments:\n");
- for (n = 0; n < numfrags; n++)
- printf("%4d %d\n", offsets[n],
- counts[n]);
- if (seenlastfrag)
- printf("last fragment received\n");
- else
- printf("last fragment not received\n");
- }
- return ERR_INCOMPLETE;
- }
- }
-
- n = recv(sockfd, (char *)&rpkt, sizeof(rpkt), 0);
- if (n == -1) {
- warning("read", "", "");
- return -1;
- }
-
- if (debug >= 4) {
- int len = n, first = 8;
- char *data = (char *)&rpkt;
-
- printf("Packet data:\n");
- while (len-- > 0) {
- if (first-- == 0) {
- printf("\n");
- first = 7;
- }
- printf(" %02x", *data++ & 0xff);
- }
- printf("\n");
- }
-
- /*
- * Check for format errors. Bug proofing.
- */
- if (n < CTL_HEADER_LEN) {
- if (debug)
- printf("Short (%d byte) packet received\n", n);
- goto again;
- }
- if (PKT_VERSION(rpkt.li_vn_mode) > NTP_VERSION
- || PKT_VERSION(rpkt.li_vn_mode) < NTP_OLDVERSION) {
- if (debug)
- printf("Packet received with version %d\n",
- PKT_VERSION(rpkt.li_vn_mode));
- goto again;
- }
- if (PKT_MODE(rpkt.li_vn_mode) != MODE_CONTROL) {
- if (debug)
- printf("Packet received with mode %d\n",
- PKT_MODE(rpkt.li_vn_mode));
- goto again;
- }
- if (!CTL_ISRESPONSE(rpkt.r_m_e_op)) {
- if (debug)
- printf("Received request packet, wanted response\n");
- goto again;
- }
-
- /*
- * Check opcode and sequence number for a match.
- * Could be old data getting to us.
- */
- if (ntohs(rpkt.sequence) != sequence) {
- if (debug)
- printf(
- "Received sequnce number %d, wanted %d\n",
- ntohs(rpkt.sequence), sequence);
- goto again;
- }
- if (CTL_OP(rpkt.r_m_e_op) != opcode) {
- if (debug)
- printf(
- "Received opcode %d, wanted %d (sequence number okay)\n",
- CTL_OP(rpkt.r_m_e_op), opcode);
- goto again;
- }
-
- /*
- * Check the error code. If non-zero, return it.
- */
- if (CTL_ISERROR(rpkt.r_m_e_op)) {
- int errcode;
-
- errcode = (ntohs(rpkt.status) >> 8) & 0xff;
- if (debug && CTL_ISMORE(rpkt.r_m_e_op)) {
- printf("Error code %d received on not-final packet\n",
- errcode);
- }
- if (errcode == CERR_UNSPEC)
- return ERR_UNSPEC;
- return errcode;
- }
-
- /*
- * Check the association ID to make sure it matches what
- * we sent.
- */
- if (ntohs(rpkt.associd) != associd) {
- if (debug)
- printf("Association ID %d doesn't match expected %d\n",
- ntohs(rpkt.associd), associd);
- /*
- * Hack for silly fuzzballs which, at the time of writing,
- * return an assID of sys.peer when queried for system variables.
- */
-#ifdef notdef
- goto again;
-#endif
- }
-
- /*
- * Collect offset and count. Make sure they make sense.
- */
- offset = ntohs(rpkt.offset);
- count = ntohs(rpkt.count);
-
- if (debug >= 3) {
- int shouldbesize;
- u_long key;
- u_long *lpkt;
- int maclen;
-
- /*
- * Usually we ignore authentication, but for debugging purposes
- * we watch it here.
- */
- shouldbesize = CTL_HEADER_LEN + count;
-
- /* round to 8 octet boundary */
- shouldbesize = (shouldbesize + 7) & ~7;
-
- if (n & 0x3) {
- printf("Packet not padded, size = %d\n", n);
- } if ((maclen = n - shouldbesize) >= MIN_MAC_LEN) {
- printf(
- "Packet shows signs of authentication (total %d, data %d, mac %d)\n",
- n, shouldbesize, maclen);
- lpkt = (u_long *)&rpkt;
- printf("%08lx %08lx %08lx %08lx %08lx %08lx\n",
- (u_long)ntohl(lpkt[(n - maclen)/sizeof(u_long) - 3]),
- (u_long)ntohl(lpkt[(n - maclen)/sizeof(u_long) - 2]),
- (u_long)ntohl(lpkt[(n - maclen)/sizeof(u_long) - 1]),
- (u_long)ntohl(lpkt[(n - maclen)/sizeof(u_long)]),
- (u_long)ntohl(lpkt[(n - maclen)/sizeof(u_long) + 1]),
- (u_long)ntohl(lpkt[(n - maclen)/sizeof(u_long) + 2]));
- key = ntohl(lpkt[(n - maclen) / sizeof(u_long)]);
- printf("Authenticated with keyid %lu\n", (u_long)key);
- if (key != 0 && key != info_auth_keyid) {
- printf("We don't know that key\n");
- } else {
- if (authdecrypt(key, (u_int32 *)&rpkt,
- n - maclen, maclen)) {
- printf("Auth okay!\n");
- } else {
- printf("Auth failed!\n");
- }
- }
- }
- }
-
- if (debug >= 2)
- printf("Got packet, size = %d\n", n);
- if (count > (u_short)(n-CTL_HEADER_LEN)) {
- if (debug)
- printf(
- "Received count of %d octets, data in packet is %d\n",
- count, n-CTL_HEADER_LEN);
- goto again;
- }
- if (count == 0 && CTL_ISMORE(rpkt.r_m_e_op)) {
- if (debug)
- printf("Received count of 0 in non-final fragment\n");
- goto again;
- }
- if (offset + count > sizeof(pktdata)) {
- if (debug)
- printf("Offset %d, count %d, too big for buffer\n",
- offset, count);
- return ERR_TOOMUCH;
- }
- if (seenlastfrag && !CTL_ISMORE(rpkt.r_m_e_op)) {
- if (debug)
- printf("Received second last fragment packet\n");
- goto again;
- }
-
- /*
- * So far, so good. Record this fragment, making sure it doesn't
- * overlap anything.
- */
- if (debug >= 2)
- printf("Packet okay\n");;
-
- if (numfrags == MAXFRAGS) {
- if (debug)
- printf("Number of fragments exceeds maximum\n");
- return ERR_TOOMUCH;
- }
-
- for (n = 0; n < numfrags; n++) {
- if (offset == offsets[n])
- goto again; /* duplicate */
- if (offset < offsets[n])
- break;
- }
-
- if ((u_short)(n > 0 && offsets[n-1] + counts[n-1]) > offset)
- goto overlap;
- if (n < numfrags && (u_short)(offset + count) > offsets[n])
- goto overlap;
-
- {
- register int i;
-
- for (i = numfrags; i > n; i--) {
- offsets[i] = offsets[i-1];
- counts[i] = counts[i-1];
- }
- }
- offsets[n] = offset;
- counts[n] = count;
- numfrags++;
-
- /*
- * Got that stuffed in right. Figure out if this was the last.
- * Record status info out of the last packet.
- */
- if (!CTL_ISMORE(rpkt.r_m_e_op)) {
- seenlastfrag = 1;
- if (rstatus != 0)
- *rstatus = ntohs(rpkt.status);
- }
-
- /*
- * Copy the data into the data buffer.
- */
- memmove((char *)pktdata + offset, (char *)rpkt.data, count);
-
- /*
- * If we've seen the last fragment, look for holes in the sequence.
- * If there aren't any, we're done.
- */
- if (seenlastfrag && offsets[0] == 0) {
- for (n = 1; n < numfrags; n++) {
- if (offsets[n-1] + counts[n-1] != offsets[n])
- break;
- }
- if (n == numfrags) {
- *rsize = offsets[numfrags-1] + counts[numfrags-1];
- return 0;
- }
- }
- goto again;
-
- overlap:
- /*
- * Print debugging message about overlapping fragments
- */
- if (debug)
- printf("Overlapping fragments returned in response\n");
- goto again;
-}
-
-
-/*
- * sendrequest - format and send a request packet
- */
-static int
-sendrequest(
- int opcode,
- int associd,
- int auth,
- int qsize,
- char *qdata
- )
-{
- struct ntp_control qpkt;
- int pktsize;
-
- /*
- * Check to make sure the data will fit in one packet
- */
- if (qsize > CTL_MAX_DATA_LEN) {
- (void) fprintf(stderr,
- "***Internal error! qsize (%d) too large\n",
- qsize);
- return 1;
- }
-
- /*
- * 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.sequence = htons(sequence);
- qpkt.status = 0;
- qpkt.associd = htons((u_short)associd);
- qpkt.offset = 0;
- qpkt.count = htons((u_short)qsize);
-
- /*
- * If we have data, copy it in and pad it out to a 64
- * bit boundary.
- */
- if (qsize > 0) {
- memmove((char *)qpkt.data, qdata, (unsigned)qsize);
- pktsize = qsize + CTL_HEADER_LEN;
- while (pktsize & (sizeof(u_long) - 1)) {
- qpkt.data[qsize++] = 0;
- pktsize++;
- }
- } else {
- pktsize = CTL_HEADER_LEN;
- }
-
- /*
- * If it isn't authenticated we can just send it. Otherwise
- * we're going to have to think about it a little.
- */
- if (!auth && !always_auth) {
- return sendpkt((char *)&qpkt, pktsize);
- } else {
- const char *pass = "\0";
- int maclen = 0;
- u_long my_keyid;
-
- /*
- * Pad out packet to a multiple of 8 octets to be sure
- * receiver can handle it.
- */
- while (pktsize & 7) {
- qpkt.data[qsize++] = 0;
- pktsize++;
- }
-
- /*
- * Get the keyid and the password if we don't have one.
- */
- if (info_auth_keyid == 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("MD5 Password: ");
- if (*pass == '\0') {
- (void) fprintf(stderr,
- "Invalid password\n");
- return (1);
- }
- }
- authusekey(info_auth_keyid, info_auth_keytype, (const u_char *)pass);
- authtrust(info_auth_keyid, 1);
-
- /*
- * Stick the keyid in the packet where
- * cp currently points. Cp should be aligned
- * properly. Then do the encryptions.
- */
- my_keyid = htonl(info_auth_keyid);
- memcpy(&qpkt.data[qsize], &my_keyid, sizeof my_keyid);
- maclen = authencrypt(info_auth_keyid, (u_int32 *)&qpkt,
- pktsize);
- if (maclen == 0) {
- (void) fprintf(stderr, "Key not found\n");
- return (1);
- }
- return sendpkt((char *)&qpkt, pktsize + maclen);
- }
- /*NOTREACHED*/
-}
-
-
-/*
- * doquery - send a request and process the response
- */
-int
-doquery(
- int opcode,
- int associd,
- int auth,
- int qsize,
- char *qdata,
- u_short *rstatus,
- int *rsize,
- char **rdata
- )
-{
- int res;
- int done;
-
- /*
- * Check to make sure host is open
- */
- if (!havehost) {
- (void) fprintf(stderr, "***No host open, use `host' command\n");
- return -1;
- }
-
- done = 0;
- sequence++;
-
- again:
- /*
- * send a request
- */
- res = sendrequest(opcode, associd, auth, qsize, qdata);
- if (res != 0)
- return res;
-
- /*
- * Get the response. If we got a standard error, print a message
- */
- res = getresponse(opcode, associd, rstatus, rsize, rdata, done);
-
- if (res > 0) {
- if (!done && (res == ERR_TIMEOUT || res == ERR_INCOMPLETE)) {
- if (res == ERR_INCOMPLETE) {
- /*
- * better bump the sequence so we don't
- * get confused about differing fragments.
- */
- sequence++;
- }
- done = 1;
- goto again;
- }
- switch(res) {
- case CERR_BADFMT:
- (void) fprintf(stderr,
- "***Server reports a bad format request packet\n");
- break;
- case CERR_PERMISSION:
- (void) fprintf(stderr,
- "***Server disallowed request (authentication?)\n");
- break;
- case CERR_BADOP:
- (void) fprintf(stderr,
- "***Server reports a bad opcode in request\n");
- break;
- case CERR_BADASSOC:
- (void) fprintf(stderr,
- "***Association ID %d unknown to server\n",associd);
- break;
- case CERR_UNKNOWNVAR:
- (void) fprintf(stderr,
- "***A request variable unknown to the server\n");
- break;
- case CERR_BADVALUE:
- (void) fprintf(stderr,
- "***Server indicates a request variable was bad\n");
- break;
- case ERR_UNSPEC:
- (void) fprintf(stderr,
- "***Server returned an unspecified error\n");
- break;
- case ERR_TIMEOUT:
- (void) fprintf(stderr, "***Request timed out\n");
- break;
- case ERR_INCOMPLETE:
- (void) fprintf(stderr,
- "***Response from server was incomplete\n");
- break;
- case ERR_TOOMUCH:
- (void) fprintf(stderr,
- "***Buffer size exceeded for returned data\n");
- break;
- default:
- (void) fprintf(stderr,
- "***Server returns unknown error code %d\n", res);
- break;
- }
- }
- return res;
-}
-
-
-/*
- * getcmds - read commands from the standard input and execute them
- */
-static void
-getcmds(void)
-{
-#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)
- char *line;
-
- for (;;) {
- if ((line = readline(interactive?prompt:"")) == NULL) return;
- if (*line) add_history(line);
- docmd(line);
- free(line);
- }
-#else /* not (HAVE_LIBREADLINE || HAVE_LIBEDIT) */
- char line[MAXLINE];
-
- for (;;) {
- if (interactive) {
-#ifdef VMS /* work around a problem with mixing stdout & stderr */
- fputs("",stdout);
-#endif
- (void) fputs(prompt, stderr);
- (void) fflush(stderr);
- }
-
- if (fgets(line, sizeof line, stdin) == NULL)
- return;
-
- docmd(line);
- }
-#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
- */
-static RETSIGTYPE
-abortcmd(
- int sig
- )
-{
- if (current_output == stdout)
- (void) fflush(stdout);
- putc('\n', stderr);
- (void) fflush(stderr);
- if (jump) longjmp(interrupt_buf, 1);
-}
-#endif /* SYS_WINNT */
-
-/*
- * docmd - decode the command line and execute a command
- */
-static void
-docmd(
- const char *cmdline
- )
-{
- char *tokens[1+MAXARGS+2];
- struct parse pcmd;
- int ntok;
- static int i;
- struct xcmd *xcmd;
-
- /*
- * Tokenize the command line. If nothing on it, return.
- */
- tokenize(cmdline, tokens, &ntok);
- if (ntok == 0)
- return;
-
- /*
- * Find the appropriate command description.
- */
- i = findcmd(tokens[0], builtins, opcmds, &xcmd);
- if (i == 0) {
- (void) fprintf(stderr, "***Command `%s' unknown\n",
- tokens[0]);
- return;
- } else if (i >= 2) {
- (void) fprintf(stderr, "***Command `%s' ambiguous\n",
- tokens[0]);
- return;
- }
-
- /*
- * Save the keyword, then walk through the arguments, interpreting
- * as we go.
- */
- pcmd.keyword = tokens[0];
- pcmd.nargs = 0;
- for (i = 0; i < MAXARGS && xcmd->arg[i] != NO; i++) {
- if ((i+1) >= 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;
- pcmd.nargs++;
- }
-
- i++;
- if (i < ntok && *tokens[i] == '>') {
- char *fname;
-
- if (*(tokens[i]+1) != '\0')
- fname = tokens[i]+1;
- else if ((i+1) < ntok)
- fname = tokens[i+1];
- else {
- (void) fprintf(stderr, "***No file for redirect\n");
- return;
- }
-
- current_output = fopen(fname, "w");
- if (current_output == NULL) {
- (void) fprintf(stderr, "***Error opening %s: ", fname);
- perror("");
- return;
- }
- i = 1; /* flag we need a close */
- } else {
- current_output = stdout;
- i = 0; /* flag no close */
- }
-
- if (interactive && setjmp(interrupt_buf)) {
- jump = 0;
- return;
- } else {
- jump++;
- (xcmd->handler)(&pcmd, current_output);
- jump = 0; /* HMS: 961106: was after fclose() */
- if (i) (void) fclose(current_output);
- }
-}
-
-
-/*
- * tokenize - turn a command line into tokens
- */
-static void
-tokenize(
- const char *line,
- char **tokens,
- int *ntok
- )
-{
- register const char *cp;
- register char *sp;
- static char tspace[MAXLINE];
-
- sp = tspace;
- cp = line;
- for (*ntok = 0; *ntok < MAXTOKENS; (*ntok)++) {
- tokens[*ntok] = sp;
- while (ISSPACE(*cp))
- cp++;
- if (ISEOL(*cp))
- break;
- do {
- *sp++ = *cp++;
- } while (!ISSPACE(*cp) && !ISEOL(*cp));
-
- *sp++ = '\0';
- }
-}
-
-
-
-/*
- * findcmd - find a command in a command description table
- */
-static int
-findcmd(
- register char *str,
- struct xcmd *clist1,
- struct xcmd *clist2,
- struct xcmd **cmd
- )
-{
- register struct xcmd *cl;
- register int clen;
- int nmatch;
- struct xcmd *nearmatch = NULL;
- struct xcmd *clist;
-
- clen = strlen(str);
- nmatch = 0;
- if (clist1 != 0)
- clist = clist1;
- else if (clist2 != 0)
- clist = clist2;
- else
- return 0;
-
- again:
- for (cl = clist; cl->keyword != 0; cl++) {
- /* do a first character check, for efficiency */
- if (*str != *(cl->keyword))
- continue;
- if (strncmp(str, cl->keyword, (unsigned)clen) == 0) {
- /*
- * Could be extact match, could be approximate.
- * Is exact if the length of the keyword is the
- * same as the str.
- */
- if (*((cl->keyword) + clen) == '\0') {
- *cmd = cl;
- return 1;
- }
- nmatch++;
- nearmatch = cl;
- }
- }
-
- /*
- * See if there is more to do. If so, go again. Sorry about the
- * goto, too much looking at BSD sources...
- */
- if (clist == clist1 && clist2 != 0) {
- clist = clist2;
- goto again;
- }
-
- /*
- * If we got extactly 1 near match, use it, else return number
- * of matches.
- */
- if (nmatch == 1) {
- *cmd = nearmatch;
- return 1;
- }
- return nmatch;
-}
-
-
-/*
- * getarg - interpret an argument token
- */
-static int
-getarg(
- char *str,
- int code,
- arg_v *argp
- )
-{
- int isneg;
- char *cp, *np;
- static const char *digits = "0123456789";
-
- switch (code & ~OPT) {
- case STR:
- argp->string = str;
- break;
- case ADD:
- if (!getnetnum(str, &(argp->netnum), (char *)0, 0)) {
- return 0;
- }
- break;
- case INT:
- case UINT:
- isneg = 0;
- np = str;
- if (*np == '&') {
- np++;
- isneg = atoi(np);
- if (isneg <= 0) {
- (void) fprintf(stderr,
- "***Association value `%s' invalid/undecodable\n", str);
- return 0;
- }
- if (isneg > numassoc) {
- 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;
- }
-
- if (*np == '-') {
- np++;
- isneg = 1;
- }
-
- argp->uval = 0;
- do {
- cp = strchr(digits, *np);
- if (cp == NULL) {
- (void) fprintf(stderr,
- "***Illegal integer value %s\n", str);
- return 0;
- }
- argp->uval *= 10;
- argp->uval += (cp - digits);
- } while (*(++np) != '\0');
-
- if (isneg) {
- if ((code & ~OPT) == UINT) {
- (void) fprintf(stderr,
- "***Value %s should be unsigned\n", str);
- return 0;
- }
- 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;
-}
-
-
-/*
- * getnetnum - given a host name, return its net number
- * and (optional) full name
- */
-int
-getnetnum(
- const char *hname,
- struct sockaddr_storage *num,
- char *fullhost,
- int af
- )
-{
- 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) {
- getnameinfo((struct sockaddr *)num, sockaddr_len,
- fullhost, sizeof(fullhost), NULL, 0,
- NI_NUMERICHOST);
-
- }
- return 1;
- } 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);
- return 0;
- }
- /*NOTREACHED*/
-}
-
-/*
- * nntohost - convert network number to host name. This routine enforces
- * the showhostnames setting.
- */
-char *
-nntohost(
- struct sockaddr_storage *netnum
- )
-{
- if (!showhostnames)
- return stoa(netnum);
- if ((netnum->ss_family == AF_INET) && ISREFCLOCKADR(netnum))
- return refnumtoa(netnum);
- return socktohost(netnum);
-}
-
-
-/*
- * rtdatetolfp - decode an RT-11 date into an l_fp
- */
-static int
-rtdatetolfp(
- char *str,
- l_fp *lfp
- )
-{
- register char *cp;
- register int i;
- struct calendar cal;
- char buf[4];
- static const char *months[12] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- };
-
- cal.yearday = 0;
-
- /*
- * An RT-11 date looks like:
- *
- * d[d]-Mth-y[y] hh:mm:ss
- *
- * (No docs, but assume 4-digit years are also legal...)
- *
- * d[d]-Mth-y[y[y[y]]] hh:mm:ss
- */
- cp = str;
- if (!isdigit((int)*cp)) {
- if (*cp == '-') {
- /*
- * Catch special case
- */
- L_CLR(lfp);
- return 1;
- }
- return 0;
- }
-
- cal.monthday = (u_char) (*cp++ - '0'); /* ascii dependent */
- if (isdigit((int)*cp)) {
- cal.monthday = (u_char)((cal.monthday << 3) + (cal.monthday << 1));
- cal.monthday = (u_char)(cal.monthday + *cp++ - '0');
- }
-
- if (*cp++ != '-')
- return 0;
-
- for (i = 0; i < 3; i++)
- buf[i] = *cp++;
- buf[3] = '\0';
-
- for (i = 0; i < 12; i++)
- if (STREQ(buf, months[i]))
- break;
- if (i == 12)
- return 0;
- cal.month = (u_char)(i + 1);
-
- if (*cp++ != '-')
- return 0;
-
- if (!isdigit((int)*cp))
- return 0;
- cal.year = (u_short)(*cp++ - '0');
- if (isdigit((int)*cp)) {
- cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
- cal.year = (u_short)(*cp++ - '0');
- }
- if (isdigit((int)*cp)) {
- cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
- cal.year = (u_short)(cal.year + *cp++ - '0');
- }
- if (isdigit((int)*cp)) {
- cal.year = (u_short)((cal.year << 3) + (cal.year << 1));
- cal.year = (u_short)(cal.year + *cp++ - '0');
- }
-
- /*
- * Catch special case. If cal.year == 0 this is a zero timestamp.
- */
- if (cal.year == 0) {
- L_CLR(lfp);
- return 1;
- }
-
- if (*cp++ != ' ' || !isdigit((int)*cp))
- return 0;
- cal.hour = (u_char)(*cp++ - '0');
- if (isdigit((int)*cp)) {
- 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 = (u_char)(*cp++ - '0');
- if (isdigit((int)*cp)) {
- 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 = (u_char)(*cp++ - '0');
- if (isdigit((int)*cp)) {
- cal.second = (u_char)((cal.second << 3) + (cal.second << 1));
- cal.second = (u_char)(cal.second + *cp++ - '0');
- }
-
- /*
- * For RT-11, 1972 seems to be the pivot year
- */
- if (cal.year < 72)
- cal.year += 2000;
- if (cal.year < 100)
- cal.year += 1900;
-
- lfp->l_ui = caltontp(&cal);
- lfp->l_uf = 0;
- return 1;
-}
-
-
-/*
- * decodets - decode a timestamp into an l_fp format number, with
- * consideration of fuzzball formats.
- */
-int
-decodets(
- char *str,
- l_fp *lfp
- )
-{
- /*
- * If it starts with a 0x, decode as hex.
- */
- if (*str == '0' && (*(str+1) == 'x' || *(str+1) == 'X'))
- return hextolfp(str+2, lfp);
-
- /*
- * If it starts with a '"', try it as an RT-11 date.
- */
- if (*str == '"') {
- register char *cp = str+1;
- register char *bp;
- char buf[30];
-
- bp = buf;
- while (*cp != '"' && *cp != '\0' && bp < &buf[29])
- *bp++ = *cp++;
- *bp = '\0';
- return rtdatetolfp(buf, lfp);
- }
-
- /*
- * Might still be hex. Check out the first character. Talk
- * about heuristics!
- */
- if ((*str >= 'A' && *str <= 'F') || (*str >= 'a' && *str <= 'f'))
- return hextolfp(str, lfp);
-
- /*
- * Try it as a decimal. If this fails, try as an unquoted
- * RT-11 date. This code should go away eventually.
- */
- if (atolfp(str, lfp))
- return 1;
- return rtdatetolfp(str, lfp);
-}
-
-
-/*
- * decodetime - decode a time value. It should be in milliseconds
- */
-int
-decodetime(
- char *str,
- l_fp *lfp
- )
-{
- return mstolfp(str, lfp);
-}
-
-
-/*
- * decodeint - decode an integer
- */
-int
-decodeint(
- char *str,
- long *val
- )
-{
- if (*str == '0') {
- if (*(str+1) == 'x' || *(str+1) == 'X')
- return hextoint(str+2, (void *)&val);
- return octtoint(str, (void *)&val);
- }
- return atoint(str, val);
-}
-
-
-/*
- * decodeuint - decode an unsigned integer
- */
-int
-decodeuint(
- char *str,
- u_long *val
- )
-{
- if (*str == '0') {
- if (*(str + 1) == 'x' || *(str + 1) == 'X')
- return (hextoint(str + 2, val));
- return (octtoint(str, val));
- }
- return (atouint(str, val));
-}
-
-
-/*
- * decodearr - decode an array of time values
- */
-static int
-decodearr(
- char *str,
- int *narr,
- l_fp *lfparr
- )
-{
- register char *cp, *bp;
- register l_fp *lfp;
- char buf[60];
-
- lfp = lfparr;
- cp = str;
- *narr = 0;
-
- while (*narr < 8) {
- while (isspace((int)*cp))
- cp++;
- if (*cp == '\0')
- break;
-
- bp = buf;
- while (!isspace((int)*cp) && *cp != '\0')
- *bp++ = *cp++;
- *bp++ = '\0';
-
- if (!decodetime(buf, lfp))
- return 0;
- (*narr)++;
- lfp++;
- }
- return 1;
-}
-
-
-/*
- * Finally, the built in command handlers
- */
-
-/*
- * help - tell about commands, or details of a particular command
- */
-static void
-help(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int i;
- int n;
- struct xcmd *xcp;
- char *cmd;
- const char *cmdsort[100];
- int length[100];
- int maxlength;
- int numperline;
- static const char *spaces = " "; /* 20 spaces */
-
- if (pcmd->nargs == 0) {
- n = 0;
- for (xcp = builtins; xcp->keyword != 0; xcp++) {
- if (*(xcp->keyword) != '?')
- cmdsort[n++] = xcp->keyword;
- }
- for (xcp = opcmds; xcp->keyword != 0; xcp++)
- cmdsort[n++] = xcp->keyword;
-
-#ifdef QSORT_USES_VOID_P
- qsort(cmdsort, (size_t)n, sizeof(char *), helpsort);
-#else
- qsort((char *)cmdsort, (size_t)n, sizeof(char *), helpsort);
-#endif
-
- maxlength = 0;
- for (i = 0; i < n; i++) {
- length[i] = strlen(cmdsort[i]);
- if (length[i] > maxlength)
- maxlength = length[i];
- }
- maxlength++;
- numperline = 76 / maxlength;
-
- (void) fprintf(fp, "Commands available:\n");
- for (i = 0; i < n; i++) {
- if ((i % numperline) == (numperline-1)
- || i == (n-1))
- (void) fprintf(fp, "%s\n", cmdsort[i]);
- else
- (void) fprintf(fp, "%s%s", cmdsort[i],
- spaces+20-maxlength+length[i]);
- }
- } else {
- cmd = pcmd->argval[0].string;
- n = findcmd(cmd, builtins, opcmds, &xcp);
- if (n == 0) {
- (void) fprintf(stderr,
- "Command `%s' is unknown\n", cmd);
- return;
- } else if (n >= 2) {
- (void) fprintf(stderr,
- "Command `%s' is ambiguous\n", cmd);
- return;
- }
- (void) fprintf(fp, "function: %s\n", xcp->comment);
- printusage(xcp, fp);
- }
-}
-
-
-/*
- * helpsort - do hostname qsort comparisons
- */
-#ifdef QSORT_USES_VOID_P
-static int
-helpsort(
- const void *t1,
- const void *t2
- )
-{
- char const * const * name1 = (char const * const *)t1;
- char const * const * name2 = (char const * const *)t2;
-
- return strcmp(*name1, *name2);
-}
-
-#else
-static int
-helpsort(
- char **name1,
- char **name2
- )
-{
- return strcmp(*name1, *name2);
-}
-#endif
-
-/*
- * printusage - print usage information for a command
- */
-static void
-printusage(
- struct xcmd *xcp,
- FILE *fp
- )
-{
- register int i;
-
- (void) fprintf(fp, "usage: %s", xcp->keyword);
- for (i = 0; i < MAXARGS && xcp->arg[i] != NO; i++) {
- if (xcp->arg[i] & OPT)
- (void) fprintf(fp, " [ %s ]", xcp->desc[i]);
- else
- (void) fprintf(fp, " %s", xcp->desc[i]);
- }
- (void) fprintf(fp, "\n");
-}
-
-
-/*
- * timeout - set time out time
- */
-static void
-timeout(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int val;
-
- if (pcmd->nargs == 0) {
- val = tvout.tv_sec * 1000 + tvout.tv_usec / 1000;
- (void) fprintf(fp, "primary timeout %d ms\n", val);
- } else {
- tvout.tv_sec = pcmd->argval[0].uval / 1000;
- tvout.tv_usec = (pcmd->argval[0].uval - (tvout.tv_sec * 1000))
- * 1000;
- }
-}
-
-
-/*
- * auth_delay - set delay for auth requests
- */
-static void
-auth_delay(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int isneg;
- u_long val;
-
- if (pcmd->nargs == 0) {
- val = delay_time.l_ui * 1000 + delay_time.l_uf / 4294967;
- (void) fprintf(fp, "delay %lu ms\n", val);
- } else {
- if (pcmd->argval[0].ival < 0) {
- isneg = 1;
- val = (u_long)(-pcmd->argval[0].ival);
- } else {
- isneg = 0;
- val = (u_long)pcmd->argval[0].ival;
- }
-
- delay_time.l_ui = val / 1000;
- val %= 1000;
- delay_time.l_uf = val * 4294967; /* 2**32/1000 */
-
- if (isneg)
- L_NEG(&delay_time);
- }
-}
-
-
-/*
- * host - set the host we are dealing with.
- */
-static void
-host(
- struct parse *pcmd,
- 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");
- 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 {
- if (havehost)
- (void) fprintf(fp,
- "current host remains %s\n", currenthost);
- else
- (void) fprintf(fp, "still no current host\n");
- }
-}
-
-
-/*
- * poll - do one (or more) polls of the host via NTP
- */
-/*ARGSUSED*/
-static void
-ntp_poll(
- struct parse *pcmd,
- FILE *fp
- )
-{
- (void) fprintf(fp, "poll not implemented yet\n");
-}
-
-
-/*
- * keyid - get a keyid to use for authenticating requests
- */
-static void
-keyid(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- 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;
- }
-}
-
-/*
- * keytype - get type of key to use for authenticating requests
- */
-static void
-keytype(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0)
- fprintf(fp, "keytype is %s\n",
- (info_auth_keytype == KEY_TYPE_MD5) ? "MD5" : "???");
- else
- switch (*(pcmd->argval[0].string)) {
- case 'm':
- case 'M':
- info_auth_keytype = KEY_TYPE_MD5;
- break;
-
- default:
- fprintf(fp, "keytype must be 'md5'\n");
- }
-}
-
-
-
-/*
- * passwd - get an authentication key
- */
-/*ARGSUSED*/
-static void
-passwd(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *pass;
-
- 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("MD5 Password: ");
- if (*pass == '\0')
- (void) fprintf(fp, "Password unchanged\n");
- else {
- authusekey(info_auth_keyid, info_auth_keytype, (u_char *)pass);
- authtrust(info_auth_keyid, 1);
- }
-}
-
-
-/*
- * hostnames - set the showhostnames flag
- */
-static void
-hostnames(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- if (showhostnames)
- (void) fprintf(fp, "hostnames being shown\n");
- else
- (void) fprintf(fp, "hostnames not being shown\n");
- } else {
- if (STREQ(pcmd->argval[0].string, "yes"))
- showhostnames = 1;
- else if (STREQ(pcmd->argval[0].string, "no"))
- showhostnames = 0;
- else
- (void)fprintf(stderr, "What?\n");
- }
-}
-
-
-
-/*
- * setdebug - set/change debugging level
- */
-static void
-setdebug(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- (void) fprintf(fp, "debug level is %d\n", debug);
- return;
- } else if (STREQ(pcmd->argval[0].string, "no")) {
- debug = 0;
- } else if (STREQ(pcmd->argval[0].string, "more")) {
- debug++;
- } else if (STREQ(pcmd->argval[0].string, "less")) {
- debug--;
- } else {
- (void) fprintf(fp, "What?\n");
- return;
- }
- (void) fprintf(fp, "debug level set to %d\n", debug);
-}
-
-
-/*
- * quit - stop this nonsense
- */
-/*ARGSUSED*/
-static void
-quit(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (havehost)
- closesocket(sockfd); /* cleanliness next to godliness */
- exit(0);
-}
-
-
-/*
- * version - print the current version number
- */
-/*ARGSUSED*/
-static void
-version(
- struct parse *pcmd,
- FILE *fp
- )
-{
-
- (void) fprintf(fp, "%s\n", Version);
- return;
-}
-
-
-/*
- * raw - set raw mode output
- */
-/*ARGSUSED*/
-static void
-raw(
- struct parse *pcmd,
- FILE *fp
- )
-{
- rawmode = 1;
- (void) fprintf(fp, "Output set to raw\n");
-}
-
-
-/*
- * cooked - set cooked mode output
- */
-/*ARGSUSED*/
-static void
-cooked(
- struct parse *pcmd,
- FILE *fp
- )
-{
- rawmode = 0;
- (void) fprintf(fp, "Output set to cooked\n");
- return;
-}
-
-
-/*
- * authenticate - always authenticate requests to this host
- */
-static void
-authenticate(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- if (always_auth) {
- (void) fprintf(fp,
- "authenticated requests being sent\n");
- } else
- (void) fprintf(fp,
- "unauthenticated requests being sent\n");
- } else {
- if (STREQ(pcmd->argval[0].string, "yes")) {
- always_auth = 1;
- } else if (STREQ(pcmd->argval[0].string, "no")) {
- always_auth = 0;
- } else
- (void)fprintf(stderr, "What?\n");
- }
-}
-
-
-/*
- * ntpversion - choose the NTP version to use
- */
-static void
-ntpversion(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (pcmd->nargs == 0) {
- (void) fprintf(fp,
- "NTP version being claimed is %d\n", pktversion);
- } else {
- if (pcmd->argval[0].uval < NTP_OLDVERSION
- || pcmd->argval[0].uval > NTP_VERSION) {
- (void) fprintf(stderr, "versions %d to %d, please\n",
- NTP_OLDVERSION, NTP_VERSION);
- } else {
- pktversion = (u_char) pcmd->argval[0].uval;
- }
- }
-}
-
-
-/*
- * warning - print a warning message
- */
-static void
-warning(
- const char *fmt,
- const char *st1,
- const char *st2
- )
-{
- (void) fprintf(stderr, "%s: ", progname);
- (void) fprintf(stderr, fmt, st1, st2);
- (void) fprintf(stderr, ": ");
- perror("");
-}
-
-
-/*
- * error - print a message and exit
- */
-static void
-error(
- const char *fmt,
- const char *st1,
- const char *st2
- )
-{
- warning(fmt, st1, st2);
- exit(1);
-}
-
-/*
- * getkeyid - prompt the user for a keyid to use
- */
-static u_long
-getkeyid(
- const char *keyprompt
- )
-{
- register char *p;
- register int c;
- FILE *fi;
- char pbuf[20];
-
-#ifndef SYS_WINNT
- if ((fi = fdopen(open("/dev/tty", 2), "r")) == NULL)
-#else
- if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL)
-#endif /* SYS_WINNT */
- fi = stdin;
- else
- setbuf(fi, (char *)NULL);
- fprintf(stderr, "%s", keyprompt); fflush(stderr);
- for (p=pbuf; (c = getc(fi))!='\n' && c!=EOF;) {
- if (p < &pbuf[18])
- *p++ = (char)c;
- }
- *p = '\0';
- if (fi != stdin)
- fclose(fi);
- if (strcmp(pbuf, "0") == 0)
- return 0;
-
- return (u_long) atoi(pbuf);
-}
-
-
-/*
- * atoascii - printable-ize possibly ascii data using the character
- * transformations cat -v uses.
- */
-static void
-atoascii(
- int length,
- char *data,
- char *outdata
- )
-{
- register u_char *cp;
- register u_char *ocp;
- register u_char c;
-
- if (!data)
- {
- *outdata = '\0';
- return;
- }
-
- ocp = (u_char *)outdata;
- for (cp = (u_char *)data; cp < (u_char *)data + length; cp++) {
- c = *cp;
- if (c == '\0')
- break;
- if (c == '\0')
- break;
- if (c > 0177) {
- *ocp++ = 'M';
- *ocp++ = '-';
- c &= 0177;
- }
-
- if (c < ' ') {
- *ocp++ = '^';
- *ocp++ = (u_char)(c + '@');
- } else if (c == 0177) {
- *ocp++ = '^';
- *ocp++ = '?';
- } else {
- *ocp++ = c;
- }
- if (ocp >= ((u_char *)outdata + length - 4))
- break;
- }
- *ocp++ = '\0';
-}
-
-
-
-/*
- * makeascii - print possibly ascii data using the character
- * transformations that cat -v uses.
- */
-static void
-makeascii(
- int length,
- char *data,
- FILE *fp
- )
-{
- register u_char *cp;
- register int c;
-
- for (cp = (u_char *)data; cp < (u_char *)data + length; cp++) {
- c = (int)*cp;
- if (c > 0177) {
- putc('M', fp);
- putc('-', fp);
- c &= 0177;
- }
-
- if (c < ' ') {
- putc('^', fp);
- putc(c+'@', fp);
- } else if (c == 0177) {
- putc('^', fp);
- putc('?', fp);
- } else {
- putc(c, fp);
- }
- }
-}
-
-
-/*
- * asciize - same thing as makeascii except add a newline
- */
-void
-asciize(
- int length,
- char *data,
- FILE *fp
- )
-{
- makeascii(length, data, fp);
- putc('\n', fp);
-}
-
-
-/*
- * Some circular buffer space
- */
-#define CBLEN 80
-#define NUMCB 6
-
-char circ_buf[NUMCB][CBLEN];
-int nextcb = 0;
-
-/*
- * nextvar - find the next variable in the buffer
- */
-int
-nextvar(
- int *datalen,
- char **datap,
- char **vname,
- char **vvalue
- )
-{
- register char *cp;
- register char *np;
- register char *cpend;
- register char *npend; /* character after last */
- int quoted = 0;
- static char name[MAXVARLEN];
- static char value[MAXVALLEN];
-
- cp = *datap;
- cpend = cp + *datalen;
-
- /*
- * Space past commas and white space
- */
- while (cp < cpend && (*cp == ',' || isspace((int)*cp)))
- cp++;
- if (cp == cpend)
- return 0;
-
- /*
- * Copy name until we hit a ',', an '=', a '\r' or a '\n'. Backspace
- * over any white space and terminate it.
- */
- np = name;
- npend = &name[MAXVARLEN];
- while (cp < cpend && np < npend && *cp != ',' && *cp != '='
- && *cp != '\r' && *cp != '\n')
- *np++ = *cp++;
- /*
- * Check if we ran out of name space, without reaching the end or a
- * terminating character
- */
- if (np == npend && !(cp == cpend || *cp == ',' || *cp == '=' ||
- *cp == '\r' || *cp == '\n'))
- return 0;
- while (isspace((int)(*(np-1))))
- np--;
- *np = '\0';
- *vname = name;
-
- /*
- * Check if we hit the end of the buffer or a ','. If so we are done.
- */
- if (cp == cpend || *cp == ',' || *cp == '\r' || *cp == '\n') {
- if (cp != cpend)
- cp++;
- *datap = cp;
- *datalen = cpend - cp;
- *vvalue = (char *)0;
- return 1;
- }
-
- /*
- * So far, so good. Copy out the value
- */
- cp++; /* past '=' */
- while (cp < cpend && (isspace((int)*cp) && *cp != '\r' && *cp != '\n'))
- cp++;
- np = value;
- npend = &value[MAXVALLEN];
- while (cp < cpend && np < npend && ((*cp != ',') || quoted))
- {
- quoted ^= ((*np++ = *cp++) == '"');
- }
-
- /*
- * Check if we overran the value buffer while still in a quoted string
- * or without finding a comma
- */
- if (np == npend && (quoted || *cp != ','))
- return 0;
- /*
- * Trim off any trailing whitespace
- */
- while (np > value && isspace((int)(*(np-1))))
- np--;
- *np = '\0';
-
- /*
- * Return this. All done.
- */
- if (cp != cpend)
- cp++;
- *datap = cp;
- *datalen = cpend - cp;
- *vvalue = value;
- return 1;
-}
-
-
-/*
- * findvar - see if this variable is known to us
- */
-int
-findvar(
- char *varname,
- struct ctl_var *varlist
- )
-{
- register char *np;
- register struct ctl_var *vl;
-
- vl = varlist;
- np = varname;
- while (vl->fmt != EOV) {
- if (vl->fmt != PADDING && STREQ(np, vl->text))
- return vl->code;
- vl++;
- }
- return 0;
-}
-
-
-
-/*
- * printvars - print variables returned in response packet
- */
-void
-printvars(
- int length,
- char *data,
- int status,
- int sttype,
- FILE *fp
- )
-{
- if (rawmode)
- rawprint(sttype, length, data, status, fp);
- else
- cookedprint(sttype, length, data, status, fp);
-}
-
-
-/*
- * rawprint - do a printout of the data in raw mode
- */
-static void
-rawprint(
- int datatype,
- int length,
- char *data,
- int status,
- FILE *fp
- )
-{
- register char *cp;
- register char *cpend;
-
- /*
- * Essentially print the data as is. We reformat unprintables, though.
- */
- cp = data;
- cpend = data + length;
-
- (void) fprintf(fp, "status=0x%04x,\n", status);
-
- while (cp < cpend) {
- if (*cp == '\r') {
- /*
- * If this is a \r and the next character is a
- * \n, supress this, else pretty print it. Otherwise
- * just output the character.
- */
- if (cp == (cpend-1) || *(cp+1) != '\n')
- makeascii(1, cp, fp);
- } else if (isspace((int)*cp) || isprint((int)*cp)) {
- putc(*cp, fp);
- } else {
- makeascii(1, cp, fp);
- }
- cp++;
- }
-}
-
-
-/*
- * Global data used by the cooked output routines
- */
-int out_chars; /* number of characters output */
-int out_linecount; /* number of characters output on this line */
-
-
-/*
- * startoutput - get ready to do cooked output
- */
-static void
-startoutput(void)
-{
- out_chars = 0;
- out_linecount = 0;
-}
-
-
-/*
- * output - output a variable=value combination
- */
-static void
-output(
- FILE *fp,
- char *name,
- char *value
- )
-{
- int lenname;
- int lenvalue;
-
- lenname = strlen(name);
- lenvalue = strlen(value);
-
- if (out_chars != 0) {
- putc(',', fp);
- out_chars++;
- out_linecount++;
- if ((out_linecount + lenname + lenvalue + 3) > MAXOUTLINE) {
- putc('\n', fp);
- out_chars++;
- out_linecount = 0;
- } else {
- putc(' ', fp);
- out_chars++;
- out_linecount++;
- }
- }
-
- fputs(name, fp);
- putc('=', fp);
- fputs(value, fp);
- out_chars += lenname + 1 + lenvalue;
- out_linecount += lenname + 1 + lenvalue;
-}
-
-
-/*
- * endoutput - terminate a block of cooked output
- */
-static void
-endoutput(
- FILE *fp
- )
-{
- if (out_chars != 0)
- putc('\n', fp);
-}
-
-
-/*
- * outputarr - output an array of values
- */
-static void
-outputarr(
- FILE *fp,
- char *name,
- int narr,
- l_fp *lfp
- )
-{
- register char *bp;
- register char *cp;
- register int i;
- register int len;
- char buf[256];
-
- bp = buf;
- /*
- * Hack to align delay and offset values
- */
- for (i = (int)strlen(name); i < 11; i++)
- *bp++ = ' ';
-
- for (i = narr; i > 0; i--) {
- if (i != narr)
- *bp++ = ' ';
- cp = lfptoms(lfp, 2);
- len = strlen(cp);
- if (len > 7) {
- cp[7] = '\0';
- len = 7;
- }
- while (len < 7) {
- *bp++ = ' ';
- len++;
- }
- while (*cp != '\0')
- *bp++ = *cp++;
- lfp++;
- }
- *bp = '\0';
- output(fp, name, buf);
-}
-
-static char *
-tstflags(
- u_long val
- )
-{
- register char *cb, *s;
- register int i;
- register const char *sep;
-
- sep = "";
- i = 0;
- s = cb = &circ_buf[nextcb][0];
- if (++nextcb >= NUMCB)
- nextcb = 0;
-
- sprintf(cb, "%02lx", val);
- cb += strlen(cb);
- if (!val) {
- strcat(cb, " ok");
- cb += strlen(cb);
- } else {
- *cb++ = ' ';
- for (i = 0; i < 11; i++) {
- if (val & 0x1) {
- sprintf(cb, "%s%s", sep, tstflagnames[i]);
- sep = ", ";
- cb += strlen(cb);
- }
- val >>= 1;
- }
- }
- *cb = '\0';
- return s;
-}
-
-/*
- * cookedprint - output variables in cooked mode
- */
-static void
-cookedprint(
- int datatype,
- int length,
- char *data,
- int status,
- FILE *fp
- )
-{
- register int varid;
- char *name;
- char *value;
- char output_raw;
- int fmt;
- struct ctl_var *varlist;
- l_fp lfp;
- long ival;
- struct sockaddr_storage hval;
- u_long uval;
- l_fp lfparr[8];
- int narr;
-
- switch (datatype) {
- case TYPE_PEER:
- varlist = peer_var;
- break;
- case TYPE_SYS:
- varlist = sys_var;
- break;
- case TYPE_CLOCK:
- varlist = clock_var;
- break;
- default:
- (void) fprintf(stderr, "Unknown datatype(0x%x) in cookedprint\n", datatype);
- return;
- }
-
- (void) fprintf(fp, "status=%04x %s,\n", status,
- statustoa(datatype, status));
-
- startoutput();
- while (nextvar(&length, &data, &name, &value)) {
- varid = findvar(name, varlist);
- if (varid == 0) {
- output_raw = '*';
- } else {
- output_raw = 0;
- fmt = varlist[varid].fmt;
- switch(fmt) {
- case TS:
- if (!decodets(value, &lfp))
- output_raw = '?';
- else
- output(fp, name, prettydate(&lfp));
- break;
- case FL:
- case FU:
- case FS:
- if (!decodetime(value, &lfp))
- output_raw = '?';
- else {
- switch (fmt) {
- case FL:
- output(fp, name,
- lfptoms(&lfp, 3));
- break;
- case FU:
- output(fp, name,
- ulfptoms(&lfp, 3));
- break;
- case FS:
- output(fp, name,
- lfptoms(&lfp, 3));
- break;
- }
- }
- break;
-
- case UI:
- if (!decodeuint(value, &uval))
- output_raw = '?';
- else
- output(fp, name, uinttoa(uval));
- break;
-
- case SI:
- if (!decodeint(value, &ival))
- output_raw = '?';
- else
- output(fp, name, inttoa(ival));
- break;
-
- case HA:
- case NA:
- if (!decodenetnum(value, &hval))
- output_raw = '?';
- else if (fmt == HA){
- output(fp, name, nntohost(&hval));
- } else {
- output(fp, name, stoa(&hval));
- }
- break;
-
- case ST:
- output_raw = '*';
- break;
-
- case RF:
- 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 = '?';
- break;
-
- case LP:
- if (!decodeuint(value, &uval) || uval > 3)
- output_raw = '?';
- else {
- char b[3];
- b[0] = b[1] = '0';
- if (uval & 0x2)
- b[0] = '1';
- if (uval & 0x1)
- b[1] = '1';
- b[2] = '\0';
- output(fp, name, b);
- }
- break;
-
- case OC:
- if (!decodeuint(value, &uval))
- output_raw = '?';
- else {
- char b[10];
-
- (void) sprintf(b, "%03lo", uval);
- output(fp, name, b);
- }
- break;
-
- case MD:
- if (!decodeuint(value, &uval))
- output_raw = '?';
- else
- output(fp, name, uinttoa(uval));
- break;
-
- case AR:
- if (!decodearr(value, &narr, lfparr))
- output_raw = '?';
- else
- outputarr(fp, name, narr, lfparr);
- break;
-
- case FX:
- if (!decodeuint(value, &uval))
- output_raw = '?';
- else
- output(fp, name, tstflags(uval));
- break;
-
- default:
- (void) fprintf(stderr,
- "Internal error in cookedprint, %s=%s, fmt %d\n",
- name, value, fmt);
- break;
- }
-
- }
- if (output_raw != 0) {
- char bn[401];
- char bv[401];
- int len;
-
- atoascii(400, name, bn);
- atoascii(400, value, bv);
- if (output_raw != '*') {
- len = strlen(bv);
- bv[len] = output_raw;
- bv[len+1] = '\0';
- }
- output(fp, bn, bv);
- }
- }
- endoutput(fp);
-}
-
-
-/*
- * sortassoc - sort associations in the cache into ascending order
- */
-void
-sortassoc(void)
-{
- if (numassoc > 1)
- qsort(
-#ifdef QSORT_USES_VOID_P
- (void *)
-#else
- (char *)
-#endif
- assoc_cache, (size_t)numassoc,
- sizeof(struct association), assoccmp);
-}
-
-
-/*
- * assoccmp - compare two associations
- */
-#ifdef QSORT_USES_VOID_P
-static int
-assoccmp(
- const void *t1,
- const void *t2
- )
-{
- const struct association *ass1 = (const struct association *)t1;
- const struct association *ass2 = (const struct association *)t2;
-
- if (ass1->assid < ass2->assid)
- return -1;
- if (ass1->assid > ass2->assid)
- return 1;
- return 0;
-}
-#else
-static int
-assoccmp(
- struct association *ass1,
- struct association *ass2
- )
-{
- if (ass1->assid < ass2->assid)
- return -1;
- if (ass1->assid > ass2->assid)
- return 1;
- return 0;
-}
-#endif /* not QSORT_USES_VOID_P */
diff --git a/contrib/ntp/ntpq/ntpq.h b/contrib/ntp/ntpq/ntpq.h
deleted file mode 100644
index 1bb1028..0000000
--- a/contrib/ntp/ntpq/ntpq.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * ntpq.h - definitions of interest to ntpq
- */
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_control.h"
-#include "ntp_string.h"
-#include "ntp_malloc.h"
-
-/*
- * Maximum number of arguments
- */
-#define MAXARGS 4
-
-/*
- * Flags for forming descriptors.
- */
-#define OPT 0x80 /* this argument is optional, or'd with type */
-
-#define NO 0x0
-#define STR 0x1 /* string argument */
-#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
- */
-typedef union {
- char *string;
- long ival;
- u_long uval;
- struct sockaddr_storage netnum;
-} arg_v;
-
-/*
- * Structure for passing parsed command line
- */
-struct parse {
- const char *keyword;
- arg_v argval[MAXARGS];
- int nargs;
-};
-
-/*
- * ntpdc includes a command parser which could charitably be called
- * crude. The following structure is used to define the command
- * syntax.
- */
-struct xcmd {
- const char *keyword; /* command key word */
- void (*handler) P((struct parse *, FILE *)); /* command handler */
- u_char arg[MAXARGS]; /* descriptors for arguments */
- const char *desc[MAXARGS]; /* descriptions for arguments */
- const char *comment;
-};
-
-/*
- * Structure to hold association data
- */
-struct association {
- u_short assid;
- u_short status;
-};
-
-#define MAXASSOC 1024
-
-/*
- * Structure for translation tables between text format
- * variable indices and text format.
- */
-struct ctl_var {
- u_short code;
- u_short fmt;
- const char *text;
-};
-
-extern void asciize P((int, char *, FILE *));
-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((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 **));
-extern int decodetime P((char *, l_fp *));
-extern void printvars P((int, char *, int, int, FILE *));
-extern int decodeint P((char *, long *));
-extern int findvar P((char *, struct ctl_var *));
diff --git a/contrib/ntp/ntpq/ntpq_ops.c b/contrib/ntp/ntpq/ntpq_ops.c
deleted file mode 100644
index c493631..0000000
--- a/contrib/ntp/ntpq/ntpq_ops.c
+++ /dev/null
@@ -1,1734 +0,0 @@
-/*
- * 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"
-
-extern char * chosts[];
-extern char currenthost[];
-extern int numhosts;
-int maxhostlen;
-
-/*
- * Declarations for command handlers in here
- */
-static int checkassocid P((u_int32));
-static char * strsave P((char *));
-static struct varlist *findlistvar P((struct varlist *, char *));
-static void doaddvlist P((struct varlist *, char *));
-static void dormvlist P((struct varlist *, char *));
-static void doclearvlist P((struct varlist *));
-static void makequerydata P((struct varlist *, int *, char *));
-static int doquerylist P((struct varlist *, int, int, int, u_short *, int *, char **));
-static void doprintvlist P((struct varlist *, FILE *));
-static void addvars P((struct parse *, FILE *));
-static void rmvars P((struct parse *, FILE *));
-static void clearvars P((struct parse *, FILE *));
-static void showvars P((struct parse *, FILE *));
-static int dolist P((struct varlist *, int, int, int, FILE *));
-static void readlist P((struct parse *, FILE *));
-static void writelist P((struct parse *, FILE *));
-static void readvar P((struct parse *, FILE *));
-static void writevar P((struct parse *, FILE *));
-static void clocklist P((struct parse *, FILE *));
-static void clockvar P((struct parse *, FILE *));
-static int findassidrange P((u_int32, u_int32, int *, int *));
-static void mreadlist P((struct parse *, FILE *));
-static void mreadvar P((struct parse *, FILE *));
-static int dogetassoc P((FILE *));
-static void printassoc P((int, FILE *));
-static void associations P((struct parse *, FILE *));
-static void lassociations P((struct parse *, FILE *));
-static void passociations P((struct parse *, FILE *));
-static void lpassociations P((struct parse *, FILE *));
-
-#ifdef UNUSED
-static void radiostatus P((struct parse *, FILE *));
-#endif /* UNUSED */
-
-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 *, 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 *, int));
-static void opeers P((struct parse *, FILE *));
-static void lopeers P((struct parse *, FILE *));
-
-
-/*
- * Commands we understand. Ntpdc imports this.
- */
-struct xcmd opcmds[] = {
- { "associations", associations, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print list of association ID's and statuses for the server's peers" },
- { "passociations", passociations, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print list of associations returned by last associations command" },
- { "lassociations", lassociations, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print list of associations including all client information" },
- { "lpassociations", lpassociations, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print last obtained list of associations, including client information" },
- { "addvars", addvars, { STR, NO, NO, NO },
- { "name[=value][,...]", "", "", "" },
- "add variables to the variable list or change their values" },
- { "rmvars", rmvars, { STR, NO, NO, NO },
- { "name[,...]", "", "", "" },
- "remove variables from the variable list" },
- { "clearvars", clearvars, { NO, NO, NO, NO },
- { "", "", "", "" },
- "remove all variables from the variable list" },
- { "showvars", showvars, { NO, NO, NO, NO },
- { "", "", "", "" },
- "print variables on the variable list" },
- { "readlist", readlist, { OPT|UINT, NO, NO, NO },
- { "assocID", "", "", "" },
- "read the system or peer variables included in the variable list" },
- { "rl", readlist, { OPT|UINT, NO, NO, NO },
- { "assocID", "", "", "" },
- "read the system or peer variables included in the variable list" },
- { "writelist", writelist, { OPT|UINT, NO, NO, NO },
- { "assocID", "", "", "" },
- "write the system or peer variables included in the variable list" },
- { "readvar", readvar, { OPT|UINT, OPT|STR, NO, NO },
- { "assocID", "name=value[,...]", "", "" },
- "read system or peer variables" },
- { "rv", readvar, { OPT|UINT, OPT|STR, NO, NO },
- { "assocID", "name=value[,...]", "", "" },
- "read system or peer variables" },
- { "writevar", writevar, { UINT, STR, NO, NO },
- { "assocID", "name=value,[...]", "", "" },
- "write system or peer variables" },
- { "mreadlist", mreadlist, { UINT, UINT, NO, NO },
- { "assocID", "assocID", "", "" },
- "read the peer variables in the variable list for multiple peers" },
- { "mrl", mreadlist, { UINT, UINT, NO, NO },
- { "assocID", "assocID", "", "" },
- "read the peer variables in the variable list for multiple peers" },
- { "mreadvar", mreadvar, { UINT, UINT, OPT|STR, NO },
- { "assocID", "assocID", "name=value[,...]", "" },
- "read peer variables from multiple peers" },
- { "mrv", mreadvar, { UINT, UINT, OPT|STR, NO },
- { "assocID", "assocID", "name=value[,...]", "" },
- "read peer variables from multiple peers" },
- { "clocklist", clocklist, { OPT|UINT, NO, NO, NO },
- { "assocID", "", "", "" },
- "read the clock variables included in the variable list" },
- { "cl", clocklist, { OPT|UINT, NO, NO, NO },
- { "assocID", "", "", "" },
- "read the clock variables included in the variable list" },
- { "clockvar", clockvar, { OPT|UINT, OPT|STR, NO, NO },
- { "assocID", "name=value[,...]", "", "" },
- "read clock variables" },
- { "cv", clockvar, { OPT|UINT, OPT|STR, NO, NO },
- { "assocID", "name=value[,...]", "", "" },
- "read clock variables" },
- { "pstatus", pstatus, { UINT, NO, NO, NO },
- { "assocID", "", "", "" },
- "print status information returned for a peer" },
- { "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", "", "", "" }, "" }
-};
-
-
-/*
- * Variable list data space
- */
-#define MAXLIST 64 /* maximum number of variables in list */
-#define LENHOSTNAME 256 /* host name is 256 characters long */
-/*
- * Old CTL_PST defines for version 2.
- */
-#define OLD_CTL_PST_CONFIG 0x80
-#define OLD_CTL_PST_AUTHENABLE 0x40
-#define OLD_CTL_PST_AUTHENTIC 0x20
-#define OLD_CTL_PST_REACH 0x10
-#define OLD_CTL_PST_SANE 0x08
-#define OLD_CTL_PST_DISP 0x04
-#define OLD_CTL_PST_SEL_REJECT 0
-#define OLD_CTL_PST_SEL_SELCAND 1
-#define OLD_CTL_PST_SEL_SYNCCAND 2
-#define OLD_CTL_PST_SEL_SYSPEER 3
-
-
-char flash2[] = " .+* "; /* flash decode for version 2 */
-char flash3[] = " x.-+#*o"; /* flash decode for peer status version 3 */
-
-struct varlist {
- char *name;
- char *value;
-} varlist[MAXLIST] = { { 0, 0 } };
-
-/*
- * Imported from ntpq.c
- */
-extern int showhostnames;
-extern int rawmode;
-extern struct servent *server_entry;
-extern struct association assoc_cache[];
-extern int numassoc;
-extern u_char pktversion;
-extern struct ctl_var peer_var[];
-
-/*
- * For quick string comparisons
- */
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-
-/*
- * checkassocid - return the association ID, checking to see if it is valid
- */
-static int
-checkassocid(
- u_int32 value
- )
-{
- if (value == 0 || value >= 65536) {
- (void) fprintf(stderr, "***Invalid association ID specified\n");
- return 0;
- }
- return (int)value;
-}
-
-
-/*
- * strsave - save a string
- * XXX - should be in libntp.a
- */
-static char *
-strsave(
- char *str
- )
-{
- char *cp;
- u_int len;
-
- len = strlen(str) + 1;
- if ((cp = (char *)malloc(len)) == NULL) {
- (void) fprintf(stderr, "Malloc failed!!\n");
- exit(1);
- }
-
- memmove(cp, str, len);
- return (cp);
-}
-
-
-/*
- * findlistvar - look for the named variable in a list and return if found
- */
-static struct varlist *
-findlistvar(
- struct varlist *list,
- char *name
- )
-{
- register struct varlist *vl;
-
- for (vl = list; vl < list + MAXLIST && vl->name != 0; vl++)
- if (STREQ(name, vl->name))
- return vl;
- if (vl < list + MAXLIST)
- return vl;
- return (struct varlist *)0;
-}
-
-
-/*
- * doaddvlist - add variable(s) to the variable list
- */
-static void
-doaddvlist(
- struct varlist *vlist,
- char *vars
- )
-{
- register struct varlist *vl;
- int len;
- char *name;
- char *value;
-
- len = strlen(vars);
- while (nextvar(&len, &vars, &name, &value)) {
- vl = findlistvar(vlist, name);
- if (vl == 0) {
- (void) fprintf(stderr, "Variable list full\n");
- return;
- }
-
- if (vl->name == 0) {
- vl->name = strsave(name);
- } else if (vl->value != 0) {
- free(vl->value);
- vl->value = 0;
- }
-
- if (value != 0)
- vl->value = strsave(value);
- }
-}
-
-
-/*
- * dormvlist - remove variable(s) from the variable list
- */
-static void
-dormvlist(
- struct varlist *vlist,
- char *vars
- )
-{
- register struct varlist *vl;
- int len;
- char *name;
- char *value;
-
- len = strlen(vars);
- while (nextvar(&len, &vars, &name, &value)) {
- vl = findlistvar(vlist, name);
- if (vl == 0 || vl->name == 0) {
- (void) fprintf(stderr, "Variable `%s' not found\n",
- name);
- } else {
- free((void *)vl->name);
- if (vl->value != 0)
- free(vl->value);
- for ( ; (vl+1) < (varlist+MAXLIST)
- && (vl+1)->name != 0; vl++) {
- vl->name = (vl+1)->name;
- vl->value = (vl+1)->value;
- }
- vl->name = vl->value = 0;
- }
- }
-}
-
-
-/*
- * doclearvlist - clear a variable list
- */
-static void
-doclearvlist(
- struct varlist *vlist
- )
-{
- register struct varlist *vl;
-
- for (vl = vlist; vl < vlist + MAXLIST && vl->name != 0; vl++) {
- free((void *)vl->name);
- vl->name = 0;
- if (vl->value != 0) {
- free(vl->value);
- vl->value = 0;
- }
- }
-}
-
-
-/*
- * makequerydata - form a data buffer to be included with a query
- */
-static void
-makequerydata(
- struct varlist *vlist,
- int *datalen,
- char *data
- )
-{
- register struct varlist *vl;
- register char *cp, *cpend;
- register int namelen, valuelen;
- register int totallen;
-
- cp = data;
- cpend = data + *datalen;
-
- for (vl = vlist; vl < vlist + MAXLIST && vl->name != 0; vl++) {
- namelen = strlen(vl->name);
- if (vl->value == 0)
- valuelen = 0;
- else
- valuelen = strlen(vl->value);
- totallen = namelen + valuelen + (valuelen != 0) + (cp != data);
- if (cp + totallen > cpend)
- break;
-
- if (cp != data)
- *cp++ = ',';
- memmove(cp, vl->name, (unsigned)namelen);
- cp += namelen;
- if (valuelen != 0) {
- *cp++ = '=';
- memmove(cp, vl->value, (unsigned)valuelen);
- cp += valuelen;
- }
- }
- *datalen = cp - data;
-}
-
-
-/*
- * doquerylist - send a message including variables in a list
- */
-static int
-doquerylist(
- struct varlist *vlist,
- int op,
- int associd,
- int auth,
- u_short *rstatus,
- int *dsize,
- char **datap
- )
-{
- char data[CTL_MAX_DATA_LEN];
- int datalen;
-
- datalen = sizeof(data);
- makequerydata(vlist, &datalen, data);
-
- return doquery(op, associd, auth, datalen, data, rstatus,
- dsize, datap);
-}
-
-
-/*
- * doprintvlist - print the variables on a list
- */
-static void
-doprintvlist(
- struct varlist *vlist,
- FILE *fp
- )
-{
- register struct varlist *vl;
-
- if (vlist->name == 0) {
- (void) fprintf(fp, "No variables on list\n");
- } else {
- for (vl = vlist; vl < vlist + MAXLIST && vl->name != 0; vl++) {
- if (vl->value == 0) {
- (void) fprintf(fp, "%s\n", vl->name);
- } else {
- (void) fprintf(fp, "%s=%s\n",
- vl->name, vl->value);
- }
- }
- }
-}
-
-
-/*
- * addvars - add variables to the variable list
- */
-/*ARGSUSED*/
-static void
-addvars(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doaddvlist(varlist, pcmd->argval[0].string);
-}
-
-
-/*
- * rmvars - remove variables from the variable list
- */
-/*ARGSUSED*/
-static void
-rmvars(
- struct parse *pcmd,
- FILE *fp
- )
-{
- dormvlist(varlist, pcmd->argval[0].string);
-}
-
-
-/*
- * clearvars - clear the variable list
- */
-/*ARGSUSED*/
-static void
-clearvars(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doclearvlist(varlist);
-}
-
-
-/*
- * showvars - show variables on the variable list
- */
-/*ARGSUSED*/
-static void
-showvars(
- struct parse *pcmd,
- FILE *fp
- )
-{
- doprintvlist(varlist, fp);
-}
-
-
-/*
- * dolist - send a request with the given list of variables
- */
-static int
-dolist(
- struct varlist *vlist,
- int associd,
- int op,
- int type,
- FILE *fp
- )
-{
- char *datap;
- int res;
- int dsize;
- u_short rstatus;
-
- res = doquerylist(vlist, op, associd, 0, &rstatus, &dsize, &datap);
-
- if (res != 0)
- return 0;
-
- if (dsize == 0) {
- if (associd == 0)
- (void) fprintf(fp, "No system%s variables returned\n",
- (type == TYPE_CLOCK) ? " clock" : "");
- else
- (void) fprintf(fp,
- "No information returned for%s association %u\n",
- (type == TYPE_CLOCK) ? " clock" : "", associd);
- return 1;
- }
-
- printvars(dsize, datap, (int)rstatus, type, fp);
- return 1;
-}
-
-
-/*
- * readlist - send a read variables request with the variables on the list
- */
-static void
-readlist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int associd;
-
- if (pcmd->nargs == 0) {
- associd = 0;
- } else {
- /* HMS: I think we want the u_int32 target here, not the u_long */
- if (pcmd->argval[0].uval == 0)
- associd = 0;
- else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
- }
-
- (void) dolist(varlist, associd, CTL_OP_READVAR,
- (associd == 0) ? TYPE_SYS : TYPE_PEER, fp);
-}
-
-
-/*
- * writelist - send a write variables request with the variables on the list
- */
-static void
-writelist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *datap;
- int res;
- int associd;
- int dsize;
- u_short rstatus;
-
- if (pcmd->nargs == 0) {
- associd = 0;
- } else {
- /* HMS: Do we really want uval here? */
- if (pcmd->argval[0].uval == 0)
- associd = 0;
- else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
- }
-
- res = doquerylist(varlist, CTL_OP_WRITEVAR, associd, 1, &rstatus,
- &dsize, &datap);
-
- if (res != 0)
- return;
-
- if (dsize == 0)
- (void) fprintf(fp, "done! (no data returned)\n");
- else
- printvars(dsize, datap, (int)rstatus,
- (associd != 0) ? TYPE_PEER : TYPE_SYS, fp);
- return;
-}
-
-
-/*
- * readvar - send a read variables request with the specified variables
- */
-static void
-readvar(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int associd;
- struct varlist tmplist[MAXLIST];
-
- /* HMS: uval? */
- if (pcmd->nargs == 0 || pcmd->argval[0].uval == 0)
- associd = 0;
- else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
-
- memset((char *)tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
-
- (void) dolist(tmplist, associd, CTL_OP_READVAR,
- (associd == 0) ? TYPE_SYS : TYPE_PEER, fp);
-
- doclearvlist(tmplist);
-}
-
-
-/*
- * writevar - send a write variables request with the specified variables
- */
-static void
-writevar(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *datap;
- int res;
- int associd;
- int dsize;
- u_short rstatus;
- struct varlist tmplist[MAXLIST];
-
- /* HMS: uval? */
- if (pcmd->argval[0].uval == 0)
- associd = 0;
- else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
-
- memset((char *)tmplist, 0, sizeof(tmplist));
- doaddvlist(tmplist, pcmd->argval[1].string);
-
- res = doquerylist(tmplist, CTL_OP_WRITEVAR, associd, 1, &rstatus,
- &dsize, &datap);
-
- doclearvlist(tmplist);
-
- if (res != 0)
- return;
-
- if (dsize == 0)
- (void) fprintf(fp, "done! (no data returned)\n");
- else
- printvars(dsize, datap, (int)rstatus,
- (associd != 0) ? TYPE_PEER : TYPE_SYS, fp);
- return;
-}
-
-
-/*
- * clocklist - send a clock variables request with the variables on the list
- */
-static void
-clocklist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int associd;
-
- /* HMS: uval? */
- if (pcmd->nargs == 0) {
- associd = 0;
- } else {
- if (pcmd->argval[0].uval == 0)
- associd = 0;
- else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
- }
-
- (void) dolist(varlist, associd, CTL_OP_READCLOCK, TYPE_CLOCK, fp);
-}
-
-
-/*
- * clockvar - send a clock variables request with the specified variables
- */
-static void
-clockvar(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int associd;
- struct varlist tmplist[MAXLIST];
-
- /* HMS: uval? */
- if (pcmd->nargs == 0 || pcmd->argval[0].uval == 0)
- associd = 0;
- else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
-
- memset((char *)tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
-
- (void) dolist(tmplist, associd, CTL_OP_READCLOCK, TYPE_CLOCK, fp);
-
- doclearvlist(tmplist);
-}
-
-
-/*
- * findassidrange - verify a range of association ID's
- */
-static int
-findassidrange(
- u_int32 assid1,
- u_int32 assid2,
- int *from,
- int *to
- )
-{
- register int i;
- int f, t;
-
- if (assid1 == 0 || assid1 > 65535) {
- (void) fprintf(stderr,
- "***Invalid association ID %lu specified\n", (u_long)assid1);
- return 0;
- }
-
- if (assid2 == 0 || assid2 > 65535) {
- (void) fprintf(stderr,
- "***Invalid association ID %lu specified\n", (u_long)assid2);
- return 0;
- }
-
- f = t = -1;
- for (i = 0; i < numassoc; i++) {
- if (assoc_cache[i].assid == assid1) {
- f = i;
- if (t != -1)
- break;
- }
- if (assoc_cache[i].assid == assid2) {
- t = i;
- if (f != -1)
- break;
- }
- }
-
- if (f == -1 || t == -1) {
- (void) fprintf(stderr,
- "***Association ID %lu not found in list\n",
- (f == -1) ? (u_long)assid1 : (u_long)assid2);
- return 0;
- }
-
- if (f < t) {
- *from = f;
- *to = t;
- } else {
- *from = t;
- *to = f;
- }
- return 1;
-}
-
-
-
-/*
- * mreadlist - send a read variables request for multiple associations
- */
-static void
-mreadlist(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int i;
- int from;
- int to;
-
- /* HMS: uval? */
- if (!findassidrange(pcmd->argval[0].uval, pcmd->argval[1].uval,
- &from, &to))
- return;
-
- for (i = from; i <= to; i++) {
- if (i != from)
- (void) fprintf(fp, "\n");
- if (!dolist(varlist, (int)assoc_cache[i].assid,
- CTL_OP_READVAR, TYPE_PEER, fp))
- return;
- }
- return;
-}
-
-
-/*
- * mreadvar - send a read variables request for multiple associations
- */
-static void
-mreadvar(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int i;
- int from;
- int to;
- struct varlist tmplist[MAXLIST];
-
- /* HMS: uval? */
- if (!findassidrange(pcmd->argval[0].uval, pcmd->argval[1].uval,
- &from, &to))
- return;
-
- memset((char *)tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 3)
- doaddvlist(tmplist, pcmd->argval[2].string);
-
- for (i = from; i <= to; i++) {
- if (i != from)
- (void) fprintf(fp, "\n");
- if (!dolist(varlist, (int)assoc_cache[i].assid,
- CTL_OP_READVAR, TYPE_PEER, fp))
- break;
- }
- doclearvlist(tmplist);
- return;
-}
-
-
-/*
- * dogetassoc - query the host for its list of associations
- */
-static int
-dogetassoc(
- FILE *fp
- )
-{
- u_short *datap;
- int res;
- int dsize;
- u_short rstatus;
-
- res = doquery(CTL_OP_READSTAT, 0, 0, 0, (char *)0, &rstatus,
- &dsize, (void *)&datap);
-
- if (res != 0)
- return 0;
-
- if (dsize == 0) {
- (void) fprintf(fp, "No association ID's returned\n");
- return 0;
- }
-
- if (dsize & 0x3) {
- (void) fprintf(stderr,
- "***Server returned %d octets, should be multiple of 4\n",
- dsize);
- return 0;
- }
-
- numassoc = 0;
- while (dsize > 0) {
- assoc_cache[numassoc].assid = ntohs(*datap);
- datap++;
- assoc_cache[numassoc].status = ntohs(*datap);
- datap++;
- if (++numassoc >= MAXASSOC)
- break;
- dsize -= sizeof(u_short) + sizeof(u_short);
- }
- sortassoc();
- return 1;
-}
-
-
-/*
- * printassoc - print the current list of associations
- */
-static void
-printassoc(
- int showall,
- FILE *fp
- )
-{
- register char *bp;
- int i;
- u_char statval;
- int event;
- u_long event_count;
- const char *conf;
- const char *reach;
- const char *auth;
- const char *condition = "";
- const char *last_event;
- const char *cnt;
- char buf[128];
-
- if (numassoc == 0) {
- (void) fprintf(fp, "No association ID's in list\n");
- return;
- }
-
- /*
- * Output a header
- */
- (void) fprintf(fp,
- "ind assID status conf reach auth condition last_event cnt\n");
- (void) fprintf(fp,
- "===========================================================\n");
- for (i = 0; i < numassoc; i++) {
- 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);
- event_count = CTL_PEER_NEVNT(assoc_cache[i].status);
- if (statval & CTL_PST_CONFIG)
- conf = "yes";
- else
- conf = "no";
- if (statval & CTL_PST_REACH || 1) {
- reach = "yes";
- if (statval & CTL_PST_AUTHENABLE) {
- if (statval & CTL_PST_AUTHENTIC)
- auth = "ok ";
- else
- auth = "bad";
- } else
- auth = "none";
-
- if (pktversion > NTP_OLDVERSION)
- switch (statval & 0x7) {
- case CTL_PST_SEL_REJECT:
- condition = "reject";
- break;
- case CTL_PST_SEL_SANE:
- condition = "falsetick";
- break;
- case CTL_PST_SEL_CORRECT:
- condition = "excess";
- break;
- case CTL_PST_SEL_SELCAND:
- condition = "outlyer";
- break;
- case CTL_PST_SEL_SYNCCAND:
- condition = "candidat";
- break;
- case CTL_PST_SEL_DISTSYSPEER:
- condition = "selected";
- break;
- case CTL_PST_SEL_SYSPEER:
- condition = "sys.peer";
- break;
- case CTL_PST_SEL_PPS:
- condition = "pps.peer";
- break;
- }
- else
- switch (statval & 0x3) {
- case OLD_CTL_PST_SEL_REJECT:
- if (!(statval & OLD_CTL_PST_SANE))
- condition = "insane";
- else if (!(statval & OLD_CTL_PST_DISP))
- condition = "hi_disp";
- else
- condition = "";
- break;
- case OLD_CTL_PST_SEL_SELCAND:
- condition = "sel_cand";
- break;
- case OLD_CTL_PST_SEL_SYNCCAND:
- condition = "sync_cand";
- break;
- case OLD_CTL_PST_SEL_SYSPEER:
- condition = "sys_peer";
- break;
- }
-
- } else {
- reach = "no";
- auth = condition = "";
- }
-
- switch (PEER_EVENT|event) {
- case EVNT_PEERIPERR:
- last_event = "IP error";
- break;
- case EVNT_PEERAUTH:
- last_event = "auth fail";
- break;
- case EVNT_UNREACH:
- last_event = "lost reach";
- break;
- case EVNT_REACH:
- last_event = "reachable";
- break;
- case EVNT_PEERCLOCK:
- last_event = "clock expt";
- break;
-#if 0
- case EVNT_PEERSTRAT:
- last_event = "stratum chg";
- break;
-#endif
- default:
- last_event = "";
- break;
- }
-
- if (event_count != 0)
- cnt = uinttoa(event_count);
- else
- cnt = "";
- (void) sprintf(buf,
- "%3d %5u %04x %3.3s %4s %4.4s %9.9s %11s %2s",
- i+1, assoc_cache[i].assid, assoc_cache[i].status,
- conf, reach, auth, condition, last_event, cnt);
- bp = &buf[strlen(buf)];
- while (bp > buf && *(bp-1) == ' ')
- *(--bp) = '\0';
- (void) fprintf(fp, "%s\n", buf);
- }
-}
-
-
-
-/*
- * associations - get, record and print a list of associations
- */
-/*ARGSUSED*/
-static void
-associations(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (dogetassoc(fp))
- printassoc(0, fp);
-}
-
-
-/*
- * lassociations - get, record and print a long list of associations
- */
-/*ARGSUSED*/
-static void
-lassociations(
- struct parse *pcmd,
- FILE *fp
- )
-{
- if (dogetassoc(fp))
- printassoc(1, fp);
-}
-
-
-/*
- * passociations - print the association list
- */
-/*ARGSUSED*/
-static void
-passociations(
- struct parse *pcmd,
- FILE *fp
- )
-{
- printassoc(0, fp);
-}
-
-
-/*
- * lpassociations - print the long association list
- */
-/*ARGSUSED*/
-static void
-lpassociations(
- struct parse *pcmd,
- FILE *fp
- )
-{
- printassoc(1, fp);
-}
-
-
-#ifdef UNUSED
-/*
- * radiostatus - print the radio status returned by the server
- */
-/*ARGSUSED*/
-static void
-radiostatus(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *datap;
- int res;
- int dsize;
- u_short rstatus;
-
- res = doquery(CTL_OP_READCLOCK, 0, 0, 0, (char *)0, &rstatus,
- &dsize, &datap);
-
- if (res != 0)
- return;
-
- if (dsize == 0) {
- (void) fprintf(fp, "No radio status string returned\n");
- return;
- }
-
- asciize(dsize, datap, fp);
-}
-#endif /* UNUSED */
-
-/*
- * pstatus - print peer status returned by the server
- */
-static void
-pstatus(
- struct parse *pcmd,
- FILE *fp
- )
-{
- char *datap;
- int res;
- int associd;
- int dsize;
- u_short rstatus;
-
- /* HMS: uval? */
- if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
- return;
-
- res = doquery(CTL_OP_READSTAT, associd, 0, 0, (char *)0, &rstatus,
- &dsize, &datap);
-
- if (res != 0)
- return;
-
- if (dsize == 0) {
- (void) fprintf(fp,
- "No information returned for association %u\n",
- associd);
- return;
- }
-
- printvars(dsize, datap, (int)rstatus, TYPE_PEER, fp);
-}
-
-
-/*
- * when - print how long its been since his last packet arrived
- */
-static long
-when(
- l_fp *ts,
- l_fp *rec,
- l_fp *reftime
- )
-{
- l_fp *lasttime;
-
- if (rec->l_ui != 0)
- lasttime = rec;
- else if (reftime->l_ui != 0)
- lasttime = reftime;
- else
- return 0;
-
- return (ts->l_ui - lasttime->l_ui);
-}
-
-
-/*
- * Pretty-print an interval into the given buffer, in a human-friendly format.
- */
-static char *
-prettyinterval(
- char *buf,
- long diff
- )
-{
- if (diff <= 0) {
- buf[0] = '-';
- buf[1] = 0;
- return buf;
- }
-
- if (diff <= 2048) {
- (void) sprintf(buf, "%ld", (long int)diff);
- return buf;
- }
-
- diff = (diff + 29) / 60;
- if (diff <= 300) {
- (void) sprintf(buf, "%ldm", (long int)diff);
- return buf;
- }
-
- diff = (diff + 29) / 60;
- if (diff <= 96) {
- (void) sprintf(buf, "%ldh", (long int)diff);
- return buf;
- }
-
- diff = (diff + 11) / 24;
- (void) sprintf(buf, "%ldd", (long int)diff);
- 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
- */
-struct varlist opeervarlist[] = {
- { "srcadr", 0 }, /* 0 */
- { "dstadr", 0 }, /* 1 */
- { "stratum", 0 }, /* 2 */
- { "hpoll", 0 }, /* 3 */
- { "ppoll", 0 }, /* 4 */
- { "reach", 0 }, /* 5 */
- { "delay", 0 }, /* 6 */
- { "offset", 0 }, /* 7 */
- { "jitter", 0 }, /* 8 */
- { "dispersion", 0 }, /* 9 */
- { "rec", 0 }, /* 10 */
- { "reftime", 0 }, /* 11 */
- { "srcport", 0 }, /* 12 */
- { 0, 0 }
-};
-
-struct varlist peervarlist[] = {
- { "srcadr", 0 }, /* 0 */
- { "refid", 0 }, /* 1 */
- { "stratum", 0 }, /* 2 */
- { "hpoll", 0 }, /* 3 */
- { "ppoll", 0 }, /* 4 */
- { "reach", 0 }, /* 5 */
- { "delay", 0 }, /* 6 */
- { "offset", 0 }, /* 7 */
- { "jitter", 0 }, /* 8 */
- { "dispersion", 0 }, /* 9 */
- { "rec", 0 }, /* 10 */
- { "reftime", 0 }, /* 11 */
- { "srcport", 0 }, /* 12 */
- { 0, 0 }
-};
-
-#define HAVE_SRCADR 0
-#define HAVE_DSTADR 1
-#define HAVE_REFID 1
-#define HAVE_STRATUM 2
-#define HAVE_HPOLL 3
-#define HAVE_PPOLL 4
-#define HAVE_REACH 5
-#define HAVE_DELAY 6
-#define HAVE_OFFSET 7
-#define HAVE_JITTER 8
-#define HAVE_DISPERSION 9
-#define HAVE_REC 10
-#define HAVE_REFTIME 11
-#define HAVE_SRCPORT 12
-#define MAXHAVE 13
-
-/*
- * Decode an incoming data buffer and print a line in the peer list
- */
-static int
-doprintpeers(
- struct varlist *pvl,
- int associd,
- int rstatus,
- int datalen,
- char *data,
- FILE *fp,
- int af
- )
-{
- char *name;
- char *value = NULL;
- int i;
- int c;
-
- 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;
- l_fp estdisp;
- l_fp reftime;
- l_fp rec;
- l_fp ts;
- u_char havevar[MAXHAVE];
- u_long poll_sec;
- 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)) {
- struct sockaddr_storage dum_store;
-
- i = findvar(name, peer_var);
- if (i == 0)
- continue; /* don't know this one */
- switch (i) {
- case CP_SRCADR:
- if (decodenetnum(value, &srcadr))
- havevar[HAVE_SRCADR] = 1;
- break;
- case CP_DSTADR:
- if (decodenetnum(value, &dum_store))
- type = decodeaddrtype(&dum_store);
- if (pvl == opeervarlist) {
- if (decodenetnum(value, &dstadr)) {
- havevar[HAVE_DSTADR] = 1;
- dstadr_refid = stoa(&dstadr);
- }
- }
- break;
- case CP_REFID:
- if (pvl == peervarlist) {
- havevar[HAVE_REFID] = 1;
- if (*value == '\0') {
- dstadr_refid = "0.0.0.0";
- } else if (decodenetnum(value, &dstadr)) {
- 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 =
- stoa(&dstadr);
- } else if ((int)strlen(value) <= 4) {
- refid_string[0] = '.';
- (void) strcpy(&refid_string[1], value);
- i = strlen(refid_string);
- refid_string[i] = '.';
- refid_string[i+1] = '\0';
- dstadr_refid = refid_string;
- } else {
- havevar[HAVE_REFID] = 0;
- }
- }
- break;
- case CP_STRATUM:
- if (decodeuint(value, &stratum))
- havevar[HAVE_STRATUM] = 1;
- break;
- case CP_HPOLL:
- if (decodeint(value, &hpoll)) {
- havevar[HAVE_HPOLL] = 1;
- if (hpoll < 0)
- hpoll = NTP_MINPOLL;
- }
- break;
- case CP_PPOLL:
- if (decodeint(value, &ppoll)) {
- havevar[HAVE_PPOLL] = 1;
- if (ppoll < 0)
- ppoll = NTP_MINPOLL;
- }
- break;
- case CP_REACH:
- if (decodeuint(value, &reach))
- havevar[HAVE_REACH] = 1;
- break;
- case CP_DELAY:
- if (decodetime(value, &estdelay))
- havevar[HAVE_DELAY] = 1;
- break;
- case CP_OFFSET:
- if (decodetime(value, &estoffset))
- havevar[HAVE_OFFSET] = 1;
- break;
- case CP_JITTER:
- if (decodetime(value, &estjitter))
- havevar[HAVE_JITTER] = 1;
- break;
- case CP_DISPERSION:
- if (decodetime(value, &estdisp))
- havevar[HAVE_DISPERSION] = 1;
- break;
- case CP_REC:
- if (decodets(value, &rec))
- havevar[HAVE_REC] = 1;
- break;
- case CP_SRCPORT:
- if (decodeuint(value, &srcport))
- havevar[HAVE_SRCPORT] = 1;
- break;
- case CP_REFTIME:
- havevar[HAVE_REFTIME] = 1;
- if (!decodets(value, &reftime))
- L_CLR(&reftime);
- break;
- default:
- break;
- }
- }
-
- /*
- * Check to see if the srcport is NTP's port. If not this probably
- * isn't a valid peer association.
- */
- if (havevar[HAVE_SRCPORT] && srcport != NTP_PORT)
- return (1);
-
- /*
- * Got everything, format the line
- */
- poll_sec = 1<<max(min3(ppoll, hpoll, NTP_MAXPOLL), NTP_MINPOLL);
- if (pktversion > NTP_OLDVERSION)
- c = flash3[CTL_PEER_STATVAL(rstatus) & 0x7];
- else
- c = flash2[CTL_PEER_STATVAL(rstatus) & 0x3];
- if (numhosts > 1)
- (void) fprintf(fp, "%-*s ", maxhostlen, currenthost);
- 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
-#undef HAVE_DSTADR
-#undef HAVE_STRATUM
-#undef HAVE_PPOLL
-#undef HAVE_HPOLL
-#undef HAVE_REACH
-#undef HAVE_ESTDELAY
-#undef HAVE_ESTOFFSET
-#undef HAVE_JITTER
-#undef HAVE_ESTDISP
-#undef HAVE_REFID
-#undef HAVE_REC
-#undef HAVE_SRCPORT
-#undef HAVE_REFTIME
-#undef MAXHAVE
-
-
-/*
- * dogetpeers - given an association ID, read and print the spreadsheet
- * peer variables.
- */
-static int
-dogetpeers(
- struct varlist *pvl,
- int associd,
- FILE *fp,
- int af
- )
-{
- char *datap;
- int res;
- int dsize;
- u_short rstatus;
-
-#ifdef notdef
- res = doquerylist(pvl, CTL_OP_READVAR, associd, 0, &rstatus,
- &dsize, &datap);
-#else
- /*
- * Damn fuzzballs
- */
- res = doquery(CTL_OP_READVAR, associd, 0, 0, (char *)0, &rstatus,
- &dsize, &datap);
-#endif
-
- if (res != 0)
- return 0;
-
- if (dsize == 0) {
- (void) fprintf(stderr,
- "***No information returned for association %d\n",
- associd);
- return 0;
- }
-
- return doprintpeers(pvl, associd, (int)rstatus, dsize, datap, fp, af);
-}
-
-
-/*
- * peers - print a peer spreadsheet
- */
-static void
-dopeers(
- int showall,
- FILE *fp,
- int af
- )
-{
- register int i;
- char fullname[LENHOSTNAME];
- struct sockaddr_storage netnum;
-
- if (!dogetassoc(fp))
- return;
-
- for (i = 0; i < numhosts; ++i) {
- if (getnetnum(chosts[i], &netnum, fullname, af))
- if ((int)strlen(fullname) > maxhostlen)
- maxhostlen = strlen(fullname);
- }
- 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, "=");
- (void) fprintf(fp,
- "==============================================================================\n");
-
- for (i = 0; i < numassoc; i++) {
- if (!showall &&
- !(CTL_PEER_STATVAL(assoc_cache[i].status)
- & (CTL_PST_CONFIG|CTL_PST_REACH)))
- continue;
- if (!dogetpeers(peervarlist, (int)assoc_cache[i].assid, fp, af)) {
- return;
- }
- }
- return;
-}
-
-
-/*
- * peers - print a peer spreadsheet
- */
-/*ARGSUSED*/
-static void
-peers(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int af = 0;
-
- if (pcmd->nargs == 1) {
- if (pcmd->argval->ival == 6)
- af = AF_INET6;
- else
- af = AF_INET;
- }
- dopeers(0, fp, af);
-}
-
-
-/*
- * lpeers - print a peer spreadsheet including all fuzzball peers
- */
-/*ARGSUSED*/
-static void
-lpeers(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int af = 0;
-
- if (pcmd->nargs == 1) {
- if (pcmd->argval->ival == 6)
- af = AF_INET6;
- else
- af = AF_INET;
- }
- dopeers(1, fp, af);
-}
-
-
-/*
- * opeers - print a peer spreadsheet
- */
-static void
-doopeers(
- int showall,
- FILE *fp,
- int af
- )
-{
- register int i;
-
- if (!dogetassoc(fp))
- return;
-
- (void) fprintf(fp,
- " remote local st t when poll reach delay offset disp\n");
- (void) fprintf(fp,
- "==============================================================================\n");
-
- for (i = 0; i < numassoc; i++) {
- if (!showall &&
- !(CTL_PEER_STATVAL(assoc_cache[i].status)
- & (CTL_PST_CONFIG|CTL_PST_REACH)))
- continue;
- if (!dogetpeers(opeervarlist, (int)assoc_cache[i].assid, fp, af)) {
- return;
- }
- }
- return;
-}
-
-
-/*
- * opeers - print a peer spreadsheet the old way
- */
-/*ARGSUSED*/
-static void
-opeers(
- struct parse *pcmd,
- FILE *fp
- )
-{
- int af = 0;
-
- if (pcmd->nargs == 1) {
- if (pcmd->argval->ival == 6)
- af = AF_INET6;
- else
- af = AF_INET;
- }
- doopeers(0, fp, af);
-}
-
-
-/*
- * lopeers - print a peer spreadsheet including all fuzzball peers
- */
-/*ARGSUSED*/
-static void
-lopeers(
- struct parse *pcmd,
- FILE *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/ntptrace/Makefile.am b/contrib/ntp/ntptrace/Makefile.am
deleted file mode 100644
index fed8321..0000000
--- a/contrib/ntp/ntptrace/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntptrace
-INCLUDES = -I$(top_srcdir)/include
-# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a
-DISTCLEANFILES = .version version.c
-noinst_HEADERS = ntptrace.h
-#EXTRA_DIST = ntptrace.mak README TAGS save
-ETAGS_ARGS = Makefile.am
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-version.o: $(ntptrace_OBJECTS) ../libntp/libntp.a Makefile
- env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntptrace
- $(COMPILE) -c version.c
diff --git a/contrib/ntp/ntptrace/Makefile.in b/contrib/ntp/ntptrace/Makefile.in
deleted file mode 100644
index 06c1deb..0000000
--- a/contrib/ntp/ntptrace/Makefile.in
+++ /dev/null
@@ -1,369 +0,0 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# 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@
-
-#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@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_HEADER = $(INSTALL_DATA)
-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@
-AMTAR = @AMTAR@
-AUTOKEY = @AUTOKEY@
-AWK = @AWK@
-CC = @CC@
-CFLAGS = @CFLAGS@
-CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
-CPP = @CPP@
-DCFD = @DCFD@
-DEPDIR = @DEPDIR@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
-EXEEXT = @EXEEXT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBPARSE = @LIBPARSE@
-LIBRSAREF = @LIBRSAREF@
-LN_S = @LN_S@
-MAKE_ADJTIMED = @MAKE_ADJTIMED@
-MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
-MAKE_LIBPARSE = @MAKE_LIBPARSE@
-MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
-MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
-MAKE_NTPTIME = @MAKE_NTPTIME@
-MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@
-MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
-MAKE_TICKADJ = @MAKE_TICKADJ@
-MAKE_TIMETRIM = @MAKE_TIMETRIM@
-OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
-PACKAGE = @PACKAGE@
-PATH_PERL = @PATH_PERL@
-PATH_SH = @PATH_SH@
-PROPDELAY = @PROPDELAY@
-RANLIB = @RANLIB@
-RSADIR = @RSADIR@
-RSAOBJS = @RSAOBJS@
-RSAREF = @RSAREF@
-RSASRCS = @RSASRCS@
-TESTDCF = @TESTDCF@
-U = @U@
-VERSION = @VERSION@
-am__include = @am__include@
-am__quote = @am__quote@
-install_sh = @install_sh@
-
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-bin_PROGRAMS = ntptrace
-INCLUDES = -I$(top_srcdir)/include
-# LDADD might need RESLIB and ADJLIB
-LDADD = version.o ../libntp/libntp.a
-DISTCLEANFILES = .version version.c
-noinst_HEADERS = ntptrace.h
-#EXTRA_DIST = ntptrace.mak README TAGS save
-ETAGS_ARGS = Makefile.am
-subdir = ntptrace
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-bin_PROGRAMS = ntptrace$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-ntptrace_SOURCES = ntptrace.c
-ntptrace_OBJECTS = ntptrace$U.$(OBJEXT)
-ntptrace_LDADD = $(LDADD)
-ntptrace_DEPENDENCIES = version.o ../libntp/libntp.a
-ntptrace_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)/ntptrace$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 = ntptrace.c
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in
-SOURCES = ntptrace.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu ntptrace/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-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 '$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
- else :; fi; \
- done
-
-uninstall-binPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(bin_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed '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)
-ntptrace$(EXEEXT): $(ntptrace_OBJECTS) $(ntptrace_DEPENDENCIES)
- @rm -f ntptrace$(EXEEXT)
- $(LINK) $(ntptrace_LDFLAGS) $(ntptrace_OBJECTS) $(ntptrace_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -rm -f *_.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ntptrace$U.Po@am__quote@
-
-distclean-depend:
- -rm -rf $(DEPDIR)
-
-.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)/'`$<
-
-.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@
-ntptrace_.c: ntptrace.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ntptrace.c; then echo $(srcdir)/ntptrace.c; else echo ntptrace.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ntptrace_.c || rm -f ntptrace_.c
-ntptrace_.$(OBJEXT) : $(ANSI2KNR)
-uninstall-info-am:
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(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)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(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)
-
-GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
-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; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
- fi; \
- if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || 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 $(PROGRAMS) $(HEADERS)
-
-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)" \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
- -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."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
- 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
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
-
-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 \
- 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
-
-
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-version.o: $(ntptrace_OBJECTS) ../libntp/libntp.a Makefile
- env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntptrace
- $(COMPILE) -c version.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/ntptrace/README b/contrib/ntp/ntptrace/README
deleted file mode 100644
index 523f840..0000000
--- a/contrib/ntp/ntptrace/README
+++ /dev/null
@@ -1,7 +0,0 @@
-README file for directory ./ntptrace of the NTP Version 4 distribution
-
-This directory contains the sources for the ntptrace utility program. See
-the README and RELNOTES files in the parent directory for directions on
-how to make and install this program. The current version number of this
-program is in the version.c file.
-
diff --git a/contrib/ntp/ntptrace/ntptrace.c b/contrib/ntp/ntptrace/ntptrace.c
deleted file mode 100644
index 8115c50..0000000
--- a/contrib/ntp/ntptrace/ntptrace.c
+++ /dev/null
@@ -1,802 +0,0 @@
-/*
- * ntptrace - show the chain from an NTP host leading back to
- * its source of time
- *
- * Jeffrey Mogul DECWRL 13 January 1993
- *
- * Inspired by a script written by Glenn Trewitt
- *
- * Large portions stolen from ntpdate.c
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntptrace.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-#include "recvbuff.h"
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#include <netdb.h>
-#ifdef HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-#else
-# include <signal.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-/*
- * only 16 stratums, so this is more than enough.
- */
-int maxhosts = 20;
-
-/*
- * Debugging flag
- */
-volatile int debug = 0;
-
-#ifndef SYS_VXWORKS
-int nonames = 0; /* if set, don't print hostnames */
-#else
-int nonames = 1; /* if set, don't print hostnames */
-#endif
-/*
- * Program name.
- */
-char *progname;
-
-/*
- * Systemwide parameters and flags
- */
-int sys_retries = 5; /* # of retry attempts per server */
-int sys_timeout = 2; /* timeout time, in seconds */
-struct server **sys_servers; /* the server list */
-int sys_numservers = 0; /* number of servers to poll */
-int sys_maxservers = STRATUM_UNSPEC; /* max number of servers to deal with */
-int sys_version = NTP_OLDVERSION; /* version to poll with */
-
-
-/*
- * File descriptor masks etc. for call to select
- */
-int fd;
-fd_set fdmask;
-
-/*
- * Miscellaneous flags
- */
-int verbose = 0;
-int always_step = 0;
-
-int ntptracemain P((int, char **));
-static void DoTrace P((struct server *));
-static void DoTransmit P((struct server *));
-static int DoReceive P((struct server *));
-static int ReceiveBuf P((struct server *, struct recvbuf *));
-static struct server *addserver P((struct in_addr *));
-static struct server *addservbyname P((const char *));
-static void setup_io P((void));
-static void sendpkt P((struct sockaddr_in *, struct pkt *, int));
-static int getipaddr P((const char *, u_int32 *));
-static int decodeipaddr P((const char *, u_int32 *));
-static void printserver P((struct server *, FILE *));
-static void printrefid P((FILE *, struct server *));
-void input_handler P((l_fp * x));
-
-#ifdef SYS_WINNT
-int on = 1;
-WORD wVersionRequested;
-WSADATA wsaData;
-
-HANDLE TimerThreadHandle = NULL; /* 1998/06/03 - Used in ntplib/machines.c */
-void timer(void) { ; }; /* 1998/06/03 - Used in ntplib/machines.c */
-#endif /* SYS_WINNT */
-
-void
-input_handler(l_fp * x)
-{ ;
-}
-
-#ifdef NO_MAIN_ALLOWED
-CALL(ntptrace,"ntptrace",ntptracemain);
-#endif
-
-/*
- * Main program. Initialize us and loop waiting for I/O and/or
- * timer expiries.
- */
-#ifndef NO_MAIN_ALLOWED
-int
-main(
- int argc,
- char *argv[]
- )
-{
- return ntptracemain(argc, argv);
-}
-#endif
-
-int
-ntptracemain(
- int argc,
- char *argv[]
- )
-{
- struct server *firstserver;
- int errflg;
- int c;
-
- errflg = 0;
- progname = argv[0];
-
- /*
- * Decode argument list
- */
- while ((c = ntp_getopt(argc, argv, "dm:no:r:t:v")) != EOF)
- switch (c) {
- case 'd':
- ++debug;
- break;
- case 'm':
- maxhosts = atoi(ntp_optarg);
- break;
- case 'n':
- nonames = 1;
- break;
- case 'o':
- sys_version = atoi(ntp_optarg);
- break;
- case 'r':
- sys_retries = atoi(ntp_optarg);
- if (sys_retries < 1) {
- (void)fprintf(stderr,
- "%s: retries (%d) too small\n",
- progname, sys_retries);
- errflg++;
- }
- break;
- case 't':
- sys_timeout = atoi(ntp_optarg);
- if (sys_timeout < 1) {
- (void)fprintf(stderr,
- "%s: timeout (%d) too short\n",
- progname, sys_timeout);
- errflg++;
- }
- break;
- case 'v':
- verbose = 1;
- break;
- case '?':
- ++errflg;
- break;
- default:
- break;
- }
-
- if (errflg || (argc - ntp_optind) > 1) {
- (void) fprintf(stderr,
- "usage: %s [-dnv] [-m maxhosts] [-o version#] [-r retries] [-t timeout] [server]\n",
- progname);
- exit(2);
- }
-
-#ifdef SYS_WINNT
- wVersionRequested = MAKEWORD(1,1);
- if (WSAStartup(wVersionRequested, &wsaData)) {
- msyslog(LOG_ERR, "No useable winsock.dll: %m");
- exit(1);
- }
-#endif /* SYS_WINNT */
-
- sys_servers = (struct server **)
- emalloc(sys_maxservers * sizeof(struct server *));
-
- if (debug) {
-#ifdef HAVE_SETVBUF
- static char buf[BUFSIZ];
- setvbuf(stdout, buf, _IOLBF, BUFSIZ);
-#else
- setlinebuf(stdout);
-#endif
- }
-
- if (debug || verbose)
- msyslog(LOG_NOTICE, "%s", Version);
-
- if ((argc - ntp_optind) == 1)
- firstserver = addservbyname(argv[ntp_optind]);
- else
- firstserver = addservbyname("localhost");
-
- if (firstserver == NULL) {
- /* a message has already been printed */
- exit(2);
- }
-
- /*
- * Initialize the time of day routines and the I/O subsystem
- */
- setup_io();
-
- DoTrace(firstserver);
-
-#ifdef SYS_WINNT
- WSACleanup();
-#endif
- return(0);
-} /* main end */
-
-
-static void
-DoTrace(
- register struct server *server
- )
-{
- int retries = sys_retries;
-
- if (!server->srcadr.sin_addr.s_addr) {
- if (nonames)
- printf("%s:\t*Not Synchronized*\n", ntoa(&server->srcadr));
- else
- printf("%s:\t*Not Synchronized*\n", ntohost(&server->srcadr));
- fflush(stdout);
- return;
- }
-
- if (!verbose) {
- if (nonames)
- printf("%s: ", ntoa(&server->srcadr));
- else
- printf("%s: ", ntohost(&server->srcadr));
- fflush(stdout);
- }
- while (retries-- > 0) {
- DoTransmit(server);
- if (DoReceive(server))
- return;
- }
- if (verbose) {
- if (nonames)
- printf("%s:\t*Timeout*\n", ntoa(&server->srcadr));
- else
- printf("%s:\t*Timeout*\n", ntohost(&server->srcadr));
- }
- else
- printf("\t*Timeout*\n");
-}
-
-/*
- * Dotransmit - transmit a packet to the given server
- */
-static void
-DoTransmit(
- register struct server *server
- )
-{
- struct pkt xpkt;
-
- if (debug)
- printf("DoTransmit(%s)\n", ntoa(&server->srcadr));
-
- /*
- * Fill in the packet and let 'er rip.
- */
- xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
- sys_version, MODE_CLIENT);
- xpkt.stratum = STRATUM_TO_PKT(STRATUM_UNSPEC);
- xpkt.ppoll = NTP_MINPOLL;
- xpkt.precision = NTPTRACE_PRECISION;
- xpkt.rootdelay = htonl(NTPTRACE_DISTANCE);
- xpkt.rootdispersion = htonl(NTPTRACE_DISP);
- xpkt.refid = htonl(NTPTRACE_REFID);
- L_CLR(&xpkt.reftime);
- L_CLR(&xpkt.org);
- L_CLR(&xpkt.rec);
-
- /*
- * just timestamp packet and send it away.
- */
- get_systime(&(server->xmt));
- HTONL_FP(&server->xmt, &xpkt.xmt);
- sendpkt(&(server->srcadr), &xpkt, LEN_PKT_NOMAC);
-
- if (debug)
- printf("DoTransmit to %s\n", ntoa(&(server->srcadr)));
-}
-
-/*
- * DoReceive - attempt to receive a packet from a specific server
- */
-static int
-DoReceive(
- register struct server *server
- )
-{
- register int n;
- fd_set fds;
- struct timeval timeout;
- l_fp ts;
- register struct recvbuf *rb;
- int fromlen;
- int status;
-
- /*
- * Loop until we see the packet we want or until we time out
- */
- for (;;) {
- fds = fdmask;
- timeout.tv_sec = sys_timeout;
- timeout.tv_usec = 0;
- n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0, &timeout);
-
- if (n == 0) { /* timed out */
- if (debug)
- printf("timeout\n");
- return(0);
- }
- else if (n == -1) {
- msyslog(LOG_ERR, "select() error: %m");
- return(0);
- }
- get_systime(&ts);
-
- if (free_recvbuffs() == 0) {
- msyslog(LOG_ERR, "no buffers");
- exit(1);
- }
-
- rb = get_free_recv_buffer();
-
- fromlen = sizeof(struct sockaddr_in);
- rb->recv_length = recvfrom(fd, (char *)&rb->recv_pkt,
- sizeof(rb->recv_pkt), 0,
- (struct sockaddr *)&rb->recv_srcadr, &fromlen);
- if (rb->recv_length == -1) {
- freerecvbuf(rb);
- continue;
- }
-
- /*
- * Got one. Mark how and when it got here,
- * put it on the full list.
- */
- rb->recv_time = ts;
- add_full_recv_buffer(rb);
-
- status = ReceiveBuf(server, rb);
-
- freerecvbuf(rb);
-
- return(status);
- }
-}
-
-/*
- * receive - receive and process an incoming frame
- * Return 1 on success, 0 on failure
- */
-static int
-ReceiveBuf(
- struct server *server,
- struct recvbuf *rbufp
- )
-{
- register struct pkt *rpkt;
- register s_fp di;
- l_fp t10, t23;
- l_fp org;
- l_fp rec;
- l_fp ci;
- struct server *nextserver;
- struct in_addr nextia;
-
-
- if (debug) {
- printf("ReceiveBuf(%s, ", ntoa(&server->srcadr));
- printf("%s)\n", ntoa(&rbufp->recv_srcadr));
- }
-
- /*
- * Check to see if the packet basically looks like something
- * intended for us.
- */
- if (rbufp->recv_length < LEN_PKT_NOMAC) {
- if (debug)
- printf("receive: packet length %d\n",
- rbufp->recv_length);
- return(0); /* funny length packet */
- }
- if (rbufp->recv_srcadr.sin_addr.s_addr != server->srcadr.sin_addr.s_addr) {
- if (debug)
- printf("receive: wrong server\n");
- return(0); /* funny length packet */
- }
-
- rpkt = &(rbufp->recv_pkt);
-
- if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION) {
- if (debug)
- printf("receive: version %d\n", PKT_VERSION(rpkt->li_vn_mode));
- return(0);
- }
- if (PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) {
- if (debug)
- printf("receive: version %d\n", PKT_VERSION(rpkt->li_vn_mode));
- return(0);
- }
-
- if ((PKT_MODE(rpkt->li_vn_mode) != MODE_SERVER
- && PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE)
- || rpkt->stratum >= STRATUM_UNSPEC) {
- if (debug)
- printf("receive: mode %d stratum %d\n",
- PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
- return(0);
- }
-
- /*
- * Decode the org timestamp and make sure we're getting a response
- * to our last request.
- */
- NTOHL_FP(&rpkt->org, &org);
- if (!L_ISEQU(&org, &server->xmt)) {
- if (debug)
- printf("receive: pkt.org and peer.xmt differ\n");
- return(0);
- }
-
- /*
- * Looks good. Record info from the packet.
- */
-
- server->leap = PKT_LEAP(rpkt->li_vn_mode);
- server->stratum = PKT_TO_STRATUM(rpkt->stratum);
- server->precision = rpkt->precision;
- server->rootdelay = ntohl(rpkt->rootdelay);
- server->rootdispersion = ntohl(rpkt->rootdispersion);
- server->refid = rpkt->refid;
- NTOHL_FP(&rpkt->reftime, &server->reftime);
- NTOHL_FP(&rpkt->rec, &rec);
- NTOHL_FP(&rpkt->xmt, &server->org);
-
- /*
- * Make sure the server is at least somewhat sane. If not, try
- * again.
- */
- if (L_ISZERO(&rec) || !L_ISHIS(&server->org, &rec)) {
- return(0);
- }
-
- /*
- * Calculate the round trip delay (di) and the clock offset (ci).
- * We use the equations (reordered from those in the spec):
- *
- * d = (t2 - t3) - (t1 - t0)
- * c = ((t2 - t3) + (t1 - t0)) / 2
- */
- t10 = server->org; /* pkt.xmt == t1 */
- L_SUB(&t10, &rbufp->recv_time); /* recv_time == t0*/
-
- t23 = rec; /* pkt.rec == t2 */
- L_SUB(&t23, &org); /* pkt->org == t3 */
-
- /* now have (t2 - t3) and (t0 - t1). Calculate (ci) and (di) */
- ci = t10;
- L_ADD(&ci, &t23);
- L_RSHIFT(&ci);
-
- /*
- * Calculate di in t23 in full precision, then truncate
- * to an s_fp.
- */
- L_SUB(&t23, &t10);
- di = LFPTOFP(&t23);
-
- server->offset = ci;
- server->delay = di;
-
- printserver(server, stdout);
-
- /*
- * End of recursion if we reach stratum 1 or a local refclock
- */
- if ((server->stratum <= 1) || (--maxhosts <= 0) || ((server->refid & 0xff) == 127))
- return(1);
-
- nextia.s_addr = server->refid;
- nextserver = addserver(&nextia);
- if (nextserver)
- DoTrace(nextserver);
- return(1);
-}
-
-/* XXX ELIMINATE addserver (almost) identical to ntpdate.c, ntptrace.c */
-/*
- * addserver - Allocate a new structure for server.
- * Returns a pointer to that structure.
- */
-static struct server *
-addserver(
- struct in_addr *iap
- )
-{
- register struct server *server;
- static int toomany = 0;
-
- if (sys_numservers >= sys_maxservers) {
- if (!toomany) {
- toomany = 1;
- msyslog(LOG_ERR,
- "too many servers (> %d) specified, remainder not used",
- sys_maxservers);
- }
- return(NULL);
- }
-
- server = (struct server *)emalloc(sizeof(struct server));
- memset((char *)server, 0, sizeof(struct server));
-
- server->srcadr.sin_family = AF_INET;
- server->srcadr.sin_addr = *iap;
- server->srcadr.sin_port = htons(NTP_PORT);
-
- sys_servers[sys_numservers++] = server;
-
- return(server);
-}
-
-
-/*
- * addservbyname - determine a server's address and allocate a new structure
- * for it. Returns a pointer to that structure.
- */
-static struct server *
-addservbyname(
- const char *serv
- )
-{
- u_int32 ipaddr;
- struct in_addr ia;
-
- if (!getipaddr(serv, &ipaddr)) {
- msyslog(LOG_ERR, "can't find host %s\n", serv);
- return(NULL);
- }
-
- ia.s_addr = ipaddr;
- return(addserver(&ia));
-}
-
-
-static void
-setup_io(void)
-{
- /*
- * Init buffer free list and stat counters
- */
- init_recvbuff(sys_maxservers + 2);
-
- /* create a datagram (UDP) socket */
- if ((fd = socket(AF_INET, SOCK_DGRAM, 0))
-#ifndef SYS_WINNT
- < 0
-#else
- == INVALID_SOCKET
-#endif
- ) {
- msyslog(LOG_ERR, "socket() failed: %m");
- exit(1);
- /*NOTREACHED*/
- }
-
- FD_ZERO(&fdmask);
- FD_SET(fd, &fdmask);
-}
-
-
-
-/* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */
-/*
- * sendpkt - send a packet to the specified destination
- */
-static void
-sendpkt(
- struct sockaddr_in *dest,
- struct pkt *pkt,
- int len
- )
-{
- int cc;
-
- cc = sendto(fd, (char *)pkt, (size_t)len, 0, (struct sockaddr *)dest,
- sizeof(struct sockaddr_in));
- if (cc == -1) {
-#ifndef SYS_WINNT
- if (errno != EWOULDBLOCK && errno != ENOBUFS)
-#else /* SYS_WINNT */
- int iSockErr = WSAGetLastError();
- if (iSockErr != WSAEWOULDBLOCK && iSockErr != WSAENOBUFS)
-#endif /* SYS_WINNT */
- msyslog(LOG_ERR, "sendto(%s): %m", ntoa(dest));
- }
-}
-
-/*
- * getipaddr - given a host name, return its host address
- */
-static int
-getipaddr(
- const char *host,
- u_int32 *num
- )
-{
- struct hostent *hp;
-
- if (decodeipaddr(host, num)) {
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
- memmove((char *)num, hp->h_addr, sizeof(long));
- return 1;
- }
- return 0;
-}
-
-/*
- * decodeipaddr - return a host address (this is crude, but careful)
- */
-static int
-decodeipaddr(
- const char *num,
- u_int32 *ipaddr
- )
-{
- register const char *cp;
- register char *bp;
- register int i;
- register int temp;
- char buf[80]; /* will core dump on really stupid stuff */
-
- cp = num;
- *ipaddr = 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;
- *ipaddr <<= 8;
- *ipaddr += temp;
- }
-
- if (i < 4)
- return 0;
- *ipaddr = htonl(*ipaddr);
- return 1;
-}
-
-
-/* XXX ELIMINATE printserver similar in ntptrace.c, ntpdate.c */
-/*
- * printserver - print detail information for a server
- */
-static void
-printserver(
- register struct server *pp,
- FILE *fp
- )
-{
- u_fp synchdist;
-
- synchdist = pp->rootdispersion + (pp->rootdelay/2);
-
- if (!verbose) {
- (void) fprintf(fp, "stratum %d, offset %s, synch distance %s",
- pp->stratum, lfptoa(&pp->offset, 6), ufptoa(synchdist, 5));
- if (pp->stratum == 1) {
- (void) fprintf(fp, ", refid ");
- printrefid(fp, pp);
- }
- (void) fprintf(fp, "\n");
- return;
- }
-
- (void) fprintf(fp, "server %s, port %d\n", ntoa(&pp->srcadr),
- ntohs(pp->srcadr.sin_port));
-
- (void) fprintf(fp, "stratum %d, precision %d, leap %c%c\n",
- pp->stratum, pp->precision, pp->leap & 0x2 ? '1' : '0',
- pp->leap & 0x1 ? '1' : '0');
-
- (void) fprintf(fp, "refid ");
- printrefid(fp, pp);
-
- (void) fprintf(fp, " delay %s, dispersion %s ", fptoa(pp->delay, 5),
- ufptoa(pp->dispersion, 5));
- (void) fprintf(fp, "offset %s\n", lfptoa(&pp->offset, 6));
- (void) fprintf(fp, "rootdelay %s, rootdispersion %s",
- ufptoa(pp->rootdelay, 5), ufptoa(pp->rootdispersion, 5));
- (void) fprintf(fp, ", synch dist %s\n", ufptoa(synchdist, 5));
-
- (void) fprintf(fp, "reference time: %s\n",
- prettydate(&pp->reftime));
- (void) fprintf(fp, "originate timestamp: %s\n",
- prettydate(&pp->org));
- (void) fprintf(fp, "transmit timestamp: %s\n",
- prettydate(&pp->xmt));
-
- (void) fprintf(fp, "\n");
-
-}
-
-static void
-printrefid(
- FILE *fp,
- struct server *pp
- )
-{
- char junk[5];
- char *str;
-
- if (pp->stratum == 1) {
- junk[4] = 0;
- memmove(junk, (char *)&pp->refid, 4);
- str = junk;
- (void) fprintf(fp, "'%s'", str);
- } else {
- if (nonames) {
- str = numtoa(pp->refid);
- (void) fprintf(fp, "[%s]", str);
- }
- else {
- str = numtohost(pp->refid);
- (void) fprintf(fp, "%s", str);
- }
- }
-}
-
-#if !defined(HAVE_VSPRINTF)
-int
-vsprintf(
- char *str,
- const char *fmt,
- va_list ap
- )
-{
- FILE f;
- int len;
-
- f._flag = _IOWRT+_IOSTRG;
- f._ptr = str;
- f._cnt = 32767;
- len = _doprnt(fmt, ap, &f);
- *f._ptr = 0;
- return (len);
-}
-#endif
diff --git a/contrib/ntp/ntptrace/ntptrace.h b/contrib/ntp/ntptrace/ntptrace.h
deleted file mode 100644
index 53cbe01..0000000
--- a/contrib/ntp/ntptrace/ntptrace.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * ntptrace.h - declarations for the ntptrace program
- */
-
-/*
- * The server structure is a much simplified version of the
- * peer structure, for ntptrace's use. Since we always send
- * in client mode and expect to receive in server mode, this
- * leaves only a very limited number of things we need to
- * remember about the server.
- */
-struct server {
- struct sockaddr_in srcadr; /* address of remote host */
- u_char leap; /* leap indicator */
- u_char stratum; /* stratum of remote server */
- s_char precision; /* server's clock precision */
- u_fp rootdelay; /* distance from primary clock */
- u_fp rootdispersion; /* peer clock dispersion */
- u_int32 refid; /* peer reference ID */
- l_fp reftime; /* time of peer's last update */
- l_fp org; /* peer's originate time stamp */
- l_fp xmt; /* transmit time stamp */
- s_fp delay; /* filter estimated delay */
- u_fp dispersion; /* filter estimated dispersion */
- l_fp offset; /* filter estimated clock offset */
-};
-
-
-/*
- * Since ntptrace isn't aware of some of the things that normally get
- * put in an NTP packet, we fix some values.
- */
-#define NTPTRACE_PRECISION (-6) /* use this precision */
-#define NTPTRACE_DISTANCE FP_SECOND /* distance is 1 sec */
-#define NTPTRACE_DISP FP_SECOND /* so is the dispersion */
-#define NTPTRACE_REFID (0) /* reference ID to use */
diff --git a/contrib/ntp/parseutil/Makefile.am b/contrib/ntp/parseutil/Makefile.am
deleted file mode 100644
index 01f6bd2..0000000
--- a/contrib/ntp/parseutil/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS = ../util/ansi2knr
-noinst_PROGRAMS = @TESTDCF@ @DCFD@
-EXTRA_PROGRAMS = testdcf dcfd
-INCLUDES = -I$(top_srcdir)/include
-ETAGS_ARGS = Makefile.am
-DISTCLEANFILES = $(EXTRA_PROGRAMS)
-#EXTRA_DIST= TAGS
-
-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
deleted file mode 100644
index fbaded6..0000000
--- a/contrib/ntp/parseutil/Makefile.in
+++ /dev/null
@@ -1,441 +0,0 @@
-# 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
-noinst_PROGRAMS = @TESTDCF@ @DCFD@
-EXTRA_PROGRAMS = testdcf dcfd
-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 =
-EXTRA_PROGRAMS = testdcf$(EXEEXT) dcfd$(EXEEXT)
-noinst_PROGRAMS = @TESTDCF@ @DCFD@
-PROGRAMS = $(noinst_PROGRAMS)
-
-dcfd_SOURCES = dcfd.c
-dcfd_OBJECTS = dcfd$U.$(OBJEXT)
-dcfd_LDADD = $(LDADD)
-dcfd_DEPENDENCIES =
-dcfd_LDFLAGS =
-testdcf_SOURCES = testdcf.c
-testdcf_OBJECTS = testdcf$U.$(OBJEXT)
-testdcf_LDADD = $(LDADD)
-testdcf_DEPENDENCIES =
-testdcf_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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 $(srcdir)/Makefile.in Makefile.am
-SOURCES = dcfd.c testdcf.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-dcfd$(EXEEXT): $(dcfd_OBJECTS) $(dcfd_DEPENDENCIES)
- @rm -f dcfd$(EXEEXT)
- $(LINK) $(dcfd_LDFLAGS) $(dcfd_OBJECTS) $(dcfd_LDADD) $(LIBS)
-testdcf$(EXEEXT): $(testdcf_OBJECTS) $(testdcf_DEPENDENCIES)
- @rm -f testdcf$(EXEEXT)
- $(LINK) $(testdcf_LDFLAGS) $(testdcf_OBJECTS) $(testdcf_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = ../util/ansi2knr
-../util/ansi2knr:
- cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
-
-mostlyclean-kr:
- -test "$U" = "" || 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@
-
-.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`
-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) > $@ || 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) > $@ || 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) $(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
- $(MAKE) $(AM_MAKEFLAGS) check-local
-check: check-am
-all-am: Makefile $(PROGRAMS)
-
-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)
- -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."
-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-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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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 pdf pdf-am ps ps-am tags \
- uninstall uninstall-am uninstall-info-am
-
-#EXTRA_DIST= TAGS
-
-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/README b/contrib/ntp/parseutil/README
deleted file mode 100644
index 8bc5140..0000000
--- a/contrib/ntp/parseutil/README
+++ /dev/null
@@ -1,16 +0,0 @@
-This directory contains some DCF77 related programs.
-They have not yet fully been ported to architectures other than Sun with
-SunOS 4.x. So if you want to try them you are on your own - a little
-porting may be necessary.
-
-parsetest: simple parse streams module test
- Works only under SunOS with parse Streams Module loaded
- and Meinberg-Clocks
-
-testdcf: simple DCF77 raw impulse test program via 50Baud RS232
-
-dcfd: simple DCF77 raw impulse receiver with NTP loopfilter
- mechanics for synchronisation (allows DCF77 synchronisation
- without network code in a nutshell)
-
-Frank Kardel
diff --git a/contrib/ntp/parseutil/dcfd.c b/contrib/ntp/parseutil/dcfd.c
deleted file mode 100644
index 28fede7..0000000
--- a/contrib/ntp/parseutil/dcfd.c
+++ /dev/null
@@ -1,1852 +0,0 @@
-/*
- * /src/NTP/ntp-4/parseutil/dcfd.c,v 4.9 1999/02/28 13:06:27 kardel RELEASE_19990228_A
- *
- * dcfd.c,v 4.9 1999/02/28 13:06:27 kardel RELEASE_19990228_A
- *
- * DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
- *
- * Features:
- * DCF77 decoding
- * simple NTP loopfilter logic for local clock
- * interactive display for debugging
- *
- * Lacks:
- * Leap second handling (at that level you should switch to NTP Version 4 - really!)
- *
- * Copyright (C) 1995-1999 by Frank Kardel <kardel@acm.org>
- * Copyright (C) 1993-1994 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- * This program may not be sold or used for profit without prior
- * written consent of the author.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <signal.h>
-#include <syslog.h>
-#include <time.h>
-
-/*
- * NTP compilation environment
- */
-#include "ntp_stdlib.h"
-#include "ntpd.h" /* indirectly include ntp.h to get YEAR_PIVOT Y2KFixes */
-
-/*
- * select which terminal handling to use (currently only SysV variants)
- */
-#if defined(HAVE_TERMIOS_H) || defined(STREAM)
-#include <termios.h>
-#define TTY_GETATTR(_FD_, _ARG_) tcgetattr((_FD_), (_ARG_))
-#define TTY_SETATTR(_FD_, _ARG_) tcsetattr((_FD_), TCSANOW, (_ARG_))
-#else /* not HAVE_TERMIOS_H || STREAM */
-# if defined(HAVE_TERMIO_H) || defined(HAVE_SYSV_TTYS)
-# include <termio.h>
-# define TTY_GETATTR(_FD_, _ARG_) ioctl((_FD_), TCGETA, (_ARG_))
-# define TTY_SETATTR(_FD_, _ARG_) ioctl((_FD_), TCSETAW, (_ARG_))
-# endif/* HAVE_TERMIO_H || HAVE_SYSV_TTYS */
-#endif /* not HAVE_TERMIOS_H || STREAM */
-
-
-#ifndef TTY_GETATTR
-#include "Bletch: MUST DEFINE ONE OF 'HAVE_TERMIOS_H' or 'HAVE_TERMIO_H'"
-#endif
-
-#ifndef days_per_year
-#define days_per_year(_x_) (((_x_) % 4) ? 365 : (((_x_) % 400) ? 365 : 366))
-#endif
-
-#define timernormalize(_a_) \
- if ((_a_)->tv_usec >= 1000000) \
- { \
- (_a_)->tv_sec += (_a_)->tv_usec / 1000000; \
- (_a_)->tv_usec = (_a_)->tv_usec % 1000000; \
- } \
- if ((_a_)->tv_usec < 0) \
- { \
- (_a_)->tv_sec -= 1 + (-(_a_)->tv_usec / 1000000); \
- (_a_)->tv_usec = 999999 - (-(_a_)->tv_usec - 1); \
- }
-
-#ifdef timeradd
-#undef timeradd
-#endif
-#define timeradd(_a_, _b_) \
- (_a_)->tv_sec += (_b_)->tv_sec; \
- (_a_)->tv_usec += (_b_)->tv_usec; \
- timernormalize((_a_))
-
-#ifdef timersub
-#undef timersub
-#endif
-#define timersub(_a_, _b_) \
- (_a_)->tv_sec -= (_b_)->tv_sec; \
- (_a_)->tv_usec -= (_b_)->tv_usec; \
- timernormalize((_a_))
-
-/*
- * debug macros
- */
-#define PRINTF if (interactive) printf
-#define LPRINTF if (interactive && loop_filter_debug) printf
-
-#ifdef DEBUG
-#define dprintf(_x_) LPRINTF _x_
-#else
-#define dprintf(_x_)
-#endif
-
-#ifdef DECL_ERRNO
- extern int errno;
-#endif
-
-/*
- * display received data (avoids also detaching from tty)
- */
-static int interactive = 0;
-
-/*
- * display loopfilter (clock control) variables
- */
-static int loop_filter_debug = 0;
-
-/*
- * do not set/adjust system time
- */
-static int no_set = 0;
-
-/*
- * time that passes between start of DCF impulse and time stamping (fine
- * adjustment) in microseconds (receiver/OS dependent)
- */
-#define DEFAULT_DELAY 230000 /* rough estimate */
-
-/*
- * The two states we can be in - eithe we receive nothing
- * usable or we have the correct time
- */
-#define NO_SYNC 0x01
-#define SYNC 0x02
-
-static int sync_state = NO_SYNC;
-static time_t last_sync;
-
-static unsigned long ticks = 0;
-
-static char pat[] = "-\\|/";
-
-#define LINES (24-2) /* error lines after which the two headlines are repeated */
-
-#define MAX_UNSYNC (10*60) /* allow synchronisation loss for 10 minutes */
-#define NOTICE_INTERVAL (20*60) /* mention missing synchronisation every 20 minutes */
-
-/*
- * clock adjustment PLL - see NTP protocol spec (RFC1305) for details
- */
-
-#define USECSCALE 10
-#define TIMECONSTANT 2
-#define ADJINTERVAL 0
-#define FREQ_WEIGHT 18
-#define PHASE_WEIGHT 7
-#define MAX_DRIFT 0x3FFFFFFF
-
-#define R_SHIFT(_X_, _Y_) (((_X_) < 0) ? -(-(_X_) >> (_Y_)) : ((_X_) >> (_Y_)))
-
-static struct timeval max_adj_offset = { 0, 128000 };
-
-static long clock_adjust = 0; /* current adjustment value (usec * 2^USECSCALE) */
-static long accum_drift = 0; /* accumulated drift value (usec / ADJINTERVAL) */
-static long adjustments = 0;
-static char skip_adjust = 1; /* discard first adjustment (bad samples) */
-
-/*
- * DCF77 state flags
- */
-#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 occurrence) */
-#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
-
-struct clocktime /* clock time broken up from time code */
-{
- long wday; /* Day of week: 1: Monday - 7: Sunday */
- long day;
- long month;
- long year;
- long hour;
- long minute;
- long second;
- long usecond;
- long utcoffset; /* in minutes */
- long flags; /* current clock status (DCF77 state flags) */
-};
-
-typedef struct clocktime clocktime_t;
-
-/*
- * (usually) quick constant multiplications
- */
-#define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1)) /* *8 + *2 */
-#define TIMES24(_X_) (((_X_) << 4) + ((_X_) << 3)) /* *16 + *8 */
-#define TIMES60(_X_) ((((_X_) << 4) - (_X_)) << 2) /* *(16 - 1) *4 */
-/*
- * generic l_abs() function
- */
-#define l_abs(_x_) (((_x_) < 0) ? -(_x_) : (_x_))
-
-/*
- * conversion related return/error codes
- */
-#define CVT_MASK 0x0000000F /* conversion exit code */
-#define CVT_NONE 0x00000001 /* format not applicable */
-#define CVT_FAIL 0x00000002 /* conversion failed - error code returned */
-#define CVT_OK 0x00000004 /* conversion succeeded */
-#define CVT_BADFMT 0x00000010 /* general format error - (unparsable) */
-#define CVT_BADDATE 0x00000020 /* invalid date */
-#define CVT_BADTIME 0x00000040 /* invalid time */
-
-/*
- * DCF77 raw time code
- *
- * From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig
- * und Berlin, Maerz 1989
- *
- * Timecode transmission:
- * 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
- * FM:
- * see the spec. (basically a (non-)inverted psuedo random phase shift)
- *
- * Encoding:
- * 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 -> 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
- */
-
-/*-----------------------------------------------------------------------
- * conversion table to map DCF77 bit stream into data fields.
- * Encoding:
- * Each field of the DCF77 code is described with two adjacent entries in
- * this table. The first entry specifies the offset into the DCF77 data stream
- * while the length is given as the difference between the start index and
- * the start index of the following field.
- */
-static struct rawdcfcode
-{
- char offset; /* start bit */
-} rawdcfcode[] =
-{
- { 0 }, { 15 }, { 16 }, { 17 }, { 19 }, { 20 }, { 21 }, { 25 }, { 28 }, { 29 },
- { 33 }, { 35 }, { 36 }, { 40 }, { 42 }, { 45 }, { 49 }, { 50 }, { 54 }, { 58 }, { 59 }
-};
-
-/*-----------------------------------------------------------------------
- * symbolic names for the fields of DCF77 describes in "rawdcfcode".
- * see comment above for the structure of the DCF77 data
- */
-#define DCF_M 0
-#define DCF_R 1
-#define DCF_A1 2
-#define DCF_Z 3
-#define DCF_A2 4
-#define DCF_S 5
-#define DCF_M1 6
-#define DCF_M10 7
-#define DCF_P1 8
-#define DCF_H1 9
-#define DCF_H10 10
-#define DCF_P2 11
-#define DCF_D1 12
-#define DCF_D10 13
-#define DCF_DW 14
-#define DCF_MO 15
-#define DCF_MO0 16
-#define DCF_Y1 17
-#define DCF_Y10 18
-#define DCF_P3 19
-
-/*-----------------------------------------------------------------------
- * parity field table (same encoding as rawdcfcode)
- * This table describes the sections of the DCF77 code that are
- * parity protected
- */
-static struct partab
-{
- char offset; /* start bit of parity field */
-} partab[] =
-{
- { 21 }, { 29 }, { 36 }, { 59 }
-};
-
-/*-----------------------------------------------------------------------
- * offsets for parity field descriptions
- */
-#define DCF_P_P1 0
-#define DCF_P_P2 1
-#define DCF_P_P3 2
-
-/*-----------------------------------------------------------------------
- * legal values for time zone information
- */
-#define DCF_Z_MET 0x2
-#define DCF_Z_MED 0x1
-
-/*-----------------------------------------------------------------------
- * symbolic representation if the DCF77 data stream
- */
-static struct dcfparam
-{
- unsigned char onebits[60];
- unsigned char zerobits[60];
-} dcfparam =
-{
- "###############RADMLS1248124P124812P1248121241248112481248P", /* 'ONE' representation */
- "--------------------s-------p------p----------------------p" /* 'ZERO' representation */
-};
-
-/*-----------------------------------------------------------------------
- * extract a bitfield from DCF77 datastream
- * All numeric fields are LSB first.
- * buf holds a pointer to a DCF77 data buffer in symbolic
- * representation
- * idx holds the index to the field description in rawdcfcode
- */
-static unsigned long
-ext_bf(
- register unsigned char *buf,
- register int idx
- )
-{
- register unsigned long sum = 0;
- register int i, first;
-
- first = rawdcfcode[idx].offset;
-
- for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
- {
- sum <<= 1;
- sum |= (buf[i] != dcfparam.zerobits[i]);
- }
- return sum;
-}
-
-/*-----------------------------------------------------------------------
- * check even parity integrity for a bitfield
- *
- * buf holds a pointer to a DCF77 data buffer in symbolic
- * representation
- * idx holds the index to the field description in partab
- */
-static unsigned
-pcheck(
- register unsigned char *buf,
- register int idx
- )
-{
- register int i,last;
- register unsigned psum = 1;
-
- last = partab[idx+1].offset;
-
- for (i = partab[idx].offset; i < last; i++)
- psum ^= (buf[i] != dcfparam.zerobits[i]);
-
- return psum;
-}
-
-/*-----------------------------------------------------------------------
- * convert a DCF77 data buffer into wall clock time + flags
- *
- * buffer holds a pointer to a DCF77 data buffer in symbolic
- * representation
- * size describes the length of DCF77 information in bits (represented
- * as chars in symbolic notation
- * clock points to a wall clock time description of the DCF77 data (result)
- */
-static unsigned long
-convert_rawdcf(
- unsigned char *buffer,
- int size,
- clocktime_t *clock_time
- )
-{
- if (size < 57)
- {
- PRINTF("%-30s", "*** INCOMPLETE");
- return CVT_NONE;
- }
-
- /*
- * check Start and Parity bits
- */
- if ((ext_bf(buffer, DCF_S) == 1) &&
- pcheck(buffer, DCF_P_P1) &&
- pcheck(buffer, DCF_P_P2) &&
- pcheck(buffer, DCF_P_P3))
- {
- /*
- * buffer OK - extract all fields and build wall clock time from them
- */
-
- clock_time->flags = 0;
- clock_time->usecond= 0;
- clock_time->second = 0;
- clock_time->minute = ext_bf(buffer, DCF_M10);
- clock_time->minute = TIMES10(clock_time->minute) + ext_bf(buffer, DCF_M1);
- clock_time->hour = ext_bf(buffer, DCF_H10);
- clock_time->hour = TIMES10(clock_time->hour) + ext_bf(buffer, DCF_H1);
- clock_time->day = ext_bf(buffer, DCF_D10);
- clock_time->day = TIMES10(clock_time->day) + ext_bf(buffer, DCF_D1);
- clock_time->month = ext_bf(buffer, DCF_MO0);
- clock_time->month = TIMES10(clock_time->month) + ext_bf(buffer, DCF_MO);
- clock_time->year = ext_bf(buffer, DCF_Y10);
- clock_time->year = TIMES10(clock_time->year) + ext_bf(buffer, DCF_Y1);
- clock_time->wday = ext_bf(buffer, DCF_DW);
-
- /*
- * determine offset to UTC by examining the time zone
- */
- switch (ext_bf(buffer, DCF_Z))
- {
- case DCF_Z_MET:
- clock_time->utcoffset = -60;
- break;
-
- case DCF_Z_MED:
- clock_time->flags |= DCFB_DST;
- clock_time->utcoffset = -120;
- break;
-
- default:
- PRINTF("%-30s", "*** BAD TIME ZONE");
- return CVT_FAIL|CVT_BADFMT;
- }
-
- /*
- * extract various warnings from DCF77
- */
- if (ext_bf(buffer, DCF_A1))
- clock_time->flags |= DCFB_ANNOUNCE;
-
- if (ext_bf(buffer, DCF_A2))
- clock_time->flags |= DCFB_LEAP;
-
- if (ext_bf(buffer, DCF_R))
- clock_time->flags |= DCFB_ALTERNATE;
-
- return CVT_OK;
- }
- else
- {
- /*
- * bad format - not for us
- */
- PRINTF("%-30s", "*** BAD FORMAT (invalid/parity)");
- return CVT_FAIL|CVT_BADFMT;
- }
-}
-
-/*-----------------------------------------------------------------------
- * raw dcf input routine - fix up 50 baud
- * characters for 1/0 decision
- */
-static unsigned long
-cvt_rawdcf(
- unsigned char *buffer,
- int size,
- clocktime_t *clock_time
- )
-{
- register unsigned char *s = buffer;
- register unsigned char *e = buffer + size;
- register unsigned char *b = dcfparam.onebits;
- register unsigned char *c = dcfparam.zerobits;
- register unsigned rtc = CVT_NONE;
- register unsigned int i, lowmax, highmax, cutoff, span;
-#define BITS 9
- unsigned char histbuf[BITS];
- /*
- * the input buffer contains characters with runs of consecutive
- * bits set. These set bits are an indication of the DCF77 pulse
- * length. We assume that we receive the pulse at 50 Baud. Thus
- * a 100ms pulse would generate a 4 bit train (20ms per bit and
- * start bit)
- * a 200ms pulse would create all zeroes (and probably a frame error)
- *
- * The basic idea is that on corret reception we must have two
- * maxima in the pulse length distribution histogram. (one for
- * the zero representing pulses and one for the one representing
- * pulses)
- * There will always be ones in the datastream, thus we have to see
- * two maxima.
- * The best point to cut for a 1/0 decision is the minimum between those
- * between the maxima. The following code tries to find this cutoff point.
- */
-
- /*
- * clear histogram buffer
- */
- for (i = 0; i < BITS; i++)
- {
- histbuf[i] = 0;
- }
-
- cutoff = 0;
- lowmax = 0;
-
- /*
- * convert sequences of set bits into bits counts updating
- * the histogram alongway
- */
- while (s < e)
- {
- register unsigned int ch = *s ^ 0xFF;
- /*
- * check integrity and update histogramm
- */
- if (!((ch+1) & ch) || !*s)
- {
- /*
- * character ok
- */
- for (i = 0; ch; i++)
- {
- ch >>= 1;
- }
-
- *s = i;
- histbuf[i]++;
- cutoff += i;
- lowmax++;
- }
- else
- {
- /*
- * invalid character (no consecutive bit sequence)
- */
- dprintf(("parse: cvt_rawdcf: character check for 0x%x@%d FAILED\n", *s, s - buffer));
- *s = (unsigned char)~0;
- rtc = CVT_FAIL|CVT_BADFMT;
- }
- s++;
- }
-
- /*
- * first cutoff estimate (average bit count - must be between both
- * maxima)
- */
- if (lowmax)
- {
- cutoff /= lowmax;
- }
- else
- {
- cutoff = 4; /* doesn't really matter - it'll fail anyway, but gives error output */
- }
-
- dprintf(("parse: cvt_rawdcf: average bit count: %d\n", cutoff));
-
- lowmax = 0; /* weighted sum */
- highmax = 0; /* bitcount */
-
- /*
- * collect weighted sum of lower bits (left of initial guess)
- */
- dprintf(("parse: cvt_rawdcf: histogram:"));
- for (i = 0; i <= cutoff; i++)
- {
- lowmax += histbuf[i] * i;
- highmax += histbuf[i];
- dprintf((" %d", histbuf[i]));
- }
- dprintf((" <M>"));
-
- /*
- * round up
- */
- lowmax += highmax / 2;
-
- /*
- * calculate lower bit maximum (weighted sum / bit count)
- *
- * avoid divide by zero
- */
- if (highmax)
- {
- lowmax /= highmax;
- }
- else
- {
- lowmax = 0;
- }
-
- highmax = 0; /* weighted sum of upper bits counts */
- cutoff = 0; /* bitcount */
-
- /*
- * collect weighted sum of lower bits (right of initial guess)
- */
- for (; i < BITS; i++)
- {
- highmax+=histbuf[i] * i;
- cutoff +=histbuf[i];
- dprintf((" %d", histbuf[i]));
- }
- dprintf(("\n"));
-
- /*
- * determine upper maximum (weighted sum / bit count)
- */
- if (cutoff)
- {
- highmax /= cutoff;
- }
- else
- {
- highmax = BITS-1;
- }
-
- /*
- * following now holds:
- * lowmax <= cutoff(initial guess) <= highmax
- * best cutoff is the minimum nearest to higher bits
- */
-
- /*
- * find the minimum between lowmax and highmax (detecting
- * possibly a minimum span)
- */
- span = cutoff = lowmax;
- for (i = lowmax; i <= highmax; i++)
- {
- if (histbuf[cutoff] > histbuf[i])
- {
- /*
- * got a new minimum move beginning of minimum (cutoff) and
- * end of minimum (span) there
- */
- cutoff = span = i;
- }
- else
- if (histbuf[cutoff] == histbuf[i])
- {
- /*
- * minimum not better yet - but it spans more than
- * one bit value - follow it
- */
- span = i;
- }
- }
-
- /*
- * cutoff point for 1/0 decision is the middle of the minimum section
- * in the histogram
- */
- cutoff = (cutoff + span) / 2;
-
- dprintf(("parse: cvt_rawdcf: lower maximum %d, higher maximum %d, cutoff %d\n", lowmax, highmax, cutoff));
-
- /*
- * convert the bit counts to symbolic 1/0 information for data conversion
- */
- s = buffer;
- while ((s < e) && *c && *b)
- {
- if (*s == (unsigned char)~0)
- {
- /*
- * invalid character
- */
- *s = '?';
- }
- else
- {
- /*
- * symbolic 1/0 representation
- */
- *s = (*s >= cutoff) ? *b : *c;
- }
- s++;
- b++;
- c++;
- }
-
- /*
- * if everything went well so far return the result of the symbolic
- * conversion routine else just the accumulated errors
- */
- if (rtc != CVT_NONE)
- {
- PRINTF("%-30s", "*** BAD DATA");
- }
-
- return (rtc == CVT_NONE) ? convert_rawdcf(buffer, size, clock_time) : rtc;
-}
-
-/*-----------------------------------------------------------------------
- * convert a wall clock time description of DCF77 to a Unix time (seconds
- * since 1.1. 1970 UTC)
- */
-static time_t
-dcf_to_unixtime(
- clocktime_t *clock_time,
- unsigned *cvtrtc
- )
-{
-#define SETRTC(_X_) { if (cvtrtc) *cvtrtc = (_X_); }
- static int days_of_month[] =
- {
- 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
- };
- register int i;
- time_t t;
-
- /*
- * map 2 digit years to 19xx (DCF77 is a 20th century item)
- */
- if ( clock_time->year < YEAR_PIVOT ) /* in case of Y2KFixes [ */
- clock_time->year += 100; /* *year%100, make tm_year */
- /* *(do we need this?) */
- if ( clock_time->year < YEAR_BREAK ) /* (failsafe if) */
- clock_time->year += 1900; /* Y2KFixes ] */
-
- /*
- * must have been a really bad year code - drop it
- */
- if (clock_time->year < (YEAR_PIVOT + 1900) ) /* Y2KFixes */
- {
- SETRTC(CVT_FAIL|CVT_BADDATE);
- return -1;
- }
- /*
- * sorry, slow section here - but it's not time critical anyway
- */
-
- /*
- * calculate days since 1970 (watching leap years)
- */
- t = julian0( clock_time->year ) - julian0( 1970 );
-
- /* month */
- if (clock_time->month <= 0 || clock_time->month > 12)
- {
- SETRTC(CVT_FAIL|CVT_BADDATE);
- return -1; /* bad month */
- }
- /* adjust current leap year */
-#if 0
- if (clock_time->month < 3 && days_per_year(clock_time->year) == 366)
- t--;
-#endif
-
- /*
- * collect days from months excluding the current one
- */
- for (i = 1; i < clock_time->month; i++)
- {
- t += days_of_month[i];
- }
- /* day */
- if (clock_time->day < 1 || ((clock_time->month == 2 && days_per_year(clock_time->year) == 366) ?
- clock_time->day > 29 : clock_time->day > days_of_month[clock_time->month]))
- {
- SETRTC(CVT_FAIL|CVT_BADDATE);
- return -1; /* bad day */
- }
-
- /*
- * collect days from date excluding the current one
- */
- t += clock_time->day - 1;
-
- /* hour */
- if (clock_time->hour < 0 || clock_time->hour >= 24)
- {
- SETRTC(CVT_FAIL|CVT_BADTIME);
- return -1; /* bad hour */
- }
-
- /*
- * calculate hours from 1. 1. 1970
- */
- t = TIMES24(t) + clock_time->hour;
-
- /* min */
- if (clock_time->minute < 0 || clock_time->minute > 59)
- {
- SETRTC(CVT_FAIL|CVT_BADTIME);
- return -1; /* bad min */
- }
-
- /*
- * calculate minutes from 1. 1. 1970
- */
- t = TIMES60(t) + clock_time->minute;
- /* sec */
-
- /*
- * calculate UTC in minutes
- */
- t += clock_time->utcoffset;
-
- if (clock_time->second < 0 || clock_time->second > 60) /* allow for LEAPs */
- {
- SETRTC(CVT_FAIL|CVT_BADTIME);
- return -1; /* bad sec */
- }
-
- /*
- * calculate UTC in seconds - phew !
- */
- t = TIMES60(t) + clock_time->second;
- /* done */
- return t;
-}
-
-/*-----------------------------------------------------------------------
- * cheap half baked 1/0 decision - for interactive operation only
- */
-static char
-type(
- unsigned int c
- )
-{
- c ^= 0xFF;
- return (c > 0xF);
-}
-
-/*-----------------------------------------------------------------------
- * week day representation
- */
-static const char *wday[8] =
-{
- "??",
- "Mo",
- "Tu",
- "We",
- "Th",
- "Fr",
- "Sa",
- "Su"
-};
-
-/*-----------------------------------------------------------------------
- * generate a string representation for a timeval
- */
-static char *
-pr_timeval(
- struct timeval *val
- )
-{
- static char buf[20];
-
- if (val->tv_sec == 0)
- sprintf(buf, "%c0.%06ld", (val->tv_usec < 0) ? '-' : '+', (long int)l_abs(val->tv_usec));
- else
- sprintf(buf, "%ld.%06ld", (long int)val->tv_sec, (long int)l_abs(val->tv_usec));
- return buf;
-}
-
-/*-----------------------------------------------------------------------
- * correct the current time by an offset by setting the time rigorously
- */
-static void
-set_time(
- struct timeval *offset
- )
-{
- struct timeval the_time;
-
- if (no_set)
- return;
-
- LPRINTF("set_time: %s ", pr_timeval(offset));
- syslog(LOG_NOTICE, "setting time (offset %s)", pr_timeval(offset));
-
- if (gettimeofday(&the_time, 0L) == -1)
- {
- perror("gettimeofday()");
- }
- else
- {
- timeradd(&the_time, offset);
- if (settimeofday(&the_time, 0L) == -1)
- {
- perror("settimeofday()");
- }
- }
-}
-
-/*-----------------------------------------------------------------------
- * slew the time by a given offset
- */
-static void
-adj_time(
- long offset
- )
-{
- struct timeval time_offset;
-
- if (no_set)
- return;
-
- time_offset.tv_sec = offset / 1000000;
- time_offset.tv_usec = offset % 1000000;
-
- LPRINTF("adj_time: %ld us ", (long int)offset);
- if (adjtime(&time_offset, 0L) == -1)
- perror("adjtime()");
-}
-
-/*-----------------------------------------------------------------------
- * read in a possibly previously written drift value
- */
-static void
-read_drift(
- const char *drift_file
- )
-{
- FILE *df;
-
- df = fopen(drift_file, "r");
- if (df != NULL)
- {
- int idrift = 0, fdrift = 0;
-
- fscanf(df, "%4d.%03d", &idrift, &fdrift);
- fclose(df);
- LPRINTF("read_drift: %d.%03d ppm ", idrift, fdrift);
-
- accum_drift = idrift << USECSCALE;
- fdrift = (fdrift << USECSCALE) / 1000;
- accum_drift += fdrift & (1<<USECSCALE);
- LPRINTF("read_drift: drift_comp %ld ", (long int)accum_drift);
- }
-}
-
-/*-----------------------------------------------------------------------
- * write out the current drift value
- */
-static void
-update_drift(
- const char *drift_file,
- long offset,
- time_t reftime
- )
-{
- FILE *df;
-
- df = fopen(drift_file, "w");
- if (df != NULL)
- {
- int idrift = R_SHIFT(accum_drift, USECSCALE);
- int fdrift = accum_drift & ((1<<USECSCALE)-1);
-
- LPRINTF("update_drift: drift_comp %ld ", (long int)accum_drift);
- fdrift = (fdrift * 1000) / (1<<USECSCALE);
- fprintf(df, "%4d.%03d %c%ld.%06ld %.24s\n", idrift, fdrift,
- (offset < 0) ? '-' : '+', (long int)(l_abs(offset) / 1000000),
- (long int)(l_abs(offset) % 1000000), asctime(localtime(&reftime)));
- fclose(df);
- LPRINTF("update_drift: %d.%03d ppm ", idrift, fdrift);
- }
-}
-
-/*-----------------------------------------------------------------------
- * process adjustments derived from the DCF77 observation
- * (controls clock PLL)
- */
-static void
-adjust_clock(
- struct timeval *offset,
- const char *drift_file,
- time_t reftime
- )
-{
- struct timeval toffset;
- register long usecoffset;
- int tmp;
-
- if (no_set)
- return;
-
- if (skip_adjust)
- {
- skip_adjust = 0;
- return;
- }
-
- toffset = *offset;
- toffset.tv_sec = l_abs(toffset.tv_sec);
- toffset.tv_usec = l_abs(toffset.tv_usec);
- if (timercmp(&toffset, &max_adj_offset, >))
- {
- /*
- * hopeless - set the clock - and clear the timing
- */
- set_time(offset);
- clock_adjust = 0;
- skip_adjust = 1;
- return;
- }
-
- usecoffset = offset->tv_sec * 1000000 + offset->tv_usec;
-
- clock_adjust = R_SHIFT(usecoffset, TIMECONSTANT); /* adjustment to make for next period */
-
- tmp = 0;
- while (adjustments > (1 << tmp))
- tmp++;
- adjustments = 0;
- if (tmp > FREQ_WEIGHT)
- tmp = FREQ_WEIGHT;
-
- accum_drift += R_SHIFT(usecoffset << USECSCALE, TIMECONSTANT+TIMECONSTANT+FREQ_WEIGHT-tmp);
-
- if (accum_drift > MAX_DRIFT) /* clamp into interval */
- accum_drift = MAX_DRIFT;
- else
- if (accum_drift < -MAX_DRIFT)
- accum_drift = -MAX_DRIFT;
-
- update_drift(drift_file, usecoffset, reftime);
- LPRINTF("clock_adjust: %s, clock_adjust %ld, drift_comp %ld(%ld) ",
- pr_timeval(offset),(long int) R_SHIFT(clock_adjust, USECSCALE),
- (long int)R_SHIFT(accum_drift, USECSCALE), (long int)accum_drift);
-}
-
-/*-----------------------------------------------------------------------
- * adjust the clock by a small mount to simulate frequency correction
- */
-static void
-periodic_adjust(
- void
- )
-{
- register long adjustment;
-
- adjustments++;
-
- adjustment = R_SHIFT(clock_adjust, PHASE_WEIGHT);
-
- clock_adjust -= adjustment;
-
- adjustment += R_SHIFT(accum_drift, USECSCALE+ADJINTERVAL);
-
- adj_time(adjustment);
-}
-
-/*-----------------------------------------------------------------------
- * control synchronisation status (warnings) and do periodic adjusts
- * (frequency control simulation)
- */
-static void
-tick(
- int signum
- )
-{
- static unsigned long last_notice = 0;
-
-#if !defined(HAVE_SIGACTION) && !defined(HAVE_SIGVEC)
- (void)signal(SIGALRM, tick);
-#endif
-
- periodic_adjust();
-
- ticks += 1<<ADJINTERVAL;
-
- if ((ticks - last_sync) > MAX_UNSYNC)
- {
- /*
- * not getting time for a while
- */
- if (sync_state == SYNC)
- {
- /*
- * completely lost information
- */
- sync_state = NO_SYNC;
- syslog(LOG_INFO, "DCF77 reception lost (timeout)");
- last_notice = ticks;
- }
- else
- /*
- * in NO_SYNC state - look whether its time to speak up again
- */
- if ((ticks - last_notice) > NOTICE_INTERVAL)
- {
- syslog(LOG_NOTICE, "still not synchronized to DCF77 - check receiver/signal");
- last_notice = ticks;
- }
- }
-
-#ifndef ITIMER_REAL
- (void) alarm(1<<ADJINTERVAL);
-#endif
-}
-
-/*-----------------------------------------------------------------------
- * break association from terminal to avoid catching terminal
- * or process group related signals (-> daemon operation)
- */
-static void
-detach(
- void
- )
-{
-# ifdef HAVE_DAEMON
- daemon(0, 0);
-# else /* not HAVE_DAEMON */
- if (fork())
- exit(0);
-
- {
- u_long s;
- int max_fd;
-
-#if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
- max_fd = sysconf(_SC_OPEN_MAX);
-#else /* HAVE_SYSCONF && _SC_OPEN_MAX */
- max_fd = getdtablesize();
-#endif /* HAVE_SYSCONF && _SC_OPEN_MAX */
- for (s = 0; s < max_fd; s++)
- (void) close((int)s);
- (void) open("/", 0);
- (void) dup2(0, 1);
- (void) dup2(0, 2);
-#ifdef SYS_DOMAINOS
- {
- uid_$t puid;
- status_$t st;
-
- proc2_$who_am_i(&puid);
- proc2_$make_server(&puid, &st);
- }
-#endif /* SYS_DOMAINOS */
-#if defined(HAVE_SETPGID) || defined(HAVE_SETSID)
-# ifdef HAVE_SETSID
- if (setsid() == (pid_t)-1)
- syslog(LOG_ERR, "dcfd: setsid(): %m");
-# else
- if (setpgid(0, 0) == -1)
- syslog(LOG_ERR, "dcfd: setpgid(): %m");
-# endif
-#else /* HAVE_SETPGID || HAVE_SETSID */
- {
- int fid;
-
- fid = open("/dev/tty", 2);
- if (fid >= 0)
- {
- (void) ioctl(fid, (u_long) TIOCNOTTY, (char *) 0);
- (void) close(fid);
- }
-# ifdef HAVE_SETPGRP_0
- (void) setpgrp();
-# else /* HAVE_SETPGRP_0 */
- (void) setpgrp(0, getpid());
-# endif /* HAVE_SETPGRP_0 */
- }
-#endif /* HAVE_SETPGID || HAVE_SETSID */
- }
-#endif /* not HAVE_DAEMON */
-}
-
-/*-----------------------------------------------------------------------
- * list possible arguments and options
- */
-static void
-usage(
- char *program
- )
-{
- fprintf(stderr, "usage: %s [-n] [-f] [-l] [-t] [-i] [-o] [-d <drift_file>] [-D <input delay>] <device>\n", program);
- fprintf(stderr, "\t-n do not change time\n");
- fprintf(stderr, "\t-i interactive\n");
- fprintf(stderr, "\t-t trace (print all datagrams)\n");
- fprintf(stderr, "\t-f print all databits (includes PTB private data)\n");
- fprintf(stderr, "\t-l print loop filter debug information\n");
- fprintf(stderr, "\t-o print offet average for current minute\n");
- fprintf(stderr, "\t-Y make internal Y2K checks then exit\n"); /* Y2KFixes */
- fprintf(stderr, "\t-d <drift_file> specify alternate drift file\n");
- fprintf(stderr, "\t-D <input delay>specify delay from input edge to processing in micro seconds\n");
-}
-
-/*-----------------------------------------------------------------------
- * check_y2k() - internal check of Y2K logic
- * (a lot of this logic lifted from ../ntpd/check_y2k.c)
- */
-static int
-check_y2k( void )
-{
- int year; /* current working year */
- int year0 = 1900; /* sarting year for NTP time */
- int yearend; /* ending year we test for NTP time.
- * 32-bit systems: through 2036, the
- **year in which NTP time overflows.
- * 64-bit systems: a reasonable upper
- **limit (well, maybe somewhat beyond
- **reasonable, but well before the
- **max time, by which time the earth
- **will be dead.) */
- time_t Time;
- struct tm LocalTime;
-
- int Fatals, Warnings;
-#define Error(year) if ( (year)>=2036 && LocalTime.tm_year < 110 ) \
- Warnings++; else Fatals++
-
- Fatals = Warnings = 0;
-
- Time = time( (time_t *)NULL );
- LocalTime = *localtime( &Time );
-
- year = ( sizeof( u_long ) > 4 ) /* save max span using year as temp */
- ? ( 400 * 3 ) /* three greater gregorian cycles */
- : ((int)(0x7FFFFFFF / 365.242 / 24/60/60)* 2 ); /*32-bit limit*/
- /* NOTE: will automacially expand test years on
- * 64 bit machines.... this may cause some of the
- * existing ntp logic to fail for years beyond
- * 2036 (the current 32-bit limit). If all checks
- * fail ONLY beyond year 2036 you may ignore such
- * errors, at least for a decade or so. */
- yearend = year0 + year;
-
- year = 1900+YEAR_PIVOT;
- printf( " starting year %04d\n", (int) year );
- printf( " ending year %04d\n", (int) yearend );
-
- for ( ; year < yearend; year++ )
- {
- clocktime_t ct;
- time_t Observed;
- time_t Expected;
- unsigned Flag;
- unsigned long t;
-
- ct.day = 1;
- ct.month = 1;
- ct.year = year;
- ct.hour = ct.minute = ct.second = ct.usecond = 0;
- ct.utcoffset = 0;
- ct.flags = 0;
-
- Flag = 0;
- Observed = dcf_to_unixtime( &ct, &Flag );
- /* seems to be a clone of parse_to_unixtime() with
- * *a minor difference to arg2 type */
- if ( ct.year != year )
- {
- fprintf( stdout,
- "%04d: dcf_to_unixtime(,%d) CORRUPTED ct.year: was %d\n",
- (int)year, (int)Flag, (int)ct.year );
- Error(year);
- break;
- }
- t = julian0(year) - julian0(1970); /* Julian day from 1970 */
- Expected = t * 24 * 60 * 60;
- if ( Observed != Expected || Flag )
- { /* time difference */
- fprintf( stdout,
- "%04d: dcf_to_unixtime(,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)Flag,
- (unsigned long)Observed, (unsigned long)Expected,
- ((long)Observed - (long)Expected) );
- Error(year);
- break;
- }
-
- if ( year >= YEAR_PIVOT+1900 )
- {
- /* check year % 100 code we put into dcf_to_unixtime() */
- ct.year = year % 100;
- Flag = 0;
-
- Observed = dcf_to_unixtime( &ct, &Flag );
-
- if ( Observed != Expected || Flag )
- { /* time difference */
- fprintf( stdout,
-"%04d: dcf_to_unixtime(%d,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)ct.year, (int)Flag,
- (unsigned long)Observed, (unsigned long)Expected,
- ((long)Observed - (long)Expected) );
- Error(year);
- break;
- }
-
- /* check year - 1900 code we put into dcf_to_unixtime() */
- ct.year = year - 1900;
- Flag = 0;
-
- Observed = dcf_to_unixtime( &ct, &Flag );
-
- if ( Observed != Expected || Flag ) { /* time difference */
- fprintf( stdout,
- "%04d: dcf_to_unixtime(%d,%d) FAILURE: was=%lu s/b=%lu (%ld)\n",
- year, (int)ct.year, (int)Flag,
- (unsigned long)Observed, (unsigned long)Expected,
- ((long)Observed - (long)Expected) );
- Error(year);
- break;
- }
-
-
- }
- }
-
- return ( Fatals );
-}
-
-/*--------------------------------------------------
- * rawdcf_init - set up modem lines for RAWDCF receivers
- */
-#if defined(TIOCMSET) && (defined(TIOCM_DTR) || defined(CIOCM_DTR))
-static void
-rawdcf_init(
- int fd
- )
-{
- /*
- * You can use the RS232 to supply the power for a DCF77 receiver.
- * Here a voltage between the DTR and the RTS line is used. Unfortunately
- * the name has changed from CIOCM_DTR to TIOCM_DTR recently.
- */
-
-#ifdef TIOCM_DTR
- int sl232 = TIOCM_DTR; /* turn on DTR for power supply */
-#else
- int sl232 = CIOCM_DTR; /* turn on DTR for power supply */
-#endif
-
- if (ioctl(fd, TIOCMSET, (caddr_t)&sl232) == -1)
- {
- syslog(LOG_NOTICE, "rawdcf_init: WARNING: ioctl(fd, TIOCMSET, [C|T]IOCM_DTR): %m");
- }
-}
-#else
-static void
-rawdcf_init(
- int fd
- )
-{
- syslog(LOG_NOTICE, "rawdcf_init: WARNING: OS interface incapable of setting DTR to power DCF modules");
-}
-#endif /* DTR initialisation type */
-
-/*-----------------------------------------------------------------------
- * main loop - argument interpreter / setup / main loop
- */
-int
-main(
- int argc,
- char **argv
- )
-{
- unsigned char c;
- char **a = argv;
- int ac = argc;
- char *file = NULL;
- const char *drift_file = "/etc/dcfd.drift";
- int fd;
- int offset = 15;
- int offsets = 0;
- int delay = DEFAULT_DELAY; /* average delay from input edge to time stamping */
- int trace = 0;
- int errs = 0;
-
- /*
- * process arguments
- */
- while (--ac)
- {
- char *arg = *++a;
- if (*arg == '-')
- while ((c = *++arg))
- switch (c)
- {
- case 't':
- trace = 1;
- interactive = 1;
- break;
-
- case 'f':
- offset = 0;
- interactive = 1;
- break;
-
- case 'l':
- loop_filter_debug = 1;
- offsets = 1;
- interactive = 1;
- break;
-
- case 'n':
- no_set = 1;
- break;
-
- case 'o':
- offsets = 1;
- interactive = 1;
- break;
-
- case 'i':
- interactive = 1;
- break;
-
- case 'D':
- if (ac > 1)
- {
- delay = atoi(*++a);
- ac--;
- }
- else
- {
- fprintf(stderr, "%s: -D requires integer argument\n", argv[0]);
- errs=1;
- }
- break;
-
- case 'd':
- if (ac > 1)
- {
- drift_file = *++a;
- ac--;
- }
- else
- {
- fprintf(stderr, "%s: -d requires file name argument\n", argv[0]);
- errs=1;
- }
- break;
-
- case 'Y':
- errs=check_y2k();
- exit( errs ? 1 : 0 );
-
- default:
- fprintf(stderr, "%s: unknown option -%c\n", argv[0], c);
- errs=1;
- break;
- }
- else
- if (file == NULL)
- file = arg;
- else
- {
- fprintf(stderr, "%s: device specified twice\n", argv[0]);
- errs=1;
- }
- }
-
- if (errs)
- {
- usage(argv[0]);
- exit(1);
- }
- else
- if (file == NULL)
- {
- fprintf(stderr, "%s: device not specified\n", argv[0]);
- usage(argv[0]);
- exit(1);
- }
-
- errs = LINES+1;
-
- /*
- * get access to DCF77 tty port
- */
- fd = open(file, O_RDONLY);
- if (fd == -1)
- {
- perror(file);
- exit(1);
- }
- else
- {
- int i, rrc;
- struct timeval t, tt, tlast;
- struct timeval timeout;
- struct timeval phase;
- struct timeval time_offset;
- char pbuf[61]; /* printable version */
- char buf[61]; /* raw data */
- clocktime_t clock_time; /* wall clock time */
- time_t utc_time = 0;
- time_t last_utc_time = 0;
- long usecerror = 0;
- long lasterror = 0;
-#if defined(HAVE_TERMIOS_H) || defined(STREAM)
- struct termios term;
-#else /* not HAVE_TERMIOS_H || STREAM */
-# if defined(HAVE_TERMIO_H) || defined(HAVE_SYSV_TTYS)
- struct termio term;
-# endif/* HAVE_TERMIO_H || HAVE_SYSV_TTYS */
-#endif /* not HAVE_TERMIOS_H || STREAM */
- unsigned int rtc = CVT_NONE;
-
- rawdcf_init(fd);
-
- timeout.tv_sec = 1;
- timeout.tv_usec = 500000;
-
- phase.tv_sec = 0;
- phase.tv_usec = delay;
-
- /*
- * setup TTY (50 Baud, Read, 8Bit, No Hangup, 1 character IO)
- */
- if (TTY_GETATTR(fd, &term) == -1)
- {
- perror("tcgetattr");
- exit(1);
- }
-
- memset(term.c_cc, 0, sizeof(term.c_cc));
- term.c_cc[VMIN] = 1;
-#ifdef NO_PARENB_IGNPAR
- term.c_cflag = B50|CS8|CREAD|CLOCAL;
-#else
- term.c_cflag = B50|CS8|CREAD|CLOCAL|PARENB;
-#endif
- term.c_iflag = IGNPAR;
- term.c_oflag = 0;
- term.c_lflag = 0;
-
- if (TTY_SETATTR(fd, &term) == -1)
- {
- perror("tcsetattr");
- exit(1);
- }
-
- /*
- * lose terminal if in daemon operation
- */
- if (!interactive)
- detach();
-
- /*
- * get syslog() initialized
- */
-#ifdef LOG_DAEMON
- openlog("dcfd", LOG_PID, LOG_DAEMON);
-#else
- openlog("dcfd", LOG_PID);
-#endif
-
- /*
- * setup periodic operations (state control / frequency control)
- */
-#ifdef HAVE_SIGVEC
- {
- struct sigvec vec;
-
- vec.sv_handler = tick;
- vec.sv_mask = 0;
- vec.sv_flags = 0;
-
- if (sigvec(SIGALRM, &vec, (struct sigvec *)0) == -1)
- {
- syslog(LOG_ERR, "sigvec(SIGALRM): %m");
- exit(1);
- }
- }
-#else
-#ifdef HAVE_SIGACTION
- {
- struct sigaction act;
-
- act.sa_handler = tick;
-# ifdef HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION
- act.sa_sigaction = (void (*) P((int, siginfo_t *, void *)))0;
-# endif /* HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION */
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
-
- if (sigaction(SIGALRM, &act, (struct sigaction *)0) == -1)
- {
- syslog(LOG_ERR, "sigaction(SIGALRM): %m");
- exit(1);
- }
- }
-#else
- (void) signal(SIGALRM, tick);
-#endif
-#endif
-
-#ifdef ITIMER_REAL
- {
- struct itimerval it;
-
- it.it_interval.tv_sec = 1<<ADJINTERVAL;
- it.it_interval.tv_usec = 0;
- it.it_value.tv_sec = 1<<ADJINTERVAL;
- it.it_value.tv_usec = 0;
-
- if (setitimer(ITIMER_REAL, &it, (struct itimerval *)0) == -1)
- {
- syslog(LOG_ERR, "setitimer: %m");
- exit(1);
- }
- }
-#else
- (void) alarm(1<<ADJINTERVAL);
-#endif
-
- PRINTF(" DCF77 monitor - Copyright (C) 1993-1998 by Frank Kardel\n\n");
-
- pbuf[60] = '\0';
- for ( i = 0; i < 60; i++)
- pbuf[i] = '.';
-
- read_drift(drift_file);
-
- /*
- * what time is it now (for interval measurement)
- */
- gettimeofday(&tlast, 0L);
- i = 0;
- /*
- * loop until input trouble ...
- */
- do
- {
- /*
- * get an impulse
- */
- while ((rrc = read(fd, &c, 1)) == 1)
- {
- gettimeofday(&t, 0L);
- tt = t;
- timersub(&t, &tlast);
-
- if (errs > LINES)
- {
- PRINTF(" %s", &"PTB private....RADMLSMin....PHour..PMDay..DayMonthYear....P\n"[offset]);
- PRINTF(" %s", &"---------------RADMLS1248124P124812P1248121241248112481248P\n"[offset]);
- errs = 0;
- }
-
- /*
- * timeout -> possible minute mark -> interpretation
- */
- if (timercmp(&t, &timeout, >))
- {
- PRINTF("%c %.*s ", pat[i % (sizeof(pat)-1)], 59 - offset, &pbuf[offset]);
-
- if ((rtc = cvt_rawdcf((unsigned char *)buf, i, &clock_time)) != CVT_OK)
- {
- /*
- * this data was bad - well - forget synchronisation for now
- */
- PRINTF("\n");
- if (sync_state == SYNC)
- {
- sync_state = NO_SYNC;
- syslog(LOG_INFO, "DCF77 reception lost (bad data)");
- }
- errs++;
- }
- else
- if (trace)
- {
- PRINTF("\r %.*s ", 59 - offset, &buf[offset]);
- }
-
-
- buf[0] = c;
-
- /*
- * collect first character
- */
- if (((c^0xFF)+1) & (c^0xFF))
- pbuf[0] = '?';
- else
- pbuf[0] = type(c) ? '#' : '-';
-
- for ( i = 1; i < 60; i++)
- pbuf[i] = '.';
-
- i = 0;
- }
- else
- {
- /*
- * collect character
- */
- buf[i] = c;
-
- /*
- * initial guess (usually correct)
- */
- if (((c^0xFF)+1) & (c^0xFF))
- pbuf[i] = '?';
- else
- pbuf[i] = type(c) ? '#' : '-';
-
- PRINTF("%c %.*s ", pat[i % (sizeof(pat)-1)], 59 - offset, &pbuf[offset]);
- }
-
- if (i == 0 && rtc == CVT_OK)
- {
- /*
- * we got a good time code here - try to convert it to
- * UTC
- */
- if ((utc_time = dcf_to_unixtime(&clock_time, &rtc)) == -1)
- {
- PRINTF("*** BAD CONVERSION\n");
- }
-
- if (utc_time != (last_utc_time + 60))
- {
- /*
- * well, two successive sucessful telegrams are not 60 seconds
- * apart
- */
- PRINTF("*** NO MINUTE INC\n");
- if (sync_state == SYNC)
- {
- sync_state = NO_SYNC;
- syslog(LOG_INFO, "DCF77 reception lost (data mismatch)");
- }
- errs++;
- rtc = CVT_FAIL|CVT_BADTIME|CVT_BADDATE;
- }
- else
- usecerror = 0;
-
- last_utc_time = utc_time;
- }
-
- if (rtc == CVT_OK)
- {
- if (i == 0)
- {
- /*
- * valid time code - determine offset and
- * note regained reception
- */
- last_sync = ticks;
- if (sync_state == NO_SYNC)
- {
- syslog(LOG_INFO, "receiving DCF77");
- }
- else
- {
- /*
- * we had at least one minute SYNC - thus
- * last error is valid
- */
- time_offset.tv_sec = lasterror / 1000000;
- time_offset.tv_usec = lasterror % 1000000;
- adjust_clock(&time_offset, drift_file, utc_time);
- }
- sync_state = SYNC;
- }
-
- time_offset.tv_sec = utc_time + i;
- time_offset.tv_usec = 0;
-
- timeradd(&time_offset, &phase);
-
- usecerror += (time_offset.tv_sec - tt.tv_sec) * 1000000 + time_offset.tv_usec
- -tt.tv_usec;
-
- /*
- * output interpreted DCF77 data
- */
- 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,
- (clock_time.flags & DCFB_ALTERNATE) ? "R" : "_",
- (clock_time.flags & DCFB_ANNOUNCE) ? "A" : "_",
- (clock_time.flags & DCFB_DST) ? "D" : "_",
- (clock_time.flags & DCFB_LEAP) ? "L" : "_",
- (lasterror < 0) ? '-' : '+', l_abs(lasterror) / 1000000, l_abs(lasterror) % 1000000
- );
-
- if (trace && (i == 0))
- {
- PRINTF("\n");
- errs++;
- }
- lasterror = usecerror / (i+1);
- }
- else
- {
- lasterror = 0; /* we cannot calculate phase errors on bad reception */
- }
-
- PRINTF("\r");
-
- if (i < 60)
- {
- i++;
- }
-
- tlast = tt;
-
- if (interactive)
- fflush(stdout);
- }
- } while ((rrc == -1) && (errno == EINTR));
-
- /*
- * lost IO - sorry guys
- */
- syslog(LOG_ERR, "TERMINATING - cannot read from device %s (%m)", file);
-
- (void)close(fd);
- }
-
- closelog();
-
- return 0;
-}
diff --git a/contrib/ntp/parseutil/testdcf.c b/contrib/ntp/parseutil/testdcf.c
deleted file mode 100644
index e3b71f3..0000000
--- a/contrib/ntp/parseutil/testdcf.c
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
- * /src/NTP/REPOSITORY/v4/parseutil/testdcf.c,v 3.18 1996/12/01 16:05:04 kardel Exp
- *
- * testdcf.c,v 3.18 1996/12/01 16:05:04 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
- * Copyright (c) 1993,1994,1995,1996, 1998 by Frank Kardel
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
- *
- * 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.
- *
- * This program may not be sold or used for profit without prior
- * written consent of the author.
- */
-
-#include "ntp_stdlib.h"
-
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <termios.h>
-
-/*
- * state flags
- */
-#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 occurrence) */
-#define DCFB_ALTERNATE 0x0008 /* alternate antenna used */
-
-struct clocktime /* clock time broken up from time code */
-{
- long wday;
- long day;
- long month;
- long year;
- long hour;
- long minute;
- long second;
- long usecond;
- long utcoffset; /* in minutes */
- long flags; /* current clock status */
-};
-
-typedef struct clocktime clocktime_t;
-
-#define TIMES10(_X_) (((_X_) << 3) + ((_X_) << 1))
-
-/*
- * parser related return/error codes
- */
-#define CVT_MASK 0x0000000F /* conversion exit code */
-#define CVT_NONE 0x00000001 /* format not applicable */
-#define CVT_FAIL 0x00000002 /* conversion failed - error code returned */
-#define CVT_OK 0x00000004 /* conversion succeeded */
-#define CVT_BADFMT 0x00000010 /* general format error - (unparsable) */
-
-/*
- * DCF77 raw time code
- *
- * From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig
- * und Berlin, Maerz 1989
- *
- * Timecode transmission:
- * 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
- * FM:
- * see the spec. (basically a (non-)inverted psuedo random phase shift)
- *
- * Encoding:
- * 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 -> 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
- */
-
-static struct rawdcfcode
-{
- char offset; /* start bit */
-} rawdcfcode[] =
-{
- { 0 }, { 15 }, { 16 }, { 17 }, { 19 }, { 20 }, { 21 }, { 25 }, { 28 }, { 29 },
- { 33 }, { 35 }, { 36 }, { 40 }, { 42 }, { 45 }, { 49 }, { 50 }, { 54 }, { 58 }, { 59 }
-};
-
-#define DCF_M 0
-#define DCF_R 1
-#define DCF_A1 2
-#define DCF_Z 3
-#define DCF_A2 4
-#define DCF_S 5
-#define DCF_M1 6
-#define DCF_M10 7
-#define DCF_P1 8
-#define DCF_H1 9
-#define DCF_H10 10
-#define DCF_P2 11
-#define DCF_D1 12
-#define DCF_D10 13
-#define DCF_DW 14
-#define DCF_MO 15
-#define DCF_MO0 16
-#define DCF_Y1 17
-#define DCF_Y10 18
-#define DCF_P3 19
-
-static struct partab
-{
- char offset; /* start bit of parity field */
-} partab[] =
-{
- { 21 }, { 29 }, { 36 }, { 59 }
-};
-
-#define DCF_P_P1 0
-#define DCF_P_P2 1
-#define DCF_P_P3 2
-
-#define DCF_Z_MET 0x2
-#define DCF_Z_MED 0x1
-
-static unsigned long
-ext_bf(
- register unsigned char *buf,
- register int idx
- )
-{
- register unsigned long sum = 0;
- register int i, first;
-
- first = rawdcfcode[idx].offset;
-
- for (i = rawdcfcode[idx+1].offset - 1; i >= first; i--)
- {
- sum <<= 1;
- sum |= (buf[i] != '-');
- }
- return sum;
-}
-
-static unsigned
-pcheck(
- register unsigned char *buf,
- register int idx
- )
-{
- register int i,last;
- register unsigned psum = 1;
-
- last = partab[idx+1].offset;
-
- for (i = partab[idx].offset; i < last; i++)
- psum ^= (buf[i] != '-');
-
- return psum;
-}
-
-static unsigned long
-convert_rawdcf(
- register unsigned char *buffer,
- register int size,
- register clocktime_t *clock_time
- )
-{
- if (size < 57)
- {
- printf("%-30s", "*** INCOMPLETE");
- return CVT_NONE;
- }
-
- /*
- * check Start and Parity bits
- */
- if ((ext_bf(buffer, DCF_S) == 1) &&
- pcheck(buffer, DCF_P_P1) &&
- pcheck(buffer, DCF_P_P2) &&
- pcheck(buffer, DCF_P_P3))
- {
- /*
- * buffer OK
- */
-
- clock_time->flags = 0;
- clock_time->usecond= 0;
- clock_time->second = 0;
- clock_time->minute = ext_bf(buffer, DCF_M10);
- clock_time->minute = TIMES10(clock_time->minute) + ext_bf(buffer, DCF_M1);
- clock_time->hour = ext_bf(buffer, DCF_H10);
- clock_time->hour = TIMES10(clock_time->hour) + ext_bf(buffer, DCF_H1);
- clock_time->day = ext_bf(buffer, DCF_D10);
- clock_time->day = TIMES10(clock_time->day) + ext_bf(buffer, DCF_D1);
- clock_time->month = ext_bf(buffer, DCF_MO0);
- clock_time->month = TIMES10(clock_time->month) + ext_bf(buffer, DCF_MO);
- clock_time->year = ext_bf(buffer, DCF_Y10);
- clock_time->year = TIMES10(clock_time->year) + ext_bf(buffer, DCF_Y1);
- clock_time->wday = ext_bf(buffer, DCF_DW);
-
- switch (ext_bf(buffer, DCF_Z))
- {
- case DCF_Z_MET:
- clock_time->utcoffset = -60;
- break;
-
- case DCF_Z_MED:
- clock_time->flags |= DCFB_DST;
- clock_time->utcoffset = -120;
- break;
-
- default:
- printf("%-30s", "*** BAD TIME ZONE");
- return CVT_FAIL|CVT_BADFMT;
- }
-
- if (ext_bf(buffer, DCF_A1))
- clock_time->flags |= DCFB_ANNOUNCE;
-
- if (ext_bf(buffer, DCF_A2))
- clock_time->flags |= DCFB_LEAP;
-
- if (ext_bf(buffer, DCF_R))
- clock_time->flags |= DCFB_ALTERNATE;
-
- return CVT_OK;
- }
- else
- {
- /*
- * bad format - not for us
- */
- printf("%-30s", "*** BAD FORMAT (invalid/parity)");
- return CVT_FAIL|CVT_BADFMT;
- }
-}
-
-char
-type(
- unsigned int c
- )
-{
- c ^= 0xFF;
- return (c > 0xF);
-}
-
-static const char *wday[8] =
-{
- "??",
- "Mo",
- "Tu",
- "We",
- "Th",
- "Fr",
- "Sa",
- "Su"
-};
-
-static char pat[] = "-\\|/";
-
-#define LINES (24-2) /* error lines after which the two headlines are repeated */
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- if ((argc != 2) && (argc != 3))
- {
- fprintf(stderr, "usage: %s [-f|-t|-ft|-tf] <device>\n", argv[0]);
- exit(1);
- }
- else
- {
- unsigned char c;
- char *file;
- int fd;
- int offset = 15;
- int trace = 0;
- int errs = LINES+1;
-
- /*
- * SIMPLE(!) argument "parser"
- */
- if (argc == 3)
- {
- if (strcmp(argv[1], "-f") == 0)
- offset = 0;
- if (strcmp(argv[1], "-t") == 0)
- trace = 1;
- if ((strcmp(argv[1], "-ft") == 0) ||
- (strcmp(argv[1], "-tf") == 0))
- {
- offset = 0;
- trace = 1;
- }
- file = argv[2];
- }
- else
- {
- file = argv[1];
- }
-
- fd = open(file, O_RDONLY);
- if (fd == -1)
- {
- perror(file);
- exit(1);
- }
- else
- {
- int i;
-#ifdef TIOCM_RTS
- int on = TIOCM_RTS;
-#endif
- struct timeval t, tt, tlast;
- char buf[61];
- clocktime_t clock_time;
- struct termios term;
- int rtc = CVT_NONE;
-
- if (tcgetattr(fd, &term) == -1)
- {
- perror("tcgetattr");
- exit(1);
- }
-
- memset(term.c_cc, 0, sizeof(term.c_cc));
- term.c_cc[VMIN] = 1;
-#ifdef NO_PARENB_IGNPAR /* Was: defined(SYS_IRIX4) || defined (SYS_IRIX5) */
- /* somehow doesn't grok PARENB & IGNPAR (mj) */
- term.c_cflag = B50|CS8|CREAD|CLOCAL;
-#else
- term.c_cflag = B50|CS8|CREAD|CLOCAL|PARENB;
-#endif
- term.c_iflag = IGNPAR;
- term.c_oflag = 0;
- term.c_lflag = 0;
-
- if (tcsetattr(fd, TCSANOW, &term) == -1)
- {
- perror("tcsetattr");
- exit(1);
- }
-
-#ifdef I_POP
- while (ioctl(fd, I_POP, 0) == 0)
- ;
-#endif
-#if defined(TIOCMBIC) && defined(TIOCM_RTS)
- if (ioctl(fd, TIOCMBIC, (caddr_t)&on) == -1)
- {
- perror("TIOCM_RTS");
- }
-#endif
-
- printf(" DCF77 monitor - Copyright (C) 1993-1996, Frank Kardel\n\n");
-
- clock_time.hour = 0;
- clock_time.minute = 0;
- clock_time.day = 0;
- clock_time.wday = 0;
- clock_time.month = 0;
- clock_time.year = 0;
- clock_time.flags = 0;
- buf[60] = '\0';
- for ( i = 0; i < 60; i++)
- buf[i] = '.';
-
- gettimeofday(&tlast, 0L);
- i = 0;
- while (read(fd, &c, 1) == 1)
- {
- gettimeofday(&t, 0L);
- tt = t;
- t.tv_sec -= tlast.tv_sec;
- t.tv_usec -= tlast.tv_usec;
- if (t.tv_usec < 0)
- {
- t.tv_usec += 1000000;
- t.tv_sec -= 1;
- }
-
- if (errs > LINES)
- {
- printf(" %s", &"PTB private....RADMLSMin....PHour..PMDay..DayMonthYear....P\n"[offset]);
- printf(" %s", &"---------------RADMLS1248124P124812P1248121241248112481248P\n"[offset]);
- errs = 0;
- }
-
- if (t.tv_sec > 1 ||
- (t.tv_sec == 1 &&
- t.tv_usec > 500000))
- {
- printf("%c %.*s ", pat[i % (sizeof(pat)-1)], 59 - offset, &buf[offset]);
-
- if ((rtc = convert_rawdcf((unsigned char *)buf, i, &clock_time)) != CVT_OK)
- {
- printf("\n");
- clock_time.hour = 0;
- clock_time.minute = 0;
- clock_time.day = 0;
- clock_time.wday = 0;
- clock_time.month = 0;
- clock_time.year = 0;
- clock_time.flags = 0;
- errs++;
- }
-
- if (((c^0xFF)+1) & (c^0xFF))
- buf[0] = '?';
- else
- buf[0] = type(c) ? '#' : '-';
-
- for ( i = 1; i < 60; i++)
- buf[i] = '.';
-
- i = 0;
- }
- else
- {
- if (((c^0xFF)+1) & (c^0xFF))
- buf[i] = '?';
- else
- buf[i] = type(c) ? '#' : '-';
-
- printf("%c %.*s ", pat[i % (sizeof(pat)-1)], 59 - offset, &buf[offset]);
- }
-
- if (rtc == CVT_OK)
- {
- printf("%s, %2d:%02d:%02d, %d.%02d.%02d, <%s%s%s%s>",
- wday[clock_time.wday],
- (int)clock_time.hour, (int)clock_time.minute, (int)i, (int)clock_time.day, (int)clock_time.month,
- (int)clock_time.year,
- (clock_time.flags & DCFB_ALTERNATE) ? "R" : "_",
- (clock_time.flags & DCFB_ANNOUNCE) ? "A" : "_",
- (clock_time.flags & DCFB_DST) ? "D" : "_",
- (clock_time.flags & DCFB_LEAP) ? "L" : "_"
- );
- if (trace && (i == 0))
- {
- printf("\n");
- errs++;
- }
- }
-
- printf("\r");
-
- if (i < 60)
- {
- i++;
- }
-
- tlast = tt;
-
- fflush(stdout);
- }
- close(fd);
- }
- }
- return 0;
-}
diff --git a/contrib/ntp/readme.y2kfixes b/contrib/ntp/readme.y2kfixes
deleted file mode 100755
index e9a63c1..0000000
--- a/contrib/ntp/readme.y2kfixes
+++ /dev/null
Binary files differ
diff --git a/contrib/ntp/results.y2kfixes b/contrib/ntp/results.y2kfixes
deleted file mode 100644
index 32f42cf..0000000
--- a/contrib/ntp/results.y2kfixes
+++ /dev/null
@@ -1,76 +0,0 @@
-Script started on Sat Jan 1 04:14:09 2000
-[root@timetest ntpdate]# date
-Sat Jan 1 04:14:11 EST 2000
-[root@timetest ntpdate]# ./ntpdate -b timelord.att.com
-14 Jul 13:44:39 ntpdate[11723]: step time server 135.16.xxxx.xxxx offset -14740193.210537 sec
-[root@timetest ntpdate]# date
-Wed Jul 14 13:44:42 EST 1999
-[root@timetest ntpdate]# cd ../ntptrace
-[root@timetest ntptrace]# ./ntptrace timelord.att.com
-timelord.att.com: stratum 2, offset -0.000879, synch distance 0.07207
-timemaster.att.com: stratum 1, offset -0.004876, synch distance 0.03485, refid 'GPS'
-[root@timetest ntptrace]# cd -
-[root@timetest ntpdate]# date
-Mon Feb 28 01:00:04 EST 2000
-[root@timetest ntpdate]# ./ntpdate -b timelord.att.com
-14 Jul 13:49:01 ntpdate[11760]: step time server 135.16.xxxx.xxxx offset -19739467.533126 sec
-[root@timetest ntpdate]# date
-Wed Jul 14 13:49:03 EST 1999
-[root@timetest ntpdate]# cd -
-[root@timetest ntptrace]# ./ntptrace timelord.att.com
-timelord.att.com: stratum 2, offset 0.001383, synch distance 0.05644
-timemaster.att.com: stratum 1, offset -0.006355, synch distance 0.04178, refid 'GPS'
-[root@timetest ntptrace]# cd -
-[root@timetest ntpdate]# date
-Tue Feb 29 01:00:05 EST 2000
-[root@timetest ntpdate]# ./ntpdate -b timelord.att.com
-14 Jul 13:57:41 ntpdate[12423]: step time server 135.16.xxxx.xxxx offset -19825349.396585 sec
-[root@timetest ntpdate]# date
-Wed Jul 14 13:57:43 EST 1999
-[root@timetest ntpdate]# cd -
-[root@timetest ntptrace]# ./ntptrace timelord.att.com
-timelord.att.com: stratum 2, offset -0.000094, synch distance 0.06522
-timemaster.att.com: stratum 1, offset -0.010803, synch distance 0.03078, refid 'GPS'
-[root@timetest ntptrace]# cd -
-[root@timetest ntpdate]# date
-Wed Mar 1 01:00:03 EST 2000
-[root@timetest ntpdate]# ./ntpdate -b timelord.att.com
-14 Jul 13:58:10 ntpdate[12525]: step time server 135.16.xxxx.xxxx offset -19911719.766061 sec
-[root@timetest ntpdate]# date
-Wed Jul 14 13:58:12 EST 1999
-[root@timetest ntpdate]# cd -
-[root@timetest ntptrace]# ./ntptrace timelord.att.com
-timelord.att.com: stratum 2, offset -0.000719, synch distance 0.06561
-timemaster.att.com: stratum 1, offset -0.013598, synch distance 0.03116, refid 'GPS'
-
-Script done on Wed Jul 14 13:58:28 1999
-
-RESULTS OK.
---------------------END OF TEST1--------------------
-
-
-### freeware test configuration
-server 127.127.1.0 prefer
-fudge 127.127.1.0 stratum 0
-driftfile drift.log
-
-
-ntpdate timelord.att.com
-server 135.16.xxxx.xxxx stratum 1, offset 0.000033, delay 0.02975
-31 Dec 23:58:59 ntpdate[83551]: adjust time server 135.16.74.3 offset 0.039057 s
-ec
-
-ntpdate timelord.att.com
-server 135.16.xxxx.xxxx stratum 1, offset 0.000019, delay 0.02504
-01 Jan 00:01:05 ntpdate[8352]: adjust time server 135.16.74.3 offset 0.039057 s
-ec
-
-ntpdate timelord.att.com
-server 135.25.xxxx.xxxx, stratum 1, offset -0.000023, delay 0.02731
-29 Feb 00:02:15 ntpdate[8353]: adjust time server 135.25.xxxx.xxxx offset -0.000023 sec
-
-
-
-
-
-
diff --git a/contrib/ntp/scripts/Makefile.am b/contrib/ntp/scripts/Makefile.am
deleted file mode 100644
index dc41963..0000000
--- a/contrib/ntp/scripts/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-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
deleted file mode 100644
index ff2c46b..0000000
--- a/contrib/ntp/scripts/Makefile.in
+++ /dev/null
@@ -1,345 +0,0 @@
-# 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@
-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 ntptrace ntpver plot_summary summary
-SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS)
-
-DIST_SOURCES =
-DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am calc_tickadj.in \
- checktime.in freq_adj.in mkver.in ntp-wait.in ntpsweep.in \
- ntptrace.in ntpver.in plot_summary.in summary.in
-all: all-am
-
-.SUFFIXES:
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-calc_tickadj: $(top_builddir)/config.status calc_tickadj.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-checktime: $(top_builddir)/config.status checktime.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-freq_adj: $(top_builddir)/config.status freq_adj.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-mkver: $(top_builddir)/config.status mkver.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntp-wait: $(top_builddir)/config.status ntp-wait.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntpsweep: $(top_builddir)/config.status ntpsweep.in
- 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) && $(SHELL) ./config.status $(subdir)/$@
-plot_summary: $(top_builddir)/config.status plot_summary.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-summary: $(top_builddir)/config.status summary.in
- 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 \
- 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 's|^.*/||;$(transform)'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f; \
- done
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-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 $(SCRIPTS)
-
-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-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-binSCRIPTS
-
-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-binSCRIPTS uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am info info-am install \
- install-am install-binSCRIPTS 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 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.
-.NOEXPORT:
diff --git a/contrib/ntp/scripts/README b/contrib/ntp/scripts/README
deleted file mode 100644
index 673ddb4..0000000
--- a/contrib/ntp/scripts/README
+++ /dev/null
@@ -1,43 +0,0 @@
-README file for directory ./scripts of the NTP Version 4 distribution
-
-This directory contains shell and perl script files for the configuration,
-monitoring and support of NTP installations. See the README and RELNOTES
-files in the parent directory for directions on how to use these files.
-
-calc_tickadj Calculates "optimal" value for tick given ntp.drift file
-
-freq_adj Calculates and optionally sets the clock frequency
- based on ntp.drift . For FreeBSD systems.
-
-mkver.in script to create new version numbers for all sources
-
-monitoring directory containing perl scripts useful for monitoring
- operations
-
-rc1 start/stop scripts for NTP
-
-rc2 start/stop script for NTP
-
-ntp-close find public stratum 2 servers that don't respond
-
-ntp-groper script useful for reaching out and rattling the cages of
- NTP peers to see if animals are inside the bars
-
-ntp-restart script useful for killing and restarting the NTP daemon
-
-ntp-wait Blocks until ntpd is in state 4 (synchronized).
- Hopefully useful at boot time, to delay the boot sequence
- until after "ntpd -g" has set the time.
-
-ntpsweep prints per host given in <file> the NTP stratum level, the
- clock offset in seconds, the daemon version, the operating
- system and the processor.
-
-ntpver What version of the NTP daemon is running?
-
-stats directory containing awk and shell scripts useful for
- maintaining statistics summaries of clockstats, loopstats
- and peerstats files
-
-support directory containing shell and perl scripts useful for
- configuration and monitoring of NTP subnets
diff --git a/contrib/ntp/scripts/calc_tickadj.in b/contrib/ntp/scripts/calc_tickadj.in
deleted file mode 100644
index 32eae12..0000000
--- a/contrib/ntp/scripts/calc_tickadj.in
+++ /dev/null
@@ -1,38 +0,0 @@
-#! @PATH_PERL@
-#
-# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
-#
-# 970306 HMS Deal with nanoseconds. Fix sign of adjustments.
-
-$df="/etc/ntp.drift";
-# Assumes a 100Hz box with "tick" of 10000
-# Someday, we might call "tickadj" for better values...
-$base=10000; # tick: 1,000,000 / HZ
-$cvt=104.8576; # 2 ** 20 / $base
-$v1=0.;
-$v2="";
-
-if (open(DF, $df))
- {
- if ($_=<DF>)
- {
- ($v1, $v2) = split;
- }
-
- while ($v1 < 0)
- {
- $v1 += $cvt;
- $base--;
- }
-
- while ($v1 > $cvt)
- {
- $v1 -= $cvt;
- $base++;
- }
- }
-
-printf("%.3f (drift)\n", $v1);
-
-printf("%d usec; %d nsec\n", $base, ($base + ($v1/$cvt)) * 1000);
-
diff --git a/contrib/ntp/scripts/checktime.in b/contrib/ntp/scripts/checktime.in
deleted file mode 100644
index 2fe8f71..0000000
--- a/contrib/ntp/scripts/checktime.in
+++ /dev/null
@@ -1,79 +0,0 @@
-#! @PATH_PERL@
-#! @PATH_PERL@ -d
-#
-# This script compares the time of several machines with the
-# time on the local host.
-#
-# Use or modify it as you wish.
-#
-# As the original author is only expecting 14 minutes of fame,
-# leaving his name attached would be appreciated.
-#
-# R. Gary Cutbill <rgary@chrysalis.com>
-# 21 April 1999
-#
-$tol=2.0;
-$|=1;
-print "Time Check";
-
-open(HOSTS,"ypcat hosts.byaddr |"); # get a list of hosts from the yp server.
-
-while ($line=<HOSTS>) { # loop for each host getting the offset compared to localhost
- ($addr,$host,$aliases)=split(/\s+/,$line,3);
- $res=`/usr/local/bin/ntptrace -m 1 -r 1 -t 1 $host`;
- print ".";
- chop $res;
- push (@results,$res);
-}
-print "\n";
-
-
-#
-# Sort the list of hosts, and print out there offsets
-# from the local host.
-#
-@list=sort appropriately @results;
-foreach $i ( @list ) {
-
- @dargs=split(/\s+/,$i);
- if ( $dargs[1] eq "\*Timeout\*" ) {
- print "$i\n";
- chop $dargs[0];
- push(@down,$dargs[0]);
- } else {
- printf "%-25s %7s %3s %6s %10s %5s %8s %8s\n",@dargs;
- if ( ( $dargs[4] > $tol ) || ( $dargs[4] < -$tol ) ) {
- chop $dargs[0];
- push(@toofarout,$dargs[0]); }
- }
-}
-#
-# When the above list finishes, hosts that are different by +/- $tol (two seconds)
-# are in @toofarout. Hosts that are down are in @down. They are treated the same
-# way here, but you might want to do something different depending on your site.
-#
-# print a set of suggested rsh commands to run on the hosts that
-# don't have "good" time. "restartntp" is left as an excersize to the reader.
-# I usually use it to kill a running xntpd, ntpdate some server, and the start xntp
-# again.
-#
-print "\nConsider:\n";
-foreach $i ( (@down,@toofarout) ) {
- print " rsh $i sudo restartntp\n";
-}
-
-
-#
-# sort the results from the list. First by stratum, then by time deviation
-# Put hosts that didn't respond (timed out) on the bottom.
-#
-sub appropriately {
- @af=split(/\s+/,$a);
- @bf=split(/\s+/,$b);
- $aba= ($af[4]<0)?-$af[4]:$af[4];
- $abb= ($bf[4]<0)?-$bf[4]:$bf[4];
-
- ( $af[1] ne $bf[1] ) ? $bf[1] cmp $af[1] :
- ( ( $af[2] != $bf[2] ) ? ( $bf[2] <=> $af[2] ) :
- ( ( $aba != $abb ) ? ( $abb <=> $aba ) : ($af[0] cmp $bf[0] ) ) );
-}
diff --git a/contrib/ntp/scripts/fixautomakedepsmagic b/contrib/ntp/scripts/fixautomakedepsmagic
deleted file mode 100644
index ec82bba..0000000
--- a/contrib/ntp/scripts/fixautomakedepsmagic
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-prog=`basename $0`
-
-
-t=/tmp/$prog.$$
-
-trap 'rm -f ${t} ; exit 1' 1 3 15
-
-while [ $# -gt 0 ]; do
- f=$1
- shift
- sed -e '/^DEPS_MAGIC :=/,/^-include \$/s/^/#/' $f > $t
- c="diff $f $t"
- echo $c
- $c
- tstatus=$?
- if [ $tstatus = 0 ]; then
- echo "$prog":" $f not modified"
- elif [ ! -w $f ]; then
- echo "$prog":" $f not not writable"
- else
- c="cp $t $f"
- echo $c
- $c
- fi
- rm -f $t
-done
diff --git a/contrib/ntp/scripts/freq_adj.in b/contrib/ntp/scripts/freq_adj.in
deleted file mode 100644
index 88eb390..0000000
--- a/contrib/ntp/scripts/freq_adj.in
+++ /dev/null
@@ -1,97 +0,0 @@
-#! @PATH_PERL@ -w
-
-die "perl5 needed\n" unless ($] > 5);
-
-use Getopt::Std;
-use vars qw($opt_n);
-
-getopts('d:nt:');
-
-#chop($ncpu = `sysctl -n hw.ncpu`);
-#die "Found $ncpu CPUs; can only be run on systems with 1 CPU.\n" if ($ncpu > 1);
-
-$driftfile = "/etc/ntp.drift";
-$driftfile = $opt_d if defined($opt_d);
-
-chop($timer = `sysctl -n kern.timecounter.hardware 2> /dev/null`);
-
-$timer =~ tr/\U/\L/;
-
-if ($timer eq '') {
- open(DM, "/var/run/dmesg.boot");
- while(<DM>) {
- # Timecounter "i8254" frequency 1193182 Hz
- if (/^Timecounter "(\w+)"\s+/) {
- $timer = $1;
- last;
- }
- }
- close(DM);
-}
-
-$opt_t = $timer if !defined($opt_t);
-
-if ($timer ne '') { # $timer found...
- if ($opt_t ne '') { # - and $opt_t found
- if ($timer ne $opt_t) { # - - and they differ
- warn "You specified a $opt_t timer but I detected a $timer timer.\n";
- usage();
- exit 1;
- } else { # - - and they are the same
- ;
- }
- } else { # - but no $opt_t specified; this is OK
- ;
- }
-} else { # No $timer found...
- if ($opt_t ne '') { # - but $opt_t was specified
- $timer = $opt_t; # - - so use it.
- } else { # - and neither was $opt_t
- warn "I can't tell what timer you have. Please specify one.\n";
- usage();
- exit 1;
- }
-}
-
-open(DF, $driftfile) || die "Can't open driftfile ($driftfile): $!\n";
-while(<DF>) {
- chop;
- if (/^(-?\d+\.\d+)(\s\d)?$/) {
- $drift = $1;
- } else {
- die "Bogus value in driftfile $driftfile: <$_>\n";
- }
-}
-close(DF);
-
-print "NTP drift is <$drift>\n";
-
-# Convert from NTP's idea of PPM to a decimal equivalent
-$freq_adj = int ( $drift * ( 10 ** 6 / 2 ** 20) );
-print "normalized freq_adj is <$freq_adj>\n";
-
-$freq_adj = int ( ( $freq_adj - 1 ) / 2 );
-print "Applying freq_adj of <".-$freq_adj.">\n";
-
-$sysctl = "machdep.".$timer."_freq";
-
-chop($mach_freq = `sysctl -n $sysctl`);
-
-print "$sysctl is <$mach_freq>\n";
-
-$n_mach_freq = $mach_freq - $freq_adj;
-
-if (defined($opt_n)) {
- print "$sysctl $mach_freq -> $n_mach_freq\n";
-} else {
- print "i8254: ".`sysctl -w $sysctl=$n_mach_freq`;
-}
-
-sub usage {
- print STDERR <<EOUsage
-Usage: $0 [-d drift_file] [-n] [-t timer]
-where "drift_file" defaults to /etc/ntp.drift
-and "timer" is usually "tsc" or "i8254"
-and "-n" says "don't really change anything, just say what would happen".
-EOUsage
-}
diff --git a/contrib/ntp/scripts/hpadjtime.sh b/contrib/ntp/scripts/hpadjtime.sh
deleted file mode 100755
index 3de2a40..0000000
--- a/contrib/ntp/scripts/hpadjtime.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh
-val=1
-if [ -f /bin/uname -o -f /usr/bin/uname ]; then
- set `uname -a | tr '[A-Z]' '[a-z]'`
- case "$1" in
- hp-ux) case "$3" in
- *.10.*) val=1 ;;
- *.09.03 | *.09.10) case "$5" in
- 9000/3*) val=1 ;;
- *) val=0 ;;
- esac ;;
- *) val=0 ;;
- esac
- ;;
- *)
- esac
-fi
-exit $val
diff --git a/contrib/ntp/scripts/mkver.in b/contrib/ntp/scripts/mkver.in
deleted file mode 100644
index dbe9c2a..0000000
--- a/contrib/ntp/scripts/mkver.in
+++ /dev/null
@@ -1,43 +0,0 @@
-#!@PATH_SH@
-PROG=${1-UNKNOWN}
-
-ConfStr="$PROG"
-
-ConfStr="$ConfStr @VERSION@"
-
-case "$CSET" in
- '') ;;
- *) ConfStr="$ConfStr@$CSET" ;;
-esac
-
-case "@LIBRSAREF@" in
- '')
- case "@AUTOKEY@" in
- '') ;;
- *) ConfStr="${ConfStr}-a" ;;
- esac
- ;;
- *) ConfStr="${ConfStr}-r" ;;
-esac
-
-ConfStr="$ConfStr `LC_TIME=C date`"
-
-if [ ! -f .version ]; then
- echo 0 > .version
-fi
-RUN="`cat .version`"
-RUN="`expr $RUN + 1`"
-echo $RUN > .version
-
-ConfStr="$ConfStr (${RUN})"
-
-echo "Version <${ConfStr}>";
-
-rm -f version.c
-cat > version.c << -EoF-
-/*
- * version file for $PROG
- */
-#include <config.h>
-const char * Version = "${ConfStr}";
--EoF-
diff --git a/contrib/ntp/scripts/monitoring/README b/contrib/ntp/scripts/monitoring/README
deleted file mode 100644
index f8eb0a9..0000000
--- a/contrib/ntp/scripts/monitoring/README
+++ /dev/null
@@ -1,158 +0,0 @@
-This directory contains support for monitoring the local clock of xntp daemons.
-
-WARNING: The scripts and routines contained in this directory are beta
- release! Do not depend on their correct operation. They are,
- however, in regular use at University of Erlangen-Nuernberg.
- No severe problems are known for this code.
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-PLEASE THINK TWICE BEFORE STARTING MONITORING REMOTE XNTP DEAMONS !!!!
-MONITORING MAY INCREASE THE LOAD OF THE DEAMON MONITORED AND MAY
-INCREASE THE NETWORK LOAD SIGNIFICANTLY
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-
-Files are:
-
-README:
- This file
-
-ntptrap:
- perl script to log ntp mode 6 trap messages.
-
- It sends a set_trap request to each server given and dumps the
- trap messages received. It handles refresh of set_trap.
- Currently it handles only NTP V2, however the NTP V3 servers
- also accept v2 requests. It will not interpret v3 system and
- peer stati correctly.
-
- usage:
- ntptrap [-n] [-p <port>] [-l <debug-output>] servers...
-
- -n: do not send set_trap requests
-
- port: port to listen for responses
- useful if you have a configured trap
-
- debug-output: file to write trace output to (for debugging)
-
- This script convinced me that ntp trap messages are only of
- little use.
-
-ntploopstat:
- perl script to gather loop info statistics from xntpd via mode 7
- LOOP_INFO requests.
-
- This script collects data to allow monitoring of remote xntp servers
- where it is not possible to directly access the loopstats file
- produced by xntpd itself. Of course, it can be used to sample
- a local server if it is not configured to produce a loopstats file.
-
- Please note, this program poses a high load on the server as
- a communication takes place every delay seconds ! USE WITH CARE !
-
- usage:
- ntploopstat [-d<delay>] [-t<timeout>] [-l <logfile>] [-v] [ntpserver]
-
- delay: number of seconds to wait between samples
- default: 60 seconds
- timeout: number of seconds to wait for reply
- default 12 seconds
- logfile: file to log samples to
- default: loopstats:<ntpserver>:
- (note the trailing colon)
- This name actually is a prefix.
- The file name is dynamically derived by appending
- the name of the month the sample belongs to.
- Thus all samples of a month end up in the same file.
-
- the format of the files generated is identical to the format used by
- xntpd with the loopstats file:
- MJD <seconds since midnight UTC> offset frequency compliance
-
- if a timeout occurs the next sample is tried after delay/2 seconds
-
- The script will terminate after MAX_FAIL (currently 60)
- consecutive errors.
-
- Errors are counted for:
- - error on send call
- - error on select call
- - error on recv call
- - short packet received
- - bad packet
- - error on open for logfile
-
-ntploopwatch:
- perl script to display loop filter statistics collected by ntploopstat
- or dumped directly by xntpd.
-
- Gnuplot is used to produce a graphical representation of the sample
- values, that have been preprocessed and analysed by this script.
-
- It can either be called to produce a printout of specific data set or
- used to continously monitor the values. Monitoring is achieved by
- periodically reprocessing the logfiles, which are updated regularly
- either by a running ntploopstat process or by the running xntpd.
-
- usage:
- to watch statistics permanently:
- ntploopwatch [-v[<level>]] [-c <config-file>] [-d <working-dir>]
-
- to get a single print out specify also
- -P<printer> [-s<samples>]
- [-S <start-time>] [-E <end-time>]
- [-O <MaxOffs>] [-o <MinOffs>]
-
- level: level of verbosity for debugging
- config-file: file to read configurable settings from
- On each iteration it is checked and reread
- if it has been changed
- default: loopwatch.config
- working-dir: specify working directory for process, affects
- interpretation of relative file names
-
- All other flags are only useful with printing plots, as otherwise
- command line values would be replaced by settings from the config file.
-
- printer: specify printer to print plot
- BSD print systems semantics apply; if printer
- is omitted the name "ps" is used; plots are
- prepared using PostScript, thus the printer
- should best accept postscript input
-
- For the following see also the comments in loopwatch.config.SAMPLE
-
- samples: use last # samples from input data
- start-time: ignore input samples before this date
- end-time: ignore input samples after this date
- if both start-time and end-time are specified
- a given samples value is ignored
- MaxOffs:
- MinOffs: restrict value range
-
-loopwatch.config.SAMPLE:
- sample config file for ntploopwatch
- each configurable option is explained there
-
-lr.pl:
- linear regression package used by ntploopwatch to compute
- linear approximations for frequency and offset values
- within display range
-
-timelocal.pl:
-
- used during conversion of ISO_DATE_TIME values specified in
- loopwatch config files to unix epoch values (seconds since
- 1970-01-01_00:00_00 UTC)
-
- A version of this file is distributed with perl-4.x, however,
- it has a bug related to dates crossing 1970, causing endless loops..
- The version contained here has been fixed.
-
-ntp.pl:
- perl support for ntp v2 mode 6 message handling
- WARNING: This code is beta level - it triggers a memory leak;
- as for now it is not quite clear, wether this is caused by a
- bug in perl or by bad usage of perl within this script.
-
diff --git a/contrib/ntp/scripts/monitoring/loopwatch.config.SAMPLE b/contrib/ntp/scripts/monitoring/loopwatch.config.SAMPLE
deleted file mode 100644
index 8cefea3..0000000
--- a/contrib/ntp/scripts/monitoring/loopwatch.config.SAMPLE
+++ /dev/null
@@ -1,89 +0,0 @@
-# sample configuration and control file for ntploowatch
-#
-# delay: sampling interval in seconds
-delay=60
-# samples: use only last # samples
-samples=600
-# DO NOT USE srcprefix in shared config files
-# srcprefix: name of file to read samples from
-# current time suffix (month name) is appended
-# defaults to "./var@$STATHOST/loopstats."
-# The string "$STATHOST"is replaced by the name of the host
-# being monitored
-#srcprefix=./var@$STATHOST/loopstats.
-#
-# showoffs: yes/no control display of offset values
-showoffs=yes
-#
-# showfreq: yes/no control display of frequency values
-showfreq=yes
-#
-# showcmpl: yes/no control display of compliance values
-showcmpl=no
-#
-# showoreg: yes/no control display of linear regression of offset values
-showoreg=no
-#
-# showfreg: yes/no control display of linear regression of frequency values
-showfreg=no
-#
-# timebase: dynamic/ISO_DATE_TIME point of zero for linear regression
-# ISO_DATE_TIME: yyyy-mm-dd_hh:mm:ss.ms
-# values are interpreted using local time zone
-# parts omitted from front default to current date/time
-# parts omitted from end default to lowest permitted values
-# to get aa:bb being interpreted as minutes:seconds use aa:bb.0
-# for dynamic '00:00:00.0 of current day' is used
-timebase=dynamic
-#
-# freqbase: dynamic/<baseval>
-# if a number is given, subtract this from sampling values for display
-# if dynamic is selected, freqbase is adjusted to fit into the range of
-# offset values
-freqbase=dynamic
-#
-# cmplscale: dynamic/<scaling>
-# if a number is given, the sampling values are divided by this number
-# if dynamic is selected, cmplscale is adjusted to fit into the range of
-# offset values
-cmplscale=dynamic
-#
-# DumbScale: 0/1
-# 0 enables dynamic adjust of value ranges for freqbase and cmplscale
-# timescale is labeled with human readable times
-# 1 only uses explicit scaling for numbers
-# timescale is labeled with hours relative to timebase
-DumbScale=0
-#
-# StartTime: none/ISO_DATE_TIME
-# ignore any samples before the specified date
-StartTime=none
-#
-# EndTime: none/ISO_DATE_TIME
-# ignore any samples after the specified date
-#
-# if both StartTime and EndTime are specified
-# the value specified for samples is ignored
-EndTime=none
-#
-# MaxOffs: none/<number>
-# limit display (y-axis) to values not larger than <number>
-MaxOffset=none
-#
-# MinOffs: none/<number>
-# limit display (y-axis) to values not smaller than <number>
-MinOffset=none
-
-#
-# verbose: <number>
-# specify level for debugging
-# default is 0 for printing and 1 for monitoring
-# level 1 will just print a timestamp for any display update
-# (this is every delay seconds)
-verbose=1
-#
-# deltaT: <seconds>
-# mark `holes' in the sample data grater than <seconds>
-# by a break in the plot
-# default: 512 seconds
-deltaT=512
diff --git a/contrib/ntp/scripts/monitoring/lr.pl b/contrib/ntp/scripts/monitoring/lr.pl
deleted file mode 100644
index 7980d22..0000000
--- a/contrib/ntp/scripts/monitoring/lr.pl
+++ /dev/null
@@ -1,151 +0,0 @@
-;#
-;# lr.pl,v 3.1 1993/07/06 01:09:08 jbj Exp
-;#
-;#
-;# Linear Regression Package for perl
-;# to be 'required' from perl
-;#
-;# Copyright (c) 1992
-;# Frank Kardel, Rainer Pruy
-;# Friedrich-Alexander Universitaet Erlangen-Nuernberg
-;#
-;# Copyright (c) 1997 by
-;# Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-;# (Converted to a PERL 5.004 package)
-;#
-;#############################################################
-
-package lr;
-
-##
-## y = A + Bx
-##
-## B = (n * Sum(xy) - Sum(x) * Sum(y)) / (n * Sum(x^2) - Sum(x)^2)
-##
-## A = (Sum(y) - B * Sum(x)) / n
-##
-
-##
-## interface
-##
-;# init(tag); initialize data set for tag
-;# sample(x, y, tag); enter sample
-;# Y(x, tag); compute y for given x
-;# X(y, tag); compute x for given y
-;# r(tag); regression coefficient
-;# cov(tag); covariance
-;# A(tag);
-;# B(tag);
-;# sigma(tag); standard deviation
-;# mean(tag);
-#########################
-
-sub init
-{
- my $self = shift;
-
- $self->{n} = 0;
- $self->{sx} = 0.0;
- $self->{sx2} = 0.0;
- $self->{sxy} = 0.0;
- $self->{sy} = 0.0;
- $self->{sy2} = 0.0;
-}
-
-sub sample($$$)
-{
- my $self = shift;
- my($_x, $_y) = @_;
-
- ++($self->{n});
- $self->{sx} += $_x;
- $self->{sy} += $_y;
- $self->{sxy} += $_x * $_y;
- $self->{sx2} += $_x**2;
- $self->{sy2} += $_y**2;
-}
-
-sub B($)
-{
- my $self = shift;
-
- return 1 unless ($self->{n} * $self->{sx2} - $self->{sx}**2);
- return ($self->{n} * $self->{sxy} - $self->{sx} * $self->{sy})
- / ($self->{n} * $self->{sx2} - $self->{sx}**2);
-}
-
-sub A($)
-{
- my $self = shift;
-
- return ($self->{sy} - B($self) * $self->{sx}) / $self->{n};
-}
-
-sub Y($$)
-{
- my $self = shift;
-
- return A($self) + B($self) * $_[$[];
-}
-
-sub X($$)
-{
- my $self = shift;
-
- return ($_[$[] - A($self)) / B($self);
-}
-
-sub r($)
-{
- my $self = shift;
-
- my $s = ($self->{n} * $self->{sx2} - $self->{sx}**2)
- * ($self->{n} * $self->{sy2} - $self->{sy}**2);
-
- return 1 unless $s;
-
- return ($self->{n} * $self->{sxy} - $self->{sx} * $self->{sy}) / sqrt($s);
-}
-
-sub cov($)
-{
- my $self = shift;
-
- return ($self->{sxy} - $self->{sx} * $self->{sy} / $self->{n})
- / ($self->{n} - 1);
-}
-
-sub sigma($)
-{
- my $self = shift;
-
- return 0 if $self->{n} <= 1;
- return sqrt(($self->{sy2} - ($self->{sy} * $self->{sy}) / $self->{n})
- / ($self->{n}));
-}
-
-sub mean($)
-{
- my $self = shift;
-
- return 0 if $self->{n} <= 0;
- return $self->{sy} / $self->{n};
-}
-
-sub new
-{
- my $class = shift;
- my $self = {
- (n => undef,
- sx => undef,
- sx2 => undef,
- sxy => undef,
- sy => undef,
- sy2 => undef)
- };
- bless $self, $class;
- init($self);
- return $self;
-}
-
-1;
diff --git a/contrib/ntp/scripts/monitoring/ntp.pl b/contrib/ntp/scripts/monitoring/ntp.pl
deleted file mode 100644
index b23f396..0000000
--- a/contrib/ntp/scripts/monitoring/ntp.pl
+++ /dev/null
@@ -1,479 +0,0 @@
-#!/usr/bin/perl -w
-;#
-;# ntp.pl,v 3.1 1993/07/06 01:09:09 jbj Exp
-;#
-;# process loop filter statistics file and either
-;# - show statistics periodically using gnuplot
-;# - or print a single plot
-;#
-;# Copyright (c) 1992
-;# Rainer Pruy Friedrich-Alexander Universitaet Erlangen-Nuernberg
-;#
-;#
-;#############################################################
-
-package ntp;
-
-$NTP_version = 2;
-$ctrl_mode=6;
-
-$byte1 = (($NTP_version & 0x7)<< 3) & 0x34 | ($ctrl_mode & 0x7);
-$MAX_DATA = 468;
-
-$sequence = 0; # initial sequence number incred before used
-$pad=4;
-$do_auth=0; # no possibility today
-$keyid=0;
-;#list if known keys (passwords)
-%KEYS = ( 0, "\200\200\200\200\200\200\200\200",
- );
-
-;#-----------------------------------------------------------------------------
-;# access routines for ntp control packet
- ;# NTP control message format
- ;# C LI|VN|MODE LI 2bit=00 VN 3bit=2(3) MODE 3bit=6 : $byte1
- ;# C R|E|M|Op R response E error M more Op opcode
- ;# n sequence
- ;# n status
- ;# n associd
- ;# n offset
- ;# n count
- ;# a+ data (+ padding)
- ;# optional authentication data
- ;# N key
- ;# N2 checksum
-
-;# first byte of packet
-sub pkt_LI { return ($_[$[] >> 6) & 0x3; }
-sub pkt_VN { return ($_[$[] >> 3) & 0x7; }
-sub pkt_MODE { return ($_[$[] ) & 0x7; }
-
-;# second byte of packet
-sub pkt_R { return ($_[$[] & 0x80) == 0x80; }
-sub pkt_E { return ($_[$[] & 0x40) == 0x40; }
-sub pkt_M { return ($_[$[] & 0x20) == 0x20; }
-sub pkt_OP { return $_[$[] & 0x1f; }
-
-;#-----------------------------------------------------------------------------
-
-sub setkey
-{
- local($id,$key) = @_;
-
- $KEYS{$id} = $key if (defined($key));
- if (! defined($KEYS{$id}))
- {
- warn "Key $id not yet specified - key not changed\n";
- return undef;
- }
- return ($keyid,$keyid = $id)[$[];
-}
-
-;#-----------------------------------------------------------------------------
-sub numerical { $a <=> $b; }
-
-;#-----------------------------------------------------------------------------
-
-sub send #'
-{
- local($fh,$opcode, $associd, $data,$address) = @_;
- $fh = caller(0)."'$fh";
-
- local($junksize,$junk,$packet,$offset,$ret);
- $offset = 0;
-
- $sequence++;
- while(1)
- {
- $junksize = length($data);
- $junksize = $MAX_DATA if $junksize > $MAX_DATA;
-
- ($junk,$data) = $data =~ /^(.{$junksize})(.*)$/;
- $packet
- = pack("C2n5a".(($junk eq "") ? 0 : &pad($junksize+12,$pad)-12),
- $byte1,
- ($opcode & 0x1f) | ($data ? 0x20 : 0),
- $sequence,
- 0, $associd,
- $offset, $junksize, $junk);
- if ($do_auth)
- {
- ;# not yet
- }
- $offset += $junksize;
-
- if (defined($address))
- {
- $ret = send($fh, $packet, 0, $address);
- }
- else
- {
- $ret = send($fh, $packet, 0);
- }
-
- if (! defined($ret))
- {
- warn "send failed: $!\n";
- return undef;
- }
- elsif ($ret != length($packet))
- {
- warn "send failed: sent only $ret from ".length($packet). "bytes\n";
- return undef;
- }
- return $sequence unless $data;
- }
-}
-
-;#-----------------------------------------------------------------------------
-;# status interpretation
-;#
-sub getval
-{
- local($val,*list) = @_;
-
- return $list{$val} if defined($list{$val});
- return sprintf("%s#%d",$list{"-"},$val) if defined($list{"-"});
- return "unknown-$val";
-}
-
-;#---------------------------------
-;# system status
-;#
-;# format: |LI|CS|SECnt|SECode| LI=2bit CS=6bit SECnt=4bit SECode=4bit
-sub ssw_LI { return ($_[$[] >> 14) & 0x3; }
-sub ssw_CS { return ($_[$[] >> 8) & 0x3f; }
-sub ssw_SECnt { return ($_[$[] >> 4) & 0xf; }
-sub ssw_SECode { return $_[$[] & 0xf; }
-
-%LI = ( 0, "leap_none", 1, "leap_add_sec", 2, "leap_del_sec", 3, "sync_alarm", "-", "leap");
-%ClockSource = (0, "sync_unspec",
- 1, "sync_lf_clock",
- 2, "sync_uhf_clock",
- 3, "sync_hf_clock",
- 4, "sync_local_proto",
- 5, "sync_ntp",
- 6, "sync_udp/time",
- 7, "sync_wristwatch",
- "-", "ClockSource",
- );
-
-%SystemEvent = (0, "event_unspec",
- 1, "event_restart",
- 2, "event_fault",
- 3, "event_sync_chg",
- 4, "event_sync/strat_chg",
- 5, "event_clock_reset",
- 6, "event_bad_date",
- 7, "event_clock_excptn",
- "-", "event",
- );
-sub LI
-{
- &getval(&ssw_LI($_[$[]),*LI);
-}
-sub ClockSource
-{
- &getval(&ssw_CS($_[$[]),*ClockSource);
-}
-
-sub SystemEvent
-{
- &getval(&ssw_SECode($_[$[]),*SystemEvent);
-}
-
-sub system_status
-{
- return sprintf("%s, %s, %d event%s, %s", &LI($_[$[]), &ClockSource($_[$[]),
- &ssw_SECnt($_[$[]), ((&ssw_SECnt($_[$[])==1) ? "" : "s"),
- &SystemEvent($_[$[]));
-}
-;#---------------------------------
-;# peer status
-;#
-;# format: |PStat|PSel|PCnt|PCode| Pstat=6bit PSel=2bit PCnt=4bit PCode=4bit
-sub psw_PStat_config { return ($_[$[] & 0x8000) == 0x8000; }
-sub psw_PStat_authenable { return ($_[$[] & 0x4000) == 0x4000; }
-sub psw_PStat_authentic { return ($_[$[] & 0x2000) == 0x2000; }
-sub psw_PStat_reach { return ($_[$[] & 0x1000) == 0x1000; }
-sub psw_PStat_sane { return ($_[$[] & 0x0800) == 0x0800; }
-sub psw_PStat_dispok { return ($_[$[] & 0x0400) == 0x0400; }
-sub psw_PStat { return ($_[$[] >> 10) & 0x3f; }
-sub psw_PSel { return ($_[$[] >> 8) & 0x3; }
-sub psw_PCnt { return ($_[$[] >> 4) & 0xf; }
-sub psw_PCode { return $_[$[] & 0xf; }
-
-%PeerSelection = (0, "sel_reject",
- 1, "sel_candidate",
- 2, "sel_selcand",
- 3, "sel_sys.peer",
- "-", "PeerSel",
- );
-%PeerEvent = (0, "event_unspec",
- 1, "event_ip_err",
- 2, "event_authen",
- 3, "event_unreach",
- 4, "event_reach",
- 5, "event_clock_excptn",
- 6, "event_stratum_chg",
- "-", "event",
- );
-
-sub PeerSelection
-{
- &getval(&psw_PSel($_[$[]),*PeerSelection);
-}
-
-sub PeerEvent
-{
- &getval(&psw_PCode($_[$[]),*PeerEvent);
-}
-
-sub peer_status
-{
- local($x) = ("");
- $x .= "config," if &psw_PStat_config($_[$[]);
- $x .= "authenable," if &psw_PStat_authenable($_[$[]);
- $x .= "authentic," if &psw_PStat_authentic($_[$[]);
- $x .= "reach," if &psw_PStat_reach($_[$[]);
- $x .= &psw_PStat_sane($_[$[]) ? "sane," : "insane,";
- $x .= "hi_disp," unless &psw_PStat_dispok($_[$[]);
-
- $x .= sprintf(" %s, %d event%s, %s", &PeerSelection($_[$[]),
- &psw_PCnt($_[$[]), ((&psw_PCnt($_[$[]) == 1) ? "" : "s"),
- &PeerEvent($_[$[]));
- return $x;
-}
-
-;#---------------------------------
-;# clock status
-;#
-;# format: |CStat|CEvnt| CStat=8bit CEvnt=8bit
-sub csw_CStat { return ($_[$[] >> 8) & 0xff; }
-sub csw_CEvnt { return $_[$[] & 0xff; }
-
-%ClockStatus = (0, "clk_nominal",
- 1, "clk_timeout",
- 2, "clk_badreply",
- 3, "clk_fault",
- 4, "clk_prop",
- 5, "clk_baddate",
- 6, "clk_badtime",
- "-", "clk",
- );
-
-sub clock_status
-{
- return sprintf("%s, last %s",
- &getval(&csw_CStat($_[$[]),*ClockStatus),
- &getval(&csw_CEvnt($_[$[]),*ClockStatus));
-}
-
-;#---------------------------------
-;# error status
-;#
-;# format: |Err|reserved| Err=8bit
-;#
-sub esw_Err { return ($_[$[] >> 8) & 0xff; }
-
-%ErrorStatus = (0, "err_unspec",
- 1, "err_auth_fail",
- 2, "err_invalid_fmt",
- 3, "err_invalid_opcode",
- 4, "err_unknown_assoc",
- 5, "err_unknown_var",
- 6, "err_invalid_value",
- 7, "err_adm_prohibit",
- );
-
-sub error_status
-{
- return sprintf("%s", &getval(&esw_Err($_[$[]),*ErrorStatus));
-}
-
-;#-----------------------------------------------------------------------------
-;#
-;# cntrl op name translation
-
-%CntrlOpName = (1, "read_status",
- 2, "read_variables",
- 3, "write_variables",
- 4, "read_clock_variables",
- 5, "write_clock_variables",
- 6, "set_trap",
- 7, "trap_response",
- 31, "unset_trap", # !!! unofficial !!!
- "-", "cntrlop",
- );
-
-sub cntrlop_name
-{
- return &getval($_[$[],*CntrlOpName);
-}
-
-;#-----------------------------------------------------------------------------
-
-$STAT_short_pkt = 0;
-$STAT_pkt = 0;
-
-;# process a NTP control message (response) packet
-;# returns a list ($ret,$data,$status,$associd,$op,$seq,$auth_keyid)
-;# $ret: undef --> not yet complete
-;# "" --> complete packet received
-;# "ERROR" --> error during receive, bad packet, ...
-;# else --> error packet - list may contain useful info
-
-
-sub handle_packet
-{
- local($pkt,$from) = @_; # parameters
- local($len_pkt) = (length($pkt));
-;# local(*FRAGS,*lastseen);
- local($li_vn_mode,$r_e_m_op,$seq,$status,$associd,$offset,$count,$data);
- local($autch_keyid,$auth_cksum);
-
- $STAT_pkt++;
- if ($len_pkt < 12)
- {
- $STAT_short_pkt++;
- return ("ERROR","short packet received");
- }
-
- ;# now break packet apart
- ($li_vn_mode,$r_e_m_op,$seq,$status,$associd,$offset,$count,$data) =
- unpack("C2n5a".($len_pkt-12),$pkt);
- $data=substr($data,$[,$count);
- if ((($len_pkt - 12) - &pad($count,4)) >= 12)
- {
- ;# looks like an authenticator
- ($auth_keyid,$auth_cksum) =
- unpack("Na8",substr($pkt,$len_pkt-12+$[,12));
- $STAT_auth++;
- ;# no checking of auth_cksum (yet ?)
- }
-
- if (&pkt_VN($li_vn_mode) != $NTP_version)
- {
- $STAT_bad_version++;
- return ("ERROR","version ".&pkt_VN($li_vn_mode)."packet ignored");
- }
-
- if (&pkt_MODE($li_vn_mode) != $ctrl_mode)
- {
- $STAT_bad_mode++;
- return ("ERROR", "mode ".&pkt_MODE($li_vn_mode)." packet ignored");
- }
-
- ;# handle single fragment fast
- if ($offset == 0 && &pkt_M($r_e_m_op) == 0)
- {
- $STAT_single_frag++;
- if (&pkt_E($r_e_m_op))
- {
- $STAT_err_pkt++;
- return (&error_status($status),
- $data,$status,$associd,&pkt_OP($r_e_m_op),$seq,
- $auth_keyid);
- }
- else
- {
- return ("",
- $data,$status,$associd,&pkt_OP($r_e_m_op),$seq,
- $auth_keyid);
- }
- }
- else
- {
- ;# fragment - set up local name space
- $id = "$from$seq".&pkt_OP($r_e_m_op);
- $ID{$id} = 1;
- *FRAGS = "$id FRAGS";
- *lastseen = "$id lastseen";
-
- $STAT_frag++;
-
- $lastseen = 1 if !&pkt_M($r_e_m_op);
- if (!defined(%FRAGS))
- {
- print((&pkt_M($r_e_m_op) ? " more" : "")."\n");
- $FRAGS{$offset} = $data;
- ;# save other info
- @FRAGS = ($status,$associd,&pkt_OP($r_e_m_op),$seq,$auth_keyid,$r_e_m_op);
- }
- else
- {
- print((&pkt_M($r_e_m_op) ? " more" : "")."\n");
- ;# add frag to previous - combine on the fly
- if (defined($FRAGS{$offset}))
- {
- $STAT_dup_frag++;
- return ("ERROR","duplicate fragment at $offset seq=$seq");
- }
-
- $FRAGS{$offset} = $data;
-
- undef($loff);
- foreach $off (sort numerical keys(%FRAGS))
- {
- next unless defined($FRAGS{$off});
- if (defined($loff) &&
- ($loff + length($FRAGS{$loff})) == $off)
- {
- $FRAGS{$loff} .= $FRAGS{$off};
- delete $FRAGS{$off};
- last;
- }
- $loff = $off;
- }
-
- ;# return packet if all frags arrived
- ;# at most two frags with possible padding ???
- if ($lastseen && defined($FRAGS{0}) &&
- (((scalar(@x=sort numerical keys(%FRAGS)) == 2) &&
- (length($FRAGS{0}) + 8) > $x[$[+1]) ||
- (scalar(@x=sort numerical keys(%FRAGS)) < 2)))
- {
- @x=((&pkt_E($r_e_m_op) ? &error_status($status) : ""),
- $FRAGS{0},@FRAGS);
- &pkt_E($r_e_m_op) ? $STAT_err_frag++ : $STAT_frag_all++;
- undef(%FRAGS);
- undef(@FRAGS);
- undef($lastseen);
- delete $ID{$id};
- &main'clear_timeout($id);
- return @x;
- }
- else
- {
- &main'set_timeout($id,time+$timeout,"&ntp'handle_packet_timeout(\"".unpack("H*",$id)."\");"); #'";
- }
- }
- return (undef);
- }
-}
-
-sub handle_packet_timeout
-{
- local($id) = @_;
- local($r_e_m_op,*FRAGS,*lastseen,@x) = (@FRAGS[$[+5]);
-
- *FRAGS = "$id FRAGS";
- *lastseen = "$id lastseen";
-
- @x=((&pkt_E($r_e_m_op) ? &error_status($status) : "TIMEOUT"),
- $FRAGS{0},@FRAGS[$[ .. $[+4]);
- $STAT_frag_timeout++;
- undef(%FRAGS);
- undef(@FRAGS);
- undef($lastseen);
- delete $ID{$id};
- return @x;
-}
-
-
-sub pad
-{
- return $_[$[+1] * int(($_[$[] + $_[$[+1] - 1) / $_[$[+1]);
-}
-
-1;
diff --git a/contrib/ntp/scripts/monitoring/ntploopstat b/contrib/ntp/scripts/monitoring/ntploopstat
deleted file mode 100644
index 7583c7c..0000000
--- a/contrib/ntp/scripts/monitoring/ntploopstat
+++ /dev/null
@@ -1,458 +0,0 @@
-#!/usr/bin/perl -w
-# --*-perl-*-
-;#
-;# ntploopstat,v 3.1 1993/07/06 01:09:11 jbj Exp
-;#
-;# Poll NTP server using NTP mode 7 loopinfo request.
-;# Log info and timestamp to file for processing by ntploopwatch.
-;#
-;#
-;# Copyright (c) 1992
-;# Rainer Pruy Friedrich-Alexander Universitaet Erlangen-Nuernberg
-;#
-;#################################################################
-;#
-;# The format written to the logfile is the same as used by xntpd
-;# for the loopstats file.
-;# This script however allows to gather loop filter statistics from
-;# remote servers where you do not have access to the loopstats logfile.
-;#
-;# Please note: Communication delays affect the accuracy of the
-;# timestamps recorded. Effects from these delays will probably
-;# not show up, as timestamps are recorded to the second only.
-;# (Should have implemented &gettimeofday()..)
-;#
-
-$0 =~ s!^.*/([^/]+)$!$1!; # beautify script name
-
-$ntpserver = 'localhost'; # default host to poll
-$delay = 60; # default sampling rate
- ;# keep it shorter than minpoll (=64)
- ;# to get all values
-
-require "ctime.pl";
-;# handle bug in early ctime distributions
-$ENV{'TZ'} = 'MET' unless defined($ENV{'TZ'}) || $] > 4.010;
-
-if (defined(@ctime'MoY))
-{
- *MonthName = *ctime'MoY;
-}
-else
-{
- @MonthName = ('Jan','Feb','Mar','Apr','May','Jun',
- 'Jul','Aug','Sep','Oct','Nov','Dec');
-}
-
-;# this routine can be redefined to point to syslog if necessary
-sub msg
-{
- return unless $verbose;
-
- print STDERR "$0: ";
- printf STDERR @_;
-}
-
-;#############################################################
-;#
-;# process command line
-$usage = <<"E-O-S";
-
-usage:
- $0 [-d<delay>] [-t<timeout>] [-l <logfile>] [-v] [ntpserver]
-E-O-S
-
-while($_ = shift)
-{
- /^-v(\d*)$/ && ($verbose=($1 eq '') ? 1 : $1,1) && next;
- /^-d(\d*)$/ &&
- do {
- ($1 ne '') && ($delay = $1,1) && next;
- @ARGV || die("$0: delay value missing after -d\n$usage");
- $delay = shift;
- ($delay >= 0) || die("$0: bad delay value \"$delay\"\n$usage");
- next;
- };
- /^-l$/ &&
- do {
- @ARGV || die("$0: logfile missing after -l\n$usage");
- $logfile = shift;
- next;
- };
- /^-t(\d*(\.\d*)?)$/ &&
- do {
- ($1 ne '') && ($timeout = $1,1) && next;
- @ARGV || die("$0: timeout value missing after -t\n$usage\n");
- $timeout = shift;
- ($timeout > 0) ||
- die("$0: bad timeout value \"$timeout\"\n$usage");
- next;
- };
-
- /^-/ && die("$0: unknown option \"$_\"\n$usage");
-
- ;# any other argument is server to poll
- $ntpserver = $_;
- last;
-}
-
-if (@ARGV)
-{
- warn("unexpected arguments: ".join(" ",@ARGV).".\n");
- die("$0: too many servers specified\n$usage");
-}
-
-;# logfile defaults to include server name
-;# The name of the current month is appended and
-;# the file is opened and closed for each sample.
-;#
-$logfile = "loopstats:$ntpserver." unless defined($logfile);
-$timeout = 12.0 unless defined($timeout); # wait $timeout seconds for reply
-
-$MAX_FAIL = 60; # give up after $MAX_FAIL failed polls
-
-
-$MJD_1970 = 40587;
-
-if (eval 'require "syscall.ph";')
-{
- if (defined(&SYS_gettimeofday))
- {
- ;# assume standard
- ;# gettimeofday(struct timeval *tp,struct timezone *tzp)
- ;# syntax for gettimeofday syscall
- ;# tzp = NULL -> undef
- ;# tp = (long,long)
- eval 'sub time { local($tz) = pack("LL",0,0);
- (&msg("gettimeofday failed: $!\n"),
- return (time))
- unless syscall(&SYS_gettimeofday,$tz,undef) == 0;
- local($s,$us) = unpack("LL",$tz);
- return $s + $us/1000000; }';
- local($t1,$t2,$t3);
- $t1 = time;
- eval '$t2 = &time;';
- $t3 = time;
- die("$0: gettimeofday failed: $@.\n") if defined($@) && $@;
- die("$0: gettimeofday inconsistency time=$t1,gettimeofday=$t2,time=$t2\n")
- if (int($t1) != int($t2) && int($t3) != int($t2));
- &msg("Using gettimeofday for timestamps\n");
- }
- else
- {
- warn("No gettimeofday syscall found - using time builtin for timestamps\n");
- eval 'sub time { return time; }';
- }
-}
-else
-{
- warn("No syscall.ph file found - using time builtin for timestamps\n");
- eval 'sub time { return time; }';
-}
-
-
-;#------------------+
-;# from ntp_request.h
-;#------------------+
-
-;# NTP mode 7 packet format:
-;# Byte 1: ResponseBit MoreBit Version(3bit) Mode(3bit)==7
-;# Byte 2: AuthBit Sequence # - 0 - 127 see MoreBit
-;# Byte 3: Implementation #
-;# Byte 4: Request Code
-;#
-;# Short 1: Err(3bit) NumItems(12bit)
-;# Short 2: MBZ(3bit)=0 DataItemSize(12bit)
-;# 0 - 500 byte Data
-;# if AuthBit is set:
-;# Long: KeyId
-;# 2xLong: AuthCode
-
-;#
-$IMPL_XNTPD = 2;
-$REQ_LOOP_INFO = 8;
-
-
-;# request packet for REQ_LOOP_INFO:
-;# B1: RB=0 MB=0 V=2 M=7
-;# B2: S# = 0
-;# B3: I# = IMPL_XNTPD
-;# B4: RC = REQ_LOOP_INFO
-;# S1: E=0 NI=0
-;# S2: MBZ=0 DIS=0
-;# data: 32 byte 0 padding
-;# 8byte timestamp if encryption, 0 padding otherwise
-$loopinfo_reqpkt =
- pack("CCCC nn x32 x8", 0x17, 0, $IMPL_XNTPD, $REQ_LOOP_INFO, 0, 0);
-
-;# ignore any auth data in packets
-$loopinfo_response_size =
- 1+1+1+1+2+2 # header size like request pkt
- + 8 # l_fp last_offset
- + 8 # l_fp drift_comp
- + 4 # u_long compliance
- + 4 # u_long watchdog_timer
- ;
-$loopinfo_response_fmt = "C4n2N2N2NN";
-$loopinfo_response_fmt_v2 = "C4n2N2N2N2N";
-
-;#
-;# prepare connection to server
-;#
-
-;# workaround for broken socket.ph on dynix_ptx
-eval 'sub INTEL {1;}' unless defined(&INTEL);
-eval 'sub ATT {1;}' unless defined(&ATT);
-
-require "sys/socket.ph";
-
-require 'netinet/in.ph';
-
-;# if you do not have netinet/in.ph enable the following lines
-;#eval 'sub INADDR_ANY { 0x00000000; }' unless defined(&INADDR_ANY);
-;#eval 'sub IPPRORO_UDP { 17; }' unless defined(&IPPROTO_UDP);
-
-if ($ntpserver =~ /^((0x?)?\w+)\.((0x?)?\w+)\.((0x?)?\w+)\.((0x?)?\w+)$/)
-{
- local($a,$b,$c,$d) = ($1,$3,$5,$7);
- $a = oct($a) if defined($2);
- $b = oct($b) if defined($4);
- $c = oct($c) if defined($6);
- $d = oct($d) if defined($8);
- $server_addr = pack("C4", $a,$b,$c,$d);
-
- $server_mainname
- = (gethostbyaddr($server_addr,&AF_INET))[$[] || $ntpserver;
-}
-else
-{
- ($server_mainname,$server_addr)
- = (gethostbyname($ntpserver))[$[,$[+4];
-
- die("$0: host \"$ntpserver\" is unknown\n")
- unless defined($server_addr);
-}
-&msg ("Address of server \"$ntpserver\" is \"%d.%d.%d.%d\"\n",
- unpack("C4",$server_addr));
-
-$proto_udp = (getprotobyname('udp'))[$[+2] || &IPPROTO_UDP;
-
-$ntp_port =
- (getservbyname('ntp','udp'))[$[+2] ||
- (warn "Could not get port number for service \"ntp/udp\" using 123\n"),
- ($ntp_port=123);
-
-;#
-0 && &SOCK_DGRAM; # satisfy perl -w ...
-socket(S, &AF_INET, &SOCK_DGRAM, $proto_udp) ||
- die("Cannot open socket: $!\n");
-
-bind(S, pack("S n N x8", &AF_INET, 0, &INADDR_ANY)) ||
- die("Cannot bind: $!\n");
-
-($my_port, $my_addr) = (unpack("S n a4 x8",getsockname(S)))[$[+1,$[+2];
-
-&msg("Listening at address %d.%d.%d.%d port %d\n",
- unpack("C4",$my_addr), $my_port);
-
-$server_inaddr = pack("Sna4x8", &AF_INET, $ntp_port, $server_addr);
-
-;############################################################
-;#
-;# the main loop:
-;# send request
-;# get reply
-;# wait til next sample time
-
-undef($lasttime);
-$lostpacket = 0;
-
-while(1)
-{
- $stime = &time;
-
- &msg("Sending request $stime...\n");
-
- $ret = send(S,$loopinfo_reqpkt,0,$server_inaddr);
-
- if (! defined($ret) || $ret < length($loopinfo_reqpkt))
- {
- warn("$0: send failed ret=($ret): $!\n");
- $fail++;
- next;
- }
-
- &msg("Waiting for reply...\n");
-
- $mask = ""; vec($mask,fileno(S),1) = 1;
- $ret = select($mask,undef,undef,$timeout);
-
- if (! defined($ret))
- {
- warn("$0: select failed: $!\n");
- $fail++;
- next;
- }
- elsif ($ret == 0)
- {
- warn("$0: request to $ntpserver timed out ($timeout seconds)\n");
- ;# do not count this event as failure
- ;# it usually this happens due to dropped udp packets on noisy and
- ;# havily loaded lines, so just try again;
- $lostpacket = 1;
- next;
- }
-
- &msg("Receiving reply...\n");
-
- $len = 520; # max size of a mode 7 packet
- $reply = ""; # just make it defined for -w
- $ret = recv(S,$reply,$len,0);
-
- if (!defined($ret))
- {
- warn("$0: recv failed: $!\n");
- $fail++;
- next;
- }
-
- $etime = &time;
- &msg("Received at\t$etime\n");
-
- ;#$time = ($stime + $etime) / 2; # symmetric delay assumed
- $time = $etime; # the above assumption breaks for X25
- ;# so taking etime makes timestamps be a
- ;# little late, but keeps them increasing
- ;# monotonously
-
- &msg(sprintf("Reply from %d.%d.%d.%d took %f seconds\n",
- (unpack("SnC4",$ret))[$[+2 .. $[+5], ($etime - $stime)));
-
- if ($len < $loopinfo_response_size)
- {
- warn("$0: short packet ($len bytes) received ($loopinfo_response_size bytes expected\n");
- $fail++;
- next;
- }
-
- ($b1,$b2,$b3,$b4,$s1,$s2,
- $offset_i,$offset_f,$drift_i,$drift_f,$compl,$watchdog)
- = unpack($loopinfo_response_fmt,$reply);
-
- ;# check reply
- if (($s1 >> 12) != 0) # error !
- {
- die("$0: got error reply ".($s1>>12)."\n");
- }
- if (($b1 != 0x97 && $b1 != 0x9f) || # Reply NotMore V=2 M=7
- ($b2 != 0 && $b2 != 0x80) || # S=0 Auth no/yes
- $b3 != $IMPL_XNTPD || # ! IMPL_XNTPD
- $b4 != $REQ_LOOP_INFO || # Ehh.. not loopinfo reply ?
- $s1 != 1 || # ????
- ($s2 != 24 && $s2 != 28) #
- )
- {
- warn("$0: Bad/unexpected reply from server:\n");
- warn(" \"".unpack("H*",$reply)."\"\n");
- warn(" ".sprintf("b1=%x b2=%x b3=%x b4=%x s1=%d s2=%d\n",
- $b1,$b2,$b3,$b4,$s1,$s2));
- $fail++;
- next;
- }
- elsif ($s2 == 28)
- {
- ;# seems to be a version 2 xntpd
- ($b1,$b2,$b3,$b4,$s1,$s2,
- $offset_i,$offset_f,$drift_i,$drift_f,$compl_i,$compl_f,$watchdog)
- = unpack($loopinfo_response_fmt_v2,$reply);
- $compl = &lfptoa($compl_i, $compl_f);
- }
-
- $time -= $watchdog;
-
- $offset = &lfptoa($offset_i, $offset_f);
- $drift = &lfptoa($drift_i, $drift_f);
-
- &log($time,$offset,$drift,$compl) && ($fail = 0);;
-}
-continue
-{
- die("$0: Too many failures - terminating\n") if $fail > $MAX_FAIL;
- &msg("Sleeping " . ($lostpacket ? ($delay / 2) : $delay) . " seconds...\n");
-
- sleep($lostpacket ? ($delay / 2) : $delay);
- $lostpacket = 0;
-}
-
-sub log
-{
- local($time,$offs,$freq,$cmpl) = @_;
- local($y,$m,$d);
- local($fname,$suff) = ($logfile);
-
-
- ;# silently drop sample if distance to last sample is too low
- if (defined($lasttime) && ($lasttime + 2) >= $time)
- {
- &msg("Dropped packet - old sample\n");
- return 1;
- }
-
- ;# $suff determines which samples end up in the same file
- ;# could have used $year (;-) or WeekOfYear, DayOfYear,....
- ;# Change it to your suit...
-
- ($d,$m,$y) = (localtime($time))[$[+3 .. $[+5];
- $suff = sprintf("%04d%02d%02d",$y+1900,$m+1,$d);
- $fname .= $suff;
- if (!open(LOG,">>$fname"))
- {
- warn("$0: open($fname) failed: $!\n");
- $fail++;
- return 0;
- }
- else
- {
- ;# file format
- ;# MJD seconds offset drift compliance
- printf LOG ("%d %.3lf %.8lf %.7lf %d\n",
- int($time/86400)+$MJD_1970,
- $time - int($time/86400) * 86400,
- $offs,$freq,$cmpl);
- close(LOG);
- $lasttime = $time;
- }
- return 1;
-}
-
-;# see ntp_fp.h to understand this
-sub lfptoa
-{
- local($i,$f) = @_;
- local($sign) = 1;
-
-
- if ($i & 0x80000000)
- {
- if ($f == 0)
- {
- $i = -$i;
- }
- else
- {
- $f = -$f;
- $i = ~$i;
- $i += 1; # 2s complement
- }
- $sign = -1;
- ;#print "NEG: $i $f\n";
- }
- else
- {
- ;#print "POS: $i $f\n";
- }
- ;# unlike xntpd I have perl do the dirty work.
- ;# Using floats here may affect precision, but
- ;# currently these bits aren't significant anyway
- return $sign * ($i + $f/2**32);
-}
diff --git a/contrib/ntp/scripts/monitoring/ntploopwatch b/contrib/ntp/scripts/monitoring/ntploopwatch
deleted file mode 100644
index db661d3..0000000
--- a/contrib/ntp/scripts/monitoring/ntploopwatch
+++ /dev/null
@@ -1,1667 +0,0 @@
-#!/usr/bin/perl -w
-;# --*-perl-*--
-;#
-;# /src/NTP/ntp-4/scripts/monitoring/ntploopwatch,v 4.3 1999/02/21 12:18:38 kardel RELEASE_19990228_A
-;# RELEASE_19990228_A
-;#
-;# process loop filter statistics file and either
-;# - show statistics periodically using gnuplot
-;# - or print a single plot
-;#
-;# Copyright (c) 1992-1998
-;# Rainer Pruy, Friedrich-Alexander Universität Erlangen-Nürnberg
-;#
-;#
-;#############################################################
-$0 =~ s!^.*/([^/]+)$!$1!;
-$F = ' ' x length($0);
-$|=1;
-
-$ENV{'SHELL'} = '/bin/sh'; # use bourne shell
-
-undef($config);
-undef($workdir);
-undef($PrintIt);
-undef($samples);
-undef($StartTime);
-undef($EndTime);
-($a,$b) if 0; # keep -w happy
-$usage = <<"E-O-P";
-usage:
- to watch statistics permanently:
- $0 [-v[<level>]] [-c <config-file>] [-d <working-dir>]
- $F [-h <hostname>]
-
- to get a single print out specify also
- $F -P[<printer>] [-s<samples>]
- $F [-S <start-time>] [-E <end-time>]
- $F [-Y <MaxOffs>] [-y <MinOffs>]
-
-If You like long option names, You can use:
- -help
- -c +config
- -d +directory
- -h +host
- -v +verbose[=<level>]
- -P +printer[=<printer>]
- -s +samples[=<samples>]
- -S +starttime
- -E +endtime
- -Y +maxy
- -y +miny
-
-If <printer> contains a '/' (slash character) output is directed to
-a file of this name instead of delivered to a printer.
-E-O-P
-
-;# add directory to look for lr.pl and timelocal.pl (in front of current list)
-unshift(@INC,"/usr/local/xntp/monitoring");
-
-require "lr.pl"; # linear regresion routines
-
-$MJD_1970 = 40587; # from ntp.h (V3)
-$RecordSize = 48; # usually a line fits into 42 bytes
-$MinClip = 1; # clip Y scales with greater range than this
-
-;# largest extension of Y scale from mean value, factor for standart deviation
-$FuzzLow = 2.2; # for side closer to zero
-$FuzzBig = 1.8; # for side farther from zero
-
-require "ctime.pl";
-require "timelocal.pl";
-;# early distributions of ctime.pl had a bug
-$ENV{'TZ'} = 'MET' unless defined $ENV{'TZ'} || $[ > 4.010;
-if (defined(@ctime'MoY))
-{
- *Month=*ctime'MoY;
- *Day=*ctime'DoW;
-} # ' re-sync emacs fontification
-else
-{
- @Month = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
- @Day = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
-}
-print @ctime'DoW if 0; # ' re-sync emacs fontification
-
-;# max number of days per month
-@MaxNumDaysPerMonth = (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
-
-;# config settable parameters
-$delay = 60;
-$srcprefix = "./var\@\$STATHOST/loopstats.";
-$showoffs = 1;
-$showfreq = 1;
-$showcmpl = 0;
-$showoreg = 0;
-$showfreg = 0;
-undef($timebase);
-undef($freqbase);
-undef($cmplscale);
-undef($MaxY);
-undef($MinY);
-$deltaT = 512; # indicate sample data gaps greater than $deltaT seconds
-$verbose = 1;
-
-while($_ = shift(@ARGV))
-{
- (/^[+-]help$/) && die($usage);
-
- (/^-c$/ || /^\+config$/) &&
- (@ARGV || die($usage), $config = shift(@ARGV), next);
-
- (/^-d$/ || /^\+directory$/) &&
- (@ARGV || die($usage), $workdir = shift(@ARGV), next);
-
- (/^-h$/ || /^\+host$/) &&
- (@ARGV || die($usage), $STATHOST = shift, next);
-
- (/^-v(\d*)$/ || /^\+verbose=?(\d*)$/) &&
- ($verbose=($1 eq "") ? 1 : $1, next);
-
- (/^-P(\S*)$/ || /^\+[Pp]rinter=?(\S*)$/) &&
- ($PrintIt = $1, $verbose==1 && ($verbose = 0), next);
-
- (/^-s(\d*)$/ || /^\+samples=?(\d*)$/) &&
- (($samples = ($1 eq "") ? (shift || die($usage)): $1), next);
-
- (/^-S$/ || /^\+[Ss]tart[Tt]ime$/) &&
- (@ARGV || die($usage), $StartTime=&date_time_spec2seconds(shift),next);
-
- (/^-E$/ || /^\+[Ee]nd[Tt]ime$/) &&
- (@ARGV || die($usage), $EndTime = &date_time_spec2seconds(shift),next);
-
- (/^-Y$/ || /^\+[Mm]ax[Yy]$/) &&
- (@ARGV || die($usage), $MaxY = shift, next);
-
- (/^-y$/ || /^\+[Mm]in[Yy]$/) &&
- (@ARGV || die($usage), $MinY = shift, next);
-
- die("$0: unexpected argument \"$_\"\n$usage");
-}
-
-if (defined($workdir))
-{
- chdir($workdir) ||
- die("$0: failed to change working dir to \"$workdir\": $!\n");
-}
-
-$PrintIt = "ps" if defined($PrintIt) && $PrintIt eq "";
-
-if (!defined($PrintIt))
-{
- defined($samples) &&
- print "WARNING: your samples value may be shadowed by config file settings\n";
- defined($StartTime) &&
- print "WARNING: your StartTime value may be shadowed by config file settings\n";
- defined($EndTime) &&
- print "WARNING: your EndTime value may be shadowed by config file settings\n";
- defined($MaxY) &&
- print "WARNING: your MaxY value may be shadowed by config file settings\n";
- defined($MinY) &&
- print "WARNING: your MinY value may be shadowed by config file settings\n";
-
- ;# check operating environment
- ;#
- ;# gnuplot usually has X support
- ;# I vaguely remember there was one with sunview support
- ;#
- ;# If Your plotcmd can display graphics using some other method
- ;# (Tek window,..) fix the following test
- ;# (or may be, just disable it)
- ;#
- !(defined($ENV{'DISPLAY'}) || defined($ENV{'WINDOW_PARENT'})) &&
- die("Need window system to monitor statistics\n");
-}
-
-;# configuration file
-$config = "loopwatch.config" unless defined($config);
-($STATHOST = $config) =~ s!.*loopwatch\.config.([^/\.]*)$!$1!
- unless defined($STATHOST);
-($STATTAG = $STATHOST) =~ s/^([^\.\*\s]+)\..*$/$1/;
-
-$srcprefix =~ s/\$STATHOST/$STATHOST/g;
-
-;# plot command
-@plotcmd=("gnuplot",
- '-title', "Ntp loop filter statistics $STATHOST",
- '-name', "NtpLoopWatch_$STATTAG");
-$tmpfile = "/tmp/ntpstat.$$";
-
-;# other variables
-$doplot = ""; # assembled command for @plotcmd to display plot
-undef($laststat);
-
-;# plot value ranges
-undef($mintime);
-undef($maxtime);
-undef($minoffs);
-undef($maxoffs);
-undef($minfreq);
-undef($maxfreq);
-undef($mincmpl);
-undef($maxcmpl);
-undef($miny);
-undef($maxy);
-
-;# stop operation if plot command dies
-sub sigchld
-{
- local($pid) = wait;
- unlink($tmpfile);
- warn(sprintf("%s: %s died: exit status: %d signal %d\n",
- $0,
- (defined($Plotpid) && $Plotpid == $pid)
- ? "plotcmd" : "unknown child $pid",
- $?>>8,$? & 0xff)) if $?;
- exit(1) if $? && defined($Plotpid) && $pid == $Plotpid;
-}
-&sigchld if 0;
-$SIG{'CHLD'} = "sigchld";
-$SIG{'CLD'} = "sigchld";
-
-sub abort
-{
- unlink($tmpfile);
- defined($Plotpid) && kill('TERM',$Plotpid);
- die("$0: received signal SIG$_[$[] - exiting\n");
-}
-&abort if 0; # make -w happy - &abort IS used
-$SIG{'INT'} = $SIG{'HUP'} = $SIG{'QUIT'} = $SIG{'TERM'} = $SIG{'PIPE'} = "abort";
-
-;#
-sub abs
-{
- ($_[$[] < 0) ? -($_[$[]) : $_[$[];
-}
-
-sub boolval
-{
- local($v) = ($_[$[]);
-
- return 1 if ($v eq 'yes') || ($v eq 'y');
- return 1 if ($v =~ /^[0-9]*$/) && ($v != 0);
- return 0;
-}
-
-;#####################
-;# start of real work
-
-print "starting plot command (" . join(" ",@plotcmd) . ")\n" if $verbose > 1;
-
-$Plotpid = open(PLOT,"|-");
-select((select(PLOT),$|=1)[$[]); # make PLOT line bufferd
-
-defined($Plotpid) ||
- die("$0: failed to start plot command: $!\n");
-
-unless ($Plotpid)
-{
- ;# child == plot command
- close(STDOUT);
- open(STDOUT,">&STDERR") ||
- die("$0: failed to redirect STDOUT of plot command: $!\n");
-
- print STDOUT "plot command running as $$\n";
-
- exec @plotcmd;
- die("$0: failed to exec (@plotcmd): $!\n");
- exit(1); # in case ...
-}
-
-sub read_config
-{
- local($at) = (stat($config))[$[+9];
- local($_,$c,$v);
-
- (undef($laststat),(print("stat $config failed: $!\n")),return) if ! defined($at);
- return if (defined($laststat) && ($laststat == $at));
- $laststat = $at;
-
- print "reading configuration from \"$config\"\n" if $verbose;
-
- open(CF,"<$config") ||
- (warn("$0: failed to read \"$config\" - using old settings ($!)\n"),
- return);
- while(<CF>)
- {
- chop;
- s/^([^\#]*[^\#\s]?)\s*\#.*$//;
- next if /^\s*$/;
-
- s/^\s*([^=\s]*)\s*=\s*(.*\S)\s*$/$1=$2/;
-
- ($c,$v) = split(/=/,$_,2);
- print "processing \"$c=$v\"\n" if $verbose > 3;
- ($c eq "delay") && ($delay = $v,1) && next;
- ($c eq 'samples') && (!defined($PrintIt) || !defined($samples)) &&
- ($samples = $v,1) && next;
- ($c eq 'srcprefix') && (($srcprefix=$v)=~s/\$STATHOST/$STATHOST/g,1)
- && next;
- ($c eq 'showoffs') &&
- ($showoffs = boolval($v),1) && next;
- ($c eq 'showfreq') &&
- ($showfreq = boolval($v),1) && next;
- ($c eq 'showcmpl') &&
- ($showcmpl = boolval($v),1) && next;
- ($c eq 'showoreg') &&
- ($showoreg = boolval($v),1) && next;
- ($c eq 'showfreg') &&
- ($showfreg = boolval($v),1) && next;
-
- ($c eq 'exit') && (unlink($tmpfile),die("$0: exit by config request\n"));
-
- ($c eq 'freqbase' ||
- $c eq 'cmplscale') &&
- do {
- if (! defined($v) || $v eq "" || $v eq 'dynamic')
- {
- eval "undef(\$$c);";
- }
- else
- {
- eval "\$$c = \$v;";
- }
- next;
- };
- ($c eq 'timebase') &&
- do {
- if (! defined($v) || $v eq "" || $v eq "dynamic")
- {
- undef($timebase);
- }
- else
- {
- $timebase=&date_time_spec2seconds($v);
- }
- };
- ($c eq 'EndTime') &&
- do {
- next if defined($EndTime) && defined($PrintIt);
- if (! defined($v) || $v eq "" || $v eq "none")
- {
- undef($EndTime);
- }
- else
- {
- $EndTime=&date_time_spec2seconds($v);
- }
- };
- ($c eq 'StartTime') &&
- do {
- next if defined($StartTime) && defined($PrintIt);
- if (! defined($v) || $v eq "" || $v eq "none")
- {
- undef($StartTime);
- }
- else
- {
- $StartTime=&date_time_spec2seconds($v);
- }
- };
-
- ($c eq 'MaxY') &&
- do {
- next if defined($MaxY) && defined($PrintIt);
- if (! defined($v) || $v eq "" || $v eq "none")
- {
- undef($MaxY);
- }
- else
- {
- $MaxY=$v;
- }
- };
-
- ($c eq 'MinY') &&
- do {
- next if defined($MinY) && defined($PrintIt);
- if (! defined($v) || $v eq "" || $v eq "none")
- {
- undef($MinY);
- }
- else
- {
- $MinY=$v;
- }
- };
-
- ($c eq 'deltaT') &&
- do {
- if (!defined($v) || $v eq "")
- {
- undef($deltaT);
- }
- else
- {
- $deltaT = $v;
- }
- next;
- };
- ($c eq 'verbose') && ! defined($PrintIt) &&
- do {
- if (!defined($v) || $v == 0)
- {
- $verbose = 0;
- }
- else
- {
- $verbose = $v;
- }
- next;
- };
- ;# otherwise: silently ignore unrecognized config line
- }
- close(CF);
- ;# set show defaults when nothing selected
- $showoffs = $showfreq = $showcmpl = 1
- unless $showoffs || $showfreq || $showcmpl;
- if ($verbose > 3)
- {
- print "new configuration:\n";
- print " delay\t= $delay\n";
- print " samples\t= $samples\n";
- print " srcprefix\t= $srcprefix\n";
- print " showoffs\t= $showoffs\n";
- print " showfreq\t= $showfreq\n";
- print " showcmpl\t= $showcmpl\n";
- print " showoreg\t= $showoreg\n";
- print " showfreg\t= $showfreg\n";
- printf " timebase\t= %s",defined($timebase)?&ctime($timebase):"dynamic\n";
- printf " freqbase\t= %s\n",defined($freqbase) ?"$freqbase":"dynamic";
- printf " cmplscale\t= %s\n",defined($cmplscale)?"$cmplscale":"dynamic";
- printf " StartTime\t= %s",defined($StartTime)?&ctime($StartTime):"none\n";
- printf " EndTime\t= %s", defined($EndTime) ? &ctime($EndTime):"none\n";
- printf " MaxY\t= %s",defined($MaxY)? $MaxY :"none\n";
- printf " MinY\t= %s",defined($MinY)? $MinY :"none\n";
- print " verbose\t= $verbose\n";
- }
-print "configuration file read\n" if $verbose > 2;
-}
-
-sub make_doplot
-{
- local($c) = ("");
- local($fmt)
- = ("%s \"%s\" using 1:%d title '%s <%lf %lf> %6s' with lines");
- local($regfmt)
- = ("%s ((%lf * x) + %lf) title 'lin. approx. %s (%f t[h]) %s %f <%f> %6s' with lines");
-
- $doplot = " set title 'NTP loopfilter statistics for $STATHOST " .
- "(last $LastCnt samples from $srcprefix*)'\n";
-
- local($xts,$xte,$i,$t);
-
- local($s,$c) = ("");
-
- ;# number of integral seconds to get at least 12 tic marks on x axis
- $t = int(($maxtime - $mintime) / 12 + 0.5);
- $t = 1 unless $t; # prevent $t to be zero
- foreach $i (30,
- 60,5*60,15*60,30*60,
- 60*60,2*60*60,6*60*60,12*60*60,
- 24*60*60,48*60*60)
- {
- last if $t < $i;
- $t = $t - ($t % $i);
- }
- print "time label resolution: $t seconds\n" if $verbose > 1;
-
- ;# make gnuplot use wall clock time labels instead of NTP seconds
- for ($c="", $i = $mintime - ($mintime % $t);
- $i <= $maxtime + $t;
- $i += $t, $c=",")
- {
- $s .= $c;
- ((int($i / $t) % 2) &&
- ($s .= sprintf("'' %lf",($i - $LastTimeBase)/3600))) ||
- (($t <= 60) &&
- ($s .= sprintf("'%d:%02d:%02d' %lf",
- (localtime($i))[$[+2,$[+1,$[+0],
- ($i - $LastTimeBase)/3600)))
- || (($t <= 2*60*60) &&
- ($s .= sprintf("'%d:%02d' %lf",
- (localtime($i))[$[+2,$[+1],
- ($i - $LastTimeBase)/3600)))
- || (($t <= 12*60*60) &&
- ($s .= sprintf("'%s %d:00' %lf",
- $Day[(localtime($i))[$[+6]],
- (localtime($i))[$[+2],
- ($i - $LastTimeBase)/3600)))
- || ($s .= sprintf("'%d.%d-%d:00' %lf",
- (localtime($i))[$[+3,$[+4,$[+2],
- ($i - $LastTimeBase)/3600));
- }
- $doplot .= "set xtics ($s)\n";
-
- chop($xts = &ctime($mintime));
- chop($xte = &ctime($maxtime));
- $doplot .= "set xlabel 'Start: $xts -- Time Scale -- End: $xte'\n";
- $doplot .= "set yrange [" ;
- $doplot .= defined($MinY) ? sprintf("%lf", $MinY) : $miny;
- $doplot .= ':';
- $doplot .= defined($MaxY) ? sprintf("%lf", $MaxY) : $maxy;
- $doplot .= "]\n";
-
- $doplot .= " plot";
- $c = "";
- $showoffs &&
- ($doplot .= sprintf($fmt,$c,$tmpfile,2,
- "offset",
- $minoffs,$maxoffs,
- "[ms]"),
- $c = ",");
- $LastCmplScale = 1 if ! defined($LastCmplScale);
- $showcmpl &&
- ($doplot .= sprintf($fmt,$c,$tmpfile,4,
- "compliance" .
- (&abs($LastCmplScale) > 1
- ? " / $LastCmplScale"
- : (&abs($LastCmplScale) == 1 ? "" : " * ".(1/$LastCmplScale))),
- $mincmpl/$LastCmplScale,$maxcmpl/$LastCmplScale,
- ""),
- $c = ",");
- $LastFreqBase = 0 if ! defined($LastFreqBase);
- $LastFreqBaseString = "?" if ! defined($LastFreqBaseString);
- $FreqScale = 1 if ! defined($FreqScale);
- $FreqScaleInv = 1 if ! defined($FreqScaleInv);
- $showfreq &&
- ($doplot .= sprintf($fmt,$c,$tmpfile,3,
- "frequency" .
- ($LastFreqBase > 0
- ? " - $LastFreqBaseString"
- : ($LastFreqBase == 0 ? "" : " + $LastFreqBaseString")),
- $minfreq * $FreqScale - $LastFreqBase,
- $maxfreq * $FreqScale - $LastFreqBase,
- "[${FreqScaleInv}ppm]"),
- $c = ",");
- $showoreg && $showoffs &&
- ($doplot .= sprintf($regfmt, $c,
- &lr_B('offs'),&lr_A('offs'),
- "offset ",
- &lr_B('offs'),
- ((&lr_A('offs')) < 0 ? '-' : '+'),
- &abs(&lr_A('offs')), &lr_r('offs'),
- "[ms]"),
- $c = ",");
- $showfreg && $showfreq &&
- ($doplot .= sprintf($regfmt, $c,
- &lr_B('freq') * $FreqScale,
- (&lr_A('freq') + $minfreq) * $FreqScale - $LastFreqBase,
- "frequency",
- &lr_B('freq') * $FreqScale,
- ((&lr_A('freq') + $minfreq) * $FreqScale - $LastFreqBase) < 0 ? '-' : '+',
- &abs((&lr_A('freq') + $minfreq) * $FreqScale - $LastFreqBase),
- &lr_r('freq'),
- "[${FreqScaleInv}ppm]"),
- $c = ",");
- $doplot .= "\n";
-}
-
-%F_key = ();
-%F_name = ();
-%F_size = ();
-%F_mtime = ();
-%F_first = ();
-%F_last = ();
-
-sub genfile
-{
- local($cnt,$in,$out,@fpos) = @_;
-
- local(@F,@t,$t,$lastT) = ();
- local(@break,@time,@offs,@freq,@cmpl,@loffset,@filekey) = ();
- local($lm,$l,@f);
-
- local($sdir,$sname);
-
- ;# allocate some storage for the tables
- ;# otherwise realloc may get into troubles
- if (defined($StartTime) && defined($EndTime))
- {
- $l = ($EndTime-$StartTime) -$[+1 +1; # worst case: 1 sample per second
- }
- else
- {
- $l = $cnt + 10;
- }
- print "preextending arrays to $l entries\n" if $verbose > 2;
- $#break = $l; for ($i=$[; $i<=$l;$i++) { $break[$i] = 0; }
- $#time = $l; for ($i=$[; $i<=$l;$i++) { $time[$i] = 0; }
- $#offs = $l; for ($i=$[; $i<=$l;$i++) { $offs[$i] = 0; }
- $#freq = $l; for ($i=$[; $i<=$l;$i++) { $freq[$i] = 0; }
- $#cmpl = $l; for ($i=$[; $i<=$l;$i++) { $cmpl[$i] = 0; }
- $#loffset = $l; for ($i=$[; $i<=$l;$i++) { $loffset[$i] = 0; }
- $#filekey = $l; for ($i=$[; $i<=$l;$i++) { $filekey[$i] = 0; }
- ;# now reduce size again
- $#break = $[ - 1;
- $#time = $[ - 1;
- $#offs = $[ - 1;
- $#freq = $[ - 1;
- $#cmpl = $[ - 1;
- $#loffset = $[ - 1;
- $#filekey = $[ - 1;
- print "memory allocation ready\n" if $verbose > 2;
- sleep(3) if $verbose > 1;
-
- $fpos[$[] = '' if !defined($fpos[$[]);
-
- if (index($in,"/") < $[)
- {
- $sdir = ".";
- $sname = $in;
- }
- else
- {
- ($sdir,$sname) = ($in =~ m!^(.*)/([^/]*)!);
- $sname = "" unless defined($sname);
- }
-
- $Ltime = -1 if ! defined($Ltime);
- if (!defined($Lsdir) || $Lsdir ne $sdir || $Ltime != (stat($sdir))[$[+9] ||
- grep($F_mtime{$_} != (stat($F_name{$_}))[$[+9], @F_files))
-
- {
- print "rescanning directory \"$sdir\" for files \"$sname*\"\n"
- if $verbose > 1;
-
- ;# rescan directory on changes
- $Lsdir = $sdir;
- $Ltime = (stat($sdir))[$[+9];
- </X{> if 0; # dummy line - calm down my formatter
- local(@newfiles) = < ${in}*[0-9] >;
- local($st_dev,$st_ino,$st_mtime,$st_size,$name,$key,$modified);
-
- foreach $name (@newfiles)
- {
- ($st_dev,$st_ino,$st_size,$st_mtime) =
- (stat($name))[$[,$[+1,$[+7,$[+9];
- $modified = 0;
- $key = sprintf("%lx|%lu", $st_dev, $st_ino);
-
- print "candidate file \"$name\"",
- (defined($st_dev) ? "" : " failed: $!"),"\n"
- if $verbose > 2;
-
- if (! defined($F_key{$name}) || $F_key{$name} ne $key)
- {
- $F_key{$name} = $key;
- $modified++;
- }
- if (!defined($F_name{$key}) || $F_name{$key} ne $name)
- {
- $F_name{$key} = $name;
- $modified++;
- }
- if (!defined($F_size{$key}) || $F_size{$key} != $st_size)
- {
- $F_size{$key} = $st_size;
- $modified++;
- }
- if (!defined($F_mtime{$key}) || $F_mtime{$key} != $st_mtime)
- {
- $F_mtime{$key} = $st_mtime;
- $modified++;
- }
- if ($modified)
- {
- print "new data \"$name\" key: $key;\n" if $verbose > 1;
- print " size: $st_size; mtime: $st_mtime;\n"
- if $verbose > 1;
- $F_last{$key} = $F_first{$key} = $st_mtime;
- $F_first{$key}--; # prevent zero divide later on
- ;# now compute derivated attributes
- open(IN, "<$name") ||
- do {
- warn "$0: failed to open \"$name\": $!";
- next;
- };
-
- while(<IN>)
- {
- @F = split;
- next if @F < 5;
- next if $F[$[] eq "";
- $t = ($F[$[] - $MJD_1970) * 24 * 60 * 60;
- $t += $F[$[+1];
- $F_first{$key} = $t;
- print "\tfound first entry: $t ",&ctime($t)
- if $verbose > 4;
- last;
- }
- seek(IN,
- ($st_size > 4*$RecordSize) ? $st_size - 4*$RecordSize : 0,
- 0);
- while(<IN>)
- {
- @F = split;
- next if @F < 5;
- next if $F[$[] eq "";
- $t = ($F[$[] - $MJD_1970) * 24 * 60 * 60;
- $t += $F[$[+1];
- $F_last{$key} = $t;
- $_ = <IN>;
- print "\tfound last entry: $t ", &ctime($t)
- if $verbose > 4 && ! defined($_);
- last unless defined($_);
- redo;
- ;# Ok, calm down...
- ;# using $_ = <IN> in conjunction with redo
- ;# is semantically equivalent to the while loop, but
- ;# I needed a one line look ahead and this solution
- ;# was what I thought of first
- ;# and.. If you do not like it dont look
- }
- close(IN);
- print(" first: ",$F_first{$key},
- " last: ",$F_last{$key},"\n") if $verbose > 1;
- }
- }
- ;# now reclaim memory used for files no longer referenced ...
- local(%Names);
- grep($Names{$_} = 1,@newfiles);
- foreach (keys %F_key)
- {
- next if defined($Names{$_});
- delete $F_key{$_};
- $verbose > 2 && print "no longer referenced: \"$_\"\n";
- }
- %Names = ();
-
- grep($Names{$_} = 1,values(%F_key));
- foreach (keys %F_name)
- {
- next if defined($Names{$_});
- delete $F_name{$_};
- $verbose > 2 && print "unref name($_)= $F_name{$_}\n";
- }
- foreach (keys %F_size)
- {
- next if defined($Names{$_});
- delete $F_size{$_};
- $verbose > 2 && print "unref size($_)\n";
- }
- foreach (keys %F_mtime)
- {
- next if defined($Names{$_});
- delete $F_mtime{$_};
- $verbose > 2 && print "unref mtime($_)\n";
- }
- foreach (keys %F_first)
- {
- next if defined($Names{$_});
- delete $F_first{$_};
- $verbose > 2 && print "unref first($_)\n";
- }
- foreach (keys %F_last)
- {
- next if defined($Names{$_});
- delete $F_last{$_};
- $verbose > 2 && print "unref last($_)\n";
- }
- ;# create list sorted by time
- @F_files = sort {$F_first{$a} <=> $F_first{$b}; } keys(%F_name);
- if ($verbose > 1)
- {
- print "Resulting file list:\n";
- foreach (@F_files)
- {
- print "\t$_\t$F_name{$_}\n";
- }
- }
- }
-
- printf("processing %s; output \"$out\" (%d input files)\n",
- ((defined($StartTime) && defined($EndTime))
- ? "time range"
- : (defined($StartTime) ? "$cnt samples from StartTime" :
- (defined($EndTime) ? "$cnt samples to EndTime" :
- "last $cnt samples"))),
- scalar(@F_files))
- if $verbose > 1;
-
- ;# open output file - will be input for plotcmd
- open(OUT,">$out") ||
- do {
- warn("$0: cannot create \"$out\": $!\n");
- };
-
- @f = @F_files;
- if (defined($StartTime))
- {
- while (@f && ($F_last{$f[$[]} < $StartTime))
- {
- print("shifting ", $F_name{$f[$[]},
- " last: ", $F_last{$f[$[]},
- " < StartTime: $StartTime\n")
- if $verbose > 3;
- shift(@f);
- }
-
-
- }
- if (defined($EndTime))
- {
- while (@f && ($F_first{$f[$#f]} > $EndTime))
- {
- print("popping ", $F_name{$f[$#f]},
- " first: ", $F_first{$f[$#f]},
- " > EndTime: $EndTime\n")
- if $verbose > 3;
- pop(@f);
- }
- }
-
- if (@f)
- {
- if (defined($StartTime))
- {
- print "guess start according to StartTime ($StartTime)\n"
- if $verbose > 3;
-
- if ($fpos[$[] eq 'start')
- {
- if (grep($_ eq $fpos[$[+1],@f))
- {
- shift(@f) while @f && $f[$[] ne $fpos[$[+1];
- }
- else
- {
- @fpos = ('start', $f[$[], undef);
- }
- }
- else
- {
- @fpos = ('start' , $f[$[], undef);
- }
-
- if (!defined($fpos[$[+2]))
- {
- if ($StartTime <= $F_first{$f[$[]})
- {
- $fpos[$[+2] = 0;
- }
- else
- {
- $fpos[$[+2] =
- int($F_size{$f[$[]} *
- (($StartTime - $F_first{$f[$[]})/
- ($F_last{$f[$[]} - $F_first{$f[$[]})));
- $fpos[$[+2] = ($fpos[$[+2] <= 2 * $RecordSize)
- ? 0 : $fpos[$[+2] - 2 * $RecordSize;
- ;# anyway as the data may contain "time holes"
- ;# our heuristics may baldly fail
- ;# so just start at 0
- $fpos[$[+2] = 0;
- }
- }
- }
- elsif (defined($EndTime))
- {
- print "guess starting point according to EndTime ($EndTime)\n"
- if $verbose > 3;
-
- if ($fpos[$[] eq 'end')
- {
- if (grep($_ eq $fpos[$[+1],@f))
- {
- shift(@f) while @f && $f[$[] ne $fpos[$[+1];
- }
- else
- {
- @fpos = ('end', $f[$[], undef);
- }
- }
- else
- {
- @fpos = ('end', $f[$[], undef);
- }
-
- if (!defined($fpos[$[+2]))
- {
- local(@x) = reverse(@f);
- local($s,$c) = (0,$cnt);
- if ($EndTime < $F_last{$x[$[]})
- {
- ;# last file will only be used partially
- $s = int($F_size{$x[$[]} *
- (($EndTime - $F_first{$x[$[]}) /
- ($F_last{$x[$[]} - $F_first{$x[$[]})));
- $s = int($s/$RecordSize);
- $c -= $s - 1;
- if ($c <= 0)
- {
- ;# start is in the same file
- $fpos[$[+1] = $x[$[];
- $fpos[$[+2] = ($c >=-2) ? 0 : (-$c - 2) * $RecordSize;
- shift(@f) while @f && ($f[$[] ne $x[$[]);
- }
- else
- {
- shift(@x);
- }
- }
-
- if (!defined($fpos[$[+2]))
- {
- local($_);
- while($_ = shift(@x))
- {
- $s = int($F_size{$_}/$RecordSize);
- $c -= $s - 1;
- if ($c <= 0)
- {
- $fpos[$[+1] = $_;
- $fpos[$[+2] = ($c>-2) ? 0 : (-$c - 2) * $RecordSize;
- shift(@f) while @f && ($f[$[] ne $_);
- last;
- }
- }
- }
- }
- }
- else
- {
- print "guessing starting point according to count ($cnt)\n"
- if $verbose > 3;
- ;# guess offset to get last available $cnt samples
- if ($fpos[$[] eq 'cnt')
- {
- if (grep($_ eq $fpos[$[+1],@f))
- {
- print "old positioning applies\n" if $verbose > 3;
- shift(@f) while @f && $f[$[] ne $fpos[$[+1];
- }
- else
- {
- @fpos = ('cnt', $f[$[], undef);
- }
- }
- else
- {
- @fpos = ('cnt', $f[$[], undef);
- }
-
- if (!defined($fpos[$[+2]))
- {
- local(@x) = reverse(@f);
- local($s,$c) = (0,$cnt);
-
- local($_);
- while($_ = shift(@x))
- {
- print "examing \"$_\" $c samples still needed\n"
- if $verbose > 4;
- $s = int($F_size{$_}/$RecordSize);
- $c -= $s - 1;
- if ($c <= 0)
- {
- $fpos[$[+1] = $_;
- $fpos[$[+2] = ($c>-2) ? 0 : (-$c - 2) * $RecordSize;
- shift(@f) while @f && ($f[$[] ne $_);
- last;
- }
- }
- if (!defined($fpos[$[+2]))
- {
- print "no starting point yet - using start of data\n"
- if $verbose > 2;
- $fpos[$[+2] = 0;
- }
- }
- }
- }
- print "Ooops, no suitable input file ??\n"
- if $verbose > 1 && @f <= 0;
-
- printf("Starting at (%s) \"%s\" offset %ld using %d files\n",
- $fpos[$[+1],
- $F_name{$fpos[$[+1]},
- $fpos[$[+2],
- scalar(@f))
- if $verbose > 2;
-
- $lm = 1;
- $l = 0;
- foreach $key (@f)
- {
- $file = $F_name{$key};
- print "processing file \"$file\"\n" if $verbose > 2;
-
- open(IN,"<$file") ||
- (warn("$0: cannot read \"$file\": $!\n"), next);
-
- ;# try to seek to a position nearer to the start of the interesting lines
- ;# should always affect only first item in @f
- ($key eq $fpos[$[+1]) &&
- (($verbose > 1) &&
- print("Seeking to offset $fpos[$[+2]\n"),
- seek(IN,$fpos[$[+2],0) ||
- warn("$0: seek(\"$F_name{$key}\" failed: $|\n"));
-
- while(<IN>)
- {
- $l++;
- ($verbose > 3) &&
- (($l % $lm) == 0 && print("\t$l lines read\n") &&
- (($l == 2) && ($lm = 10) ||
- ($l == 100) && ($lm = 100) ||
- ($l == 500) && ($lm = 500) ||
- ($l == 1000) && ($lm = 1000) ||
- ($l == 5000) && ($lm = 5000) ||
- ($l == 10000) && ($lm = 10000)));
-
- @F = split;
-
- next if @F < 6; # no valid input line is this short
- next if $F[$[] eq "";
- next if ($F[$[] !~ /^\d+$/);
- ($F[$[] !~ /^\d+$/) && # A 'never should have happend' error
- die("$0: unexpected input line: >$_<\n");
-
- ;# modified Julian to UNIX epoch
- $t = ($F[$[] - $MJD_1970) * 24 * 60 * 60;
- $t += $F[$[+1]; # add seconds + fraction
-
- ;# multiply offset by 1000 to get ms - try to avoid float op
- (($F[$[+2] =~ s/(\d*)\.(\d{3})(\d*)/$1$2.$3/) &&
- $F[$[+2] =~ s/0+([\d\.])/($1 eq '.') ? '0.' : $1/e) # strip leading zeros
- || ($F[$[+2] *= 1000);
-
-
- ;# skip samples out of specified time range
- next if (defined($StartTime) && $StartTime > $t);
- next if (defined($EndTime) && $EndTime < $t);
-
- next if defined($lastT) && $t < $lastT; # backward in time ??
-
- push(@offs,$F[$[+2]);
- push(@freq,$F[$[+3] * (2**20/10**6));
- push(@cmpl,$F[$[+5]);
-
- push(@break, (defined($lastT) && ($t - $lastT > $deltaT)));
- $lastT = $t;
- push(@time,$t);
- push(@loffset, tell(IN) - length($_));
- push(@filekey, $key);
-
- shift(@break),shift(@time),shift(@offs),
- shift(@freq), shift(@cmpl),shift(@loffset),
- shift(@filekey)
- if @time > $cnt &&
- ! (defined($StartTime) && defined($EndTime));
-
- last if @time >= $cnt && defined($StartTime) && !defined($EndTime);
- }
- close(IN);
- last if @time >= $cnt && defined($StartTime) && !defined($EndTime);
- }
- print "input scanned ($l lines/",scalar(@time)," samples)\n"
- if $verbose > 1;
-
- &lr_init('offs');
- &lr_init('freq');
-
- if (@time)
- {
- local($_,@F);
-
- local($timebase) unless defined($timebase);
- local($freqbase) unless defined($freqbase);
- local($cmplscale) unless defined($cmplscale);
-
- undef $mintime;
- undef $maxtime;
- undef $minoffs;
- undef $maxoffs;
- undef $minfreq;
- undef $maxfreq;
- undef $mincmpl;
- undef $maxcmpl;
- undef $miny;
- undef $maxy ;
-
- print "computing ranges\n" if $verbose > 2;
-
- $LastCnt = @time;
-
- ;# @time is in ascending order (;-)
- $mintime = $time[$[];
- $maxtime = $time[$#time];
- unless (defined($timebase))
- {
- local($time,@X) = (time);
- @X = localtime($time);
-
- ;# compute today 00:00:00
- $timebase = $time - ((($X[$[+2]*60)+$X[$[+1])*60+$X[$[]);
-
- }
- $LastTimeBase = $timebase;
-
- if ($showoffs)
- {
- local($i,$m,$f);
-
- $minoffs = &min(@offs);
- $maxoffs = &max(@offs);
-
- ;# I know, it is not perl style using indices to access arrays,
- ;# but I have to proccess two arrays in sync, non-destructively
- ;# (otherwise a (shift(@a1),shift(a2)) would do),
- ;# I dont like to make copies of these arrays as they may be huge
- $i = $[;
- &lr_sample(($time[$i]-$timebase)/3600,$offs[$i],'offs'),$i++
- while $i <= $#time;
-
- ($minoffs == $maxoffs) && ($minoffs -= 0.1,$maxoffs += 0.1);
-
- $i = &lr_sigma('offs');
- $m = &lr_mean('offs');
-
- print "mean offset: $m sigma: $i\n" if $verbose > 2;
-
- if (($maxoffs - $minoffs) > $MinClip)
- {
- $f = (&abs($minoffs) < &abs($maxoffs)) ? $FuzzLow : $FuzzBig;
- $miny = (($m - $minoffs) <= ($f * $i))
- ? $minoffs : ($m - $f * $i);
- $f = ($f == $FuzzLow) ? $FuzzBig : $FuzzLow;
- $maxy = (($maxoffs - $m) <= ($f * $i))
- ? $maxoffs : ($m + $f * $i);
- }
- else
- {
- $miny = $minoffs;
- $maxy = $maxoffs;
- }
- ($maxy-$miny) == 0 &&
- (($maxy,$miny)
- = (($maxoffs - $minoffs) > 0)
- ? ($maxoffs,$minoffs) : ($MinClip,-$MinClip));
-
- $maxy = $MaxY if defined($MaxY) && $MaxY < $maxy;
- $miny = $MinY if defined($MinY) && $MinY > $miny;
-
- print "offset min clipped from $minoffs to $miny\n"
- if $verbose > 2 && $minoffs != $miny;
- print "offset max clipped from $maxoffs to $maxy\n"
- if $verbose > 2 && $maxoffs != $maxy;
- }
-
- if ($showfreq)
- {
- local($i,$m);
-
- $minfreq = &min(@freq);
- $maxfreq = &max(@freq);
-
- $i = $[;
- &lr_sample(($time[$i]-$timebase)/3600,$freq[$i]-$minfreq,'freq'),
- $i++
- while $i <= $#time;
-
- $i = &lr_sigma('freq');
- $m = &lr_mean('freq') + $minfreq;
-
- print "mean frequency: $m sigma: $i\n" if $verbose > 2;
-
- if (defined($maxy))
- {
- local($s) =
- ($maxfreq - $minfreq)
- ? ($maxy - $miny) / ($maxfreq - $minfreq) : 1;
-
- if (defined($freqbase))
- {
- $FreqScale = 1;
- $FreqScaleInv = "";
- }
- else
- {
- $FreqScale = 1;
- $FreqScale = 10 ** int(log($s)/log(10) - 0.9999);
- $FreqScaleInv =
- ("$FreqScale" =~ /^10(0*)$/) ? "0.${1}1" :
- ($FreqScale == 1 ? "" : (1/$FreqScale));
-
- $freqbase = ($maxfreq + $minfreq)/ 2 * $FreqScale; #$m * $FreqScale;
- $freqbase -= ($maxy + $miny) / 2; #&lr_mean('offs');
-
- ;# round resulting freqbase
- ;# to precision of min max difference
- $s = -12;
- $s = int(log(($maxfreq-$minfreq)*$FreqScale)/log(10))-1
- unless ($maxfreq-$minfreq) < 1e-12;
- $s = 10 ** $s;
- $freqbase = int($freqbase / $s) * $s;
- }
- }
- else
- {
- $FreqScale = 1;
- $FreqScaleInv = "";
- $freqbase = $m unless defined($freqbase);
- if (($maxfreq - $minfreq) > $MinClip)
- {
- $f = (&abs($minfreq) < &abs($maxfreq))
- ? $FuzzLow : $FuzzBig;
- $miny = (($freqbase - $minfreq) <= ($f * $i))
- ? ($minfreq-$freqbase) : (- $f * $i);
- $f = ($f == $FuzzLow) ? $FuzzBig : $FuzzLow;
- $maxy = (($maxfreq - $freqbase) <= ($f * $i))
- ? ($maxfreq-$freqbase) : ($f * $i);
- }
- else
- {
- $miny = $minfreq - $freqbase;
- $maxy = $maxfreq - $freqbase;
- }
- ($maxy - $miny) == 0 &&
- (($maxy,$miny) =
- (($maxfreq - $minfreq) > 0)
- ? ($maxfreq-$freqbase,$minfreq-$freqbase) : (0.5,-0.5));
-
- $maxy = $MaxY if defined($MaxY) && $MaxY < $maxy;
- $miny = $MinY if defined($MinY) && $MinY > $miny;
-
- print("frequency min clipped from ",$minfreq-$freqbase,
- " to $miny\n")
- if $verbose > 2 && $miny != ($minfreq - $freqbase);
- print("frequency max clipped from ",$maxfreq-$freqbase,
- " to $maxy\n")
- if $verbose > 2 && $maxy != ($maxfreq - $freqbase);
- }
- $LastFreqBaseString =
- sprintf("%g",$freqbase >= 0 ? $freqbase : -$freqbase);
- $LastFreqBase = $freqbase;
- print "LastFreqBaseString now \"$LastFreqBaseString\"\n"
- if $verbose > 5;
- }
- else
- {
- $FreqScale = 1;
- $FreqScaleInv = "";
- $LastFreqBase = 0;
- $LastFreqBaseString = "";
- }
-
- if ($showcmpl)
- {
- $mincmpl = &min(@cmpl);
- $maxcmpl = &max(@cmpl);
-
- if (!defined($cmplscale))
- {
- if (defined($maxy))
- {
- local($cmp)
- = (&abs($miny) > &abs($maxy)) ? &abs($miny) : $maxy;
- $cmplscale = $cmp == $maxy ? 1 : -1;
-
- foreach (0.01, 0.02, 0.05,
- 0.1, 0.2, 0.25, 0.4, 0.5,
- 1, 2, 4, 5,
- 10, 20, 25, 50,
- 100, 200, 250, 500, 1000)
- {
- $cmplscale *= $_, last if $maxcmpl/$_ <= $cmp;
- }
- }
- else
- {
- $cmplscale = 1;
- $miny = $mincmpl ? 0 : -$MinClip;
- $maxy = $maxcmpl+$MinClip;
- }
- }
- $LastCmplScale = $cmplscale;
- }
- else
- {
- $LastCmplScale = 1;
- }
-
- print "creating plot command input file\n" if $verbose > 2;
-
-
- print OUT ("# preprocessed NTP statistics file for $STATHOST\n");
- print OUT ("# timebase is: ",&ctime($LastTimeBase))
- if defined($LastTimeBase);
- print OUT ("# frequency is offset by ",
- ($LastFreqBase >= 0 ? "+" : "-"),
- "$LastFreqBaseString [${FreqScaleInv}ppm]\n");
- print OUT ("# compliance is scaled by $LastCmplScale\n");
- print OUT ("# time [h]\toffset [ms]\tfrequency [${FreqScaleInv}ppm]\tcompliance\n");
-
- printf OUT ("%s%lf\t%lf\t%lf\t%lf\n",
- (shift(@break) ? "\n" : ""),
- (shift(@time) - $LastTimeBase)/3600,
- shift(@offs),
- shift(@freq) * $FreqScale - $LastFreqBase,
- shift(@cmpl) / $LastCmplScale)
- while(@time);
- }
- else
- {
- ;# prevent plotcmd from processing empty file
- print "Creating plot command dummy...\n" if $verbose > 2;
- print OUT "# dummy samples\n0 1 2 3\n1 1 2 3\n";
- &lr_sample(0,1,'offs');
- &lr_sample(1,1,'offs');
- &lr_sample(0,2,'freq');
- &lr_sample(1,2,'freq');
- @time = (0, 1); $maxtime = 1; $mintime = 0;
- @offs = (1, 1); $maxoffs = 1; $minoffs = 1;
- @freq = (2, 2); $maxfreq = 2; $minfreq = 2;
- @cmpl = (3, 3); $maxcmpl = 3; $mincmpl = 3;
- $LastCnt = 2;
- $LastFreqBase = 0;
- $LastCmplScale = 1;
- $LastTimeBase = 0;
- $miny = -$MinClip;
- $maxy = 3 + $MinClip;
- }
- close(OUT);
-
- print "plot command input file created\n"
- if $verbose > 2;
-
-
- if (($fpos[$[] eq 'cnt' && scalar(@loffset) >= $cnt) ||
- ($fpos[$[] eq 'start' && $mintime <= $StartTime) ||
- ($fpos[$[] eq 'end'))
- {
- return ($fpos[$[],$filekey[$[],$loffset[$[]);
- }
- else # found to few lines - next time start search earlier in file
- {
- if ($fpos[$[] eq 'start')
- {
- ;# the timestamps we got for F_first and F_last guaranteed
- ;# that no file is left out
- ;# the only thing that could happen is:
- ;# we guessed the starting point wrong
- ;# compute a new guess from the first record found
- ;# if this equals our last guess use data of first record
- ;# otherwise try new guess
-
- if ($fpos[$[+1] eq $filekey[$[] && $loffset[$[] > $fpos[$[+2])
- {
- local($noff);
- $noff = $loffset[$[] - ($cnt - @loffset + 1) * $RecordSize;
- $noff = 0 if $noff < 0;
-
- return (@fpos[$[,$[+1], ($noff == $fpos[$[+2]) ? $loffset[$[] : $noff);
- }
- return ($fpos[$[],$filekey[$[],$loffset[$[]);
- }
- elsif ($fpos[$[] eq 'end' || $fpos[$[] eq 'cnt')
- {
- ;# try to start earlier in file
- ;# if we already started at the beginning
- ;# try to use previous file
- ;# this assumes distance to better starting point is at most one file
- ;# the primary guess at top of genfile() should usually allow this
- ;# assumption
- ;# if the offset of the first sample used is within
- ;# a different file than we guessed it must have occurred later
- ;# in the sequence of files
- ;# this only can happen if our starting file did not contain
- ;# a valid sample from the starting point we guessed
- ;# however this does not invalidate our assumption, no check needed
- local($noff,$key);
- if ($fpos[$[+2] > 0)
- {
- $noff = $fpos[$[+2] - $RecordSize * ($cnt - @loffset + 1);
- $noff = 0 if $noff < 0;
- return (@fpos[$[,$[+1],$noff);
- }
- else
- {
- if ($fpos[$[+1] eq $F_files[$[])
- {
- ;# first file - and not enough samples
- ;# use data of first sample
- return ($fpos[$[], $filekey[$[], $loffset[$[]);
- }
- else
- {
- ;# search key of previous file
- $key = $F_files[$[];
- @F = reverse(@F_files);
- while ($_ = shift(@F))
- {
- if ($_ eq $fpos[$[+1])
- {
- $key = shift(@F) if @F;
- last;
- }
- }
- $noff = int($F_size{$key} / $RecordSize);
- $noff -= $cnt - @loffset;
- $noff = 0 if $noff < 0;
- $noff *= $RecordSize;
- return ($fpos[$[], $key, $noff);
- }
- }
- }
- else
- {
- return ();
- }
-
- return 0 if @loffset <= 1 || ($loffset[$#loffset] - $loffset[$[]) <= 1;
-
- ;# EOF - 1.1 * avg(line) * $cnt
- local($val) = $loffset[$#loffset]
- - $cnt * 11 * (($loffset[$#loffset] - $loffset[$[]) / @loffset) / 10;
- return ($val < 0) ? 0 : $val;
- }
-}
-
-$Ltime = -1 if ! defined($Ltime);
-$LastFreqBase = 0;
-$LastFreqBaseString = "??";
-
-;# initial setup of plot
-print "initialize plotting\n" if $verbose;
-if (defined($PrintIt))
-{
- if ($PrintIt =~ m,/,)
- {
- print "Saving plot to file $PrintIt\n";
- print PLOT "set output '$PrintIt'\n";
- }
- else
- {
- print "Printing plot on printer $PrintIt\n";
- print PLOT "set output '| lpr -P$PrintIt -h'\n";
- }
- print PLOT "set terminal postscript landscape color solid 'Helvetica' 10\n";
-}
-print PLOT "set grid\n";
-print PLOT "set tics out\n";
-print PLOT "set format y '%g '\n";
-printf PLOT "set time 47\n" unless defined($PrintIt);
-
-@filepos =();
-while(1)
-{
- print &ctime(time) if $verbose;
-
- ;# update diplay characteristics
- &read_config;# unless defined($PrintIt);
-
- unlink($tmpfile);
- @filepos = &genfile($samples,$srcprefix,$tmpfile,@filepos);
-
- ;# make plotcmd display samples
- &make_doplot;
- print "Displaying plot...\n" if $verbose > 1;
- print "command for plot sub process:\n$doplot----\n" if $verbose > 3;
- print PLOT $doplot;
-}
-continue
-{
- if (defined($PrintIt))
- {
- delete $SIG{'CHLD'};
- print PLOT "quit\n";
- close(PLOT);
- if ($PrintIt =~ m,/,)
- {
- print "Plot saved to file $PrintIt\n";
- }
- else
- {
- print "Plot spooled to printer $PrintIt\n";
- }
- unlink($tmpfile);
- exit(0);
- }
- ;# wait $delay seconds
- print "waiting $delay seconds ..." if $verbose > 2;
- sleep($delay);
- print " continuing\n" if $verbose > 2;
- undef($LastFreqBaseString);
-}
-
-
-sub date_time_spec2seconds
-{
- local($_) = @_;
- ;# a date_time_spec consistes of:
- ;# YYYY-MM-DD_HH:MM:SS.ms
- ;# values can be omitted from the beginning and default than to
- ;# values of current date
- ;# values omitted from the end default to lowest possible values
-
- local($time) = time;
- local($sec,$min,$hour,$mday,$mon,$year)
- = localtime($time);
-
- local($last) = ();
-
- s/^\D*(.*\d)\D*/$1/; # strip off garbage
-
- PARSE:
- {
- if (s/^(\d{4})(-|$)//)
- {
- if ($1 < 1970)
- {
- warn("$0: can not handle years before 1970 - year $1 ignored\n");
- return undef;
- }
- elsif ( $1 >= 2070)
- {
- warn("$0: can not handle years past 2070 - year $1 ignored\n");
- return undef;
- }
- else
- {
- $year = $1 % 100; # 0<= $year < 100
- ;# - interpreted 70 .. 99,00 .. 69
- }
- $last = $[ + 5;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec: \"$_\" found after YEAR\n"),
- return(undef)
- if $2 eq '';
- }
-
- if (s/^(\d{1,2})(-|$)//)
- {
- warn("$0: implausible month $1\n"),return(undef)
- if $1 < 1 || $1 > 12;
- $mon = $1 - 1;
- $last = $[ + 4;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec: \"$_\" found after MONTH\n"),
- return(undef)
- if $2 eq '';
- }
- else
- {
- warn("$0: bad date_time_spec \"$_\"\n"),return(undef)
- if defined($last);
-
- }
-
- if (s/^(\d{1,2})([_ ]|$)//)
- {
- warn("$0: implausible month day $1 for month ".($mon+1)." (".
- $MaxNumDaysPerMonth[$mon].")$mon\n"),
- return(undef)
- if $1 < 1 || $1 > $MaxNumDaysPerMonth[$mon];
- $mday = $1;
- $last = $[ + 3;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec \"$_\" found after MDAY\n"),
- return(undef)
- if $2 eq '';
- }
- else
- {
- warn("$0: bad date_time_spec \"$_\"\n"), return undef
- if defined($last);
- }
-
- ;# now we face a problem:
- ;# if ! defined($last) a prefix of "07:"
- ;# can be either 07:MM or 07:ss
- ;# to get the second interpretation make the user add
- ;# a msec fraction part and check for this special case
- if (! defined($last) && s/^(\d{1,2}):(\d{1,2}\.\d+)//)
- {
- warn("$0: implausible minute $1\n"), return undef
- if $1 < 0 || $1 >= 60;
- warn("$0: implausible second $1\n"), return undef
- if $2 < 0 || $2 >= 60;
- $min = $1;
- $sec = $2;
- $last = $[ + 1;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec \"$_\" after SECONDS\n");
- return undef;
- }
-
- if (s/^(\d{1,2})(:|$)//)
- {
- warn("$0: implausible hour $1\n"), return undef
- if $1 < 0 || $1 > 24;
- $hour = $1;
- $last = $[ + 2;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec found \"$_\" after HOUR\n"),
- return undef
- if $2 eq '';
- }
- else
- {
- warn("$0: bad date_time_spec \"$_\"\n"), return undef
- if defined($last);
- }
-
- if (s/^(\d{1,2})(:|$)//)
- {
- warn("$0: implausible minute $1\n"), return undef
- if $1 < 0 || $1 >=60;
- $min = $1;
- $last = $[ + 1;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec found \"$_\" after MINUTE\n"),
- return undef
- if $2 eq '';
- }
- else
- {
- warn("$0: bad date_time_spec \"$_\"\n"), return undef
- if defined($last);
- }
-
- if (s/^(\d{1,2}(\.\d+)?)//)
- {
- warn("$0: implausible second $1\n"), return undef
- if $1 < 0 || $1 >=60;
- $sec = $1;
- $last = $[;
- last PARSE if $_ eq '';
- warn("$0: bad date_time_spec found \"$_\" after SECOND\n");
- return undef;
- }
- }
-
- return $time unless defined($last);
-
- $sec = 0 if $last > $[;
- $min = 0 if $last > $[ + 1;
- $hour = 0 if $last > $[ + 2;
- $mday = 1 if $last > $[ + 3;
- $mon = 0 if $last > $[ + 4;
- local($rtime) = &timelocal($sec,$min,$hour,$mday,$mon,$year, 0,0, 0);
-
- ;# $rtime may be off if daylight savings time is in effect at given date
- return $rtime + ($sec - int($sec))
- if $hour == (localtime($rtime))[$[+2];
- return
- &timelocal($sec,$min,$hour,$mday,$mon,$year, 0,0, 1)
- + ($sec - int($sec));
-}
-
-
-sub min
-{
- local($m) = shift;
-
- grep((($m > $_) && ($m = $_),0),@_);
- $m;
-}
-
-sub max
-{
- local($m) = shift;
-
- grep((($m < $_) && ($m = $_),0),@_);
- $m;
-}
diff --git a/contrib/ntp/scripts/monitoring/ntptrap b/contrib/ntp/scripts/monitoring/ntptrap
deleted file mode 100644
index 5a1bcb1..0000000
--- a/contrib/ntp/scripts/monitoring/ntptrap
+++ /dev/null
@@ -1,463 +0,0 @@
-#!/local/bin/perl --*-perl-*-
-;#
-;# ntptrap,v 3.1 1993/07/06 01:09:15 jbj Exp
-;#
-;# a client for the xntp mode 6 trap mechanism
-;#
-;# Copyright (c) 1992
-;# Rainer Pruy Friedrich-Alexander Universitaet Erlangen-Nuernberg
-;#
-;#
-;#############################################################
-$0 =~ s!^.*/([^/]+)$!$1!; # strip to filename
-;# enforce STDOUT and STDERR to be line buffered
-$| = 1;
-select((select(STDERR),$|=1)[$[]);
-
-;#######################################
-;# load utility routines and definitions
-;#
-require('ntp.pl'); # implementation of the NTP protocol
-use Socket;
-
-#eval { require('sys/socket.ph'); require('netinet/in.ph') unless defined(&INADDR_ANY); } ||
-#do {
- #die("$0: $@") unless $[ == index($@, "Can't locate ");
- #warn "$0: $@";
- #warn "$0: supplying some default definitions\n";
- #eval 'sub INADDR_ANY { 0; } sub AF_INET {2;} sub SOCK_DGRAM {2;} 1;' || die "$0: $@";
-#};
-require('getopts.pl'); # option parsing
-require('ctime.pl'); # date/time formatting
-
-;######################################
-;# define some global constants
-;#
-$BASE_TIMEOUT=10;
-$FRAG_TIMEOUT=10;
-$MAX_TRY = 5;
-$REFRESH_TIME=60*15; # 15 minutes (server uses 1 hour)
-$ntp'timeout = $FRAG_TIMEOUT; #';
-$ntp'timeout if 0;
-
-;######################################
-;# now process options
-;#
-sub usage
-{
- die("usage: $0 [-n] [-p <port>] [-l <logfile>] [host] ...\n");
-}
-
-$opt_l = "/dev/null"; # where to write debug messages to
-$opt_p = 0; # port to use locally - (0 does mean: will be choosen by kernel)
-
-&usage unless &Getopts('l:p:');
-&Getopts if 0; # make -w happy
-
-@Hosts = ($#ARGV < $[) ? ("localhost") : @ARGV;
-
-;# setup for debug output
-$DEBUGFILE=$opt_l;
-$DEBUGFILE="&STDERR" if $DEBUGFILE eq '-';
-
-open(DEBUG,">>$DEBUGFILE") || die("Cannot open \"$DEBUGFILE\": $!\n");
-select((select(DEBUG),$|=1)[$[]);
-
-;# &log prints a single trap record (adding a (local) time stamp)
-sub log
-{
- chop($date=&ctime(time));
- print "$date ",@_,"\n";
-}
-
-sub debug
-{
- print DEBUG @_,"\n";
-}
-;#
-$proto_udp = (getprotobyname('udp'))[$[+2] ||
- (warn("$0: Could not get protocoll number for 'udp' using 17"), 17);
-
-$ntp_port = (getservbyname('ntp','udp'))[$[+2] ||
- (warn("$0: Could not get port number for service ntp/udp using 123"), 123);
-
-;#
-socket(S, &AF_INET, &SOCK_DGRAM, $proto_udp) || die("Cannot open socket: $!\n");
-
-;#
-bind(S, pack("S n a4 x8", &AF_INET, $opt_p, &INADDR_ANY)) ||
- die("Cannot bind: $!\n");
-
-($my_port, $my_addr) = (unpack("S n a4 x8",getsockname(S)))[$[+1,$[+2];
-&log(sprintf("Listening at address %d.%d.%d.%d port %d",
- unpack("C4",$my_addr), $my_port));
-
-;# disregister with all servers in case of termination
-sub cleanup
-{
- &log("Aborted by signal \"$_[$[]\"") if defined($_[$[]);
-
- foreach (@Hosts)
- {
- if ( ! defined($Host{$_}) )
- {
- print "no info for host '$_'\n";
- next;
- }
- &ntp'send(S,31,0,"",pack("Sna4x8",&AF_INET,$ntp_port,$Host{$_})); #';
- }
- close(S);
- exit(2);
-}
-
-$SIG{'HUP'} = 'cleanup';
-$SIG{'INT'} = 'cleanup';
-$SIG{'QUIT'} = 'cleanup';
-$SIG{'TERM'} = 'cleanup';
-
-0 && $a && $b;
-sub timeouts # sort timeout id array
-{
- $TIMEOUTS{$a} <=> $TIMEOUTS{$b};
-}
-
-;# a Request element looks like: pack("a4SC",addr,associd,op)
-@Requests= ();
-
-;# compute requests for set trap control msgs to each host given
-{
- local($name,$addr);
-
- foreach (@Hosts)
- {
- if (/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/)
- {
- ($name,$addr) =
- (gethostbyaddr(pack("C4",$1,$2,$3,$4),&AF_INET))[$[,$[+4];
- unless (defined($name))
- {
- $name = sprintf("[[%d.%d.%d.%d]]",$1,$2,$3,$4);
- $addr = pack("C4",$1,$2,$3,$4);
- }
- }
- else
- {
- ($name,$addr) = (gethostbyname($_))[$[,$[+4];
- unless (defined($name))
- {
- warn "$0: unknown host \"$_\" - ignored\n";
- next;
- }
- }
- next if defined($Host{$name});
- $Host{$name} = $addr;
- $Host{$_} = $addr;
- push(@Requests,pack("a4SC",$addr,0,6)); # schedule a set trap request for $name
- }
-}
-
-sub hostname
-{
- local($addr) = @_;
- return $HostName{$addr} if defined($HostName{$addr});
- local($name) = gethostbyaddr($addr,&AF_INET);
- &debug(sprintf("hostname(%d.%d.%d.%d) = \"%s\"",unpack("C4",$addr),$name))
- if defined($name);
- defined($name) && ($HostName{$addr} = $name) && (return $name);
- &debug(sprintf("Failed to get name for %d.%d.%d.%d",unpack("C4",$addr)));
- return sprintf("[%d.%d.%d.%d]",unpack("C4",$addr));
-}
-
-;# when no hosts were given on the commandline no requests have been scheduled
-&usage unless (@Requests);
-
-&debug(sprintf("%d request(s) scheduled",scalar(@Requests)));
-grep(&debug(" - ".$_),keys(%Host));
-
-;# allocate variables;
-$addr="";
-$assoc=0;
-$op = 0;
-$timeout = 0;
-$ret="";
-%TIMEOUTS = ();
-%TIMEOUT_PROCS = ();
-@TIMEOUTS = ();
-
-$len = 512;
-$buf = " " x $len;
-
-while (1)
-{
- if (@Requests || @TIMEOUTS) # if there is some work pending
- {
- if (@Requests)
- {
- ($addr,$assoc,$op) = unpack("a4SC",($req = shift(@Requests)));
- &debug(sprintf("Request: %s: %s(%d)",&hostname($addr), &ntp'cntrlop_name($op), $assoc)); #';))
- $ret = &ntp'send(S,$op,$assoc,"", #'(
- pack("Sna4x8",&AF_INET,$ntp_port,$addr));
- &set_timeout("retry-".unpack("H*",$req),time+$BASE_TIMEOUT,
- sprintf("&retry(\"%s\");",unpack("H*",$req)));
-
- last unless (defined($ret)); # warn called by ntp'send();
-
- ;# if there are more requests just have a quick look for new messages
- ;# otherwise grant server time for a response
- $timeout = @Requests ? 0 : $BASE_TIMEOUT;
- }
- if ($timeout && @TIMEOUTS)
- {
- ;# ensure not to miss a timeout
- if ($timeout + time > $TIMEOUTS{$TIMEOUTS[$[]})
- {
- $timeout = $TIMEOUTS{$TIMEOUTS[$[]} - time;
- $timeout = 0 if $timeout < 0;
- }
- }
- }
- else
- {
- ;# no work yet - wait for some messages dropping in
- ;# usually this will not hapen as the refresh semantic will
- ;# always have a pending timeout
- undef($timeout);
- }
-
- vec($mask="",fileno(S),1) = 1;
- $ret = select($mask,undef,undef,$timeout);
-
- warn("$0: select: $!\n"),last if $ret < 0; # give up on error return from select
-
- if ($ret == 0)
- {
- ;# timeout
- if (@TIMEOUTS && time > $TIMEOUTS{$TIMEOUTS[$[]})
- {
- ;# handle timeout
- $timeout_proc =
- (delete $TIMEOUT_PROCS{$TIMEOUTS[$[]},
- delete $TIMEOUTS{shift(@TIMEOUTS)})[$[];
- eval $timeout_proc;
- die "timeout eval (\"$timeout_proc\"): $@\n" if $@;
- }
- ;# else: there may be something to be sent
- }
- else
- {
- ;# data avail
- $from = recv(S,$buf,$len,0);
- ;# give up on error return from recv
- warn("$0: recv: $!\n"), last unless (defined($from));
-
- $from = (unpack("Sna4",$from))[$[+2]; # keep host addr only
- ;# could check for ntp_port - but who cares
- &debug("-Packet from ",&hostname($from));
-
- ;# stuff packet into ntp mode 6 receive machinery
- ($ret,$data,$status,$associd,$op,$seq,$auth_keyid) =
- &ntp'handle_packet($buf,$from); # ';
- &debug(sprintf("%s uses auth_keyid %d",&hostname($from),$auth_keyid)) if defined($auth_keyid);
- next unless defined($ret);
-
- if ($ret eq "")
- {
- ;# handle packet
- ;# simple trap response messages have neither timeout nor retries
- &clear_timeout("retry-".unpack("H*",pack("a4SC",$from,$associd,$op))) unless $op == 7;
- delete $RETRY{pack("a4SC",$from,$associd,$op)} unless $op == 7;
-
- &process_response($from,$ret,$data,$status,$associd,$op,$seq,$auth_keyid);
- }
- else
- {
- ;# some kind of error
- &log(sprintf("%50s: %s: %s",(gethostbyaddr($from,&AF_INET))[$[],$ret,$data));
- if ($ret ne "TIMEOUT" && $ret ne "ERROR")
- {
- &clear_timeout("retry-".unpack("H*",pack("a4SC",$from,$associd,$op)));
- }
- }
- }
-
-}
-
-warn("$0: terminating\n");
-&cleanup;
-exit 0;
-
-;##################################################
-;# timeout support
-;#
-sub set_timeout
-{
- local($id,$time,$proc) = @_;
-
- $TIMEOUTS{$id} = $time;
- $TIMEOUT_PROCS{$id} = $proc;
- @TIMEOUTS = sort timeouts keys(%TIMEOUTS);
- chop($date=&ctime($time));
- &debug(sprintf("Schedule timeout \"%s\" for %s", $id, $date));
-}
-
-sub clear_timeout
-{
- local($id) = @_;
- delete $TIMEOUTS{$id};
- delete $TIMEOUT_PROCS{$id};
- @TIMEOUTS = sort timeouts keys(%TIMEOUTS);
- &debug("Clear timeout \"$id\"");
-}
-
-0 && &refresh;
-sub refresh
-{
- local($addr) = @_[$[];
- $addr = pack("H*",$addr);
- &debug(sprintf("Refreshing trap for %s", &hostname($addr)));
- push(@Requests,pack("a4SC",$addr,0,6));
-}
-
-0 && &retry;
-sub retry
-{
- local($tag) = @_;
- $tag = pack("H*",$tag);
- $RETRY{$tag} = 0 if (!defined($RETRY{$tag}));
-
- if (++$RETRY{$tag} > $MAX_TRY)
- {
- &debug(sprintf("Retry failed: %s assoc %5d op %d",
- &hostname(substr($tag,$[,4)),
- unpack("x4SC",$tag)));
- return;
- }
- &debug(sprintf("Retrying: %s assoc %5d op %d",
- &hostname(substr($tag,$[,4)),
- unpack("x4SC",$tag)));
- push(@Requests,$tag);
-}
-
-sub process_response
-{
- local($from,$ret,$data,$status,$associd,$op,$seq,$auth_keyid) = @_;
-
- $msg="";
- if ($op == 7) # trap response
- {
- $msg .= sprintf("%40s trap#%-5d",
- &hostname($from),$seq);
- &debug (sprintf("\nTrap %d associd %d:\n%s\n===============\n",$seq,$associd,$data));
- if ($associd == 0) # system event
- {
- $msg .= " SYSTEM ";
- $evnt = &ntp'SystemEvent($status); #';
- $msg .= "$evnt ";
- ;# for special cases add additional info
- ($stratum) = ($data =~ /stratum=(\d+)/);
- ($refid) = ($data =~ /refid=([\w\.]+)/);
- $msg .= "stratum=$stratum refid=$refid";
- if ($refid =~ /\[?(\d+)\.(\d+)\.(\d+)\.(\d+)/)
- {
- local($x) = (gethostbyaddr(pack("C4",$1,$2,$3,$4),&AF_INET));
- $msg .= " " . $x if defined($x)
- }
- if ($evnt eq "event_sync_chg")
- {
- $msg .= sprintf("%s %s ",
- &ntp'LI($status), #',
- &ntp'ClockSource($status) #'
- );
- }
- elsif ($evnt eq "event_sync/strat_chg")
- {
- ($peer) = ($data =~ /peer=([0-9]+)/);
- $msg .= " peer=$peer";
- }
- elsif ($evnt eq "event_clock_excptn")
- {
- if (($device) = ($data =~ /device=\"([^\"]+)\"/))
- {
- ($cstatus) = ($data =~ /refclockstatus=0?x?([\da-fA-F]+)/);
- $Cstatus = hex($cstatus);
- $msg .= sprintf("- %-32s",&ntp'clock_status($Cstatus)); #');
- ($timecode) = ($data =~ /timecode=\"([^\"]+)\"/);
- $msg .= " \"$device\" \"$timecode\"";
- }
- else
- {
- push(@Requests,pack("a4SC",$from, $associd, 4));
- }
- }
- }
- else # peer event
- {
- $msg .= sprintf("peer %5d ",$associd);
- ($srcadr) = ($data =~ /srcadr=\[?([\d\.]+)/);
- $msg .= sprintf("%-18s %40s ", "[$srcadr]",
- &hostname(pack("C4",split(/\./,$srcadr))));
- $evnt = &ntp'PeerEvent($status); #';
- $msg .= "$evnt ";
- ;# for special cases include additional info
- if ($evnt eq "event_clock_excptn")
- {
- if (($device) = ($data =~ /device=\"([^\"]+)\"/))
- {
- ;#&debug("----\n$data\n====\n");
- ($cstatus) = ($data =~ /refclockstatus=0?x?([\da-fA-F]+)/);
- $Cstatus = hex($cstatus);
- $msg .= sprintf("- %-32s",&ntp'clock_status($Cstatus)); #');
- ($timecode) = ($data =~ /timecode=\"([^\"]+)\"/);
- $msg .= " \"$device\" \"$timecode\"";
- }
- else
- {
- ;# no clockvars included - post a cv request
- push(@Requests,pack("a4SC",$from, $associd, 4));
- }
- }
- elsif ($evnt eq "event_stratum_chg")
- {
- ($stratum) = ($data =~ /stratum=(\d+)/);
- $msg .= "new stratum $stratum";
- }
- }
- }
- elsif ($op == 6) # set trap resonse
- {
- &debug("Set trap ok from ",&hostname($from));
- &set_timeout("refresh-".unpack("H*",$from),time+$REFRESH_TIME,
- sprintf("&refresh(\"%s\");",unpack("H*",$from)));
- return;
- }
- elsif ($op == 4) # read clock variables response
- {
- ;# status of clock
- $msg .= sprintf(" %40s ", &hostname($from));
- if ($associd == 0)
- {
- $msg .= "system clock status: ";
- }
- else
- {
- $msg .= sprintf("peer %5d clock",$associd);
- }
- $msg .= sprintf("%-32s",&ntp'clock_status($status)); #');
- ($device) = ($data =~ /device=\"([^\"]+)\"/);
- ($timecode) = ($data =~ /timecode=\"([^\"]+)\"/);
- $msg .= " \"$device\" \"$timecode\"";
- }
- elsif ($op == 31) # unset trap response (UNOFFICIAL op)
- {
- ;# clear timeout
- &debug("Clear Trap ok from ",&hostname($from));
- &clear_timeout("refresh-".unpack("H*",$from));
- return;
- }
- else # unexpected response
- {
- $msg .= "unexpected response to op $op assoc=$associd";
- $msg .= sprintf(" status=%04x",$status);
- }
- &log($msg);
-}
diff --git a/contrib/ntp/scripts/monitoring/timelocal.pl b/contrib/ntp/scripts/monitoring/timelocal.pl
deleted file mode 100644
index d0f73a2..0000000
--- a/contrib/ntp/scripts/monitoring/timelocal.pl
+++ /dev/null
@@ -1,77 +0,0 @@
-;# timelocal.pl
-;#
-;# Usage:
-;# $time = timelocal($sec,$min,$hours,$mday,$mon,$year,$junk,$junk,$isdst);
-;# $time = timegm($sec,$min,$hours,$mday,$mon,$year);
-
-;# These routines are quite efficient and yet are always guaranteed to agree
-;# with localtime() and gmtime(). We manage this by caching the start times
-;# of any months we've seen before. If we know the start time of the month,
-;# we can always calculate any time within the month. The start times
-;# themselves are guessed by successive approximation starting at the
-;# current time, since most dates seen in practice are close to the
-;# current date. Unlike algorithms that do a binary search (calling gmtime
-;# once for each bit of the time value, resulting in 32 calls), this algorithm
-;# calls it at most 6 times, and usually only once or twice. If you hit
-;# the month cache, of course, it doesn't call it at all.
-
-;# timelocal is implemented using the same cache. We just assume that we're
-;# translating a GMT time, and then fudge it when we're done for the timezone
-;# and daylight savings arguments. The timezone is determined by examining
-;# the result of localtime(0) when the package is initialized. The daylight
-;# savings offset is currently assumed to be one hour.
-
-CONFIG: {
- package timelocal;
-
- @epoch = localtime(0);
- $tzmin = $epoch[2] * 60 + $epoch[1]; # minutes east of GMT
- if ($tzmin > 0) {
- $tzmin = 24 * 60 - $tzmin; # minutes west of GMT
- $tzmin -= 24 * 60 if $epoch[5] == 70; # account for the date line
- }
-
- $SEC = 1;
- $MIN = 60 * $SEC;
- $HR = 60 * $MIN;
- $DAYS = 24 * $HR;
- $YearFix = ((gmtime(946684800))[5] == 100) ? 100 : 0;
-}
-
-sub timegm {
- package timelocal;
-
- $ym = pack(C2, @_[5,4]);
- $cheat = $cheat{$ym} || &cheat;
- $cheat + $_[0] * $SEC + $_[1] * $MIN + $_[2] * $HR + ($_[3]-1) * $DAYS;
-}
-
-sub timelocal {
- package timelocal;
-
- $ym = pack(C2, @_[5,4]);
- $cheat = $cheat{$ym} || &cheat;
- $cheat + $_[0] * $SEC + $_[1] * $MIN + $_[2] * $HR + ($_[3]-1) * $DAYS
- + $tzmin * $MIN - 60 * 60 * ($_[8] != 0);
-}
-
-package timelocal;
-
-sub cheat {
- $year = $_[5];
- $month = $_[4];
- $guess = $^T;
- @g = gmtime($guess);
- $year += $YearFix if $year < $epoch[5];
- while ($diff = $year - $g[5]) {
- $guess += $diff * (364 * $DAYS);
- @g = gmtime($guess);
- }
- while ($diff = $month - $g[4]) {
- $guess += $diff * (28 * $DAYS);
- @g = gmtime($guess);
- }
- $g[3]--;
- $guess -= $g[0] * $SEC + $g[1] * $MIN + $g[2] * $HR + $g[3] * $DAYS;
- $cheat{$ym} = $guess;
-}
diff --git a/contrib/ntp/scripts/ntp-close b/contrib/ntp/scripts/ntp-close
deleted file mode 100755
index b5077e6..0000000
--- a/contrib/ntp/scripts/ntp-close
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh
-
-lynx -source http://www.eecis.udel.edu/~mills/ntp/clock2.htm |
- sed -n -e 's,).*,,' -e' /([0-9.]*$/s/.*(//p' |
- xargs ntpdate -q |
- sort -n +7 > /tmp/ntp-close
-
-# From: Neal McBurnett <neal@bcn.boulder.co.us>
diff --git a/contrib/ntp/scripts/ntp-groper b/contrib/ntp/scripts/ntp-groper
deleted file mode 100755
index 1fd0cfe..0000000
--- a/contrib/ntp/scripts/ntp-groper
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/sh
-#
-# ntpgroper host ...
-#
-# This script checks each hostname given as an argument to see if
-# it is running NTP. It reports one of the following messages (assume
-# the host is named "dumbo.hp.com":
-#
-# dumbo.hp.com not registered in DNS
-# dumbo.hp.com not responding to ping
-# dumbo.hp.com refused ntpq connection
-# dumbo.hp.com not responding to NTP
-# dumbo.hp.com answers NTP version 2, stratum: 3, ref: telford.nsa.hp.com
-# dumbo.hp.com answers NTP version 3, stratum: 3, ref: telford.nsa.hp.com
-#
-# It ain't pretty, but it is kinda useful.
-#
-# Walter Underwood, 11 Feb 1993, wunder@hpl.hp.com
-#
-# converted to /bin/sh from /bin/ksh by scott@ee.udel.edu 24 Mar 1993
-
-PATH="/usr/local/etc:$PATH" export PATH
-
-verbose=1
-logfile=/tmp/cntp-log$$
-ntpqlog=/tmp/cntp-ntpq$$
-
-# I wrap the whole thing in parens so that it is possible to redirect
-# all the output somewhere, if desired.
-(
-for host in $*
-do
- # echo "Trying $host."
-
- gethost $host > /dev/null 2>&1
- if [ $? -ne 0 ]
- then
- echo "$host not registered in DNS"
- continue
- fi
-
- ping $host 64 1 > /dev/null 2>&1
- if [ $? -ne 0 ]
- then
- echo "$host not responding to ping"
- continue
- fi
-
- # Attempt to contact with version 3 ntp, then try version 2.
- for version in 3 2
- do
-
- ntpq -c "ntpversion $version" -p $host > $ntpqlog 2>&1
-
- if fgrep -s 'Connection refused' $ntpqlog
- then
- echo "$host refused ntpq connection"
- break
- fi
-
- responding=1
- fgrep -s 'timed out, nothing received' $ntpqlog > /dev/null && responding=0
-
- if [ $responding -eq 1 ]
- then
- ntpq -c "ntpversion $version" -c rl $host > $ntpqlog
-
- # First we extract the reference ID (usually a host or a clock)
- synchost=`fgrep "refid=" $ntpqlog`
- #synchost=${synchost##*refid=} # strip off the beginning of the line
- #synchost=${synchost%%,*} # strip off the end
- synchost=`expr "$synchost" : '.*refid=\([^,]*\),.*'`
-
- # Next, we get the stratum
- stratum=`fgrep "stratum=" $ntpqlog`
- #stratum=${stratum##*stratum=}
- #stratum=${stratum%%,*}
- stratum=`expr "$stratum" : '.*stratum=\([^,]*\),.*'`
-
- echo "$host answers NTP version $version, stratum: $stratum, ref: $synchost"
- break;
- fi
-
- if [ $version -eq 2 -a $responding -eq 0 ]
- then
- echo "$host not responding to NTP"
- fi
- done
-done
-)
-# ) >> $logfile
-
-if [ -f $ntpqlog ]; then
- rm $ntpqlog
-fi
diff --git a/contrib/ntp/scripts/ntp-restart b/contrib/ntp/scripts/ntp-restart
deleted file mode 100755
index 0a1d58a..0000000
--- a/contrib/ntp/scripts/ntp-restart
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# This script can be used to kill and restart the NTP daemon. Edit the
-# /usr/local/bin/ntpd line to fit.
-#
-kill -INT `ps -ax | egrep "ntpd" | egrep -v "egrep" | sed 's/^\([ 0-9]*\) .*/\1'/`
-sleep 10
-/usr/local/bin/ntpd -g
-/usr/local/bin/ntp-wait
-exit 0
diff --git a/contrib/ntp/scripts/ntp-status b/contrib/ntp/scripts/ntp-status
deleted file mode 100755
index 4109124..0000000
--- a/contrib/ntp/scripts/ntp-status
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# From: Marc Brett <Marc.Brett@westgeo.com>
-
-# Here's a quick hack which can give you the stratum, delay, offset
-# for any number of ntp servers.
-
-NTPDATE=/usr/local/bin/ntpdate
-NSLOOKUP=/usr/sbin/nslookup
-EGREP=/bin/egrep
-AWK=/bin/awk
-RM=/bin/rm
-FILE=/tmp/ntp.$$
-
-USAGE="Usage: $0 hostname [hostname ...]"
-
-if [ $# -le 0 ]
-then
- echo $USAGE 2>&1
- exit 1
-fi
-
-trap '$RM -f $FILE; exit' 1 2 3 4 13 15
-
-for HOST in $*
-do
- HOSTNAME=`$NSLOOKUP $HOST | $EGREP "Name:" | $AWK '{print $2}'`
- if [ -n "$HOSTNAME" ]
- then
- $NTPDATE -d $HOST 2>/dev/null | $EGREP '^stratum|^delay|^offset|^originate' > $FILE
- STRATUM=`$EGREP '^stratum' $FILE | $AWK '{print $2}'`
- OFFSET=`$EGREP '^offset' $FILE | $AWK '{print $2}'`
- DELAY=`$EGREP '^delay' $FILE | $AWK '{print $2}'`
- TIMESTAMP=`$EGREP '^originate' $FILE | $AWK '{print $4 " " $5 " " $6 " " $7 " " $8}'`
- if [ "$STRATUM" -ne 0 ]
- then
- echo "$HOSTNAME: stratum:$STRATUM delay:$DELAY offset:$OFFSET $TIMESTAMP"
- else
- echo $HOSTNAME: Not running NTP
- fi
- fi
-
-done
-
-$RM -f $FILE
diff --git a/contrib/ntp/scripts/ntp-wait.in b/contrib/ntp/scripts/ntp-wait.in
deleted file mode 100644
index a26630b..0000000
--- a/contrib/ntp/scripts/ntp-wait.in
+++ /dev/null
@@ -1,42 +0,0 @@
-#! @PATH_PERL@ -w
-
-die "perl5 needed\n" unless ($] > 5);
-
-use Getopt::Std;
-
-$opt_f = 0; # 'Hard' failure if 'state' is unknown
-$opt_n = 1000; # How many tries before we give up? (10 min+)
-$opt_s = 6; # Seconds to sleep between tries (6s = 10/min)
-$opt_v = 0; # Be verbose?
-
-getopts('fn:s:v');
-
-$cmd = 'ntpq -c "rv 0 state"';
-
-$| = 1; # Autoflush output.
-
-print "Waiting for ntpd to synchronize... " if ($opt_v);
-for ($i = 0; $i < $opt_n; ++$i) {
- open(Q, $cmd." 2>&1 |") || die "Can't start ntpq: $!";
- while(<Q>) {
- if (/^state=4/) {
- print "\bOK!\n" if ($opt_v);
- exit 0;
- }
-
- if (/request variable was unknown/) {
- print "\bCan't tell!\nPerhaps you are running an old version of ntpd.\n" if ($opt_v);
- exit $opt_f;
- }
-
- if (/Connection refused/) {
- print "\bntpd is not running!\n" if ($opt_v);
- exit 1;
- }
- }
- close(Q);
- print "\b".substr("*+:.", $i % 4, 1) if ($opt_v);
- sleep($opt_s);
-}
-print "\bNo!\nntpd did not synchronize.\n" if ($opt_v);
-exit 1;
diff --git a/contrib/ntp/scripts/ntpsweep.in b/contrib/ntp/scripts/ntpsweep.in
deleted file mode 100644
index 156fb45..0000000
--- a/contrib/ntp/scripts/ntpsweep.in
+++ /dev/null
@@ -1,301 +0,0 @@
-#! @PATH_PERL@ -w
-#
-# $Id$
-#
-# DISCLAIMER
-#
-# Copyright (C) 1999,2000 Hans Lambermont and Origin B.V.
-#
-# 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. This software is supported as is and without
-# any express or implied warranties, including, without limitation, the
-# implied warranties of merchantability and fitness for a particular
-# purpose. The name Origin B.V. must not be used to endorse or promote
-# products derived from this software without prior written permission.
-#
-# Hans Lambermont <Hans.Lambermont@nl.origin-it.com>/<H.Lambermont@chello.nl>
-# 14 Jan 2000
-
-require 5.0; # But actually tested on 5.004 ;)
-use Getopt::Long; # GetOptions()
-use strict;
-
-my $version = 1.3;
-(my $program = $0) =~ s%.*/(.+?)(.pl)?$%$1%;
-
-# Hardcoded paths/program names
-my $ntpdate = "ntpdate";
-my $ntpq = "ntpq";
-
-# no STDOUT buffering
-$| = 1;
-
-my ($help, $single_host, $showpeers, $maxlevel, $strip, $askversion);
-my $res = GetOptions("help!" => \$help,
- "host=s" => \$single_host,
- "peers!" => \$showpeers,
- "maxlevel=s" => \$maxlevel,
- "strip=s" => \$strip,
- "version!" => \$askversion);
-
-if ($askversion) {
- print("$version\n");
- exit 0;
-}
-
-if ($help || ((@ARGV != 1) && !$single_host)) {
- warn <<EOF;
-This is $program, version $version
-Copyright (C) 1999,2000 Hans Lambermont and Origin B.V. Disclaimer inside.
-
-Usage:
- $program [--help|--peers|--strip <string>|--maxlevel <level>|--version] \\
- <file>|[--host <hostname>]
-
-Description:
- $program prints per host given in <file> the NTP stratum level, the
- clock offset in seconds, the daemon version, the operating system and
- the processor. Optionally recursing through all peers.
-
-Options:
---help
- Print this short help text and exit.
---version
- Print version ($version) and exit.
-<file>
- Specify hosts file. File format is one hostname or ip number per line.
- Lines beginning with # are considered as comment.
---host <hostname>
- Speficy a single host, bypassing the need for a hosts file.
---peers
- Recursively list all peers a host synchronizes to.
- An '= ' before a peer means a loop. Recursion stops here.
---maxlevel <level>
- Traverse peers up to this level (4 is a reasonable number).
---strip <string>
- Strip <string> from hostnames.
-
-Examples:
- $program myhosts.txt --strip .foo.com
- $program --host some.host --peers --maxlevel 4
-EOF
- exit 1;
-}
-
-my $hostsfile = shift;
-my (@hosts, @known_hosts);
-my (%known_host_info, %known_host_peers);
-
-sub read_hosts()
-{
- local *HOSTS;
- open (HOSTS, $hostsfile) ||
- die "$program: FATAL: unable to read $hostsfile: $!\n";
- while (<HOSTS>) {
- next if /^\s*(#|$)/; # comment/empty
- chomp;
- push(@hosts, $_);
- }
- close(HOSTS);
-}
-
-# translate IP to hostname if possible
-sub ip2name {
- my($ip) = @_;
- my($addr, $name, $aliases, $addrtype, $length, @addrs);
- $addr = pack('C4', split(/\./, $ip));
- ($name, $aliases, $addrtype, $length, @addrs) = gethostbyaddr($addr, 2);
- if ($name) {
- # return lower case name
- return("\L$name");
- } else {
- return($ip);
- }
-}
-
-# item_in_list($item, @list): returns 1 if $item is in @list, 0 if not
-sub item_in_list {
- my($item, @list) = @_;
- my($i);
- foreach $i (@list) {
- return 1 if ($item eq $i);
- }
- return 0;
-}
-
-sub scan_host($;$;$) {
- my($host, $level, @trace) = @_;
- my $stratum = 0;
- my $offset = 0;
- my $daemonversion = "";
- my $system = "";
- my $processor = "";
- my @peers;
- my $known_host = 0;
-
- if (&item_in_list($host, @known_hosts)) {
- $known_host = 1;
- } else {
- # ntpdate part
- open(NTPDATE, "$ntpdate -bd $host 2>/dev/null |") ||
- die "Cannot open ntpdate pipe: $!\n";
- while (<NTPDATE>) {
- /^stratum\s+(\d+).*$/ && do {
- $stratum = $1;
- };
- /^offset\s+([0-9.-]+)$/ && do {
- $offset = $1;
- };
- }
- close(NTPDATE);
-
- # got answers ? If so, go on.
- if ($stratum) {
- # ntpq part
- my $ntpqparams = "-c 'rv 0 processor,system,daemon_version'";
- open(NTPQ, "$ntpq $ntpqparams $host 2>/dev/null |") ||
- die "Cannot open ntpq pipe: $!\n";
- while (<NTPQ>) {
- /daemon_version="(.*)"/ && do {
- $daemonversion = $1;
- };
- /system="([^"]*)"/ && do {
- $system = $1;
- };
- /processor="([^"]*)"/ && do {
- $processor = $1;
- };
- }
- close(NTPQ);
-
- # Shorten daemon_version string.
- $daemonversion =~ s/(;|Mon|Tue|Wed|Thu|Fri|Sat|Sun).*$//;
- $daemonversion =~ s/version=//;
- $daemonversion =~ s/(x|)ntpd //;
- $daemonversion =~ s/(\(|\))//g;
- $daemonversion =~ s/beta/b/;
- $daemonversion =~ s/multicast/mc/;
-
- # Shorten system string
- $system =~ s/UNIX\///;
- $system =~ s/RELEASE/r/;
- $system =~ s/CURRENT/c/;
-
- # Shorten processor string
- $processor =~ s/unknown//;
- }
-
- # got answers ? If so, go on.
- if ($daemonversion) {
- # ntpq again, find out the peers this time
- if ($showpeers) {
- my $ntpqparams = "-pn";
- open(NTPQ, "$ntpq $ntpqparams $host 2>/dev/null |") ||
- die "Cannot open ntpq pipe: $!\n";
- while (<NTPQ>) {
- /^No association ID's returned$/ && do {
- last;
- };
- /^ remote/ && do {
- next;
- };
- /^==/ && do {
- next;
- };
- /^( |x|\.|-|\+|#|\*|o)([^ ]+)/ && do {
- push(@peers, ip2name($2));
- next;
- };
- print "ERROR: $_";
- }
- close(NTPQ);
- }
- }
-
- # Add scanned host to known_hosts array
- push(@known_hosts, $host);
- if ($stratum) {
- $known_host_info{$host} = sprintf("%2d %9.3f %-11s %-12s %s",
- $stratum, $offset, substr($daemonversion,0,11),
- substr($system,0,12), substr($processor,0,9));
- } else {
- # Stratum level 0 is consider invalid
- $known_host_info{$host} = sprintf(" ?");
- }
- $known_host_peers{$host} = [@peers];
- }
-
- if ($stratum || $known_host) { # Valid or known host
- my $printhost = ' ' x $level . $host;
- # Shorten host string
- if ($strip) {
- $printhost =~ s/$strip//;
- }
- # append number of peers in brackets if requested and valid
- if ($showpeers && ($known_host_info{$host} ne " ?")) {
- $printhost .= " (" . @{$known_host_peers{$host}} . ")";
- }
- # Finally print complete host line
- printf("%-32s %s\n",
- substr($printhost,0,32), $known_host_info{$host});
- if ($showpeers && (eval($maxlevel ? $level < $maxlevel : 1))) {
- my $peer;
- push(@trace, $host);
- # Loop through peers
- foreach $peer (@{$known_host_peers{$host}}) {
- if (&item_in_list($peer, @trace)) {
- # we've detected a loop !
- $printhost = ' ' x ($level + 1) . "= " . $peer;
- # Shorten host string
- if ($strip) {
- $printhost =~ s/$strip//;
- }
- printf("%-32s %s\n",
- substr($printhost,0,32));
- } else {
- if (substr($peer,0,3) ne "127") {
- &scan_host($peer, $level + 1, @trace);
- }
- }
- }
- }
- } else { # We did not get answers from this host
- my $printhost = ' ' x $level . $host;
- # Shorten host string
- if ($strip) {
- $printhost =~ s/$strip//;
- }
- printf("%-32s ?\n", substr($printhost,0,32));
- }
-}
-
-sub scan_hosts()
-{
- my $host;
- for $host (@hosts) {
- my @trace;
- push(@trace, $host);
- scan_host($host, 0, @trace);
- }
-}
-
-# Main program
-
-if ($single_host) {
- push(@hosts, $single_host);
-} else {
- &read_hosts($hostsfile);
-}
-
-# Print header
-print <<EOF;
-Host st offset(s) version system processor
---------------------------------+--+---------+-----------+------------+---------
-EOF
-
-&scan_hosts();
-
-exit 0;
diff --git a/contrib/ntp/scripts/ntptrace.in b/contrib/ntp/scripts/ntptrace.in
deleted file mode 100755
index 8545b2c..0000000
--- a/contrib/ntp/scripts/ntptrace.in
+++ /dev/null
@@ -1,60 +0,0 @@
-#! @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/scripts/ntpver.in b/contrib/ntp/scripts/ntpver.in
deleted file mode 100644
index be36897..0000000
--- a/contrib/ntp/scripts/ntpver.in
+++ /dev/null
@@ -1,7 +0,0 @@
-#!@PATH_SH@
-# print version string of NTP daemon
-# Copyright (c) 1997 by Ulrich Windl
-# Modified 970318: Harlan Stenn: rewritten...
-# usage: ntpver hostname
-
-ntpq -c "rv 0 daemon_version" $* | awk '/daemon_version/ { print $2 }'
diff --git a/contrib/ntp/scripts/plot_summary.in b/contrib/ntp/scripts/plot_summary.in
deleted file mode 100644
index 3b46a04..0000000
--- a/contrib/ntp/scripts/plot_summary.in
+++ /dev/null
@@ -1,337 +0,0 @@
-#! @PATH_PERL@ -w
-# $Id$
-#
-# Use Gnuplot to display data in summary files produced by summary.pl.
-# This script requires GNUPLOT 3.7!
-#
-# Copyright (c) 1997, 1999 by Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-#
-# 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 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-require 5.003; # "never tested with any other version of Perl"
-use strict;
-
-use Time::Local;
-use Getopt::Long;
-
-# parse command line
-my $summary_dir = "/tmp";
-my $identifier = "host " . `hostname`; # origin of these data
-chomp $identifier; # remove newline
-my $offset_limit = 0.128; # limit of absolute offset
-my $output_file = ""; # output file defaults to stdout
-my $output_file_number = 1; # numbering of output files
-my $gnuplot_terminal = $ENV{DISPLAY} ? "x11" : "dumb";
-my $wait_after_plot = 1;
-my @peer_list = ();
-
-my %options = ("directory|input-directory=s" => \$summary_dir,
- "identifier=s" => \$identifier,
- "offset-limit=f" => \$offset_limit,
- "output-file=s" => \$output_file,
- "peer=s@" => \@peer_list,
- "plot-term|gnuplot-term=s" => \$gnuplot_terminal,
- "wait-after-plot!" => \$wait_after_plot,
- );
-
-if ( !GetOptions(%options) )
-{
- print STDERR "valid options for $0 are:\n";
- my $opt;
- foreach $opt (sort(keys %options)) {
- print STDERR "\t--$opt\t(default is ";
- if ( ref($options{$opt}) eq "ARRAY" ) {
- print STDERR join(", ", map { "'$_'" } @{$options{$opt}});
- } else {
- print STDERR "'${$options{$opt}}'";
- }
- print STDERR ")\n";
- }
- print STDERR "\n";
- die;
-}
-
-chomp $identifier;
-die "illegal offset-limit: $offset_limit" unless $offset_limit > 0.0;
-$offset_limit *= 1e6; # scale to microseconds
-
-# return the smallest value in the given list
-sub min
-{
- my ($result, @rest) = @_;
- map { $result = $_ if ($_ < $result) } @rest;
- return($result);
-}
-
-# return the largest value in the given list
-sub max
-{
- my ($result, @rest) = @_;
- map { $result = $_ if ($_ > $result) } @rest;
- return($result);
-}
-
-# maybe open alternate output file
-sub open_output
-{
- my $file;
- if ($output_file) {
- while ( -r ($file = "$output_file$output_file_number") ) {
- ++$output_file_number;
- }
- open TOUCH, ">$file" and close TOUCH or die "$file: $!";
- print "set output \"$file\"\n";
- }
-}
-
-# make Gnuplot wait
-sub maybe_add_pause
-{
- print "pause -1 \"Press key to continue...\"\n" if $wait_after_plot;
-}
-
-# plot data from loop summary
-sub do_loop
-{
- my $fname = shift;
- my $line;
- my $out_file = "/tmp/tempdata$$";
- my $cmd_file = "/tmp/tempcmd$$";
- my ($first_day, $day_out) = ("", 0);
- my ($lower_bound, $upper_bound, $rms);
- my ($min_offs, $max_offs) = (1e9, -1e9);
- my ($min_rms, $max_rms) = (1e9, -1e9);
- open INPUT, "$fname" or die "$fname: $!";
- open OUTPUT, ">$out_file" or die "$out_file: $!";
- my @Fld;
- while (<INPUT>) {
- chop; # strip record separator
- @Fld = split;
- if ($#Fld == 0) {
-# loops.19960405
- $_ = $Fld[0]; s/.*([12]\d{3}[01]\d[0-3]\d)$/$1/;
- m/(\d{4})(\d{2})(\d{2})/;
- $line = timegm(59, 59, 23, $3, $2 - 1, $1 - 1900, 0, 0, 0);
- $line = int $line / 86400; # days relative to 1970
- $first_day = "$1-$2-$3 ($line)" unless $day_out;
- next;
- }
- if ($#Fld != 8) {
- warn "Illegal number of fields in file $fname, line $.";
- next;
- }
-# loop 216, 856106+/-874041.5, rms 117239.8, freq 67.52+/-10.335, var 4.850
- $_ = $Fld[1]; s/,/ /; $line .= " $_";
- $_ = $Fld[2]; m:(.+?)\+/-(.+),:;
- $lower_bound = $1 - $2;
- $upper_bound = $1 + $2;
- $line .= "$1 $lower_bound $upper_bound";
- $min_offs = min($min_offs, $lower_bound);
- $max_offs = max($max_offs, $upper_bound);
- $_ = $Fld[4]; s/,/ /; $rms = $_;
- $min_rms = min($min_rms, $rms);
- $max_rms = max($max_rms, $rms);
- $line .= " $rms";
- $_ = $Fld[6]; m:(.+?)\+/-(.+),:;
- $line .= " $1 " . ($1-$2) . " " . ($1+$2);
- $line .= " $Fld[8]";
- print OUTPUT "$line\n";
- $day_out = 1;
-# 9621 216 856106 -17935.5 1730147.5 117239.8 67.52 57.185 77.855 4.850
- }
- close INPUT;
- close OUTPUT or die "close failed on $out_file: $!";
- my $ylimit = "[";
- if ($min_offs < -$offset_limit) {
- $ylimit .= "-$offset_limit";
- }
- $ylimit .= ":";
- if ($max_offs > $offset_limit) {
- $ylimit .= "$offset_limit";
- }
- if ( $ylimit eq "[:" ) {
- $ylimit = "";
- } else {
- $ylimit = "[] $ylimit]";
- }
-# build command file for GNUplot
- open OUTPUT, "> $cmd_file" or die "$cmd_file: $!";
- my $oldfh = select OUTPUT;
- print "set term $gnuplot_terminal\n";
- open_output;
- print "set grid\n";
- print "set title \"Loop Summary for $identifier: " .
- "Daily mean values since $first_day\\n" .
- "(Offset limit is $offset_limit microseconds)\"\n";
- print "set ylabel \"[us]\"\n";
- print "set data style yerrorbars\n";
- print "set multiplot\n";
- print "set size 1, 0.5\n";
- print "set lmargin 8\n";
- print "set origin 0, 0.5\n";
- print "plot $ylimit \"$out_file\"" .
- " using 1:3:4:5 title \"mean offset\", ";
- print "\"$out_file\" using 1:(\$3-\$6/2) " .
- "title \"(sigma low)\" with lines, ";
- print "\"$out_file\" using 1:3 smooth bezier " .
- "title \"(Bezier med)\" with lines, ";
- print "\"$out_file\" using 1:(\$3+\$6/2) " .
- "title \"(sigma high)\" with lines\n";
- print "set ylabel \"[ppm]\"\n";
- print "set origin 0, 0.0\n";
- print "set title\n";
- print "set xlabel \"Days relative to 1970\"\n";
- print "plot \"$out_file\" using 1:7:8:9 title \"mean frequency\", ";
- print "\"$out_file\" using 1:(\$7-\$10/2) " .
- "title \"(sigma low)\" with lines, ";
- print "\"$out_file\" using 1:7 smooth bezier " .
- "title \"(Bezier med)\" with lines, ";
- print "\"$out_file\" using 1:(\$7+\$10/2) " .
- "title \"(sigma high)\" with lines\n";
- print "set nomultiplot\n";
- maybe_add_pause;
-
- $ylimit = "[";
- if ($min_rms < -$offset_limit) {
- $ylimit .= "-$offset_limit";
- }
- $ylimit .= ":";
- if ($max_rms > $offset_limit) {
- $ylimit .= "$offset_limit";
- }
- if ( $ylimit eq "[:" ) {
- $ylimit ="";
- } else {
- $ylimit = "[] $ylimit]";
- }
-
- open_output;
- print "set title \"Loop Summary for $identifier: " .
- "Standard deviation since $first_day\\n" .
- "(Offset limit is $offset_limit microseconds)\"\n";
- print "set xlabel\n";
- print "set ylabel \"[us]\"\n";
- print "set origin 0, 0.5\n";
- print "set data style linespoints\n";
- print "set multiplot\n";
- print "plot $ylimit \"$out_file\" using 1:6 title \"Offset\", ";
- print "\"$out_file\" using 1:6 smooth bezier " .
- "title \"(Bezier)\" with lines\n";
- print "set title\n";
- print "set origin 0, 0.0\n";
- print "set xlabel \"Days relative to 1970\"\n";
- print "set ylabel \"[ppm]\"\n";
- print "plot \"$out_file\" using 1:10 title \"Frequency\", ";
- print "\"$out_file\" using 1:10 smooth bezier " .
- "title \"(Bezier)\" with lines\n";
- print "set nomultiplot\n";
- maybe_add_pause;
-
- close OUTPUT or die "close failed on $cmd_file: $!";
- select $oldfh;
- print `gnuplot $cmd_file`;
- unlink $cmd_file;
- unlink $out_file;
-}
-
-# plot data form peer summary
-sub do_peer
-{
- my $fname = shift;
- my $peer = shift;
- my $out_file = "/tmp/tempdata$$";
- my $cmd_file = "/tmp/tempcmd$$";
- my $line;
- my ($first_day, $day_out) = ("", 0);
- open INPUT, "$fname" or die "$fname: $!";
- open OUTPUT, ">$out_file" or die "$out_file: $!";
- my @Fld;
- while (<INPUT>) {
- chop; # strip record separator
- @Fld = split;
- if ($#Fld == 0) {
-# peers.19960405
- $_ = $Fld[0]; s/.*([12]\d{3}[01]\d[0-3]\d)$/$1/;
- m/(\d{4})(\d{2})(\d{2})/ or next;
- $line = timegm(59, 59, 23, $3, $2 - 1, $1 - 1900, 0, 0, 0);
- $line = int $line / 86400; # days relative to 1970
- $first_day = "$1-$2-$3 ($line)" unless $day_out;
- next;
- }
- if ($#Fld != 7) {
- warn "Illegal number of fields in file $fname, line $.";
- next;
- }
- next if ($Fld[0] ne $peer);
-# ident cnt mean rms max delay dist disp
-# 127.127.8.1 38 30.972 189.867 1154.607 0.000 879.760 111.037
- $Fld[0] = $line;
- print OUTPUT join(' ', @Fld) . "\n";
-# 9969 38 30.972 189.867 1154.607 0.000 879.760 111.037
- $day_out = 1;
- }
- close INPUT;
- close OUTPUT or die "close failed on $out_file: $!";
- die "no data found for peer $peer" if !$day_out;
- open OUTPUT, "> $cmd_file" or die "$cmd_file: $!";
- my $oldfh = select OUTPUT;
- print "set term $gnuplot_terminal\n";
- open_output;
- print "set grid\n";
- print "set multiplot\n";
- print "set lmargin 8\n";
- print "set size 1, 0.34\n";
- print "set origin 0, 0.66\n";
- print "set title " .
- "\"Peer Summary for $peer on $identifier since $first_day\"\n";
- print "set data style linespoints\n";
- print "set ylabel \"[us]\"\n";
- print "plot \"$out_file\" using 1:3 title \"mean offset\", ";
- print "\"$out_file\" using 1:3 smooth bezier " .
- "title \"(Bezier)\" with lines, ";
- print "\"$out_file\" using 1:(\$3-\$7/2) " .
- "title \"(sigma low)\" with lines, ";
- print "\"$out_file\" using 1:(\$3+\$7/2) " .
- "title \"(sigma high)\" with lines\n";
- print "set title\n";
- print "set origin 0, 0.34\n";
- print "set size 1, 0.32\n";
- print "set ylabel\n";
- print "plot \"$out_file\" using 1:7 title \"dist\", ";
- print "\"$out_file\" using 1:7 smooth bezier " .
- "title \"(Bezier)\" with lines\n";
- print "set origin 0, 0.00\n";
- print "set size 1, 0.35\n";
- print "set xlabel \"Days relative to 1970\"\n";
- print "plot \"$out_file\" using 1:8 title \"disp\", ";
- print "\"$out_file\" using 1:8 smooth bezier " .
- "title \"(Bezier)\" with lines\n";
- print "set nomultiplot\n";
- maybe_add_pause;
-
- select $oldfh;
- close OUTPUT or die "close failed on $cmd_file: $!";
- print `gnuplot $cmd_file`;
- unlink $cmd_file;
- unlink $out_file;
-}
-
-
-my $loop_summary ="$summary_dir/loop_summary";
-my $peer_summary ="$summary_dir/peer_summary";
-my $clock_summary="$summary_dir/clock_summary";
-
-do_loop $loop_summary;
-map { do_peer $peer_summary, $_ } @peer_list;
diff --git a/contrib/ntp/scripts/rc1/postinstall b/contrib/ntp/scripts/rc1/postinstall
deleted file mode 100644
index d84b8c5..0000000
--- a/contrib/ntp/scripts/rc1/postinstall
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/etc/init.d/xntp start
diff --git a/contrib/ntp/scripts/rc1/preinstall b/contrib/ntp/scripts/rc1/preinstall
deleted file mode 100644
index aa18639..0000000
--- a/contrib/ntp/scripts/rc1/preinstall
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-if [ -x /etc/init.d/xntp ]
-then
- /etc/init.d/xntp stop
-fi
-exit 0
diff --git a/contrib/ntp/scripts/rc1/preremove b/contrib/ntp/scripts/rc1/preremove
deleted file mode 100644
index b870151..0000000
--- a/contrib/ntp/scripts/rc1/preremove
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-/etc/init.d/xntp stop
-
-exit 0
diff --git a/contrib/ntp/scripts/rc1/prototype b/contrib/ntp/scripts/rc1/prototype
deleted file mode 100644
index 3de20b0..0000000
--- a/contrib/ntp/scripts/rc1/prototype
+++ /dev/null
@@ -1,19 +0,0 @@
-!default 755 root bin
-i pkginfo
-i preinstall
-i postinstall
-i preremove
-f none /etc/init.d/xntp=xntp 0755 root other
-l none /etc/rc2.d/S79xntp=/etc/init.d/xntp
-l none /etc/rc1.d/K79xntp=/etc/init.d/xntp
-l none /etc/rc0.d/K79xntp=/etc/init.d/xntp
-f none /usr/sbin/xntpd=xntpd/xntpd 0555 root other
-f none /usr/sbin/xntpdc=xntpdc/xntpdc 0555 root other
-f none /usr/sbin/ntpq=ntpq/ntpq 0555 root other
-f none /usr/sbin/ntptrace=ntptrace/ntptrace 0555 root other
-f none /usr/sbin/ntpdate=ntpdate/ntpdate 0555 root other
-f none /usr/share/man/man1m/xntpd.1m=doc/xntpd.8 0444 root other
-f none /usr/share/man/man1m/xntpdc.1m=doc/xntpdc.8 0444 root other
-f none /usr/share/man/man1m/ntpdate.1m=doc/ntpdate.8 0444 root other
-f none /usr/share/man/man1m/ntpq.1m=doc/ntpq.8 0444 root other
-f none /usr/share/man/man1m/ntptrace.1m=doc/ntptrace.8 0444 root other
diff --git a/contrib/ntp/scripts/rc1/xntp b/contrib/ntp/scripts/rc1/xntp
deleted file mode 100644
index 227b943..0000000
--- a/contrib/ntp/scripts/rc1/xntp
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-killproc() { # kill named processes
- pid=`/usr/bin/ps -e |
- /usr/bin/grep $1 |
- /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
- [ "$pid" != "" ] && kill $pid
-}
-
-case "$1" in
-'start')
- ps -e | grep xntpd > /dev/null 2>&1
- if [ $? -eq 0 ]
- then
- echo "ntp daemon already running. ntp start aborted"
- exit 0
- fi
- if [ -f /etc/inet/ntp.conf -a -x /usr/sbin/xntpd ]
- then
- /usr/sbin/xntpd -c /etc/inet/ntp.conf
- fi
- ;;
-'stop')
- killproc xntpd
- ;;
-*)
- echo "Usage: /etc/init.d/xntp { start | stop }"
- ;;
-esac
diff --git a/contrib/ntp/scripts/rc2/local.ntpd b/contrib/ntp/scripts/rc2/local.ntpd
deleted file mode 100644
index ba53e05..0000000
--- a/contrib/ntp/scripts/rc2/local.ntpd
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /usr/bin/perl -w
-# 980904 Harlan Stenn - created
-
-# vvv CHANGE THESE vvv
-
-$ps = "/bin/ps x |";
-
-$ntp_conf = "/etc/ntp.conf";
-$ntpd = "/usr/local/bin/xntpd";
-$ntpdate = "/usr/local/bin/ntpdate -b -s 10.0.0.1 10.0.0.2";
-
-# ^^^ CHANGE THESE ^^^
-
-{
- if (0)
- {
- }
- elsif ($ARGV[0] eq "start")
- {
- @pidlist = pidlist($ntpd);
- if (defined(@pidlist))
- {
- warn "NTP is already running\n";
- }
- else
- {
- if ( -f $ntp_conf && -x $ntpd )
- {
- system ($ntpdate);
- system ($ntpd." -c ".$ntp_conf);
- }
- }
- }
- elsif ($ARGV[0] eq "stop")
- {
- @pidlist = pidlist($ntpd);
- kill 'TERM', @pidlist if (scalar(@pidlist) > 0);
- }
- else
- {
- die "Usage: $0 {start,stop}\n";
- }
-}
-
-sub pidlist ($)
- {
- my ($target) = @_;
- my ($qt) = quotemeta($target);
- my @pids;
-
- open(PS, $ps) || die "Can't run ps: $!\n";
- while (<PS>)
- {
- chomp;
- next unless (/$qt/);
- print "Got <$_>\n";
- if (/^\s*(\d+)\s+/)
- {
- push @pids, $1;
- }
- }
- close(PS);
- return @pids;
- }
diff --git a/contrib/ntp/scripts/stats/README b/contrib/ntp/scripts/stats/README
deleted file mode 100644
index 6808963..0000000
--- a/contrib/ntp/scripts/stats/README
+++ /dev/null
@@ -1,39 +0,0 @@
-Statistics processing scripts (README)
-
-This directory contains a number of scripts for use with the filegen
-facility. Those files ending in .awk are for the Unix awk utility, while
-those ending in .sh are for the csh utility. Normally, the summary.sh
-script is called from a cron job once per day. This script processes the
-daily loopstats, peerstats and clockstats files produced by the daemon,
-updates the loop_summary, peer_summary and clock_summary archive files,
-and deletes the daily files.
-
-In the case of the Austron 2201A GPS receiver, the clockstats file
-contains a wealth of additional monitoring data. These data are summarized
-and writted to the clock_summary file, then a series of special files are
-constructed for later processing by the S utility.
-
-The summary.sh script invokes a number of awk scripts to actually produce
-the data. This may result in multiple scans of the same input file.
-The input file is deleted after processing. In fact, the shell scripts will
-process all input files found of the correct type in chronological order,
-deleting each one as it is scanned, except the current day file.
-
-The summary.sh script can produce input files for the S utility, if it
-is found on the search path. This utility makes PostScript graphs of the
-loopstats data for each day, as well as various statistics produced by
-the Austorn 220aA GPS receiver. The S utility is automatically run
-as a background job. Its control files have the .S extension.
-
-The psummary.awk script can be used to scan the peer_summary file and
-construct an historical reprise of the daily summaries.
-
-The file formats are documented in the README.stats file and in the
-scripts themselves. Further detail on the radio clock ASCII timecode
-formats and related data are in the README.timecode file.
-
-David L. Mills
-University of Delaware
-mills@udel.edu
-1 November 1993
-Revised 12 April 1994
diff --git a/contrib/ntp/scripts/stats/README.stats b/contrib/ntp/scripts/stats/README.stats
deleted file mode 100644
index aa8e77f..0000000
--- a/contrib/ntp/scripts/stats/README.stats
+++ /dev/null
@@ -1,246 +0,0 @@
-Statistics file formats (README.stats)
-
-The xntp3 daemon can produce a variety of statistics files which are
-useful for maintenance, evaluation and retrospective calibration
-purposes. See the xntpd.8 man page for instructions on how to configure
-this feature. Since these files can become rather large and cumbersome,
-they are ordinarily reduced to summary form by running the summary.sh
-shell script once per day, week or month, as appropriate. There are
-three file collections presently defined: peerstats, loopstats and
-clockstats, each of which is described in this note.
-
-peerstats
-
-The following data are collected in the peerstats files. The files are
-reduced to summary data using the peer.sh shell script. See the peer.awk
-script for further information. A line in the file is produced upon
-reception of each valid update from a configured peer.
-
- 49236 30.756 140.173.96.1 9474 0.000603 0.37532
-
- 49236 modified Julian day number
- 30.756 time of day (s) past midnight UTC
- 140.173.96.1 peer identifier (IP address or receiver identifier)
- 9474 peer status word (hex) (see NTP specification)
- 0.000603 offset (s)
- 0.08929 delay (s)
- 0.37532 dispersion (s)
-
-loopstats
-
-The following data are collected in the loopstats files. The files are
-reduced to summary data using the loop.sh shell script. See the loop.awk
-script for further information. A line in the file is produced at each
-valid update of the local clock.
-
- 49236 11.897 -0.000004 -35.9384 0
-
- 49236 modified Julian day number
- 11.897 time of day (s) past midnight UTC
- -0.000004 time offset (s)
- -35.9384 frequency offset (ppm)
- 0 phase-lock loop time constant
-
-clockstats
-
-The following data are collected in the clockstats files. The files are
-reduced to summary data using the clock.sh shell script, which also
-updates the ensemble, etf, itf and tdata data files as well. See the
-clock.awk, ensemble.awk, etf.awk, itf.awk and tdta.awk scripts for
-further information. A line in the file is produced at each valid update
-received from a configured radio clock. Data are at present recorded for
-several radios. The first part of each data line is similar for all
-radios, e.g.:
-
- 49234 60517.826 127.127.4.1 93 247 16:48:21.814
-
- 49234 modified Julian day number
- 60517.826 time of day (s) past midnight UTC
- 127.127.4.1 receiver identifier (Spectracom 8170/Netclock-2)
- 93 247 16:48:21.814 timecode (format varies)
-
-In the case of the Austron GPS receiver, a good deal of additional
-information is extracted from the radio, as described below. The formats
-shown consist of one line with all the fields shown in order. The
-timecode formats specific to each radio follow. See the file
-README.timecodes for detailed information on the timecode formats used
-by these radios.
-
-Spectracom 8170/Netclock-2 WWVB receiver
-
- 49234 60517.826 127.127.4.1 ?A93 247 16:48:21.814
-
- The '?' and 'A' characters are present only when the receiver is
- unsynchronized; otherwise, they are replaced by space ' ' characters.
-
-IRIG audio decoder
-
- 49234 60517.826 127.127.6.0 247 16:48:21?
-
- The '?' character is present only when the receiver is unsynchronized.
-
-Austron 2200A/2201A GPS receiver
-
- 49234 60580.843 127.127.10.1 93:247:16:49:24.814?
-
- The '?' character is present only when the receiver is unsynchronized.
-
-Depending on the installed options, the Austron 2200A/2201A recognizes a
-number of special commands that report various data items. See the
-refclock_as2201.c source module for a list of the commands used. These
-data are collected only if the following line is included in the
-configuration file ntp.conf:
-
- fudge 127.127.10.1 flag4 1 # enable extended statistics collection
-
-The format of each data line returned is summarized in the following
-list.
-
-External time/frequency data (requires input buffer option IN)
-
-These data determine the deviations of external time/frequency inputs
-relative to receiver oscillator time. The following data are typical
-using an external cesium oscillator PPS and 5-MHz outputs.
-
- 49234 60580.843 127.127.10.1 93:247:16:49:24.814 ETF
-
- -85.9 time interval (ns)
- -89.0 average time interval (ns)
- 4.0 time interval sigma (ns)
- +1.510E-11 time interval rate
- -4.500E-11 deltaf/f
- +1.592E-11 average deltaf/f
- 5.297E-13 sigma deltaf/f
- 500 number of samples
-
-Model and option identifiers
-
-These data show the receiver model number and option configuration.
-
- 49234 60708.848 127.127.10.1 93:247:16:51:32.817 ID;OPT;VER
-
- GPS 2201A model ident (must be "GPS 2200A" or "GPS 2201A")
- TTY1 rs232 option present (required)
- TC1 IRIG option present (optional)
- LORAN LORAN assist option present (optional)
- IN input buffer option present (optional)
- OUT1 output buffer option present (required)
- B.00 data processor software version ("B.00" or later)
- B.00 signal processor software version ("B.00" or later)
- 28-Apr-93 software version date ("28-Apr-93" or later)
-
-Internal time/frequency data
-
-These data determine the deviations of the receiver oscillator with
-respect to satellite time.
-
- 49234 60564.846 127.127.10.1 93:247:16:49:08.816 ITF
-
- COCO current mode (must be "COCO")
- 0 code coast mode (must be zero)
- +6.6152E-08 code sigma (s)
- -3.5053E-08 code delta t (s)
- -4.0361E-11 deltat/t
- -6.4746E-11 oscillator ageing rate
- 500.00 loop time constant
- 4.984072 electrical tuning (V)
-
-GPS/LORAN ensemble data (requires LORAN assist option LORAN)
-
-These data determine the deviations and weights to calculate ensemble
-time from GPS and LORAN data.
-
- 49234 60596.852 127.127.10.1 93:247:16:49:40.812 LORAN ENSEMBLE
-
- +9.06E-08 GPS t (s)
- +3.53E-08 GPS sigma (s)
- .532 GPS weight
- +3.71E-08 LORAN t (s)
- +3.76E-08 LORAN sigma (s)
- .468 LORAN weight
- +6.56E-08 ensemble t
- +6.94E-08 ensemble sigma (s)
-
-LORAN stationkeeping data (requires LORAN assist option LORAN)
-
-These data determine which stations of the LORAN chain are being
-tracked, together with individual signal/noise ratios, deviations and
-weights.
-
- 49234 60532.850 127.127.10.1 93:247:16:48:36.820 LORAN TDATA
-
- M station identifier; data follows
- OK status (must be "OK" for tracking)
- 0 cw flag
- 0 sw flag
- 1162.17 time of arrival
- -4.6 snr (-30.0 if not "OK" status)
- 1.67E-07 2-sample phase-time deviation
- .507 weight (included only if "OK" status)
- W AQ 0 0 3387.80 -31.0 station identifier and data
- X OK 0 0 1740.27 -11.2 2.20E-07 .294 station identifier and data
- Y OK 0 0 2180.71 -4.6 2.68E-07 .198 station identifier and data
- Z CV 0 0 3392.94 -30.0 station identifier and data
-
-Oscillator status and environment
-
-These data determine the receiver oscillator type, mode, status and
-environment. Nominal operating conditions are shown below.
-
- 49234 60628.847 127.127.10.1 93:247:16:50:12.817 OSC;ET;TEMP
-
- 1121 Software Control oscillator model and mode (must be
- "Software Control")
- Locked status (must be "Locked")
- 4.979905 electrical tuning (V)
- 44.81 oscillator cavity temperature
-
-Receiver position, status and offsets
-
-These data determine the receiver position and elevation, together with
-programmable delay corrections for the antenna cable and receiver.
-
- 49234 60788.847 127.127.10.1 93:247:16:52:52.817 POS;PPS;PPSOFF
-
- +39:40:48.425 receiver latitude (N)
- -075:45:02.392 receiver longitude (E)
- +74.09 receiver elevation (m)
- Stored position status (must be "Stored")
- UTC PPS/PPM alignment (must be "UTC")
- 0 receiver delay (ns) (should be zero for calibrated
- receiver)
- 200 cable delay (ns)
- 0 user time bias (ns) (must be zero)
-
-Satellite tracking status
-
-These data determine how many satellites are being tracked. At the
-present state of constellation development, there should be at least
-three visible satellites in view. Much of the time the maximum of
-seven are being tracked; rarely this number drops to two.
-
- 49234 60612.850 127.127.10.1 93:247:16:49:56.820 TRSTAT
-
- 24 T satellite prn and status (T = track, A = acquire)
- 16 A 13 T 20 T 18 T 07 T 12 T list continued
-
-UTC leap-second information
-
-These data determine when the next leap second is to occur. The exact
-method to use is obscure.
-
- 49234 60548.847 127.127.10.1 93:247:16:48:52.818 UTC
-
- -1.2107E-08 A0 term (s)
- -1.2790E-13 A1 term (s)
- +9.0000E+00 current leap seconds (s)
- +2.0480E+05 time for leap seconds (s)
- +2.0100E+02 week number for delta leap (weeks)
- +1.9100E+02 week number for future leap (weeks)
- +4.0000E+00 day number for future leap (days)
- +9.0000E+00 future leap seconds (s)
-
-David L. Mills
-University of Delaware
-mills@udel.edu
-23 October 1993
diff --git a/contrib/ntp/scripts/stats/README.timecodes b/contrib/ntp/scripts/stats/README.timecodes
deleted file mode 100644
index 00b5ba5..0000000
--- a/contrib/ntp/scripts/stats/README.timecodes
+++ /dev/null
@@ -1,149 +0,0 @@
-Radio Timecode Formats (README.timecodes)
-
-Following are examples of the serial timecode formats used by various
-timecode receivers as given in the instruction manuals. These examples
-are intended only for illustration and not as the basis of system
-design. The following symbols are used to identify the timecode
-character that begins a subfield. The values given after this symbol
-represent the character offset from the beginning of the timecode string
-as edited to remove control characters.
-
-C on-time character (start bit)
-Y year of century
-T time of day
-D day of year or month/day
-A alarm indicator (format specific)
-Q quality indicator (format specific)
-<LF> ASCII line feed (hex 0a)
-<CR> ASCII carriage return (hex 0d)
-<SP> ASCII space (hex 20)
-
-In order to promote uniform behavior in the various implementations, it
-is useful to have a common interpretation of alarm conditions and signal
-quality. When the alarm indicator it on, the receiver is not operating
-correctly or has never synchronized to the broadcast signal. When the
-alarm indicator is off and the quality indicator is on, the receiver has
-synchronized to the broadcast signal, then lost the signal and is
-coasting on its internal oscillator.
-
-In the following uppercase letters, punctuation marks and spaces <SP>
-stand for themselves; lowercase letters stand for fields as described.
-Special characters other than <LF>, <CR> and <SP> are preceded by ^.
-
-Spectracom 8170 and Netclock/2 WWV Synchonized Clock (format 0)
-
-"<CR><LF>i ddd hh:mm:ss TZ=zz<CR><LF>"
- C A D T
-
- poll: ?; offsets: Y = none, D = 3, T = 7, A = 0, Q = none
- i = synchronization flag (<SP> = in synch, ? = out synch)
- ddd = day of year
- hh:mm:ss = hours, minutes, seconds
- zz = timezone offset (hours from UTC)
-
- Note: alarm condition is indicated by other than <SP> at A, which
- occurs during initial synchronization and when received signal has
- been lost for about ten hours
-
- example: " 216 15:36:43 TZ=0"
- A D T
-
-Netclock/2 WWV Synchonized Clock (format 2)
-
-"<CR><LF>iqyy ddd hh:mm:ss.fff ld"
- C AQY D T
-
- poll: ?; offsets: Y = 2, D = 5, T = 9, A = 0, Q = 1
- i = synchronization flag (<SP> = in synch, ? = out synch)
- q = quality indicator (<SP> < 1ms, A < 10 ms, B < 100 ms, C < 500
- ms, D > 500 ms)
- yy = year (as broadcast)
- ddd = day of year
- hh:mm:ss.fff = hours, minutes, seconds, milliseconds of day
- l = leap-second warning (L indicates leap at end of month)
- d = standard/daylight time indicator (<SP> standard, D daylight)
-
- Note: alarm condition is indicated by other than <SP> at A, which
- occurs during initial synchronization and when received signal has
- been lost for about ten hours; unlock condition is indicated by
- other than <SP> at Q, with time since last lock indicated by the
- letter code A < 13 min, B < 1.5 hr, C < 7 hr, D > 7 hr.
-
- example: " 92 216 15:36:43.640 D"
- AQ D T
-
-TrueTime 468-DC Satellite Synchronized Clock (and other TrueTime
-receivers)
-
-"<CR><LF><^A>ddd:hh:mm:ssq<CR>"
- D T QC
-
- poll: none; offsets: Y = none, D = 0, T = 4, A = 12, Q = 12
- hh:mm:ss = hours, minutes, seconds
- q = quality/alarm indicator (<SP> = locked, ? = alarm)
-
- Note: alarm condition is indicated by ? at A, which occurs during
- initial synchronization and when received signal is lost for an
- extended period; unlock condition is indicated by other than <SP>
- at Q
-
- example: "216:15:36:43 "
- D T Q
-
-Heath GC-1000 Most Accurate Clock (WWV/H)
-
-"<CR>hh:mm:ss.f dd/mm/yy<CR>"
- C T A D
-
- poll: none; offsets: Y = none, D = 15, T = 0, A = 9, Q = none
- hh:mm:ss = hours, minutes, seconds
- f = deciseconds (? when out of spec)
- dd/mm = day, month
- yy = year of century (from DIPswitches)
-
- Note: 0?:??:??.? is displayed before synch is first established and
- hh:mm:ss.? once synch is established and then lost again for about
- a day.
-
- example: "15:36:43.6 04/08/91"
- T A D Y
-
-PST/Traconex 1020 Time Source (WWV/H) (firmware revision V4.01)
-
-"frdzycchhSSFTttttuuxx<CR>" "ahh:mm:ss.fffs<CR>" "yy/dd/mm/ddd<CR>"
- A Q T Y D
-
- poll: "QMQDQT"; offsets: Y = 0, D = 3 T = 1,, A = 11, Q = 13
- 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 = 1991)
- 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 (1-5 = 2.5, 5, 10, 15, 20 MHz)
- T = transmitter (C = WWV, H = WWVH)
- tttt = time since last update (minutes)
- uu = flush character (03 = ^C)
- xx = 94 (unknown) (firmware revision X4.01.999 only)
-
- a = AM/PM indicator (A = AM, P = PM, <SP> - 24-hour format)
- hh:mm:ss.fff = hours, minutes, seconds, milliseconds of day
- s = daylight-saving indicator (<SP> standard, D daylight)
-
- yy = year of century (from DIPswitches)
- dd/mm/ddd = day of month, month of year, day of year
-
- Note: The alarm condition is indicated by other than ? at A, which
- occurs during initial synchronization and when received signal is
- lost for an extended period. A receiver unlock condition is
- indicated by other than "0000" in the tttt subfield at Q.
-
- example: "O3@055281824C00000394 91/08/04/216 15:36:43.640"
- T Y D T
-
-David L. Mills
-University of Delaware
-mills@udel.edu
-23 October 1993
diff --git a/contrib/ntp/scripts/stats/clock.awk b/contrib/ntp/scripts/stats/clock.awk
deleted file mode 100755
index ef62da9..0000000
--- a/contrib/ntp/scripts/stats/clock.awk
+++ /dev/null
@@ -1,431 +0,0 @@
-# awk program to scan clockstat files and report errors/statistics
-#
-# usage: awk -f check.awk clockstats
-#
-# This program works for the following radios:
-# PST/Traconex 1020 WWV reciever
-# Arbiter 1088 GPS receiver
-# Spectracom 8170/Netclock-2 WWVB receiver
-# IRIG audio decoder
-# Austron 2200A/2201A GPS receiver (see README.austron file)
-#
-BEGIN {
- etf_min = osc_vmin = osc_tmin = 1e9
- etf_max = osc_vmax = osc_tmax = -1e9
-}
-#
-# scan all records in file
-#
-{
- #
- # select PST/Traconex WWV records
- # 00:00:37.234 96/07/08/190 O6@0:5281825C07510394
- #
- if (NF >= 4 && $3 == "127.127.3.1") {
- if (substr($6, 14, 4) > "0010")
- wwv_sync++
- if (substr($6, 13, 1) == "C")
- wwv_wwv++
- if (substr($6, 13, 1) == "H")
- wwv_wwvh++
- x = substr($6, 12, 1)
- if (x == "1")
- wwv_2.5++
- else if (x == "2")
- wwv_5++
- else if (x == "3")
- wwv_10++
- else if (x == "4")
- wwv_15++
- else if (x == "5")
- wwv_20++
- continue
- }
- #
- # select Arbiter GPS records
- # 96 190 00:00:37.000 0 V=08 S=44 T=3 P=10.6 E=00
- # N39:42:00.951 W075:46:54.880 210.55 2.50 0.00
- #
- if (NF >= 4 && $3 == "127.127.11.1") {
- if (NF > 8) {
- arb_count++
- if ($7 != 0)
- arb_sync++
- x = substr($10, 3, 1)
- if (x == "0")
- arb_0++
- else if (x == "1")
- arb_1++
- else if (x == "2")
- arb_2++
- else if (x == "3")
- arb_3++
- else if (x == "4")
- arb_4++
- else if (x == "5")
- arb_5++
- else if (x == "6")
- arb_6++
- } else if (NF == 8) {
- arbn++
- arb_mean += $7
- arb_rms += $7 * $7
- if (arbn > 0) {
- x = $7 - arb_val
- arb_var += x * x
- }
- arb_val = $7
- }
- continue
- }
- #
- # select Spectracom WWVB records
- # see summary for decode
- # 96 189 23:59:32.248 D
- #
- if (NF >= 4 && $3 == "127.127.4.1") {
- if ($4 == "SIGNAL" || NF > 7)
- printf "%s\n", $0
- else {
- wwvb_count++
- if ($4 ~ /\?/)
- wwvb_x++
- else if ($4 ~ /A/)
- wwvb_a++
- else if ($4 ~ /B/)
- wwvb_b++
- else if ($4 ~ /C/)
- wwvb_c++
- else if ($4 ~ /D/)
- wwvb_d++
- }
- continue
- }
- #
- # select IRIG audio decoder records
- # see summary for decode
- #
- if (NF >= 4 && $3 == "127.127.6.0") {
- irig_count++
- if ($5 ~ /\?/)
- irig_error++
- continue
- }
- #
- # select Austron GPS LORAN ENSEMBLE records
- # see summary for decode
- #
- else if (NF >= 13 && $6 == "ENSEMBLE") {
- ensemble_count++
- if ($9 <= 0)
- ensemble_badgps++
- else if ($12 <= 0)
- ensemble_badloran++
- else {
- if ($13 > 200e-9 || $13 < -200e-9)
- ensemble_200++
- else if ($13 > 100e-9 || $13 < -100e-9)
- ensemble_100++
- ensemble_mean += $13
- ensemble_rms += $13 * $13
- }
- continue
- }
- #
- # select Austron LORAN TDATA records
- # see summary for decode; note that signal quality log is simply
- # copied to output
- #
- else if (NF >= 7 && $6 == "TDATA") {
- tdata_count++
- for (i = 7; i < NF; i++) {
- if ($i == "M" && $(i+1) == "OK") {
- i += 5
- m += $i
- tdata_m++
- }
- else if ($i == "W" && $(i+1) == "OK") {
- i += 5
- w += $i
- tdata_w++
- }
- else if ($i == "X" && $(i+1) == "OK") {
- i += 5
- x += $i
- tdata_x++
- }
- else if ($i == "Y" && $(i+1) == "OK") {
- i += 5
- y += $i
- tdata_y++
- }
- else if ($i == "Z" && $(i+1) == "OK") {
- i += 5
- z += $i
- tdata_z++
- }
- }
- continue
- }
- #
- # select Austron ITF records
- # see summary for decode
- #
- else if (NF >= 13 && $5 == "ITF" && $12 >= 100) {
- itf_count++
- if ($9 > 200e-9 || $9 < -200e-9)
- itf_200++
- else if ($9 > 100e-9 || $9 < -100e-9)
- itf_100++
- itf_mean += $9
- itf_rms += $9 * $9
- itf_var += $10 * $10
- continue
- }
- #
- # select Austron ETF records
- # see summary for decode
- #
- else if (NF >= 13 && $5 == "ETF" && $13 >= 100) {
- etf_count++
- if ($6 > etf_max)
- etf_max = $6
- else if ($6 < etf_min)
- etf_min = $6
- etf_mean += $6
- etf_rms += $6 * $6
- etf_var += $9 * $9
- continue
- }
- #
- # select Austron TRSTAT records
- # see summary for decode
- #
- else if (NF >= 5 && $5 == "TRSTAT") {
- trstat_count++
- j = 0
- for (i = 6; i <= NF; i++)
- if ($i == "T")
- j++
- trstat_sat[j]++
- continue
- }
- #
- # select Austron ID;OPT;VER records
- #
- # config GPS 2201A TTY1 TC1 LORAN IN OUT1 B.00 B.00 28-Apr-93
- #
- # GPS 2201A receiver model
- # TTY1 rs232 moduel
- # TC1 IRIG module
- # LORAN LORAN assist module
- # IN input module
- # OUT1 output module
- # B.00 B.00 firmware revision
- # 28-Apr-9 firmware date3
- #
- else if (NF >= 5 && $5 == "ID;OPT;VER") {
- id_count++
- id_temp = ""
- for (i = 6; i <= NF; i++)
- id_temp = id_temp " " $i
- if (id_string != id_temp)
- printf "config%s\n", id_temp
- id_string = id_temp
- continue
- }
- #
- # select Austron POS;PPS;PPSOFF records
- #
- # position +39:40:48.425 -075:45:02.392 +74.09 Stored UTC 0 200 0
- #
- # +39:40:48.425 position north latitude
- # -075:45:02.392 position east longitude
- # +74.09 elevation (meters)
- # Stored position is stored
- # UTC time is relative to UTC
- # 0 200 0 PPS offsets
- #
- else if (NF >= 5 && $5 == "POS;PPS;PPSOFF") {
- pos_count++
- pos_temp = ""
- for (i = 6; i <= NF; i++)
- pos_temp = pos_temp " " $i
- if (pos_string != pos_temp)
- printf "position%s\n", pos_temp
- pos_string = pos_temp
- continue
- }
- #
- # select Austron OSC;ET;TEMP records
- #
- # loop 1121 Software Control Locked
- #
- # 1121 oscillator type
- # Software Control loop is under software control
- # Locked loop is locked
- #
- else if (NF >= 5 && $5 == "OSC;ET;TEMP") {
- osc_count++
- osc_temp = $6 " " $7 " " $8 " " $9
- if (osc_status != osc_temp)
- printf "loop %s\n", osc_temp
- osc_status = osc_temp
- if ($10 > osc_vmax)
- osc_vmax = $10
- if ($10 < osc_vmin)
- osc_vmin = $10
- if ($11 > osc_tmax)
- osc_tmax = $11
- if ($11 < osc_tmin)
- osc_tmin = $11
- continue
- }
- #
- # select Austron UTC records
- # these ain't ready yet
- #
- else if (NF >= 5 && $5 == "UTC") {
- utc_count++
- utc_temp = ""
- for (i = 6; i <= NF; i++)
- utc_temp = utc_temp " " $i
- if (utc_string != utc_temp)
-# printf "utc%s\n", utc_temp
- utc_string = utc_temp
- continue
- }
-} END {
-#
-# PST/Traconex WWV summary data
-#
- if (wwv_wwv + wwv_wwvh > 0)
- printf "wwv %d, wwvh %d, err %d, MHz (2.5) %d, (5) %d, (10) %d, (15) %d, (20) %d\n", wwv_wwv, wwv_wwvh, wwv_sync, wwv_2.5, wwv_5, wwv_10, wwv_15, wwv_20
-#
-# Arbiter 1088 summary data
-#
-# gps record count
-# err error count
-# sats(0-6) satellites tracked
-# mean 1 PPS mean (us)
-# rms 1 PPS rms error (us)
-# var 1 PPS Allan variance
-#
- if (arb_count > 0) {
- printf "gps %d, err %d, sats(0-6) %d %d %d %d %d %d %d", arb_count, arb_sync, arb_0, arb_1, arb_2, arb_3, arb_4, arb_5, arb_6
- if (arbn > 1) {
- arb_mean /= arbn
- arb_rms = sqrt(arb_rms / arbn - arb_mean * arb_mean)
- arb_var = sqrt(arb_var / (2 * (arbn - 1)))
- printf ", mean %.2f, rms %.2f, var %.2e\n", arb_mean, arb_rms, arb_var * 1e-6
- } else {
- printf "\n"
- }
- }
-#
-# ensemble summary data
-#
-# ensemble record count
-# badgps gps data unavailable
-# badloran loran data unavailable
-# rms ensemble rms error (ns)
-# >200 ensemble error >200 ns
-# >100 100 ns < ensemble error < 200 ns
-#
- if (ensemble_count > 0) {
- ensemble_mean /= ensemble_count
- ensemble_rms = sqrt(ensemble_rms / ensemble_count - ensemble_mean * ensemble_mean) * 1e9
- printf "ensemble %d, badgps %d, badloran %d, rms %.1f, >200 %d, >100 %d\n", ensemble_count, ensemble_badgps, ensemble_badloran, ensemble_rms, ensemble_200, ensemble_100
- }
-#
-# wwvb summary data
-#
-# wwvb record count
-# ? unsynchronized
-# >1 error > 1 ms
-# >10 error > 10 ms
-# >100 error > 100 ms
-# >500 error > 500 ms
-#
- if (wwvb_count > 0)
- printf "wwvb %d, ? %d, >1 %d, >10 %d, >100 %d, >500 %d\n", wwvb_count, wwvb_x, wwvb_a, wwvb_b, wwvb_c, wwvb_d
-#
-# irig summary data
-#
-# irig record count
-# err error count
-#
- if (irig_count > 0)
- printf "irig %d, err %d\n", irig_count, irig_error
-#
-# tdata summary data
-#
-# tdata record count
-# m M master OK-count, mean level (dB)
-# w W slave OK-count, mean level (dB)
-# x X slave OK-count, mean level (dB)
-# y Y slave OK-count, mean level (dB)
-# z Z slave OK-count, mean level (dB)
-#
- if (tdata_count > 0 ) {
- if (tdata_m > 0)
- m /= tdata_count
- if (tdata_x > 0)
- w /= tdata_count
- if (tdata_x > 0)
- x /= tdata_count
- if (tdata_y > 0)
- y /= tdata_count
- if (tdata_z > 0)
- z /= tdata_count
- printf "tdata %d, m %d %.1f, w %d %.1f, x %d %.1f, y %d %.1f, z %d %.1f\n", tdata_count, tdata_m, m, tdata_w, w, tdata_x, x, tdata_y, y, tdata_z, z
- }
-#
-# itf summary data
-#
-# itf record count
-# rms itf rms error (ns)
-# >200 itf error > 200 ns
-# >100 itf error > 100 ns
-# var Allan variance
-#
- if (itf_count > 1) {
- itf_mean /= itf_count
- itf_rms = sqrt(itf_rms / itf_count - itf_mean * itf_mean) * 1e9
- itf_var = sqrt(itf_var / (2 * (itf_count - 1)))
- printf "itf %d, rms %.1f, >200 %d, >100 %d, var %.2e\n", itf_count, itf_rms, itf_200, itf_100, itf_var
- }
-#
-# etf summary data
-#
-# etf record count
-# mean etf mean (ns)
-# rms etf rms error (ns)
-# max etf maximum (ns)
-# min etf minimum (ns)
-# var Allan variance
-#
- if (etf_count > 0) {
- etf_mean /= etf_count
- etf_rms = sqrt(etf_rms / etf_count - etf_mean * etf_mean)
- etf_var = sqrt(etf_var / (2 * (etf_count - 1)))
- printf "etf %d, mean %.1f, rms %.1f, max %d, min %d, var %.2e\n", etf_count, etf_mean, etf_rms, etf_max, etf_min, etf_var
- }
-#
-# trstat summary data
-#
-# trstat record count
-# sat histogram of tracked satellites (0 - 7)
-#
- if (trstat_count > 0)
- printf "trstat %d, sat %d %d %d %d %d %d %d %d\n", trstat_count, trstat_sat[0], trstat_sat[1], trstat_sat[2], trstat_sat[2], trstat_sat[3], trstat_sat[4], trstat_sat[5], trstat_sat[6], trstat_sat[7]
-#
-# osc summary data
-#
-# osc record count
-# control control midrange (V) +/- deviation (mV)
-# temp oven temperature midrange +/- deviation (deg C)
-#
- if (osc_count > 0)
- printf "osc %d, control %.3f+/-%.3f, temp %.1f+/-%.2f\n", osc_count, (osc_vmax + osc_vmin) / 2, (osc_vmax - osc_vmin) / 2 * 1e3, (osc_tmax + osc_tmin) / 2, (osc_tmax - osc_tmin) / 2
-}
diff --git a/contrib/ntp/scripts/stats/dupe.awk b/contrib/ntp/scripts/stats/dupe.awk
deleted file mode 100755
index 317c2a4..0000000
--- a/contrib/ntp/scripts/stats/dupe.awk
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# delete duplicate lines
-#
-{
- if (old != $0)
- printf "%s\n", $0
- old = $0
-}
diff --git a/contrib/ntp/scripts/stats/ensemble.S b/contrib/ntp/scripts/stats/ensemble.S
deleted file mode 100755
index 32a4dba..0000000
--- a/contrib/ntp/scripts/stats/ensemble.S
+++ /dev/null
@@ -1,5 +0,0 @@
-ensemble <- scan(file1, list(day=0, sec=0, gps=0, gpsw=0, loran=0, loranw=0, ensemble=0, std=0))
-str <- paste("eps/", file1, ".eps", sep="")
-postscript(str, , , , 5, pointsize=18)
-par(mgp=c(1, 0, 0), tck = 0.03, mar = c(2, 2, 1, 1))
-plot(ensemble$sec, ensemble$ensemble, type="l", xlab=paste("MJD", ensemble$day, "Time (s)"), ylab="Ensemble Offset (ns)", ylim=c(-400, 400))
diff --git a/contrib/ntp/scripts/stats/ensemble.awk b/contrib/ntp/scripts/stats/ensemble.awk
deleted file mode 100755
index 136b33d..0000000
--- a/contrib/ntp/scripts/stats/ensemble.awk
+++ /dev/null
@@ -1,17 +0,0 @@
-# program to produce loran ensemble statistics from clockstats files
-#
-# usage: awk -f ensemble.awk clockstats
-#
-# format of input record (time values in seconds)
-# 49165 8.628 127.127.10.1 93:178:00:00:07.241 LORAN ENSEMBLE
-# -6.43E-08 +5.02E-08 .091 +5.98E-08 +1.59E-08 .909 +4.85E-08 +3.52E-08
-#
-# format of output record (time values in nanoseconds)
-# MJD sec GPS wgt LORAN wgt avg sigma
-# 49165 8.628 -64.3 0.091 59.8 0.909 48.5 35.2
-#
-# select LORAN ENSEMBLE records with valid format and weights
-{
- if (NF >= 14 && $6 == "ENSEMBLE" && $9 > 0 && $12 > 0)
- printf "%5s %9.3f %7.1f %6.3f %7.1f %6.3f %7.1f %7.1f\n", $1, $2, $7*1e9, $9, $10*1e9, $12, $13*1e9, $14*1e9
-}
diff --git a/contrib/ntp/scripts/stats/etf.S b/contrib/ntp/scripts/stats/etf.S
deleted file mode 100755
index 9b9c68b..0000000
--- a/contrib/ntp/scripts/stats/etf.S
+++ /dev/null
@@ -1,15 +0,0 @@
-options(digits=4)
-file2 <- "etf_summary"
-etf <- scan(file1, list(day=0, sec=0, offset=0, stab=0))
-r <- lsfit(etf$sec, etf$offset)
-count<-length(etf$sec)
-mean<-r$coef[[1]]
-std<-sqrt(var(r$residuals))
-slope<-r$coef[[2]] * 1000
-cat("\n", file=file2 , append=TRUE, fill=FALSE, sep="")
-cat(file1, "\n", file=file2, append=TRUE, fill=FALSE, sep="")
-cat("etf1 ", count, ", T ", mean, " ns, R ", slope, " ps/s, std ", std, " us\n", file=file2, append=TRUE, fill=FALSE, sep="")
-str <- paste("eps/", file1, ".eps", sep="")
-postscript(str, , , , 5, pointsize=18)
-par(mgp=c(1, 0, 0), tck=0.03, mar=c(2, 2, 1, 1))
-plot(etf$sec, etf$offset, type="l", xlab=paste("MJD", etf$day, "Time (s)"), ylab="External Offset (ns)", ylim=c(-400, 400))
diff --git a/contrib/ntp/scripts/stats/etf.awk b/contrib/ntp/scripts/stats/etf.awk
deleted file mode 100755
index 8e6e334..0000000
--- a/contrib/ntp/scripts/stats/etf.awk
+++ /dev/null
@@ -1,19 +0,0 @@
-# program to produce external time/frequence statistics from clockstats files
-#
-# usage: awk -f etf.awk clockstats
-#
-# format of input record
-# 49165 40.473 127.127.10.1 93:178:00:00:39.238 ETF
-# +175.0 +176.8 2.0 +3.729E-11 +1.000E-10 +3.511E-11 4.005E-13 500
-#
-# format of output record (time values in nanoseconds)
-# MJD sec time freq
-# 49165 40.473 175.0 3.729e-11
-#
-# select ETF records with valid format
-{
- if (NF >= 9 && $5 == "ETF") {
- printf "%5s %9.3f %7.1f %10.3e\n", $1, $2, $6, $9
- }
-}
-
diff --git a/contrib/ntp/scripts/stats/itf.S b/contrib/ntp/scripts/stats/itf.S
deleted file mode 100755
index 56c8c8d..0000000
--- a/contrib/ntp/scripts/stats/itf.S
+++ /dev/null
@@ -1,5 +0,0 @@
-itf <- scan(file1, list(day=0, sec=0, offset=0, stab=0))
-str <- paste("eps/", file1, ".eps", sep="")
-postscript(str, , , , 5, pointsize=18)
-par(mgp=c(1, 0, 0), tck=0.03, mar=c(2, 2, 1, 1))
-plot(itf$sec, itf$offset, type="l", xlab=paste("MJD", itf$day, "Time (s)"), ylab="Internal Offset (ns)", ylim=c(-400, 400))
diff --git a/contrib/ntp/scripts/stats/itf.awk b/contrib/ntp/scripts/stats/itf.awk
deleted file mode 100755
index 2b21c5b..0000000
--- a/contrib/ntp/scripts/stats/itf.awk
+++ /dev/null
@@ -1,19 +0,0 @@
-# program to produce intewrnal time/frequence statistics from clockstats files
-#
-# usage: awk -f itf.awk clockstats
-#
-# format of input record
-# 49227 67.846 127.127.10.1 93:240:00:00:51.816 ITF
-# COCO 0 +2.0579E-07 -3.1037E-08 -7.7723E-11 +6.5455E-10 500.00 4.962819
-#
-# format of output record (time values in nanoseconds)
-# MJD sec time freq
-# 49227 67.846 +2.0579E-07 -7.7723E-11
-#
-# select ITF records with valid format
-{
- if (NF >= 10 && $5 == "ITF") {
- printf "%5s %9.3f %7.1f %10.3e\n", $1, $2, $8 * 1e9, $10
- }
-}
-
diff --git a/contrib/ntp/scripts/stats/loop.S b/contrib/ntp/scripts/stats/loop.S
deleted file mode 100755
index 8e564b6..0000000
--- a/contrib/ntp/scripts/stats/loop.S
+++ /dev/null
@@ -1,7 +0,0 @@
-options(digits=4)
-loop <- scan(file1, list(day=0, sec=0, offset=0, freq=0, tc=0))
-loop$offset <- loop$offset * 1e6
-str <- paste("eps/", file1, ".eps", sep="")
-postscript(str, , , , 5, pointsize=18)
-par(mgp=c(1, 0, 0), tck=0.03, mar=c(2, 2, 1, 1))
-plot(loop$sec, loop$offset, type="l", xlab=paste("MJD", loop$day, "Time (s)"), ylab="PLL Offset (us)", ylim=c(-400, 400))
diff --git a/contrib/ntp/scripts/stats/loop.awk b/contrib/ntp/scripts/stats/loop.awk
deleted file mode 100755
index bac90db..0000000
--- a/contrib/ntp/scripts/stats/loop.awk
+++ /dev/null
@@ -1,45 +0,0 @@
-# awk program to scan loopstats files and report errors/statistics
-#
-# usage: awk -f loop.awk loopstats
-#
-# format of loopstats record
-# MJD sec time (s) freq (ppm) poll
-# 49235 3.943 0.000016 22.4716 6
-#
-# format of output dataset (time values in milliseconds, freq in ppm)
-# loopstats.19960706
-# loop 1180, 0+/-11.0, rms 2.3, freq -24.45+/-0.045, var 0.019
-#
-BEGIN {
- loop_tmax = loop_fmax = -1e9
- loop_tmin = loop_fmin = 1e9
-}
-#
-# scan all records in file
-#
-{
- if (NF >= 5) {
- loop_count++
- if ($3 > loop_tmax)
- loop_tmax = $3
- if ($3 < loop_tmin)
- loop_tmin = $3
- if ($4 > loop_fmax)
- loop_fmax = $4
- if ($4 < loop_fmin)
- loop_fmin = $4
- loop_time += $3
- loop_time_rms += $3 * $3
- loop_freq += $4
- loop_freq_rms += $4 * $4
- }
-} END {
- if (loop_count > 0) {
- loop_time /= loop_count
- loop_time_rms = sqrt(loop_time_rms / loop_count - loop_time * loop_time)
- loop_freq /= loop_count
- loop_freq_rms = sqrt(loop_freq_rms / loop_count - loop_freq * loop_freq)
- printf "loop %d, %.0f+/-%.1f, rms %.1f, freq %.2f+/-%0.3f, var %.3f\n", loop_count, (loop_tmax + loop_tmin) / 2 * 1e6, (loop_tmax - loop_tmin) / 2 * 1e6, loop_time_rms * 1e6, (loop_fmax + loop_fmin) / 2, (loop_fmax - loop_fmin) / 2, loop_freq_rms
- }
-}
-
diff --git a/contrib/ntp/scripts/stats/loop_summary b/contrib/ntp/scripts/stats/loop_summary
deleted file mode 100755
index 35479ec..0000000
--- a/contrib/ntp/scripts/stats/loop_summary
+++ /dev/null
@@ -1,2 +0,0 @@
-
-loopstats.[1-9]
diff --git a/contrib/ntp/scripts/stats/peer.awk b/contrib/ntp/scripts/stats/peer.awk
deleted file mode 100755
index 5fe260e..0000000
--- a/contrib/ntp/scripts/stats/peer.awk
+++ /dev/null
@@ -1,68 +0,0 @@
-# awk program to scan peerstats files and report errors/statistics
-#
-# usage: awk -f peer.awk peerstats
-#
-# format of peerstats record
-# MJD sec ident stat offset (s) delay (s) disp (s)
-# 49235 11.632 128.4.2.7 f414 -0.000041 0.21910 0.00084
-#
-# format of output dataset (time values in milliseconds)
-# peerstats.19960706
-# ident cnt mean rms max delay dist disp
-# ==========================================================================
-# 140.173.112.2 85 -0.509 1.345 4.606 80.417 49.260 1.092
-# 128.4.1.20 1364 0.058 0.364 4.465 3.712 10.540 1.101
-# 140.173.16.1 1415 -0.172 0.185 1.736 3.145 5.020 0.312
-#...
-#
-BEGIN {
- n = 0
- MAXDISTANCE = 1.0
-}
-#
-# scan all records in file
-#
-# we toss out all distances greater than one second on the assumption the
-# peer is in initial acquisition
-#
-{
- if (NF >= 7 && ($7 + $6 / 2) < MAXDISTANCE) {
- i = n
- for (j = 0; j < n; j++) {
- if ($3 == peer_ident[j])
- i = j
- }
- if (i == n) {
- peer_ident[i] = $3
- peer_tmax[i] = peer_dist[i] = -1e9
- peer_tmin[i] = 1e9
- n++
- }
- peer_count[i]++
- if ($5 > peer_tmax[i])
- peer_tmax[i] = $5
- if ($5 < peer_tmin[i])
- peer_tmin[i] = $5
- dist = $7 + $6 / 2
- if (dist > peer_dist[i])
- peer_dist[i] = dist
- peer_time[i] += $5
- peer_time_rms[i] += $5 * $5
- peer_delay[i] += $6
- peer_disp[i] += $7
- }
-} END {
- printf " ident cnt mean rms max delay dist disp\n"
- printf "==========================================================================\n"
- for (i = 0; i < n; i++) {
- peer_time[i] /= peer_count[i]
- peer_time_rms[i] = sqrt(peer_time_rms[i] / peer_count[i] - peer_time[i] * peer_time[i])
- peer_delay[i] /= peer_count[i]
- peer_disp[i] /= peer_count[i]
- peer_tmax[i] = peer_tmax[i] - peer_time[i]
- peer_tmin[i] = peer_time[i] - peer_tmin[i]
- if (peer_tmin[i] > peer_tmax[i])
- peer_tmax[i] = peer_tmin[i]
- printf "%-15s%5d%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f\n", peer_ident[i], peer_count[i], peer_time[i] * 1e3, peer_time_rms[i] * 1e3, peer_tmax[i] * 1e3, peer_delay[i] * 1e3, peer_dist[i] * 1e3, peer_disp[i] * 1e3
- }
-}
diff --git a/contrib/ntp/scripts/stats/psummary.awk b/contrib/ntp/scripts/stats/psummary.awk
deleted file mode 100755
index ec06b0c..0000000
--- a/contrib/ntp/scripts/stats/psummary.awk
+++ /dev/null
@@ -1,82 +0,0 @@
-# program to scan peer_summary file and produce summary of daily summaries
-#
-# usage: awk -f psummary.awk peer_summary
-#
-# format of input records
-# peerstats.19960706
-# ident cnt mean rms max delay dist disp
-# ==========================================================================
-# 140.173.112.2 85 -0.509 1.345 4.606 80.417 49.260 1.092
-# 128.4.1.20 1364 0.058 0.364 4.465 3.712 10.540 1.101
-# ...
-#
-# format of output records (actual data from rackety.udel.edu)
-# host days mean rms max >1 >5 >10 >50
-# ==================================================================
-# 127.127.22.1 1090 0.001 0.401 99.800 19 14 13 10
-# 127.0.0.1 1188 0.060 1.622 105.004 78 65 51 32
-# 127.127.4.1 586 0.000 0.000 0.000 0 0 0 0
-# 140.173.64.1 975 -0.010 2.552 257.595 399 192 114 8
-# 128.175.1.3 1121 0.447 8.637 204.123 479 460 397 147
-# 140.173.16.1 1106 0.027 1.014 267.857 242 38 31 23
-# 128.4.1.4 1119 0.023 1.037 267.748 223 41 34 23
-# 128.4.1.2 850 1.202 1.654 267.704 196 53 45 34
-# 128.4.1.20 1101 0.088 1.139 268.322 430 111 83 16
-# 140.173.32.1 979 -0.949 2.344 257.671 396 217 136 7
-# 140.173.112.2 1066 0.040 2.111 152.969 442 315 152 16
-# 140.173.80.1 1059 0.019 1.858 87.690 438 348 150 9
-# 140.173.96.1 1015 0.110 2.007 266.744 399 314 170 17
-# 140.173.128.1 1103 -0.002 2.600 257.672 465 262 132 13
-# 140.222.135.1 347 -4.626 8.804 196.394 135 135 134 95
-# 140.173.128.2 1081 -0.046 2.967 261.448 463 342 172 17
-# 140.222.141.1 354 0.820 8.809 195.333 142 141 139 100
-# 140.173.144.2 1058 -0.107 2.805 270.498 448 341 163 17
-# 140.222.134.1 354 -0.056 8.479 172.458 142 141 141 100
-# 140.222.144.1 415 -1.456 9.964 191.684 161 161 161 123
-# 140.222.136.1 234 0.902 7.707 182.431 62 62 62 48
-# 128.175.1.1 774 0.890 4.838 266.799 358 291 200 83
-# 127.127.10.1 1086 -0.002 1.462 231.128 240 239 60 57
-# 140.173.48.2 576 0.016 4.092 350.512 213 126 88 16
-# 128.4.1.11 3 0.000 0.000 0.000 0 0 0 0
-# 128.4.1.26 386 -1.363 20.251 341.284 164 164 161 132
-#
-# select table beginning with "ident"
-{
- if (NF < 8 || $1 == "ident")
- continue
- i = n
- for (j = 0; j < n; j++) {
- if ($1 == peer_ident[j])
- i = j
- }
- if (i == n) {
- peer_ident[i] = $1
- n++
- }
- peer_count[i]++
- if (($7 - $6 / 2) < 400) {
- peer_count[i]++
- peer_mean[i] += $3
- peer_var[i] += $4 * $4
- if ($5 > peer_max[i])
- peer_max[i] = $5
- if ($5 > 1)
- peer_1[i]++
- if ($5 > 5)
- peer_2[i]++
- if ($5 > 10)
- peer_3[i]++
- if ($5 > 50)
- peer_4[i]++
- }
-} END {
- printf " host days mean rms max >1 >5 >10 >50\n"
- printf "==================================================================\n"
- for (i = 0; i < n; i++) {
- if (peer_count[i] <= 0)
- continue
- peer_mean[i] /= peer_count[i]
- peer_var[i] = sqrt(peer_var[i] / peer_count[i])
- printf "%-15s%4d%10.3f%10.3f%10.3f%4d%4d%4d%4d\n", peer_ident[i], peer_count[i], peer_mean[i], peer_var[i], peer_max[i], peer_1[i], peer_2[i], peer_3[i], peer_4[i]
- }
-}
diff --git a/contrib/ntp/scripts/stats/summary.sh b/contrib/ntp/scripts/stats/summary.sh
deleted file mode 100755
index dffdb0b..0000000
--- a/contrib/ntp/scripts/stats/summary.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-#
-# Script to summarize ipeerstats, loopstats and clockstats files
-#
-# This script can be run from a cron job once per day, week or month. It
-# runs the file-specific summary script and appends the summary data to
-# designated files.
-#
-DATE=`date +20%y%m%d`
-S=/usr/local/bin/S
-SIN=S.in
-SOUT=S.out
-LOOP=loop_summary
-PEER=peer_summary
-CLOCK=clock_summary
-
-rm -f $SIN $SOUT
-
-#
-# Summarize loopstats files
-#
-for f in loopstats.[12][0-9][0-9][0-9][0-1][0-9][0-3][0-9]; do
- d=`echo $f | cut -f2 -d.`
- if [ -f $f ] && [ $DATE != $d ]; then
- echo " " >>$LOOP
- echo $f >>$LOOP
- awk -f loop.awk $f >>$LOOP
- if [ -f $S ]; then
- echo "file1<-"\"${f}\" >>$SIN
- echo "source("\""loop.S"\"")" >>$SIN
- echo "unix("\""rm ${f}"\"")" >>$SIN
- else
- rm -f $f
- fi
- fi
-done
-
-#
-# Summarize peerstats files
-#
-for f in peerstats.199[4-9][0-1][0-9][0-3][0-9]; do
- d=`echo $f | cut -f2 -d.`
- if [ -f $f ] && [ $DATE != $d ]; then
- echo " " >>$PEER
- echo $f >>$PEER
- awk -f peer.awk $f >>$PEER
- rm -f $f
- fi
-done
-
-#
-# Summarize clockstats files
-#
-for f in clockstats.199[4-9][0-1][0-9][0-3][0-9]; do
- d=`echo $f | cut -f2 -d.`
- if [ -f $f ] && [ $DATE != $d ]; then
- echo " " >>$CLOCK
- echo $f >>$CLOCK
- awk -f clock.awk $f >>$CLOCK
- if [ -f /dev/gps[0-9] ]; then
- awk -f itf.awk $f >itf.$d
- awk -f etf.awk $f >etf.$d
- awk -f ensemble.awk $f >ensemble.$d
- awk -f tdata.awk $f >tdata.$d
- fi
- rm -f $f
- fi
-done
-
-#
-# Process clockstat files with S and generate PostScript plots
-#
-for f in itf etf ensemble tdata; do
- for d in ${f}.199[4-9][0-1][0-9][0-3][0-9]; do
- if [ -f $d ]; then
- if [ -f $S ]; then
- echo "file1<-"\"${d}\" >>$SIN
- echo "source("\"${f}.S\"")" >>$SIN
- echo "unix("\""rm ${d}"\"")" >>$SIN
- else
- rm -f $d
- fi
- fi
- done
-done
-if [ -f $SIN ]; then
- $S BATCH $SIN $SOUT
-fi
diff --git a/contrib/ntp/scripts/stats/tdata.S b/contrib/ntp/scripts/stats/tdata.S
deleted file mode 100755
index f360a24..0000000
--- a/contrib/ntp/scripts/stats/tdata.S
+++ /dev/null
@@ -1,5 +0,0 @@
-tdata <- scan(file1, list(day=0, sec=0, m=0, w=0, x=0, y=0, z=0))
-str <- paste("eps/", file1, ".eps", sep="")
-postscript(str, , , , 5, pointsize=18)
-par(mgp=c(1, 0, 0), tck=0.03, mar=c(2, 2, 1, 1))
-plot(tdata$sec, tdata$m, type="l", xlab=paste("MJD", tdata$day, "Time (s)"), ylab="LORAN-M SNR (dB)")
diff --git a/contrib/ntp/scripts/stats/tdata.awk b/contrib/ntp/scripts/stats/tdata.awk
deleted file mode 100755
index 5be9c04..0000000
--- a/contrib/ntp/scripts/stats/tdata.awk
+++ /dev/null
@@ -1,45 +0,0 @@
-# program to produce loran tdata statistics from clockstats files
-#
-# usage: awk -f tdata.awk clockstats
-#
-# format of input record (missing replaced by -40.0)
-# 49228 36.852 127.127.10.1 93:241:00:00:20.812 LORAN TDATA
-# M OK 0 0 1169.14 -7.4 3.16E-07 .424
-# W CV 0 0 3329.30 -16.4 1.81E-06
-# X OK 0 0 1737.19 -10.5 3.44E-07 .358
-# Y OK 0 0 2182.07 -9.0 4.41E-07 .218
-#
-# format of output record (time in nanoseconds, signal values in dB)
-# MJD sec time M W X Y Z
-# 49228 36.852 175.0 -7.4 -16.4 -10.5 -9.0
-#
-# select LORAN TDATA records with valid format
-{
- if (NF >= 7 && $6 == "TDATA") {
- m = w = x = y = z = -40.0
- for (i = 7; i < NF - 5; i++) {
- if ($i == "M" && $(i+1) == "OK") {
- i += 5
- m = $i
- }
- else if ($i == "W" && $(i+1) == "OK") {
- i += 5
- w = $i
- }
- else if ($i == "X" && $(i+1) == "OK") {
- i += 5
- x = $i
- }
- else if ($i == "Y" && $(i+1) == "OK") {
- i += 5
- y = $i
- }
- else if ($i == "Z" && $(i+1) == "OK") {
- i += 5
- z = $i
- }
- }
- printf "%5s %9.3f %6.1f %6.1f %6.1f %6.1f %6.1f\n", $1, $2, m, w, x, y, z
- }
-}
-
diff --git a/contrib/ntp/scripts/summary.in b/contrib/ntp/scripts/summary.in
deleted file mode 100644
index 515dfc6..0000000
--- a/contrib/ntp/scripts/summary.in
+++ /dev/null
@@ -1,373 +0,0 @@
-#! @PATH_PERL@ -w
-# $Id$
-# Perl version of (summary.sh, loop.awk, peer.awk):
-# Create summaries from xntpd's loop and peer statistics.
-#
-# Copyright (c) 1997, 1999 by Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
-#
-# 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 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-require 5.003; # "never tested with any other version of Perl"
-use strict;
-
-use Getopt::Long;
-
-my $log_date_pattern = '[12]\d{3}[01]\d[0-3]\d';
-my $statsdir = "/var/log/ntp"; # directory with input files
-my $outputdir = "/tmp"; # directory for output files
-my $skip_time_steps = 3600.0; # ignore time offsets larger that this
-my $startdate = "19700101"; # first data file to use (YYYYMMDD)
-my $enddate=`date -u +%Y%m%d`; chomp $enddate; --$enddate;
-my $peer_dist_limit = 400.0;
-
-my %options = ("directory|input-directory=s" => \$statsdir,
- "output-directory=s" => \$outputdir,
- "skip-time-steps:f" => \$skip_time_steps,
- "start-date=s" => \$startdate,
- "end-date=s" => \$enddate,
- "peer-dist-limit=f" => \$peer_dist_limit);
-
-if ( !GetOptions(%options) )
-{
- print STDERR "valid options for $0 are:\n";
- my $opt;
- foreach $opt (sort(keys %options)) {
- print STDERR "\t--$opt\t(default is ";
- if ( ref($options{$opt}) eq "ARRAY" ) {
- print STDERR join(", ", map { "'$_'" } @{$options{$opt}});
- } else {
- print STDERR "'${$options{$opt}}'";
- }
- print STDERR ")\n";
- }
- print STDERR "\n";
- die;
-}
-
-# check possibly current values of options
-die "$statsdir: no such directory" unless (-d $statsdir);
-die "$outputdir: no such directory" unless (-d $outputdir);
-die "$skip_time_steps: skip-time-steps must be positive"
- unless ($skip_time_steps >= 0.0);
-die "$startdate: invalid start date|$`|$&|$'"
- unless ($startdate =~ m/.*$log_date_pattern$/);
-die "$enddate: invalid end date"
- unless ($enddate =~ m/.*$log_date_pattern$/);
-
-$skip_time_steps = 0.128 if ($skip_time_steps == 0);
-
-sub min
-{
- my ($result, @rest) = @_;
- map { $result = $_ if ($_ < $result) } @rest;
- return($result);
-}
-
-sub max
-{
- my ($result, @rest) = @_;
- map { $result = $_ if ($_ > $result) } @rest;
- return($result);
-}
-
-# calculate mean, range, and standard deviation for offset and frequency
-sub do_loop
-{
- my ($directory, $fname, $out_file) = @_;
- print "$directory/$fname\n";
- open INPUT, "$directory/$fname" or warn "can't open $directory/$fname: $!";
- open OUTPUT, ">>$out_file" or die "can't open $out_file: $!";
- print OUTPUT "$fname\n";
- my ($loop_tmax, $loop_fmax) = (-1e9, -1e9);
- my ($loop_tmin, $loop_fmin) = (1e9, 1e9);
- my ($loop_time_rms, $loop_freq_rms) = (0, 0);
- my $loop_count = 0;
- my $loop_time = 0;
- my $loop_freq = 0;
- my ($freq, $offs);
- my @Fld;
- while (<INPUT>) {
- chop; # strip record separator
- @Fld = split;
- next if ($#Fld < 4);
-#NTPv3: 50529 74356.259 -0.000112 16.1230 8
-#NTPv3: day, sec.msec, offset, drift_comp, sys_poll
-#NTPv4: 51333 54734.582 0.000001648 16.981964 0.000001094 0.020938 6
-#NTPv4: day, sec.msec, offset, drift_comp, sys_error, clock_stabil, sys_poll
- if ($Fld[2] > $skip_time_steps || $Fld[2] < -$skip_time_steps) {
- warn "ignoring loop offset $Fld[2] (file $fname, line $.)\n";
- next
- }
- $loop_count++;
- ($offs, $freq) = ($Fld[2], $Fld[3]);
- $loop_tmax = max($loop_tmax, $offs);
- $loop_tmin = min($loop_tmin, $offs);
- $loop_fmax = max($loop_fmax, $freq);
- $loop_fmin = min($loop_fmin, $freq);
- $loop_time += $offs;
- $loop_time_rms += $offs * $offs;
- $loop_freq += $freq;
- $loop_freq_rms += $freq * $freq;
- }
- close INPUT;
- if ($loop_count > 1) {
- $loop_time /= $loop_count;
- $loop_time_rms = $loop_time_rms / $loop_count - $loop_time * $loop_time;
- if ($loop_time_rms < 0) {
- warn "loop_time_rms: $loop_time_rms < 0";
- $loop_time_rms = 0;
- }
- $loop_time_rms = sqrt($loop_time_rms);
- $loop_freq /= $loop_count;
- $loop_freq_rms = $loop_freq_rms / $loop_count - $loop_freq * $loop_freq;
- if ($loop_freq_rms < 0) {
- warn "loop_freq_rms: $loop_freq_rms < 0";
- $loop_freq_rms = 0;
- }
- $loop_freq_rms = sqrt($loop_freq_rms);
- printf OUTPUT
- ("loop %d, %.0f+/-%.1f, rms %.1f, freq %.2f+/-%0.3f, var %.3f\n",
- $loop_count, ($loop_tmax + $loop_tmin) / 2 * 1e6,
- ($loop_tmax - $loop_tmin) / 2 * 1e6, $loop_time_rms * 1e6,
- ($loop_fmax + $loop_fmin) / 2, ($loop_fmax - $loop_fmin) / 2,
- $loop_freq_rms);
- }
- else {
- warn "no valid lines in $directory/$fname";
- }
- close OUTPUT
-}
-
-# calculate mean, standard deviation, maximum offset, mean dispersion,
-# and maximum distance for each peer
-sub do_peer
-{
- my ($directory, $fname, $out_file) = @_;
- print "$directory/$fname\n";
- open INPUT, "$directory/$fname" or warn "can't open $directory/$fname: $!";
- open OUTPUT, ">>$out_file" or die "can't open $out_file: $!";
- print OUTPUT "$fname\n";
-# we toss out all distances greater than one second on the assumption the
-# peer is in initial acquisition
- my ($n, $MAXDISTANCE) = (0, 1.0);
- my %peer_time;
- my %peer_time_rms;
- my %peer_count;
- my %peer_delay;
- my %peer_disp;
- my %peer_dist;
- my %peer_ident;
- my %peer_tmin;
- my %peer_tmax;
- my @Fld;
- my ($i, $j);
- my ($dist, $offs);
- while (<INPUT>) {
- chop; # strip record separator
- @Fld = split;
- next if ($#Fld < 6);
-#NTPv3: 50529 83316.249 127.127.8.1 9674 0.008628 0.00000 0.00700
-#NTPv3: day, sec.msec, addr, status, offset, delay, dispersion
-#NTPv4: 51333 56042.037 127.127.8.1 94f5 -0.000014657 0.000000000 0.000000000 0.000013214
-#NTPv4: day, sec.msec, addr, status, offset, delay, dispersion, skew
-
- $dist = $Fld[6] + $Fld[5] / 2;
- next if ($dist > $MAXDISTANCE);
- $offs = $Fld[4];
- if ($offs > $skip_time_steps || $offs < -$skip_time_steps) {
- warn "ignoring peer offset $offs (file $fname, line $.)\n";
- next
- }
- $i = $n;
- for ($j = 0; $j < $n; $j++) {
- if ($Fld[2] eq $peer_ident{$j}) {
- $i = $j; # peer found
- last;
- }
- }
- if ($i == $n) { # add new peer
- $peer_ident{$i} = $Fld[2];
- $peer_tmax{$i} = $peer_dist{$i} = -1e9;
- $peer_tmin{$i} = 1e9;
- $peer_time{$i} = $peer_time_rms{$i} = 0;
- $peer_delay{$i} = $peer_disp{$i} = 0;
- $peer_count{$i} = 0;
- $n++;
- }
- $peer_count{$i}++;
- $peer_tmax{$i} = max($peer_tmax{$i}, $offs);
- $peer_tmin{$i} = min($peer_tmin{$i}, $offs);
- $peer_dist{$i} = max($peer_dist{$i}, $dist);
- $peer_time{$i} += $offs;
- $peer_time_rms{$i} += $offs * $offs;
- $peer_delay{$i} += $Fld[5];
- $peer_disp{$i} += $Fld[6];
- }
- close INPUT;
- print OUTPUT
-" ident cnt mean rms max delay dist disp\n";
- print OUTPUT
-"==========================================================================\n";
- my @lines = ();
- for ($i = 0; $i < $n; $i++) {
- next if $peer_count{$i} < 2;
- $peer_time{$i} /= $peer_count{$i};
- eval { $peer_time_rms{$i} = sqrt($peer_time_rms{$i} / $peer_count{$i} -
- $peer_time{$i} * $peer_time{$i}); };
- $peer_time_rms{$i} = 0, warn $@ if $@;
- $peer_delay{$i} /= $peer_count{$i};
- $peer_disp{$i} /= $peer_count{$i};
- $peer_tmax{$i} = $peer_tmax{$i} - $peer_time{$i};
- $peer_tmin{$i} = $peer_time{$i} - $peer_tmin{$i};
- if ($peer_tmin{$i} > $peer_tmax{$i}) { # can this happen at all?
- $peer_tmax{$i} = $peer_tmin{$i};
- }
- push @lines, sprintf
- "%-15s %4d %8.3f %8.3f %8.3f %8.3f %8.3f %8.3f\n",
- $peer_ident{$i}, $peer_count{$i}, $peer_time{$i} * 1e3,
- $peer_time_rms{$i} * 1e3, $peer_tmax{$i} * 1e3,
- $peer_delay{$i} * 1e3, $peer_dist{$i} * 1e3, $peer_disp{$i} * 1e3;
- }
- print OUTPUT sort @lines;
- close OUTPUT;
-}
-
-sub do_clock
-{
- my ($directory, $fname, $out_file) = @_;
- print "$directory/$fname\n";
- open INPUT, "$directory/$fname";
- open OUTPUT, ">>$out_file" or die "can't open $out_file: $!";
- print OUTPUT "$fname\n";
- close INPUT;
- close OUTPUT;
-}
-
-sub peer_summary
-{
- my $in_file = shift;
- my ($i, $j, $n);
- my (%peer_ident, %peer_count, %peer_mean, %peer_var, %peer_max);
- my (%peer_1, %peer_2, %peer_3, %peer_4);
- my $dist;
- my $max;
- open INPUT, "<$in_file" or die "can't open $in_file: $!";
- my @Fld;
- $n = 0;
- while (<INPUT>) {
- chop; # strip record separator
- @Fld = split;
- next if ($#Fld < 7 || $Fld[0] eq 'ident');
- $i = $n;
- for ($j = 0; $j < $n; $j++) {
- if ($Fld[0] eq $peer_ident{$j}) {
- $i = $j;
- last; # peer found
- }
- }
- if ($i == $n) { # add new peer
- $peer_count{$i} = $peer_mean{$i} = $peer_var{$i} = 0;
- $peer_max{$i} = 0;
- $peer_1{$i} = $peer_2{$i} = $peer_3{$i} = $peer_4{$i} = 0;
- $peer_ident{$i} = $Fld[0];
- ++$n;
- }
- $dist = $Fld[6] - $Fld[5] / 2;
- if ($dist < $peer_dist_limit) {
- $peer_count{$i}++;
- $peer_mean{$i} += $Fld[2];
- $peer_var{$i} += $Fld[3] * $Fld[3];
- $max = $Fld[4];
- $peer_max{$i} = max($peer_max{$i}, $max);
- if ($max > 1) {
- $peer_1{$i}++;
- if ($max > 5) {
- $peer_2{$i}++;
- if ($max > 10) {
- $peer_3{$i}++;
- if ($max > 50) {
- $peer_4{$i}++;
- }
- }
- }
- }
- }
- else {
- warn "dist exceeds limit: $dist (file $in_file, line $.)\n";
- }
- }
- close INPUT;
- my @lines = ();
- print
- " host days mean rms max >1 >5 >10 >50\n";
- print
- "==================================================================\n";
- for ($i = 0; $i < $n; $i++) {
- next if ($peer_count{$i} < 2);
- $peer_mean{$i} /= $peer_count{$i};
- eval { $peer_var{$i} = sqrt($peer_var{$i} / $peer_count{$i} -
- $peer_mean{$i} * $peer_mean{$i}); };
- $peer_var{$i} = 0, warn $@ if $@;
- push @lines, sprintf
- "%-15s %3d %9.3f% 9.3f %9.3f %3d %3d %3d %3d\n",
- $peer_ident{$i}, $peer_count{$i}, $peer_mean{$i}, $peer_var{$i},
- $peer_max{$i}, $peer_1{$i}, $peer_2{$i}, $peer_3{$i}, $peer_4{$i};
- }
- print sort @lines;
-}
-
-my $loop_summary="$outputdir/loop_summary";
-my $peer_summary="$outputdir/peer_summary";
-my $clock_summary="$outputdir/clock_summary";
-my (@loopfiles, @peerfiles, @clockfiles);
-
-print STDERR "Creating summaries from $statsdir ($startdate to $enddate)\n";
-
-opendir SDIR, $statsdir or die "directory ${statsdir}: $!";
-rewinddir SDIR;
-@loopfiles=sort grep /loop.*$log_date_pattern/, readdir SDIR;
-rewinddir SDIR;
-@peerfiles=sort grep /peer.*$log_date_pattern/, readdir SDIR;
-rewinddir SDIR;
-@clockfiles=sort grep /clock.*$log_date_pattern/, readdir SDIR;
-closedir SDIR;
-
-# remove old summary files
-map { unlink $_ if -f $_ } ($loop_summary, $peer_summary, $clock_summary);
-
-my $date;
-map {
- $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
- if ($date ge $startdate && $date le $enddate) {
- do_loop $statsdir, $_, $loop_summary;
- }
-} @loopfiles;
-
-map {
- $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
- if ($date ge $startdate && $date le $enddate) {
- do_peer $statsdir, $_, $peer_summary;
- }
-} @peerfiles;
-
-map {
- $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
- if ($date ge $startdate && $date le $enddate) {
- do_clock $statsdir, $_, $clock_summary;
- }
-} @clockfiles;
-
-print STDERR "Creating peer summary with limit $peer_dist_limit\n";
-peer_summary $peer_summary if (-f $peer_summary);
diff --git a/contrib/ntp/scripts/support/README b/contrib/ntp/scripts/support/README
deleted file mode 100644
index 812965b..0000000
--- a/contrib/ntp/scripts/support/README
+++ /dev/null
@@ -1,73 +0,0 @@
-The bin and etc directories contain several scripts (sh and perl) that
-should ease startup and configuration of NTP sites.
-
- bin/monl is a monitoring script that prints out new, current and
- old customers of an NTP timeserver when monitoring is
- in effect.
- monl has following options:
- -i <regexp> (regular expression matchin IP addres to be ignored
- -d <directory> where the current state is kept (default /tmp)
- -v debug output
- -n do not translate IP addresses into hostnames
- <host> host to be analyzed
-
- monl uses xntpdc for information gathering and is thus
- limited to the NTP version xntpdc is compiled for.
-
- bin/mvstats moves compresses and removes statistics files (useful mainly
- for reference servers
-
- etc/install creates the locally needed directories for NTP (if not residung in /etc)
-
- etc/rc starts up daemon with configuration file and key file
- etc/cron cron called monitor statistic (uses bin/monl)
- etc/crontab crontab prototype for reference time servers
- etc/setup sh script sourced by the other scripts for variable setup
-
-YOU MUST EDIT THESE FILES TO REFLECT YOUR LOCAL SETUP !
-
-READ THIS BEFORE USING THE STARTUP SCRIPTS
-
-The startupscript etc/rc has been written for Suns and HPs. They are not
-guaranteed to work elsewhere. Following assumptions have been made:
-
- All NTP related files reside in ONE directory having following structure:
-
- bin/* - all executables (daemon, control, date, scripts)
- etc/* - startup scripts and cron scripts
- conf/* - NTP configuration files
-
-The variable NTPROOT (etc/rc, etc/install) must be edited to reflect
-the NTP directory (e.g. /usr/local/NTP)
-
-NTP config files are located via Suns arch command and have the name
-conf/`arch`.`arch -k`.
-These are the default configurations (usually clients). If a file with the name
-conf/`arch`.`arch -k`.`hostname` is present this file will be preferred (Reference host,
-gateway). If the arch command is not available no-arch is used. The arch command
-is usually a shell script which echoes a string unique the the current machine
-architecture.
-
-The tickadj command has its own conf/tickconf file which is used to set host
-specific tickadj values. The line with DEFAULT specifies the default tickadj
-parameters, all other lines consists of <hostname> <hostid>
-<tickadj parameters>. These lines need only be entered if the specified host
-needs parameters different from the default parameters.
-
-Reference clock support is provided for DCF77. If you need to initialize
-certain things for reference clock support (e.g. loading STREAMS modules),
-you need to edit etc/rc.
-
-The current config files of Erlangen are included in the conf directory.
-They are just for reference, but might help you a bit in setting up a
-synchronisation network.
-
-The advantage of keeping all config files centralized is the easier
-administration.
-
-We replicate the NTP directory via NFS and rdist.
-
-When you have set up the local config files (YOUR OWN!) you can call
-<NTPROOT>/etc/rc for daemon startup.
-
-For more information: time@informatik.uni-erlangen.de
diff --git a/contrib/ntp/scripts/support/bin/monl b/contrib/ntp/scripts/support/bin/monl
deleted file mode 100644
index f0c48db..0000000
--- a/contrib/ntp/scripts/support/bin/monl
+++ /dev/null
@@ -1,213 +0,0 @@
-#!/local/bin/perl
-
-%service = ( 0, "unspec",
- 1, "Active",
- 2, "Passive",
- 3, "Client",
- 4, "Server",
- 5, "Broadcast",
- 6, "Control",
- 7, "Private" );
-%nc = ();
-@ignpat = ();
-$noname = 0;
-$verbose = 0;
-$retries = 5;
-$lastkey = 0;
-
-sub timedelta {
- local($tm, $days, $h, $m, $s);
-
- $tm = @_[$[];
- $days = 0;
- $days = sprintf("%dd+", $days) if $days = int($tm / (60*60*24));
- $days = "" unless $days;
- $tm = $tm % (60*60*24);
- $h = int($tm / (60*60));
- $tm = $tm % (60*60);
- $m = int($tm / 60);
- $s = $tm % 60;
-
- return sprintf("%s%02d:%02d:%02d", $days, $h, $m, $s);
-}
-
-sub listentry {
- local($host, $mode) = split("$;" , @_[$[]);
- local($count, $version, $firsttime) = split("$;" , $_[$[+1]);
- local($name);
-
- if (grep($host =~ m/$_/, @ignpat))
- {
- print "ignored $host ...\n" if $verbose;
- return;
- }
-
- return if ! $count;
-
- if (defined($nc{$host}))
- {
- $name = $nc{$host};
- }
- else
- {
- if ($noname)
- {
- $nc{$host} = $name = $host;
- }
- else
- {
- $name = (gethostbyaddr(pack("C4", split(/\./, $host)), 2))[$[];
- $nc{$host} = $name = $host if ! defined($name);
- }
- }
-
- printf ($fmt, ($lastkey eq $host) ? "" : $name, $service{$mode}, $count, $version, &timedelta($firsttime), $firsttime / $count);
-
- if (@_[$[+2])
- {
- $hostcnt++ if $lastkey ne $host;
- $packcnt += $count;
- $maxtime = $firsttime if $firsttime > $maxtime;
- }
-
- $lastkey = $host;
-}
-
-while ($ARGV[$[] =~ /^-[nvid]$/)
- {
- if ($ARGV[$[] eq "-i")
- {
- shift;
- push(@ignpat, shift) unless ! defined($ARGV[$[]);
- }
- elsif ($ARGV[$[] eq "-d")
- {
- shift;
- $dir = shift unless ! defined($ARGV[$[]);
- }
- elsif ($ARGV[$[] eq "-n")
- {
- shift;
- $noname = 1;
- }
- elsif ($ARGV[$[] eq "-v")
- {
- shift;
- $verbose = 1;
- }
- }
-
-$dir = "/tmp" unless defined($dir);
-$gone = 60*60*48;
-$fmt = "%48s %10s %7d %7d %13s %14.3f\n";
-$sfmt = "%48s %10s %7s %7s %13s %14s\n";
-@lbl = ("Host", "Mode", "Count", "Version", "Time active", "Packetinterval");
-
-if (!defined($ARGV[$[]))
- {
- $hostname = `hostname`;
- chop($hostname);
- unshift(@ARGV, $hostname);
- }
-
-foreach $hostname (@ARGV)
- {
- $dbmfile = $dir . "/monlstats-" . $hostname;
- $monl = "xntpdc -c 'hostnames no' -c monl $hostname | tail +3 |";
- $hostcnt = 0;
- $packcnt = 0;
- $maxtime = 0;
- %Seen = ();
- %New = ();
- %Old = ();
-
- print "Monitor Status of $hostname\n\n";
-
- $cnt = $retries;
- do
- {
- open(MONL, $monl) || die("$monl failed $!");
- @monlout = <MONL>;
- close(MONL);
- } while (! @monlout && $cnt--);
-
- if (! @monlout)
- {
- print "not available.\n";
- next;
- }
-
- dbmopen(Clients, $dbmfile, 0644) || die("dbmopen(.., $dbmfile, ...): $!");
-
- foreach (@monlout)
- {
- chop;
- split;
- ($host, $count, $mode, $version, $lasttime, $firsttime) =
- (@_[$[, $[+2 .. $[+4, $#_-1,$#_]);
-
- $Seen{$host, $mode} = 1;
-
- if (!defined($Clients{$host, $mode}))
- {
- if ($lasttime <= $gone)
- {
- ## got a new one
- $Clients{$host, $mode} = $New{$host, $mode} = join("$;", $count, $version, $firsttime, $lasttime);
- }
- }
- else
- {
- ## throw out the old ones
- if ($lasttime > $gone)
- {
- $Old{$host, $mode} = $Clients{$host, $mode};
- delete $Clients{$host, $mode};
- }
- else
- {
- $Clients{$host, $mode} = join("$;", $count, $version, $firsttime, $lasttime);
- }
- }
- }
-
- grep(($Seen{$_} || ($Old{$_} = delete $Clients{$_})), keys(%Clients));
-
- if (grep(($tmp = $_ , !grep($tmp =~ m/$_/, @ignpat)), keys(%New)))
- {
- print "New customers\n";
- print "-------------\n";
- printf $sfmt, @lbl;
- grep( &listentry($_, $New{$_}, 1), sort(keys(%New)) );
- print "\n";
- }
-
-
- if (grep((!defined($New{$_}) && ($tmp = $_, !grep($tmp =~ m/$_/, @ignpat))), keys(%Clients)))
- {
- print "Current customers\n";
- print "-----------------\n";
- printf $sfmt, @lbl;
- grep( defined($New{$_}) || &listentry($_, $Clients{$_}, 1) , sort(keys(%Clients)) );
- print "\n";
- }
-
- if (grep(($tmp = $_, !grep($tmp =~ m/$_/, @ignpat)), keys(%Old)))
- {
- print "Discarded customers\n";
- print "-------------------\n";
- printf $sfmt, @lbl;
- grep( &listentry($_, $Old{$_}, 0) , sort(keys(%Old)) );
- print "\n";
- }
-
- dbmclose(Clients);
-
- print "\nSummary:\n";
- print "--------\n";
- printf("Elapsed time: %13s\n", &timedelta($maxtime));
- printf(" Hosts: %13d\n", $hostcnt);
- printf(" Packets: %13d\n", $packcnt);
- printf(" Rate: %13.2f\n", $packcnt / $maxtime) if $maxtime;
- print "\n";
- }
diff --git a/contrib/ntp/scripts/support/bin/mvstats b/contrib/ntp/scripts/support/bin/mvstats
deleted file mode 100644
index e33dc792..0000000
--- a/contrib/ntp/scripts/support/bin/mvstats
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# mvstats,v 3.1 1993/07/06 01:10:24 jbj Exp
-#
-# mvstats is called by cron for keeping the log files together
-# usually only used on reference hosts
-#
-# Files reside in /var/NTP
-# Files older than 2 days will be compressed,
-# Files older than 64 days will be removed.
-#
-# mvstats,v
-# Revision 3.1 1993/07/06 01:10:24 jbj
-# XNTP release 3.1
-#
-#
-# Revision 1.1 1992/12/10 12:58:24 kardel
-# Prerelease NTP V3 / DCF
-#
-#
-cd /var/NTP
-find . ! -name '*.Z' -mtime +2 -exec compress -f {} \;
-find . -mtime +64 -exec rm -f {} \;
diff --git a/contrib/ntp/scripts/support/conf/hp300.hp300 b/contrib/ntp/scripts/support/conf/hp300.hp300
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/hp300.hp300
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/hp700.hp700 b/contrib/ntp/scripts/support/conf/hp700.hp700
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/hp700.hp700
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/hp700.hp700.faui47 b/contrib/ntp/scripts/support/conf/hp700.hp700.faui47
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/hp700.hp700.faui47
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/hp800.hp800 b/contrib/ntp/scripts/support/conf/hp800.hp800
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/hp800.hp800
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/ntp.conf b/contrib/ntp/scripts/support/conf/ntp.conf
deleted file mode 100644
index 2d6bb85..0000000
--- a/contrib/ntp/scripts/support/conf/ntp.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-#
-# put your default configuration (e.g. broadcastclient) in here
-#
diff --git a/contrib/ntp/scripts/support/conf/sun3.sun3 b/contrib/ntp/scripts/support/conf/sun3.sun3
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun3.sun3
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4.faui01 b/contrib/ntp/scripts/support/conf/sun4.sun4.faui01
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4.faui01
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4.faui10 b/contrib/ntp/scripts/support/conf/sun4.sun4.faui10
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4.faui10
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4.faui45 b/contrib/ntp/scripts/support/conf/sun4.sun4.faui45
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4.faui45
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4c b/contrib/ntp/scripts/support/conf/sun4.sun4c
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4c
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4c.Lucifer b/contrib/ntp/scripts/support/conf/sun4.sun4c.Lucifer
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4c.Lucifer
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4m b/contrib/ntp/scripts/support/conf/sun4.sun4m
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4m
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4m.faui42 b/contrib/ntp/scripts/support/conf/sun4.sun4m.faui42
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4m.faui42
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/sun4.sun4m.faui45m b/contrib/ntp/scripts/support/conf/sun4.sun4m.faui45m
deleted file mode 100644
index e69de29..0000000
--- a/contrib/ntp/scripts/support/conf/sun4.sun4m.faui45m
+++ /dev/null
diff --git a/contrib/ntp/scripts/support/conf/tickconf b/contrib/ntp/scripts/support/conf/tickconf
deleted file mode 100644
index b17dbe8..0000000
--- a/contrib/ntp/scripts/support/conf/tickconf
+++ /dev/null
@@ -1,19 +0,0 @@
-DEFAULT -A -p -s -q
-Lucifer 55406cfa -a 1 -p -s -q -t 10001
-faui45 24000f9b -a 1 -p -s -q
-faui10 2440213c -a 1 -p -s -q
-faui1b 54001418 -A -p -s -q -t 10001
-faui4p 5100344d -A -p -s -q -t 9999
-faui02g 1200be20 -A -p -s -q -t 9999
-faui02e 1200bbab -A -p -s -q -t 9999
-faui02f 1200bedb -A -p -s -q -t 9999
-faui03b 1200b92b -A -p -s -q -t 9999
-faui45m 726001ac -A -p -s -q -t 10001
-faui45o 72600272 -A -p -s -q -t 10001
-faui45p 7260028f -A -p -s -q -t 10001
-faui45r 72400cc7 -A -p -s -q -t 10001
-faui45s 726045be -A -p -s -q -t 10001
-faui45v 72604487 -A -p -s -q -t 10001
-faui45x 726044eb -A -p -s -q -t 10001
-faui45y 7260476d -A -p -s -q -t 10001
-faui45z 726045a1 -A -p -s -q -t 10001
diff --git a/contrib/ntp/scripts/support/etc/cron b/contrib/ntp/scripts/support/etc/cron
deleted file mode 100644
index 07ed189..0000000
--- a/contrib/ntp/scripts/support/etc/cron
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# cron,v 3.1 1993/07/06 01:10:50 jbj Exp
-#
-# called by cron for statistics gathering
-#
-# cron,v
-# Revision 3.1 1993/07/06 01:10:50 jbj
-# XNTP release 3.1
-#
-#
-# Revision 1.1 1992/12/10 12:59:18 kardel
-# Prerelease NTP V3 / DCF
-#
-#
-PATH="${PATH}:/local/NTP/bin"
-export PATH
-monl -d /local/NTP/monitor -i '127\.0\.0\.1' faui10 faui45 lucifer rackety.udel.edu
diff --git a/contrib/ntp/scripts/support/etc/crontab b/contrib/ntp/scripts/support/etc/crontab
deleted file mode 100644
index 2b2d19c..0000000
--- a/contrib/ntp/scripts/support/etc/crontab
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# NTP statistics periodic cleanup - REFERENCE SERVER ONLY
-#
-#55 23 * * * sh /local/NTP/etc/mvstats
-#
-# gather NTP client statistics - REFERENCE SERVER ONLY
-#
-0 8,18 * * * /local/NTP/etc/cron 2>/dev/null | /usr/ucb/mail -s "NTP statistics" time@informatik.uni-erlangen.de
diff --git a/contrib/ntp/scripts/support/etc/install b/contrib/ntp/scripts/support/etc/install
deleted file mode 100644
index 169a7e5..0000000
--- a/contrib/ntp/scripts/support/etc/install
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# install,v 3.1 1993/07/06 01:10:53 jbj Exp
-#
-# install,v
-# Revision 3.1 1993/07/06 01:10:53 jbj
-# XNTP release 3.1
-#
-#
-# Revision 1.1 1992/12/10 12:59:21 kardel
-# Prerelease NTP V3 / DCF
-#
-# Revision 1.1 1992/06/18 14:50:08 kardel
-# Initial revision
-#
-#
-NTPROOT=/local/NTP # SITE SPECIFIC: where NTP resides
-#
-# where the local NTP state files reside (xntp.drift) ussualle /etc
-# this directory must not be shared as machine dependent data ist stored there
-#
-NTPDIR="/+private/local/NTP"
-#
-# get the initial setup
-#
-if [ ! -r $NTPROOT/etc/setup ]; then
- echo "ERROR: $NTPROOT/etc/setup missing - incorrect installation."
- exit 1
-else
- . $NTPROOT/etc/setup
-fi
-
-umask 022 # SITE SPECIFIC: local policy - watch out for NFS and "root" rights
-
-Mkdir() {
- p=""
- IFS="/"
- set -- $@
- IFS='
-'
- for pnc do
- if [ ! -d "$p/$pnc" ]; then
- ECHO -n "creating directory $p/$pnc"
- if mkdir "$p/$pnc"; then
- ECHO ""
- else
- ECHO " - FAILED"
- break;
- fi
- fi
- p="$p/$pnc"
- done
-}
-
-if [ ! -d "$NTPDIR" ]; then
- ECHO "installing NTP private data area ($NTPDIR)"
- if Mkdir "$NTPDIR"; then
- chmod 755 "$NTPDIR"
- ECHO "$NTPDIR created."
- fi
-else
- ECHO "NTP already installed."
- if [ -f "$NTPDIR/xntp.drift" ]; then
- ECHO "currently saved drift value:" `cat "$NTPDIR/xntp.drift"`
- fi
-fi
-
diff --git a/contrib/ntp/scripts/support/etc/rc b/contrib/ntp/scripts/support/etc/rc
deleted file mode 100644
index ef8834a..0000000
--- a/contrib/ntp/scripts/support/etc/rc
+++ /dev/null
@@ -1,198 +0,0 @@
-#!/bin/sh
-# NTP time synchronisation
-#
-# /src/NTP/REPOSITORY/v3/supportscripts/etc/rc,v 1.11 1993/07/09 13:17:00 kardel Exp
-#
-# rc,v
-# Revision 1.11 1993/07/09 13:17:00 kardel
-# local NTPROOT
-#
-# Revision 1.10 1993/07/09 11:37:29 kardel
-# Initial restructured version + GPS support
-#
-# Revision 1.9 1993/06/23 14:10:36 kardel
-# June 21st reconcilation
-#
-# Revision 1.7 1993/06/02 12:04:43 kardel
-# May 28th reconcilation & clenaup
-#
-#
-# non reference clock hosts will try to do an ntpdate on NTPSERVERS
-#
-NTPSERVERS="ntps1-0 ntps1-1 ntps2-0 ntps2-1"
-NTPROOT=/local/NTP
-
-#
-# get the initial setup
-#
-if [ ! -r $NTPROOT/etc/setup ]; then
- echo "ERROR: $NTPROOT/etc/setup missing - incorrect installation."
- exit 1
-else
- . $NTPROOT/etc/setup
-fi
-
-umask 022 # SITE SPECIFIC: local policy - watch out for NFS and "root" rights
-
-msg=""
-#
-# default configuration files are named $NTPROOT/conf/<ARCH>.<KARCH>
-#
-CF=$NTPROOT/conf/$ARCH.$KARCH # default configuration file
-#
-# Host specific config file (reference clocks) have the hostname tagged on
-#
-CFH="$CF"."$HOSTNAME" # specific configuration file
-#
-# where to find the tickadj command
-#
-KFIX=$NTPROOT/bin/tickadj # kernel variable fix
-#
-# where to find special tickadj parameters
-#
-TC=$NTPROOT/conf/tickconf # special tickadj parameters
-#
-# where to find the keys file (if not found $KEY.dumb will be used)
-#
-KEY=$NTPROOT/conf/ntp.keys # private key file
-#
-# the daemon
-#
-XD=$NTPROOT/bin/xntpd # NTP daemon
-#
-# HP adjtimed
-#
-ADJTIMED=$NTPROOT/bin/adjtimed # HP special (adjtime() emulation)
-#
-# ntpdate command
-#
-NTPDATE=$NTPROOT/bin/ntpdate
-
-#
-# secondary timed support
-# The word "TIMED" must be in the config file for timed to start
-# Note that this times is a special version which does not ever set or
-# adjust the time. Ask time@informatik.uni-erlangen.de for patches
-#
-TIMED=$NTPROOT/bin/timed # timed (Berkeley) secondary time service
- # here used in a *HARMLESS* version
- # to provide time to "inferior" systems
-#
-# ISREFHOST is a command that returns exit status 0 for a reference host
-# Site specific: sample for dcf77 is given
-#
-ISREFHOST="[ -f $NTPROOT/.karch.$KARCH/sys/OBJ/parsestreams.o -a -f /dev/refclock-0 ]"
-#
-# SETUP_REFCLOCK
-#
-# what to do in order to set up a local reference clock
-# usually this will load a STREAMS module or initialize other things
-# needed
-#
-SETUP_REFCLOCK() {
- if modstat | grep -s 'PARSE'; then
- ECHO "loadable PARSER STREAMS module already loaded."
- else
- ECHO "attempting to load PARSER STREAMS module..."
- MDLFILE="/tmp/mdl.$$"
- if modload $NTPROOT/.karch.$KARCH/sys/OBJ/parsestreams.o -o $MDLFILE 2>&1; then
- modstat
- else
- echo WARNING: load FAILED
- fi | LOG
- rm -f $MDLFILE
- unset MDLFILE
- fi
-}
-
-kargs() {
- MATCH=NO
- HOSTID="`(hostid) 2>/dev/null || echo 000000`"
- if [ -r "$TC" ]; then
- exec 0< "$TC"
- while [ "$MATCH" != "YES" ] && read HOST ID PARAM; do
- if [ "$HOST" = "DEFAULT" ]; then
- DEFAULT="$ID $PARAM"
- else
- if [ "$ID" = "$HOSTID" -o "$HOST" = "$HOSTNAME" ]; then
- echo "$PARAM"
- MATCH=YES
- fi
- fi
- done
- if [ "$MATCH" != "YES" ]; then
- if [ -z "$DEFAULT" ]; then
- echo "-A -p -s -q";
- else
- echo "$DEFAULT";
- fi
- fi
- else
- echo "-A -p -s -q";
- fi
-}
-
-if [ -x $XD ]; then
- if [ -x "$ADJTIMED" ]; then
- $ADJTIMED && ECHO "adjusttimesupport: adjtimed."
- fi
- #
- # WARNING: check ps command first, or you might kill things you don't want to
- #
- PID="`(ps -efa 2>/dev/null || ps auxww 2>/dev/null || echo "") | grep xntp | grep -v grep | awk '{ print $2 }'`"
-
- if [ ! -z "$PID" ]; then
- ECHO "killing old NTP daemon (PID=$PID)"
- #
- # enable this after checking for correctness
- # kill $PID
- ECHO "should do a kill $PID, if this is the right PID - check rc script"
- fi
- #
- # try an ntpdate when timeservers are configured
- #
- if [ ! -z "$NTPSERVERS" -a -x $NTPDATE ]; then
- ECHO "NTP initial time setting"
- $NTPDATE -v $NTPSERVERS | LOG
- fi
- #
- # look for reference clock equipment
- #
- if $ISREFHOST; then
- ECHO "REFERENCE CLOCK SUPPORT (initializing...)"
- SETUP_REFCLOCK
- fi
-
- if [ -r "$CFH" ]; then
- CF="$CFH"
- else
- if [ ! -r "$KEY" ]; then
- KEY="$KEY.dumb"
- fi
- fi
-
- ECHO "NTP configuration file: $CF"
- ECHO -n "time daemon startup:"
-
- if [ -r "$CF" ]; then
- if [ -x "$KFIX" ]; then
- KARGS="`kargs`"
- if [ ! -z "$KARGS" ]; then
- $KFIX $KARGS && ECHO -n "tickadj $KARGS"
- fi
- fi
- $XD -c "$CF" -k "$KEY" && ECHO -n ' xntpd'
- if [ -x "$TIMED" ] && grep -s TIMED "$CF"; then
- $TIMED -M -N && ECHO -n ' timed'
- fi
- else
- msg="configuration file ($CF) not present."
- fi
-else
- msg="daemon binary ($XD) not present."
-fi
-ECHO "."
-
-if [ "$msg" ]; then
- NLECHO "WARNING: NO NTP time sychronisation: $msg"
-fi
diff --git a/contrib/ntp/scripts/support/etc/setup b/contrib/ntp/scripts/support/etc/setup
deleted file mode 100644
index d4ea75e..0000000
--- a/contrib/ntp/scripts/support/etc/setup
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# setup,v 3.1 1993/07/06 01:10:55 jbj Exp
-#
-# /bin/sh sourced file for environment setup
-# expects NTPROOT variable initialized
-#
-# if not set it will be initialized to /usr/local/NTP
-#
-# setup,v
-# Revision 3.1 1993/07/06 01:10:55 jbj
-# XNTP release 3.1
-#
-#
-# Revision 1.1 1992/12/10 12:59:25 kardel
-# Prerelease NTP V3 / DCF
-#
-# Revision 1.1 1992/12/10 10:14:46 kardel
-# Initial revision
-#
-#
-NTPROOT=${NTPROOT-/usr/local/NTP}
-
-#
-# we so use our own echos, as we somes want to substitute them with a
-# file logging version durin the /etc/rc.local phase
-#
-set `type ECHO`
-
-PATH="${PATH}:$NTPROOT/bin"
-export PATH
-
-if [ "$2" = "is" ]; then
- :
-else
- #
- # find out the way echos work (Rest of rc thinks BSD echo)
- #
- ECHOREP="`echo -n x`"
- if [ "$ECHOREP" = "-n x" ]; then
- ECHO () {
- if [ "$1" = "-n" ]; then
- shift
- echo "$@\c"
- else
- echo "$@"
- fi
- }
- #ECHO "System V style echo"
- else
- ECHO () {
- echo "$@"
- }
- #ECHO "BSD style echo"
- fi
-
- NLECHO () {
- echo "$@"
- }
-
- LOG () {
- while read _line; do
- ECHO "$_line"
- done
- }
- #
- # carefully find out some configuration Variables
- #
- ARCH="`(arch) 2>/dev/null || ((uname) > /dev/null && uname -a | awk '{ print $6; }') 2>/dev/null || echo 'no-arch'`"
- KARCH="`(arch -k) 2>/dev/null || ((uname) > /dev/null && uname -a | awk '{ print $5 }') || echo 'no-arch'`"
- HOSTNAME="`(hostname) 2>/dev/null || uname -n`"
-fi
-
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am
deleted file mode 100644
index ccb62d8..0000000
--- a/contrib/ntp/sntp/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
deleted file mode 100644
index 597dd97..0000000
--- a/contrib/ntp/sntp/Makefile.in
+++ /dev/null
@@ -1,534 +0,0 @@
-# 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
deleted file mode 100644
index 10932f0..0000000
--- a/contrib/ntp/sntp/README
+++ /dev/null
@@ -1,535 +0,0 @@
-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
deleted file mode 100644
index fb76c3d..0000000
--- a/contrib/ntp/sntp/aclocal.m4
+++ /dev/null
@@ -1,835 +0,0 @@
-# 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
deleted file mode 100755
index 0e30d56..0000000
--- a/contrib/ntp/sntp/config.guess
+++ /dev/null
@@ -1,1407 +0,0 @@
-#! /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
deleted file mode 100755
index c8a01be..0000000
--- a/contrib/ntp/sntp/config.sub
+++ /dev/null
@@ -1,1504 +0,0 @@
-#! /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
deleted file mode 100755
index 33f5fe8..0000000
--- a/contrib/ntp/sntp/configure
+++ /dev/null
@@ -1,5916 +0,0 @@
-#! /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
deleted file mode 100644
index b954168..0000000
--- a/contrib/ntp/sntp/configure.ac
+++ /dev/null
@@ -1,82 +0,0 @@
-# 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
deleted file mode 100755
index aea3d00..0000000
--- a/contrib/ntp/sntp/depcomp
+++ /dev/null
@@ -1,472 +0,0 @@
-#! /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
deleted file mode 100644
index f107b1d..0000000
--- a/contrib/ntp/sntp/header.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* 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
deleted file mode 100755
index 6ce63b9..0000000
--- a/contrib/ntp/sntp/install-sh
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/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
deleted file mode 100644
index 2d23e50..0000000
--- a/contrib/ntp/sntp/internet.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* 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
deleted file mode 100644
index 993dce6..0000000
--- a/contrib/ntp/sntp/internet.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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
deleted file mode 100644
index dc78c8d..0000000
--- a/contrib/ntp/sntp/kludges.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 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
deleted file mode 100644
index 13e527c..0000000
--- a/contrib/ntp/sntp/main.c
+++ /dev/null
@@ -1,1789 +0,0 @@
-/* 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
deleted file mode 100755
index 6a37006..0000000
--- a/contrib/ntp/sntp/missing
+++ /dev/null
@@ -1,336 +0,0 @@
-#! /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
deleted file mode 100755
index d2d5f21..0000000
--- a/contrib/ntp/sntp/mkinstalldirs
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /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
deleted file mode 100644
index 75fd461..0000000
--- a/contrib/ntp/sntp/socket.c
+++ /dev/null
@@ -1,395 +0,0 @@
-/* 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
deleted file mode 100644
index 30a9159..0000000
--- a/contrib/ntp/sntp/timing.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* 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
deleted file mode 100644
index c9d5d74..0000000
--- a/contrib/ntp/sntp/unix.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* 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/stamp-h.in b/contrib/ntp/stamp-h.in
deleted file mode 100644
index 9788f70..0000000
--- a/contrib/ntp/stamp-h.in
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/contrib/ntp/util/Makefile.am b/contrib/ntp/util/Makefile.am
deleted file mode 100644
index 8f1ba9e..0000000
--- a/contrib/ntp/util/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-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
-
-INCLUDES= -I$(top_srcdir)/include
-# LDADD might need RESLIB and ADJLIB
-LDADD= ../libntp/libntp.a
-ntp_keygen_LDADD= @LCRYPTO@
-#EXTRA_DIST= README TAGS
-EXTRA_DIST=
-ETAGS_ARGS= Makefile.am
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-kern.o: kern.c
- $(COMPILE) -DHAVE_TIMEX_H -c kern.c
diff --git a/contrib/ntp/util/Makefile.in b/contrib/ntp/util/Makefile.in
deleted file mode 100644
index 50b3042..0000000
--- a/contrib/ntp/util/Makefile.in
+++ /dev/null
@@ -1,623 +0,0 @@
-# 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 = ../ansi2knr no-dependencies
-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
-
-
-INCLUDES = -I$(top_srcdir)/include
-# LDADD might need RESLIB and ADJLIB
-LDADD = ../libntp/libntp.a
-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 = 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@ \
- @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)
-byteorder_DEPENDENCIES = ../libntp/libntp.a
-byteorder_LDFLAGS =
-hist_SOURCES = hist.c
-hist_OBJECTS = hist$U.$(OBJEXT)
-hist_LDADD = $(LDADD)
-hist_DEPENDENCIES = ../libntp/libntp.a
-hist_LDFLAGS =
-jitter_SOURCES = jitter.c
-jitter_OBJECTS = jitter$U.$(OBJEXT)
-jitter_LDADD = $(LDADD)
-jitter_DEPENDENCIES = ../libntp/libntp.a
-jitter_LDFLAGS =
-kern_SOURCES = kern.c
-kern_OBJECTS = kern$U.$(OBJEXT)
-kern_LDADD = $(LDADD)
-kern_DEPENDENCIES = ../libntp/libntp.a
-kern_LDFLAGS =
-longsize_SOURCES = longsize.c
-longsize_OBJECTS = longsize$U.$(OBJEXT)
-longsize_LDADD = $(LDADD)
-longsize_DEPENDENCIES = ../libntp/libntp.a
-longsize_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)
-precision_DEPENDENCIES = ../libntp/libntp.a
-precision_LDFLAGS =
-sht_SOURCES = sht.c
-sht_OBJECTS = sht$U.$(OBJEXT)
-sht_LDADD = $(LDADD)
-sht_DEPENDENCIES = ../libntp/libntp.a
-sht_LDFLAGS =
-testrs6000_SOURCES = testrs6000.c
-testrs6000_OBJECTS = testrs6000$U.$(OBJEXT)
-testrs6000_LDADD = $(LDADD)
-testrs6000_DEPENDENCIES = ../libntp/libntp.a
-testrs6000_LDFLAGS =
-tickadj_SOURCES = tickadj.c
-tickadj_OBJECTS = tickadj$U.$(OBJEXT)
-tickadj_LDADD = $(LDADD)
-tickadj_DEPENDENCIES = ../libntp/libntp.a
-tickadj_LDFLAGS =
-timetrim_SOURCES = timetrim.c
-timetrim_OBJECTS = timetrim$U.$(OBJEXT)
-timetrim_LDADD = $(LDADD)
-timetrim_DEPENDENCIES = ../libntp/libntp.a
-timetrim_LDFLAGS =
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-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 = 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 $(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
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(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) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-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)
-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)
-hist$(EXEEXT): $(hist_OBJECTS) $(hist_DEPENDENCIES)
- @rm -f hist$(EXEEXT)
- $(LINK) $(hist_LDFLAGS) $(hist_OBJECTS) $(hist_LDADD) $(LIBS)
-jitter$(EXEEXT): $(jitter_OBJECTS) $(jitter_DEPENDENCIES)
- @rm -f jitter$(EXEEXT)
- $(LINK) $(jitter_LDFLAGS) $(jitter_OBJECTS) $(jitter_LDADD) $(LIBS)
-kern$(EXEEXT): $(kern_OBJECTS) $(kern_DEPENDENCIES)
- @rm -f kern$(EXEEXT)
- $(LINK) $(kern_LDFLAGS) $(kern_OBJECTS) $(kern_LDADD) $(LIBS)
-longsize$(EXEEXT): $(longsize_OBJECTS) $(longsize_DEPENDENCIES)
- @rm -f longsize$(EXEEXT)
- $(LINK) $(longsize_LDFLAGS) $(longsize_OBJECTS) $(longsize_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)
-sht$(EXEEXT): $(sht_OBJECTS) $(sht_DEPENDENCIES)
- @rm -f sht$(EXEEXT)
- $(LINK) $(sht_LDFLAGS) $(sht_OBJECTS) $(sht_LDADD) $(LIBS)
-testrs6000$(EXEEXT): $(testrs6000_OBJECTS) $(testrs6000_DEPENDENCIES)
- @rm -f testrs6000$(EXEEXT)
- $(LINK) $(testrs6000_LDFLAGS) $(testrs6000_OBJECTS) $(testrs6000_LDADD) $(LIBS)
-tickadj$(EXEEXT): $(tickadj_OBJECTS) $(tickadj_DEPENDENCIES)
- @rm -f tickadj$(EXEEXT)
- $(LINK) $(tickadj_LDFLAGS) $(tickadj_OBJECTS) $(tickadj_LDADD) $(LIBS)
-timetrim$(EXEEXT): $(timetrim_OBJECTS) $(timetrim_DEPENDENCIES)
- @rm -f timetrim$(EXEEXT)
- $(LINK) $(timetrim_LDFLAGS) $(timetrim_OBJECTS) $(timetrim_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-ANSI2KNR = @ANSI2KNR@
-ansi2knr: ansi2knr.$(OBJEXT)
- $(LINK) ansi2knr.$(OBJEXT) $(LIBS)
-ansi2knr.$(OBJEXT): $(CONFIG_HEADER)
-
-clean-krextra:
- -rm -f ansi2knr
-
-mostlyclean-kr:
- -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:
-@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`
-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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) > $@ || 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) $(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 $(ANSI2KNR) $(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 clean-krextra mostlyclean-am
-
-distclean: distclean-am
- -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 -rf ./$(DEPDIR)
- -rm -f Makefile
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-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: 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 pdf pdf-am ps ps-am tags \
- uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
-
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-kern.o: kern.c
- $(COMPILE) -DHAVE_TIMEX_H -c kern.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/util/README b/contrib/ntp/util/README
deleted file mode 100644
index 297a562..0000000
--- a/contrib/ntp/util/README
+++ /dev/null
@@ -1,37 +0,0 @@
-README file for directory ./util of the NTP Version 4 distribution
-
-This directory contains the sources for the various utility programs.
-See the README and RELNOTES files in the parent directory for directions
-on how to make and install these programs.
-
-The ntptime.c program checks the kernel configuration for the NTP user
-interface syscalls ntp_gettime() and ntp_adjtime(). If present, the
-current timekeeping data are displayed. If not, a dissapointment is
-displayed. See the kernel page file in the HTML documentation in
-distribution for further details. ntptime will be built be if configure
-believes your system can use it.
-
-The jitter.c program can be used to determine the timing jitter due to
-the operating system in a gettimeofday() call. For most systems the
-dominant contribution to the jitter budget is the period of the hardware
-interrupt, usually in the range 10 us-1 ms. For those systems with
-microsecond counters, such as recent Sun and certain HP and DEC systems,
-the jitter is dominated only by the operating system.
-
-The timetrim.c program can be used with SGI machines to implement a
-scheme to discipline the hardware clock frequency. See the source code
-for further information.
-
-The byteorder.c and longsize.c programs are used during the configuration
-process to determine the byte order (little or big endian) and longword
-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 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
-documentation for further details. tickadj will be built if configure
-believes your system can use it.
diff --git a/contrib/ntp/util/ansi2knr.1 b/contrib/ntp/util/ansi2knr.1
deleted file mode 100644
index f9ee5a6..0000000
--- a/contrib/ntp/util/ansi2knr.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH ANSI2KNR 1 "19 Jan 1996"
-.SH NAME
-ansi2knr \- convert ANSI C to Kernighan & Ritchie C
-.SH SYNOPSIS
-.I ansi2knr
-[--varargs] input_file [output_file]
-.SH DESCRIPTION
-If no output_file is supplied, output goes to stdout.
-.br
-There are no error messages.
-.sp
-.I ansi2knr
-recognizes function definitions by seeing a non-keyword identifier at the left
-margin, followed by a left parenthesis, with a right parenthesis as the last
-character on the line, and with a left brace as the first token on the
-following line (ignoring possible intervening comments). It will recognize a
-multi-line header provided that no intervening line ends with a left or right
-brace or a semicolon. These algorithms ignore whitespace and comments, except
-that the function name must be the first thing on the line.
-.sp
-The following constructs will confuse it:
-.br
- - Any other construct that starts at the left margin and follows the
-above syntax (such as a macro or function call).
-.br
- - Some macros that tinker with the syntax of the function header.
-.sp
-The --varargs switch is obsolete, and is recognized only for
-backwards compatibility. The present version of
-.I ansi2knr
-will always attempt to convert a ... argument to va_alist and va_dcl.
-.SH AUTHOR
-L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
-continues to maintain the current version; most of the code in the current
-version is his work. ansi2knr also includes contributions by Francois
-Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/contrib/ntp/util/ansi2knr.c b/contrib/ntp/util/ansi2knr.c
deleted file mode 100644
index 1b32b06..0000000
--- a/contrib/ntp/util/ansi2knr.c
+++ /dev/null
@@ -1,739 +0,0 @@
-/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */
-
-/*$Id: ansi2knr.c,v 1.3 2000/04/13 03:41:48 lpd Exp $*/
-/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
-
-/*
-ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY. No author or distributor accepts responsibility to anyone for the
-consequences of using it or for whether it serves any particular purpose or
-works at all, unless he says so in writing. Refer to the GNU General Public
-License (the "GPL") for full details.
-
-Everyone is granted permission to copy, modify and redistribute ansi2knr,
-but only under the conditions described in the GPL. A copy of this license
-is supposed to have been given to you along with ansi2knr so you can know
-your rights and responsibilities. It should be in a file named COPYLEFT,
-or, if there is no file named COPYLEFT, a file named COPYING. Among other
-things, the copyright notice and this notice must be preserved on all
-copies.
-
-We explicitly state here what we believe is already implied by the GPL: if
-the ansi2knr program is distributed as a separate set of sources and a
-separate executable file which are aggregated on a storage medium together
-with another program, this in itself does not bring the other program under
-the GPL, nor does the mere fact that such a program or the procedures for
-constructing it invoke the ansi2knr executable bring any other part of the
-program under the GPL.
-*/
-
-/*
- * Usage:
- ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]
- * --filename provides the file name for the #line directive in the output,
- * overriding input_file (if present).
- * If no input_file is supplied, input is read from stdin.
- * If no output_file is supplied, output goes to stdout.
- * There are no error messages.
- *
- * ansi2knr recognizes function definitions by seeing a non-keyword
- * identifier at the left margin, followed by a left parenthesis, with a
- * right parenthesis as the last character on the line, and with a left
- * brace as the first token on the following line (ignoring possible
- * intervening comments and/or preprocessor directives), except that a line
- * consisting of only
- * identifier1(identifier2)
- * will not be considered a function definition unless identifier2 is
- * the word "void", and a line consisting of
- * identifier1(identifier2, <<arbitrary>>)
- * will not be considered a function definition.
- * ansi2knr will recognize a multi-line header provided that no intervening
- * line ends with a left or right brace or a semicolon. These algorithms
- * ignore whitespace, comments, and preprocessor directives, except that
- * the function name must be the first thing on the line. The following
- * constructs will confuse it:
- * - Any other construct that starts at the left margin and
- * follows the above syntax (such as a macro or function call).
- * - Some macros that tinker with the syntax of function headers.
- */
-
-/*
- * The original and principal author of ansi2knr is L. Peter Deutsch
- * <ghost@aladdin.com>. Other authors are noted in the change history
- * that follows (in reverse chronological order):
-
- lpd 2000-04-12 backs out Eggert's changes because of bugs:
- - concatlits didn't declare the type of its bufend argument;
- - concatlits didn't't recognize when it was inside a comment;
- - scanstring could scan backward past the beginning of the string; when
- - the check for \ + newline in scanstring was unnecessary.
-
- 2000-03-05 Paul Eggert <eggert@twinsun.com>
-
- Add support for concatenated string literals.
- * ansi2knr.c (concatlits): New decl.
- (main): Invoke concatlits to concatenate string literals.
- (scanstring): Handle backslash-newline correctly. Work with
- character constants. Fix bug when scanning backwards through
- backslash-quote. Check for unterminated strings.
- (convert1): Parse character constants, too.
- (appendline, concatlits): New functions.
- * ansi2knr.1: Document this.
-
- lpd 1999-08-17 added code to allow preprocessor directives
- wherever comments are allowed
- lpd 1999-04-12 added minor fixes from Pavel Roskin
- <pavel_roskin@geocities.com> for clean compilation with
- gcc -W -Wall
- lpd 1999-03-22 added hack to recognize lines consisting of
- identifier1(identifier2, xxx) as *not* being procedures
- lpd 1999-02-03 made indentation of preprocessor commands consistent
- lpd 1999-01-28 fixed two bugs: a '/' in an argument list caused an
- endless loop; quoted strings within an argument list
- confused the parser
- lpd 1999-01-24 added a check for write errors on the output,
- suggested by Jim Meyering <meyering@ascend.com>
- lpd 1998-11-09 added further hack to recognize identifier(void)
- as being a procedure
- lpd 1998-10-23 added hack to recognize lines consisting of
- identifier1(identifier2) as *not* being procedures
- lpd 1997-12-08 made input_file optional; only closes input and/or
- output file if not stdin or stdout respectively; prints
- usage message on stderr rather than stdout; adds
- --filename switch (changes suggested by
- <ceder@lysator.liu.se>)
- lpd 1996-01-21 added code to cope with not HAVE_CONFIG_H and with
- compilers that don't understand void, as suggested by
- Tom Lane
- lpd 1996-01-15 changed to require that the first non-comment token
- on the line following a function header be a left brace,
- to reduce sensitivity to macros, as suggested by Tom Lane
- <tgl@sss.pgh.pa.us>
- lpd 1995-06-22 removed #ifndefs whose sole purpose was to define
- undefined preprocessor symbols as 0; changed all #ifdefs
- for configuration symbols to #ifs
- lpd 1995-04-05 changed copyright notice to make it clear that
- including ansi2knr in a program does not bring the entire
- program under the GPL
- lpd 1994-12-18 added conditionals for systems where ctype macros
- don't handle 8-bit characters properly, suggested by
- Francois Pinard <pinard@iro.umontreal.ca>;
- removed --varargs switch (this is now the default)
- lpd 1994-10-10 removed CONFIG_BROKETS conditional
- lpd 1994-07-16 added some conditionals to help GNU `configure',
- suggested by Francois Pinard <pinard@iro.umontreal.ca>;
- properly erase prototype args in function parameters,
- contributed by Jim Avera <jima@netcom.com>;
- correct error in writeblanks (it shouldn't erase EOLs)
- lpd 1989-xx-xx original version
- */
-
-/* Most of the conditionals here are to make ansi2knr work with */
-/* or without the GNU configure machinery. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#if HAVE_CONFIG_H
-
-/*
- For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
- This will define HAVE_CONFIG_H and so, activate the following lines.
- */
-
-# if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-#else /* not HAVE_CONFIG_H */
-
-/* Otherwise do it the hard way */
-
-# ifdef BSD
-# include <strings.h>
-# else
-# ifdef VMS
- extern int strlen(), strncmp();
-# else
-# include <string.h>
-# endif
-# endif
-
-#endif /* not HAVE_CONFIG_H */
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-/*
- malloc and free should be declared in stdlib.h,
- but if you've got a K&R compiler, they probably aren't.
- */
-# ifdef MSDOS
-# include <malloc.h>
-# else
-# ifdef VMS
- extern char *malloc();
- extern void free();
-# else
- extern char *malloc();
- extern int free();
-# endif
-# endif
-
-#endif
-
-/* Define NULL (for *very* old compilers). */
-#ifndef NULL
-# define NULL (0)
-#endif
-
-/*
- * The ctype macros don't always handle 8-bit characters correctly.
- * Compensate for this here.
- */
-#ifdef isascii
-# undef HAVE_ISASCII /* just in case */
-# define HAVE_ISASCII 1
-#else
-#endif
-#if STDC_HEADERS || !HAVE_ISASCII
-# define is_ascii(c) 1
-#else
-# define is_ascii(c) isascii(c)
-#endif
-
-#define is_space(c) (is_ascii(c) && isspace(c))
-#define is_alpha(c) (is_ascii(c) && isalpha(c))
-#define is_alnum(c) (is_ascii(c) && isalnum(c))
-
-/* Scanning macros */
-#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
-#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
-
-/* Forward references */
-char *ppdirforward();
-char *ppdirbackward();
-char *skipspace();
-char *scanstring();
-int writeblanks();
-int test1();
-int convert1();
-
-/* The main program */
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{ FILE *in = stdin;
- FILE *out = stdout;
- char *filename = 0;
- char *program_name = argv[0];
- char *output_name = 0;
-#define bufsize 5000 /* arbitrary size */
- char *buf;
- char *line;
- char *more;
- char *usage =
- "Usage: ansi2knr [--filename FILENAME] [INPUT_FILE [OUTPUT_FILE]]\n";
- /*
- * In previous versions, ansi2knr recognized a --varargs switch.
- * If this switch was supplied, ansi2knr would attempt to convert
- * a ... argument to va_alist and va_dcl; if this switch was not
- * supplied, ansi2knr would simply drop any such arguments.
- * Now, ansi2knr always does this conversion, and we only
- * check for this switch for backward compatibility.
- */
- int convert_varargs = 1;
- int output_error;
-
- while ( argc > 1 && argv[1][0] == '-' ) {
- if ( !strcmp(argv[1], "--varargs") ) {
- convert_varargs = 1;
- argc--;
- argv++;
- continue;
- }
- if ( !strcmp(argv[1], "--filename") && argc > 2 ) {
- filename = argv[2];
- argc -= 2;
- argv += 2;
- continue;
- }
- fprintf(stderr, "%s: Unrecognized switch: %s\n", program_name,
- argv[1]);
- fprintf(stderr, usage);
- exit(1);
- }
- switch ( argc )
- {
- default:
- fprintf(stderr, usage);
- exit(0);
- case 3:
- output_name = argv[2];
- out = fopen(output_name, "w");
- if ( out == NULL ) {
- fprintf(stderr, "%s: Cannot open output file %s\n",
- program_name, output_name);
- exit(1);
- }
- /* falls through */
- case 2:
- in = fopen(argv[1], "r");
- if ( in == NULL ) {
- fprintf(stderr, "%s: Cannot open input file %s\n",
- program_name, argv[1]);
- exit(1);
- }
- if ( filename == 0 )
- filename = argv[1];
- /* falls through */
- case 1:
- break;
- }
- if ( filename )
- fprintf(out, "#line 1 \"%s\"\n", filename);
- buf = malloc(bufsize);
- if ( buf == NULL )
- {
- fprintf(stderr, "Unable to allocate read buffer!\n");
- exit(1);
- }
- line = buf;
- while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
- {
-test: line += strlen(line);
- switch ( test1(buf) )
- {
- case 2: /* a function header */
- convert1(buf, out, 1, convert_varargs);
- break;
- case 1: /* a function */
- /* Check for a { at the start of the next line. */
- more = ++line;
-f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
- goto wl;
- if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
- goto wl;
- switch ( *skipspace(ppdirforward(more), 1) )
- {
- case '{':
- /* Definitely a function header. */
- convert1(buf, out, 0, convert_varargs);
- fputs(more, out);
- break;
- case 0:
- /* The next line was blank or a comment: */
- /* keep scanning for a non-comment. */
- line += strlen(line);
- goto f;
- default:
- /* buf isn't a function header, but */
- /* more might be. */
- fputs(buf, out);
- strcpy(buf, more);
- line = buf;
- goto test;
- }
- break;
- case -1: /* maybe the start of a function */
- if ( line != buf + (bufsize - 1) ) /* overflow check */
- continue;
- /* falls through */
- default: /* not a function */
-wl: fputs(buf, out);
- break;
- }
- line = buf;
- }
- if ( line != buf )
- fputs(buf, out);
- free(buf);
- if ( output_name ) {
- output_error = ferror(out);
- output_error |= fclose(out);
- } else { /* out == stdout */
- fflush(out);
- output_error = ferror(out);
- }
- if ( output_error ) {
- fprintf(stderr, "%s: error writing to %s\n", program_name,
- (output_name ? output_name : "stdout"));
- exit(1);
- }
- if ( in != stdin )
- fclose(in);
- return 0;
-}
-
-/*
- * Skip forward or backward over one or more preprocessor directives.
- */
-char *
-ppdirforward(p)
- char *p;
-{
- for (; *p == '#'; ++p) {
- for (; *p != '\r' && *p != '\n'; ++p)
- if (*p == 0)
- return p;
- if (*p == '\r' && p[1] == '\n')
- ++p;
- }
- return p;
-}
-char *
-ppdirbackward(p, limit)
- char *p;
- char *limit;
-{
- char *np = p;
-
- for (;; p = --np) {
- if (*np == '\n' && np[-1] == '\r')
- --np;
- for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np)
- if (np[-1] == 0)
- return np;
- if (*np != '#')
- return p;
- }
-}
-
-/*
- * Skip over whitespace, comments, and preprocessor directives,
- * in either direction.
- */
-char *
-skipspace(p, dir)
- char *p;
- int dir; /* 1 for forward, -1 for backward */
-{
- for ( ; ; ) {
- while ( is_space(*p) )
- p += dir;
- if ( !(*p == '/' && p[dir] == '*') )
- break;
- p += dir; p += dir;
- while ( !(*p == '*' && p[dir] == '/') ) {
- if ( *p == 0 )
- return p; /* multi-line comment?? */
- p += dir;
- }
- p += dir; p += dir;
- }
- return p;
-}
-
-/* Scan over a quoted string, in either direction. */
-char *
-scanstring(p, dir)
- char *p;
- int dir;
-{
- for (p += dir; ; p += dir)
- if (*p == '"' && p[-dir] != '\\')
- return p + dir;
-}
-
-/*
- * Write blanks over part of a string.
- * Don't overwrite end-of-line characters.
- */
-int
-writeblanks(start, end)
- char *start;
- char *end;
-{ char *p;
- for ( p = start; p < end; p++ )
- if ( *p != '\r' && *p != '\n' )
- *p = ' ';
- return 0;
-}
-
-/*
- * Test whether the string in buf is a function definition.
- * The string may contain and/or end with a newline.
- * Return as follows:
- * 0 - definitely not a function definition;
- * 1 - definitely a function definition;
- * 2 - definitely a function prototype (NOT USED);
- * -1 - may be the beginning of a function definition,
- * append another line and look again.
- * The reason we don't attempt to convert function prototypes is that
- * Ghostscript's declaration-generating macros look too much like
- * prototypes, and confuse the algorithms.
- */
-int
-test1(buf)
- char *buf;
-{ char *p = buf;
- char *bend;
- char *endfn;
- int contin;
-
- if ( !isidfirstchar(*p) )
- return 0; /* no name at left margin */
- bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
- switch ( *bend )
- {
- case ';': contin = 0 /*2*/; break;
- case ')': contin = 1; break;
- case '{': return 0; /* not a function */
- case '}': return 0; /* not a function */
- default: contin = -1;
- }
- while ( isidchar(*p) )
- p++;
- endfn = p;
- p = skipspace(p, 1);
- if ( *p++ != '(' )
- return 0; /* not a function */
- p = skipspace(p, 1);
- if ( *p == ')' )
- return 0; /* no parameters */
- /* Check that the apparent function name isn't a keyword. */
- /* We only need to check for keywords that could be followed */
- /* by a left parenthesis (which, unfortunately, is most of them). */
- { static char *words[] =
- { "asm", "auto", "case", "char", "const", "double",
- "extern", "float", "for", "if", "int", "long",
- "register", "return", "short", "signed", "sizeof",
- "static", "switch", "typedef", "unsigned",
- "void", "volatile", "while", 0
- };
- char **key = words;
- char *kp;
- unsigned len = endfn - buf;
-
- while ( (kp = *key) != 0 )
- { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
- return 0; /* name is a keyword */
- key++;
- }
- }
- {
- char *id = p;
- int len;
- /*
- * Check for identifier1(identifier2) and not
- * identifier1(void), or identifier1(identifier2, xxxx).
- */
-
- while ( isidchar(*p) )
- p++;
- len = p - id;
- p = skipspace(p, 1);
- if (*p == ',' ||
- (*p == ')' && (len != 4 || strncmp(id, "void", 4)))
- )
- return 0; /* not a function */
- }
- /*
- * If the last significant character was a ), we need to count
- * parentheses, because it might be part of a formal parameter
- * that is a procedure.
- */
- if (contin > 0) {
- int level = 0;
-
- for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
- level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
- if (level > 0)
- contin = -1;
- }
- return contin;
-}
-
-/* Convert a recognized function definition or header to K&R syntax. */
-int
-convert1(buf, out, header, convert_varargs)
- char *buf;
- FILE *out;
- int header; /* Boolean */
- int convert_varargs; /* Boolean */
-{ char *endfn;
- char *p;
- /*
- * The breaks table contains pointers to the beginning and end
- * of each argument.
- */
- char **breaks;
- unsigned num_breaks = 2; /* for testing */
- char **btop;
- char **bp;
- char **ap;
- char *vararg = 0;
-
- /* Pre-ANSI implementations don't agree on whether strchr */
- /* is called strchr or index, so we open-code it here. */
- for ( endfn = buf; *(endfn++) != '('; )
- ;
-top: p = endfn;
- breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
- if ( breaks == NULL )
- { /* Couldn't allocate break table, give up */
- fprintf(stderr, "Unable to allocate break table!\n");
- fputs(buf, out);
- return -1;
- }
- btop = breaks + num_breaks * 2 - 2;
- bp = breaks;
- /* Parse the argument list */
- do
- { int level = 0;
- char *lp = NULL;
- char *rp = NULL;
- char *end = NULL;
-
- if ( bp >= btop )
- { /* Filled up break table. */
- /* Allocate a bigger one and start over. */
- free((char *)breaks);
- num_breaks <<= 1;
- goto top;
- }
- *bp++ = p;
- /* Find the end of the argument */
- for ( ; end == NULL; p++ )
- { switch(*p)
- {
- case ',':
- if ( !level ) end = p;
- break;
- case '(':
- if ( !level ) lp = p;
- level++;
- break;
- case ')':
- if ( --level < 0 ) end = p;
- else rp = p;
- break;
- case '/':
- if (p[1] == '*')
- p = skipspace(p, 1) - 1;
- break;
- case '"':
- p = scanstring(p, 1) - 1;
- break;
- default:
- ;
- }
- }
- /* Erase any embedded prototype parameters. */
- if ( lp && rp )
- writeblanks(lp + 1, rp);
- p--; /* back up over terminator */
- /* Find the name being declared. */
- /* This is complicated because of procedure and */
- /* array modifiers. */
- for ( ; ; )
- { p = skipspace(p - 1, -1);
- switch ( *p )
- {
- case ']': /* skip array dimension(s) */
- case ')': /* skip procedure args OR name */
- { int level = 1;
- while ( level )
- switch ( *--p )
- {
- case ']': case ')':
- level++;
- break;
- case '[': case '(':
- level--;
- break;
- case '/':
- if (p > buf && p[-1] == '*')
- p = skipspace(p, -1) + 1;
- break;
- case '"':
- p = scanstring(p, -1) + 1;
- break;
- default: ;
- }
- }
- if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
- { /* We found the name being declared */
- while ( !isidfirstchar(*p) )
- p = skipspace(p, 1) + 1;
- goto found;
- }
- break;
- default:
- goto found;
- }
- }
-found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
- { if ( convert_varargs )
- { *bp++ = "va_alist";
- vararg = p-2;
- }
- else
- { p++;
- if ( bp == breaks + 1 ) /* sole argument */
- writeblanks(breaks[0], p);
- else
- writeblanks(bp[-1] - 1, p);
- bp--;
- }
- }
- else
- { while ( isidchar(*p) ) p--;
- *bp++ = p+1;
- }
- p = end;
- }
- while ( *p++ == ',' );
- *bp = p;
- /* Make a special check for 'void' arglist */
- if ( bp == breaks+2 )
- { p = skipspace(breaks[0], 1);
- if ( !strncmp(p, "void", 4) )
- { p = skipspace(p+4, 1);
- if ( p == breaks[2] - 1 )
- { bp = breaks; /* yup, pretend arglist is empty */
- writeblanks(breaks[0], p + 1);
- }
- }
- }
- /* Put out the function name and left parenthesis. */
- p = buf;
- while ( p != endfn ) putc(*p, out), p++;
- /* Put out the declaration. */
- if ( header )
- { fputs(");", out);
- for ( p = breaks[0]; *p; p++ )
- if ( *p == '\r' || *p == '\n' )
- putc(*p, out);
- }
- else
- { for ( ap = breaks+1; ap < bp; ap += 2 )
- { p = *ap;
- while ( isidchar(*p) )
- putc(*p, out), p++;
- if ( ap < bp - 1 )
- fputs(", ", out);
- }
- fputs(") ", out);
- /* Put out the argument declarations */
- for ( ap = breaks+2; ap <= bp; ap += 2 )
- (*ap)[-1] = ';';
- if ( vararg != 0 )
- { *vararg = 0;
- fputs(breaks[0], out); /* any prior args */
- fputs("va_dcl", out); /* the final arg */
- fputs(bp[0], out);
- }
- else
- fputs(breaks[0], out);
- }
- free((char *)breaks);
- return 0;
-}
diff --git a/contrib/ntp/util/audio-pcm.c b/contrib/ntp/util/audio-pcm.c
deleted file mode 100644
index 6f2e4fa..0000000
--- a/contrib/ntp/util/audio-pcm.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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/byteorder.c b/contrib/ntp/util/byteorder.c
deleted file mode 100644
index 188536f..0000000
--- a/contrib/ntp/util/byteorder.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * This works on:
- * Crays
- * Conven
- * sparc's
- * Dec mip machines
- * Dec alpha machines
- * RS6000
- * SGI's
- */
-
-#include <stdio.h>
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int i;
- int big;
- union {
- unsigned long l;
- char c[sizeof(long)];
- } u;
-
-#if defined(LONG8)
- u.l = (((long)0x08070605) << 32) | (long)0x04030201;
-#else
- u.l = 0x04030201;
-#endif
- if (sizeof(long) > 4) {
- if (u.c[0] == 0x08) big = 1;
- else big = 0;
- } else {
- if (u.c[0] == 0x04) big = 1;
- else big = 0;
- }
- for (i=0; i< sizeof(long); i++) {
- if (big == 1 && (u.c[i] == (sizeof(long) - i))) {
- continue;
- } else if (big == 0 && (u.c[i] == (i+1))) {
- continue;
- } else {
- big = -1;
- break;
- }
- }
-
- if (big == 1) {
- printf("XNTP_BIG_ENDIAN\n");
- } else if (big == 0) {
- printf("XNTP_LITTLE_ENDIAN\n");
- }
- exit(0);
-}
diff --git a/contrib/ntp/util/hist.c b/contrib/ntp/util/hist.c
deleted file mode 100644
index c9763ce..0000000
--- a/contrib/ntp/util/hist.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * This program can be used to calibrate the clock reading jitter of a
- * particular CPU and operating system. It first tickles every element
- * of an array, in order to force pages into memory, then repeatedly calls
- * gettimeofday() and, finally, writes out the time values for later
- * analysis. From this you can determine the jitter and if the clock ever
- * 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) */
-
-extern int col(hrtime_t *, hrtime_t *);
-extern hrtime_t gethrtime(void);
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int i, j, n;
- hrtime_t t, u, v, w, gtod[NBUF], ovfl[NSRT];
-
- /*
- * Force pages into memory
- */
- for (i = 0; i < NBUF; i++)
- gtod[i] = 0;
- for (i = 0; i < NSRT; i++)
- ovfl[i] = 0;
-
- /*
- * Construct histogram
- */
- n = 0;
- t = gethrtime();
- v = t;
- while (1) {
- u = gethirestime();
- if (u - v > NCNT)
- break;
- w = u - t;
- if (w <= 0) {
-/*
- printf("error <= 0 %ld %d %d, %d %d\n", w, ts.tv_sec,
- ts.tv_usec, tr.tv_sec, tr.tv_usec);
-*/
- } else if (w > NBUF - 1) {
- ovfl[n] = w;
- if (n < NSRT - 1)
- n++;
- } else {
- gtod[w]++;
- }
- t = u;
- }
-
- /*
- * Write out histogram
- */
- for (i = 0; i < NBUF - 1; i++) {
- if (gtod[i] > 0)
- printf("%ld %ld\n", i, gtod[i]);
- }
- if (n == 0)
- return;
- qsort((char *)ovfl, (size_t)n, sizeof(hrtime_t), col);
- w = 0;
- j = 0;
- for (i = 0; i < n; i++) {
- if (ovfl[i] != w) {
- if (j > 0)
- printf("%ld %ld\n", w, j);
- w = ovfl[i];
- j = 1;
- } else
- j++;
- }
- if (j > 0)
- printf("%ld %ld\n", w, j);
-
- exit(0);
-}
-
-int
-col(
- hrtime_t *x,
- hrtime_t *y
- )
-{
- return (*x - *y);
-}
diff --git a/contrib/ntp/util/jitter.c b/contrib/ntp/util/jitter.c
deleted file mode 100644
index 462fe12..0000000
--- a/contrib/ntp/util/jitter.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * This program can be used to calibrate the clock reading jitter of a
- * particular CPU and operating system. It first tickles every element
- * of an array, in order to force pages into memory, then repeatedly calls
- * gettimeofday() and, finally, writes out the time values for later
- * analysis. From this you can determine the jitter and if the clock ever
- * runs backwards.
- */
-
-#include <stdio.h>
-#include <sys/time.h>
-
-#define NBUF 20002
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- struct timeval ts, tr;
- struct timezone tzp;
- long temp, j, i, gtod[NBUF];
-
- gettimeofday(&ts, &tzp);
-
- /*
- * Force pages into memory
- */
- for (i = 0; i < NBUF; i ++)
- gtod[i] = 0;
-
- /*
- * Construct gtod array
- */
- for (i = 0; i < NBUF; i ++) {
- gettimeofday(&tr, &tzp);
- gtod[i] = (tr.tv_sec - ts.tv_sec) * 1000000 + tr.tv_usec;
- }
-
- /*
- * Write out gtod array for later processing with S
- */
- for (i = 0; i < NBUF - 2; i++) {
- /*
- printf("%lu\n", gtod[i]);
- */
- gtod[i] = gtod[i + 1] - gtod[i];
- printf("%lu\n", gtod[i]);
- }
-
- /*
- * Sort the gtod array and display deciles
- */
- for (i = 0; i < NBUF - 2; i++) {
- for (j = 0; j <= i; j++) {
- if (gtod[j] > gtod[i]) {
- temp = gtod[j];
- gtod[j] = gtod[i];
- gtod[i] = temp;
- }
- }
- }
- fprintf(stderr, "First rank\n");
- for (i = 0; i < 10; i++)
- fprintf(stderr, "%10ld%10ld\n", i, gtod[i]);
- fprintf(stderr, "Last rank\n");
- for (i = NBUF - 12; i < NBUF - 2; i++)
- fprintf(stderr, "%10ld%10ld\n", i, gtod[i]);
- exit(0);
-}
diff --git a/contrib/ntp/util/kern.c b/contrib/ntp/util/kern.c
deleted file mode 100644
index b193d6f..0000000
--- a/contrib/ntp/util/kern.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * This program simulates a first-order, type-II phase-lock loop using
- * actual code segments from modified kernel distributions for SunOS,
- * Ultrix and OSF/1 kernels. These segments do not use any licensed code.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <math.h>
-#include <sys/time.h>
-
-#ifdef HAVE_TIMEX_H
-# include "timex.h"
-#endif
-
-/*
- * Phase-lock loop definitions
- */
-#define HZ 100 /* timer interrupt frequency (Hz) */
-#define MAXPHASE 512000 /* max phase error (us) */
-#define MAXFREQ 200 /* max frequency error (ppm) */
-#define TAU 2 /* time constant (shift 0 - 6) */
-#define POLL 16 /* interval between updates (s) */
-#define MAXSEC 1200 /* max interval between updates (s) */
-
-/*
- * Function declarations
- */
-void hardupdate();
-void hardclock();
-void second_overflow();
-
-/*
- * Kernel variables
- */
-int tick; /* timer interrupt period (us) */
-int fixtick; /* amortization constant (ppm) */
-struct timeval timex; /* ripoff of kernel time variable */
-
-/*
- * Phase-lock loop variables
- */
-int time_status = TIME_BAD; /* clock synchronization status */
-long time_offset = 0; /* time adjustment (us) */
-long time_constant = 0; /* pll time constant */
-long time_tolerance = MAXFREQ; /* frequency tolerance (ppm) */
-long time_precision = 1000000 / HZ; /* clock precision (us) */
-long time_maxerror = MAXPHASE; /* maximum error (us) */
-long time_esterror = MAXPHASE; /* estimated error (us) */
-long time_phase = 0; /* phase offset (scaled us) */
-long time_freq = 0; /* frequency offset (scaled ppm) */
-long time_adj = 0; /* tick adjust (scaled 1 / HZ) */
-long time_reftime = 0; /* time at last adjustment (s) */
-
-/*
- * Simulation variables
- */
-double timey = 0; /* simulation time (us) */
-long timez = 0; /* current error (us) */
-long poll_interval = 0; /* poll counter */
-
-/*
- * Simulation test program
- */
-int
-main(
- int argc,
- char *argv[]
- )
-{
- tick = 1000000 / HZ;
- fixtick = 1000000 % HZ;
- timex.tv_sec = 0;
- timex.tv_usec = MAXPHASE;
- time_freq = 0;
- time_constant = TAU;
- printf("tick %d us, fixtick %d us\n", tick, fixtick);
- printf(" time offset freq _offset _freq _adj\n");
-
- /*
- * Grind the loop until ^C
- */
- while (1) {
- timey += (double)(1000000) / HZ;
- if (timey >= 1000000)
- timey -= 1000000;
- hardclock();
- if (timex.tv_usec >= 1000000) {
- timex.tv_usec -= 1000000;
- timex.tv_sec++;
- second_overflow();
- poll_interval++;
- if (!(poll_interval % POLL)) {
- timez = (long)timey - timex.tv_usec;
- if (timez > 500000)
- timez -= 1000000;
- if (timez < -500000)
- timez += 1000000;
- hardupdate(timez);
- printf("%10li%10li%10.2f %08lx %08lx %08lx\n",
- timex.tv_sec, timez,
- (double)time_freq / (1 << SHIFT_KF),
- time_offset, time_freq, time_adj);
- }
- }
- }
-}
-
-/*
- * This routine simulates the ntp_adjtime() call
- *
- * For default SHIFT_UPDATE = 12, offset is limited to +-512 ms, the
- * maximum interval between updates is 4096 s and the maximum frequency
- * offset is +-31.25 ms/s.
- */
-void
-hardupdate(
- long offset
- )
-{
- long ltemp, mtemp;
-
- time_offset = offset << SHIFT_UPDATE;
- mtemp = timex.tv_sec - time_reftime;
- time_reftime = timex.tv_sec;
- if (mtemp > MAXSEC)
- mtemp = 0;
-
- /* ugly multiply should be replaced */
- if (offset < 0)
- time_freq -= (-offset * mtemp) >>
- (time_constant + time_constant);
- else
- time_freq += (offset * mtemp) >>
- (time_constant + time_constant);
- ltemp = time_tolerance << SHIFT_KF;
- if (time_freq > ltemp)
- time_freq = ltemp;
- else if (time_freq < -ltemp)
- time_freq = -ltemp;
- if (time_status == TIME_BAD)
- time_status = TIME_OK;
-}
-
-/*
- * This routine simulates the timer interrupt
- */
-void
-hardclock(void)
-{
- int ltemp, time_update;
-
- time_update = tick; /* computed by adjtime() */
- time_phase += time_adj;
- if (time_phase < -FINEUSEC) {
- ltemp = -time_phase >> SHIFT_SCALE;
- time_phase += ltemp << SHIFT_SCALE;
- time_update -= ltemp;
- }
- else if (time_phase > FINEUSEC) {
- ltemp = time_phase >> SHIFT_SCALE;
- time_phase -= ltemp << SHIFT_SCALE;
- time_update += ltemp;
- }
- timex.tv_usec += time_update;
-}
-
-/*
- * This routine simulates the overflow of the microsecond field
- *
- * With SHIFT_SCALE = 23, the maximum frequency adjustment is +-256 us
- * per tick, or 25.6 ms/s at a clock frequency of 100 Hz. The time
- * contribution is shifted right a minimum of two bits, while the frequency
- * contribution is a right shift. Thus, overflow is prevented if the
- * frequency contribution is limited to half the maximum or 15.625 ms/s.
- */
-void
-second_overflow(void)
-{
- int ltemp;
-
- time_maxerror += time_tolerance;
- if (time_offset < 0) {
- ltemp = -time_offset >>
- (SHIFT_KG + time_constant);
- time_offset += ltemp;
- time_adj = -(ltemp <<
- (SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE));
- } else {
- ltemp = time_offset >>
- (SHIFT_KG + time_constant);
- time_offset -= ltemp;
- time_adj = ltemp <<
- (SHIFT_SCALE - SHIFT_HZ - SHIFT_UPDATE);
- }
- if (time_freq < 0)
- time_adj -= -time_freq >> (SHIFT_KF + SHIFT_HZ - SHIFT_SCALE);
- else
- time_adj += time_freq >> (SHIFT_KF + SHIFT_HZ - SHIFT_SCALE);
- time_adj += fixtick << (SHIFT_SCALE - SHIFT_HZ);
-
- /* ugly divide should be replaced */
- if (timex.tv_sec % 86400 == 0) {
- switch (time_status) {
-
- case TIME_INS:
- timex.tv_sec--; /* !! */
- time_status = TIME_OOP;
- break;
-
- case TIME_DEL:
- timex.tv_sec++;
- time_status = TIME_OK;
- break;
-
- case TIME_OOP:
- time_status = TIME_OK;
- break;
- }
- }
-}
diff --git a/contrib/ntp/util/longsize.c b/contrib/ntp/util/longsize.c
deleted file mode 100644
index bba1955..0000000
--- a/contrib/ntp/util/longsize.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-
-main()
-{
- if (sizeof(long) == 8) {
- printf("-DLONG8\n");
- } else if (sizeof(long) == 4) {
- printf("-DLONG4\n");
- }
- exit(0);
-}
diff --git a/contrib/ntp/util/ntp-genkeys.c b/contrib/ntp/util/ntp-genkeys.c
deleted file mode 100644
index 5b70f72..0000000
--- a/contrib/ntp/util/ntp-genkeys.c
+++ /dev/null
@@ -1,1048 +0,0 @@
-/*
- * Program to generate MD5 and RSA keys for NTP clients and servers
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_NETINFO
-#include <netinfo/ni.h>
-#endif
-
-#include "ntp_machine.h"
-#include "ntpd.h"
-#include "ntp_stdlib.h"
-#include "ntp_string.h"
-#include "ntp_filegen.h"
-#include "ntp_unixtime.h"
-#include "ntp_config.h"
-#include "ntp_cmdargs.h"
-
-#ifndef GETTIMEOFDAY
-# define GETTIMEOFDAY gettimeofday
-#endif
-
-#include <stdio.h>
-#include <unistd.h>
-#include <limits.h> /* PATH_MAX */
-#include <sys/stat.h>
-
-#ifdef PUBKEY
-# include "ntp_crypto.h"
-#endif
-
-#include "l_stdlib.h"
-
-#ifndef PATH_MAX
-# ifdef _POSIX_PATH_MAX
-# define PATH_MAX _POSIX_PATH_MAX
-# else
-# define PATH_MAX 255
-# endif
-#endif
-
-/*
- * Cryptodefines
- */
-#define MAXKEYLEN 1024 /* maximum encoded key length */
-#define MODULUSLEN 512 /* length of RSA modulus */
-#define PRIMELEN 512 /* length of D_H prime, generator */
-
-/*
- * This program generates (up to) four files:
- *
- * ntp.keys containing the DES/MD5 private keys,
- * ntpkey containing the RSA private key,
- * ntpkey_HOST containing the RSA public key
- * where HOST is the DNS name of the generating machine,
- * ntpkey_dh containing the parameters for the Diffie-Hellman
- * key-agreement algorithm.
- *
- * The files contain cryptographic values generated by the algorithms of
- * the rsaref20 package and are in printable ASCII format. Since the
- * algorythms are seeded by the system clock, each run of this program
- * will produce a different outcome. There are no options or frills of
- * any sort, although a number of options would seem to be appropriate.
- * Waving this program in the breeze will no doubt bring a cast of
- * thousands to wiggle the options this way and that for various useful
- * purposes.
- *
- * The names of all files begin with "ntp" and end with an extension
- * consisting of the seconds value of the current NTP timestamp, which
- * appears in the form ".*". This provides a way to distinguish between
- * key generations, since the host name and timestamp can be fetched by
- * a client during operation.
- *
- * The ntp.keys.* file contains 16 MD5 keys. Each key consists of 16
- * characters randomized over the ASCII 95-character printing subset.
- * The file is read by the daemon at the location specified by the keys
- * configuration file command and made visible only to root. An
- * additional key consisting of a easily remembered password should be
- * added by hand for use with the ntpdc program. The file must be
- * distributed by secure means to other servers and clients sharing the
- * same security compartment.
- *
- * The key identifiers for MD5 and DES keys must be less than 65536,
- * although this program uses only the identifiers from 1 to 16. The key
- * identifier for each association is specified as the key argument in
- * the server or peer configuration file command.
- *
- * The ntpkey.* file contains the RSA private key. It is read by the
- * daemon at the location specified by the private argument of the
- * crypto configuration file command and made visible only to root.
- * This file is useful only to the machine that generated it and never
- * shared with any other daemon or application program.
- *
- * The ntpkey_host.* file contains the RSA public key, where host is the
- * DNS name of the host that generated it. The file is read by the
- * daemon at the location specified by the public argument to the server
- * or peer configuration file command. This file can be widely
- * distributed and stored without using secure means, since the data are
- * public values.
- *
- * The ntp_dh.* file contains two Diffie-Hellman parameters, the prime
- * modulus and the generator. The file is read by the daemon at the
- * location specified by the dhparams argument of the crypto
- * configuration file command. This file can be widely distributed and
- * stored without using secure means, since the data are public values.
- *
- * The file formats all begin with two lines. The first line contains
- * the file name and decimal timestamp, while the second contains the
- * readable datestamp. Lines beginning with # are considered comments
- * and ignored by the daemon. In the ntp.keys.* file, the next 16 lines
- * contain the MD5 keys in order. In the ntpkey.* and ntpkey_host.*
- * files, the next line contains the modulus length in bits followed by
- * the key as a PEM encoded string. In the ntpkey_dh.* file, the next
- * line contains the prime length in bytes followed by the prime as a
- * PEM encoded string, and the next and final line contains the
- * generator length in bytes followed by the generator as a PEM encoded
- * string.
- *
- * Note: See the file ./source/rsaref.h in the rsaref20 package for
- * explanation of return values, if necessary.
- */
-
-
-extern char *config_file;
-
-#ifdef HAVE_NETINFO
-extern struct netinfo_config_state *config_netinfo;
-extern int check_netinfo;
-#endif /* HAVE_NETINFO */
-
-#ifdef SYS_WINNT
-char *alt_config_file;
-LPTSTR temp;
-char config_file_storage[PATH_MAX];
-char alt_config_file_storage[PATH_MAX];
-#endif /* SYS_WINNT */
-
-int make_dh = 0; /* Make D-H parameter file? */
-int make_md5 = 0; /* Make MD5 keyfile? */
-int make_rsa = 0; /* Make RSA pair? */
-int force = 0; /* Force the installation? */
-int here = 0; /* Put the files here (curdir)? */
-int nosymlinks = 0; /* Just create the (timestamped) files? */
-int memorex = 0; /* Are we live? */
-int trash = 0; /* Trash old files? */
-int errflag = 0;
-
-char *f1_keysdir = NTP_KEYSDIR;
-
-char *f1_keys; /* Visible MD5 key file name */
-char *f2_keys; /* timestamped */
-char *f3_keys; /* previous filename */
-
-char *f1_publickey;
-char *f2_publickey;
-char *f3_publickey;
-
-char *f1_privatekey;
-char *f2_privatekey;
-char *f3_privatekey;
-
-char *f1_dhparms;
-char *f2_dhparms;
-char *f3_dhparms;
-
-
-/* Stubs and hacks so we can link with ntp_config.o */
-u_long sys_automax; /* maximum session key lifetime */
-int sys_bclient; /* we set our time to broadcasts */
-int sys_manycastserver; /* 1 => respond to manycast client pkts */
-char * req_file; /* name of the file with configuration info */
-keyid_t ctl_auth_keyid; /* keyid used for authenticating write requests */
-struct interface *any_interface; /* default interface */
-keyid_t info_auth_keyid; /* keyid used to authenticate requests */
-u_long current_time; /* current time (s) */
-const char *Version = ""; /* version declaration */
-keyid_t req_keyid; /* request keyid */
-u_long client_limit;
-u_long client_limit_period;
-l_fp sys_revoketime;
-u_long sys_revoke; /* keys revoke timeout */
-volatile int debug = 0; /* debugging flag */
-u_char sys_minpoll; /* min poll interval (log2 s) */
-
-void snifflink P((const char *, char **));
-int filep P((const char *));
-FILE *newfile P((const char *, const char *, mode_t, const char *));
-void cleanlinks P((const char *, const char *, const char *));
-
-struct peer *
-peer_config(
- struct sockaddr_in *srcadr,
- struct interface *dstadr,
- int hmode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t key,
- u_char *keystr
- )
-{
- if (debug > 1) printf("peer_config...\n");
- return 0;
-}
-
-
-void
-set_sys_var(
- char *data,
- u_long size,
- int def
- )
-{
- if (debug > 1) printf("set_sys_var...\n");
- return;
-}
-
-
-void
-ntp_intres (void)
-{
- if (debug > 1) printf("ntp_intres...\n");
- return;
-}
-
-
-int
-ctlsettrap(
- struct sockaddr_in *raddr,
- struct interface *linter,
- int traptype,
- int version
- )
-{
- if (debug > 1) printf("ctlsettrap...\n");
- return 0;
-}
-
-
-#ifdef PUBKEY
-void
-crypto_config(
- int item, /* configuration item */
- char *cp /* file name */
- )
-{
- switch (item) {
- case CRYPTO_CONF_DH:
- if (debug > 0) printf("crypto_config: DH/<%d> <%s>\n", item, cp);
- f1_dhparms = strdup(cp);
- break;
- case CRYPTO_CONF_PRIV:
- if (debug > 0) printf("crypto_config: PRIVATEKEY/<%d> <%s>\n", item, cp);
- f1_privatekey = strdup(cp);
- break;
- case CRYPTO_CONF_PUBL:
- if (debug > 0) printf("crypto_config: PUBLICKEY/<%d> <%s>\n", item, cp);
- f1_publickey = strdup(cp);
- break;
- default:
- if (debug > 1) printf("crypto_config: <%d> <%s>\n", item, cp);
- break;
- }
- return;
-}
-#endif
-
-
-struct interface *
-findinterface(
- struct sockaddr_in *addr
- )
-{
- if (debug > 1) printf("findinterface...\n");
- return 0;
-}
-
-
-void
-refclock_control(
- struct sockaddr_in *srcadr,
- struct refclockstat *in,
- struct refclockstat *out
- )
-{
- if (debug > 1) printf("refclock_control...\n");
- return;
-}
-
-
-void
-loop_config(
- int item,
- double freq
- )
-{
- if (debug > 1) printf("loop_config...\n");
- return;
-}
-
-
-void
-filegen_config(
- FILEGEN *gen,
- char *basename,
- u_int type,
- u_int flag
- )
-{
- if (debug > 1) printf("filegen_config...\n");
- return;
-}
-
-
-void
-stats_config(
- int item,
- char *invalue /* only one type so far */
- )
-{
- if (debug > 1) printf("stats_config...\n");
- return;
-}
-
-
-void
-hack_restrict(
- int op,
- struct sockaddr_in *resaddr,
- struct sockaddr_in *resmask,
- int mflags,
- int flags
- )
-{
- if (debug > 1) printf("hack_restrict...\n");
- return;
-}
-
-
-void
-kill_asyncio (void)
-{
- if (debug > 1) printf("kill_asyncio...\n");
- return;
-}
-
-
-void
-proto_config(
- int item,
- u_long value,
- double dvalue
- )
-{
- if (debug > 1) printf("proto_config...\n");
- return;
-}
-
-void
-getauthkeys(
- char *keyfile
- )
-{
- if (debug > 0) printf("getauthkeys: got <%s>\n", keyfile);
- f1_keys = strdup(keyfile);
- return;
-}
-
-
-FILEGEN *
-filegen_get(
- char *name
- )
-{
- if (debug > 1) printf("filegen_get...\n");
- return 0;
-}
-
-
-/* End of stubs and hacks */
-
-
-static void
-usage(
- void
- )
-{
- printf("Usage: %s [ -c ntp.conf ] [ -g {d,m,r} ] [ -k key_file ]\n",
- progname);
- printf(" [ -d ] [ -f ] [ -h ] [ -l ] [ -n ] [ -t ]\n");
- printf(" where:\n");
- printf(" -c /etc/ntp.conf Location of ntp.conf file\n");
- printf(" -d enable debug messages (can be used multiple times)\n");
- printf(" -f force installation of generated keys.\n");
- printf(" -g d Generate D-H parameter file\n");
- printf(" -g m Generate MD5 key file\n");
- printf(" -g r Generate RSA keys\n");
- printf(" -g dmr (Can be combined)\n");
- printf(" -h Build keys here (current directory). Implies -l\n");
- printf(" -k key_file Location of key file\n");
- printf(" -l Don't make the symlinks\n");
- printf(" -n Don't actually do anything, just say what would be done\n");
- printf(" -t Trash the (old) files at the end of symlink\n");
-
- exit(1);
-}
-
-
-void
-getCmdOpts (
- int argc,
- char *argv[]
- )
-{
- int i;
-
- while ((i = ntp_getopt(argc, argv, "c:dfg:hlnt")) != EOF)
- switch (i) {
- case 'c':
- config_file = ntp_optarg;
-#ifdef HAVE_NETINFO
- check_netinfo = 0;
-#endif
- break;
- case 'd':
- ++debug;
- break;
- case 'f':
- ++force;
- break;
- case 'g':
- while (*ntp_optarg) {
- switch (*ntp_optarg) {
- case 'd':
- ++make_dh;
- break;
- case 'm':
- ++make_md5;
- break;
- case 'r':
- ++make_rsa;
- break;
- default:
- ++errflag;
- break;
- }
- ++ntp_optarg;
- }
- break;
- case 'h':
- ++here;
- ++nosymlinks;
- break;
- case 'l':
- ++nosymlinks;
- break;
- case 'n':
- ++memorex;
- break;
- case 't':
- ++trash;
- break;
- case '?':
- ++errflag;
- break;
- }
-
- if (errflag)
- usage();
-
- /* If no file type was specified, make them all. */
- if (!(make_dh | make_md5 | make_rsa)) {
- ++make_dh;
- ++make_md5;
- ++make_rsa;
- }
-}
-
-
-void
-snifflink(
- const char *file,
- char **linkdata
- )
-{
-#ifdef HAVE_READLINK
- char buf[PATH_MAX];
- int rc;
-
- if (!file)
- return;
-
- rc = readlink(file, buf, sizeof buf);
- if (-1 == rc) {
- switch (errno) {
- case EINVAL: /* Fall thru */
- case ENOENT:
- return;
- }
- fprintf(stderr, "%s: readlink(%s) failed: (%d) %s\n",
- progname, file, errno, strerror(errno));
- exit(1);
- }
- buf[rc] = '\0';
- *linkdata = strdup(buf);
- /* XXX: make sure linkdata is not 0... */
-#endif /* not HAVE_READLINK */
- return;
-}
-
-
-int
-filep(
- const char *fn
- )
-{
- struct stat sb;
-
- if (-1 == stat(fn, &sb)) {
- if (ENOENT == errno)
- return 0;
- fprintf(stderr, "stat(%s) failed: %s\n",
- fn, strerror(errno));
- exit(1);
- }
- return 1;
-}
-
-
-FILE *
-newfile(
- const char *f1, /* Visible file */
- const char *f2, /* New timestamped file name */
- mode_t fmask, /* umask for new timestamped file */
- const char *f3 /* Previous symlink target */
- )
-{
- FILE *fp;
- char fb[PATH_MAX];
- char *cp;
-
- if (debug > 1) printf("newfile(%s,%s,%0o,%s)\n", f1, f2,
- (unsigned)fmask, f3 ? f3 : "NULL");
- /*
- If:
- - no symlink support, or
- - there is no old symlink (!f3)
- - - file = dirname(f1) / f2
- Otherwise:
- - If ('/' == *f3)
- - - file = dirname(f3) / f2
- - else
- - - file = dirname(f1) / dirname(f3) / f2
- fopen(file)
- print any error message/bail
- return FILE
- */
-
- if (here)
- snprintf(fb, sizeof fb, "%s", f2);
- else {
- if (
-#ifdef HAVE_READLINK
- !f3
-#else
- 1
-#endif
- ) {
- /* file = dirname(f1) / f2 */
- snprintf(fb, sizeof fb, "%s", f1);
- cp = strrchr(fb, '/');
- if (cp) {
- *cp = 0;
- }
- snprintf(fb, sizeof fb, "%s/%s", fb, f2);
- if (debug > 1) printf("case 1: file is <%s>\n", fb);
- } else {
- /*
- - If ('/' == *f3)
- - - file = dirname(f3) / f2
- - else
- - - file = dirname(f1) / dirname(f3) / f2
- */
- if ('/' != *f3) {
- snprintf(fb, sizeof fb, "%s", f1);
- cp = strrchr(fb, '/');
- if (cp) {
- ++cp;
- *cp = 0;
- }
- if (debug > 1)
- printf("case 2: file is <%s>\n", fb);
- } else {
- *fb = 0;
- }
- snprintf(fb, sizeof fb, "%s%s", fb, f3);
- cp = strrchr(fb, '/');
- if (cp) {
- *cp = 0;
- }
- snprintf(fb, sizeof fb, "%s/%s", fb, f2);
- if (debug > 1) printf("case 3: file is <%s>\n", fb);
- }
- }
-
- /*
- fopen(file)
- print any error message/bail
- return FILE
- */
- if (memorex) {
- printf("Would write file <%s>\n", fb);
- fp = NULL;
- } else {
- mode_t omask;
-
- omask = umask(fmask);
- fp = fopen(fb, "w");
- (void) umask(omask);
- if (fp == NULL) {
- perror(fb);
- exit(1);
- }
- }
- return fp;
-}
-
-void
-cleanlinks(
- const char *f1, /* Visible file */
- const char *f2, /* New timestamped file name */
- const char *f3 /* Previous symlink target */
- )
-{
-#ifdef HAVE_READLINK
- char *cp;
- char fb[PATH_MAX];
-
- /*
- Just return if nosymlinks.
- unlink f1
- file = dirname(f3) / f2
- symlink file, f1
- If trash:
- - if f3 begins with a /, unlink it
- - else, unlink dirname(f1) / f3
- */
-#endif /* HAVE_READLINK */
-
- if (nosymlinks)
- return;
-
- if (memorex)
- printf("Would unlink(%s)\n", f1);
- else if (unlink(f1)) {
- if (errno != ENOENT) {
- fprintf(stderr, "unlink(%s) failed: %s\n", f1,
- strerror(errno));
- return;
- }
- }
- /* file = dirname(f3) / f2 */
- if (f3) {
- snprintf(fb, sizeof fb, "%s", f3);
- cp = strrchr(fb, '/');
- if (cp) {
- ++cp;
- *cp = 0;
- } else {
- *fb = 0;
- }
- } else {
- *fb = 0;
- }
- snprintf(fb, sizeof fb, "%s%s", fb, f2);
- if (debug > 1) printf("cleanlinks 1: file is <%s>\n", fb);
-
- if (memorex)
- printf("Would symlink <%s> -> <%s>\n", f1, fb);
- else if (symlink(fb, f1)) {
- fprintf(stderr, "symlink(%s,%s) failed: %s\n", fb, f1,
- strerror(errno));
- return;
- }
-
- /*
- If trash:
- - if f3 begins with a /, unlink it
- - else, unlink dirname(f1) / f3
- */
- if (trash && f3) {
- if ('/' == *f3) {
- if (memorex)
- printf("Would unlink(%s)\n", f3);
- else if (unlink(f3)) {
- if (errno != ENOENT) {
- fprintf(stderr, "unlink(%s) failed: %s\n", f3,
- strerror(errno));
- return;
- }
- }
- } else {
- snprintf(fb, sizeof fb, "%s", f1);
- cp = strrchr(fb, '/');
- if (cp) {
- *cp = 0;
- }
- snprintf(fb, sizeof fb, "%s/%s", fb, f3);
- if (debug > 1)
- printf("cleanlinks 2: file is <%s>\n", fb);
- if (memorex)
- printf("Would unlink(%s)\n", fb);
- else if (unlink(fb)) {
- if (errno != ENOENT) {
- fprintf(stderr, "unlink(%s) failed: %s\n", fb,
- strerror(errno));
- return;
- }
- }
- }
- }
-
- return;
-}
-
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
-#ifdef PUBKEY
- R_RSA_PRIVATE_KEY rsaref_private; /* RSA private key */
- R_RSA_PUBLIC_KEY rsaref_public; /* RSA public key */
- R_RSA_PROTO_KEY protokey; /* RSA prototype key */
- R_DH_PARAMS dh_params; /* Diffie-Hellman parameters */
- R_RANDOM_STRUCT randomstr; /* random structure */
- int rval; /* return value */
- u_char encoded_key[MAXKEYLEN]; /* encoded PEM string buffer */
- u_int modulus; /* modulus length */
- u_int len;
-#endif /* PUBKEY */
- struct timeval tv; /* initialization vector */
- u_long ntptime; /* NTP timestamp */
- char hostname[256]; /* DNS host name */
- u_char md5key[17]; /* generated MD5 key */
- FILE *str; /* file handle */
- u_int temp;
- int i, j;
- mode_t std_mask; /* Standard mask */
- mode_t sec_mask = 077; /* Secure mask */
- char pathbuf[PATH_MAX];
-
- gethostname(hostname, sizeof(hostname));
- GETTIMEOFDAY(&tv, 0);
- ntptime = tv.tv_sec + JAN_1970;
-
- /* Initialize config_file */
- getconfig(argc, argv); /* ntpd/ntp_config.c */
-
- if (!f1_keysdir) {
- /* Shouldn't happen... */
- f1_keysdir = "PATH_KEYSDIR";
- }
- if (*f1_keysdir != '/') {
- fprintf(stderr,
- "%s: keysdir path <%s> doesn't begin with a /\n",
- progname, f1_keysdir);
- exit(1);
- }
-
- if (!f2_keys) {
- snprintf(pathbuf, sizeof pathbuf, "ntp.keys.%lu",
- ntptime);
- f2_keys = strdup(pathbuf);
- }
- if (!f1_keys) {
- snprintf(pathbuf, sizeof pathbuf, "%s/ntp.keys",
- f1_keysdir);
- f1_keys = strdup(pathbuf);
- }
- if (*f1_keys != '/') {
- fprintf(stderr,
- "%s: keys path <%s> doesn't begin with a /\n",
- progname, f1_keys);
- exit(1);
- }
- snifflink(f1_keys, &f3_keys);
-
- if (!f2_publickey) {
- snprintf(pathbuf, sizeof pathbuf, "ntpkey_%s.%lu",
- hostname, ntptime);
- f2_publickey = strdup(pathbuf);
- }
- if (!f1_publickey) {
- snprintf(pathbuf, sizeof pathbuf, "%s/ntpkey_%s",
- f1_keysdir, hostname);
- f1_publickey = strdup(pathbuf);
- }
- if (*f1_publickey != '/') {
- fprintf(stderr,
- "%s: publickey path <%s> doesn't begin with a /\n",
- progname, f1_publickey);
- exit(1);
- }
- snifflink(f1_publickey, &f3_publickey);
-
- if (!f2_privatekey) {
- snprintf(pathbuf, sizeof pathbuf, "ntpkey.%lu",
- ntptime);
- f2_privatekey = strdup(pathbuf);
- }
- if (!f1_privatekey) {
- snprintf(pathbuf, sizeof pathbuf, "%s/ntpkey",
- f1_keysdir);
- f1_privatekey = strdup(pathbuf);
- }
- if (*f1_privatekey != '/') {
- fprintf(stderr,
- "%s: privatekey path <%s> doesn't begin with a /\n",
- progname, f1_privatekey);
- exit(1);
- }
- snifflink(f1_privatekey, &f3_privatekey);
-
- if (!f2_dhparms) {
- snprintf(pathbuf, sizeof pathbuf, "ntpkey_dh.%lu",
- ntptime);
- f2_dhparms = strdup(pathbuf);
- }
- if (!f1_dhparms) {
- snprintf(pathbuf, sizeof pathbuf, "%s/ntpkey_dh",
- f1_keysdir);
- f1_dhparms = strdup(pathbuf);
- }
- if (*f1_dhparms != '/') {
- fprintf(stderr,
- "%s: dhparms path <%s> doesn't begin with a /\n",
- progname, f1_dhparms);
- exit(1);
- }
- snifflink(f1_dhparms, &f3_dhparms);
-
- if (debug > 1) {
- printf("After config:\n");
- printf("keysdir = <%s>\n", f1_keysdir? f1_keysdir: "");
- printf("keys = <%s> -> <%s>\n"
- , f1_keys? f1_keys: ""
- , f2_keys? f2_keys: ""
- );
- printf(" old = <%s>\n", f3_keys? f3_keys: "");
- printf("publickey = <%s> -> <%s>\n"
- , f1_publickey? f1_publickey: ""
- , f2_publickey? f2_publickey: ""
- );
- printf(" old = <%s>\n", f3_publickey? f3_publickey: "");
- printf("privatekey = <%s> -> <%s>\n"
- , f1_privatekey? f1_privatekey: ""
- , f2_privatekey? f2_privatekey: ""
- );
- printf(" old = <%s>\n", f3_privatekey? f3_privatekey: "");
- printf("dhparms = <%s> -> <%s>\n"
- , f1_dhparms? f1_dhparms: ""
- , f2_dhparms? f2_dhparms: ""
- );
- printf(" old = <%s>\n", f3_dhparms? f3_dhparms: "");
- }
-
- /*
- for each file we're going to install:
- - make the new timestamped file
- - if (!nosymlinks)
- - - remove any old link
- - - make the link
- - - if (trash)
- - - - remove the old file
- */
-
- std_mask = umask(sec_mask); /* Get the standard mask */
- (void) umask(std_mask);
-
- if (make_md5 && (force || !filep(f1_keys))) {
- /*
- * Generate 16 random MD5 keys.
- */
- printf("Generating MD5 key file...\n");
- str = newfile(f1_keys, f2_keys, sec_mask, f3_keys);
- if (!memorex) {
- SRANDOM((u_int)tv.tv_usec);
- fprintf(str, "# MD5 key file %s\n# %s", f2_keys,
- ctime((const time_t *) &tv.tv_sec));
- for (i = 1; i <= 16; i++) {
- for (j = 0; j < 16; j++) {
- while (1) {
- temp = RANDOM & 0xff;
- /*
- ** Harlan says Karnaugh maps
- ** are not his friend, and
- ** compilers can optimize
- ** this most easily.
- */
- if (temp == '#')
- continue;
- if (temp > 0x20 && temp < 0x7f)
- break;
- }
- md5key[j] = (u_char)temp;
- }
- md5key[16] = 0;
- fprintf(str, "%2d M %16s # MD5 key\n",
- i, md5key);
- }
- }
- if (str) fclose(str);
- cleanlinks(f1_keys, f2_keys, f3_keys);
- }
-
-#ifdef PUBKEY
- if (make_rsa && (force || !filep(f1_publickey)
- || !filep(f1_privatekey))) {
- /*
- * Roll the RSA public/private key pair.
- */
- printf("Generating RSA public/private key pair (%d bits)...\n",
- MODULUSLEN);
- if (!memorex) {
- protokey.bits = MODULUSLEN;
- protokey.useFermat4 = 1;
- R_RandomInit(&randomstr);
- R_GetRandomBytesNeeded(&len, &randomstr);
- for (i = 0; i < len; i++) {
- temp = RANDOM;
- R_RandomUpdate(&randomstr, (u_char *)&temp, 1);
- }
- rval = R_GeneratePEMKeys(&rsaref_public,
- &rsaref_private, &protokey,
- &randomstr);
- if (rval) {
- printf("R_GeneratePEMKeys error %x\n", rval);
- return (-1);
- }
- }
-
- /*
- * Generate the file "ntpkey.*" containing the RSA
- * private key in printable ASCII format.
- */
- str = newfile(f1_privatekey, f2_privatekey, sec_mask,
- f3_privatekey);
- if (!memorex) {
- len = sizeof(rsaref_private)
- - sizeof(rsaref_private.bits);
- modulus = (u_int32)rsaref_private.bits;
- fprintf(str, "# RSA private key file %s\n# %s",
- f2_privatekey, ctime(&tv.tv_sec));
- R_EncodePEMBlock(encoded_key, &temp,
- (u_char *)rsaref_private.modulus,
- len);
- encoded_key[temp] = '\0';
- fprintf(str, "%d %s\n", modulus, encoded_key);
- }
- if (str) fclose(str);
- cleanlinks(f1_privatekey, f2_privatekey, f3_privatekey);
-
- /*
- * Generate the file "ntpkey_host.*" containing the RSA
- * public key in printable ASCII format.
- */
- str = newfile(f1_publickey, f2_publickey, std_mask,
- f3_publickey);
- if (!memorex) {
- len = sizeof(rsaref_public)
- - sizeof(rsaref_public.bits);
- modulus = (u_int32)rsaref_public.bits;
- fprintf(str, "# RSA public key file %s\n# %s",
- f2_publickey, ctime(&tv.tv_sec));
- R_EncodePEMBlock(encoded_key, &temp,
- (u_char *)rsaref_public.modulus, len);
- encoded_key[temp] = '\0';
- fprintf(str, "%d %s\n", modulus, encoded_key);
- }
- if (str) fclose(str);
- cleanlinks(f1_publickey, f2_publickey, f3_publickey);
- }
-#endif /* PUBKEY */
-
-#ifdef PUBKEY
- if (make_dh && (force || !filep(f1_dhparms))) {
- /*
- * Roll the prime and generator for the Diffie-Hellman key
- * agreement algorithm.
- */
- printf("Generating Diffie-Hellman parameters (%d bits)...\n",
- PRIMELEN);
- str = newfile(f1_dhparms, f2_dhparms, std_mask, f3_dhparms);
-
- if (!memorex) {
- R_RandomInit(&randomstr);
- R_GetRandomBytesNeeded(&len, &randomstr);
- for (i = 0; i < len; i++) {
- temp = RANDOM;
- R_RandomUpdate(&randomstr, (u_char *)&temp, 1);
- }
-
- /*
- * Generate the file "ntpkey_dh.*" containing the
- * Diffie-Hellman prime and generator in printable
- * ASCII format.
- */
- len = DH_PRIME_LEN(PRIMELEN);
- dh_params.prime = (u_char *)malloc(len);
- dh_params.generator = (u_char *)malloc(len);
- rval = R_GenerateDHParams(&dh_params, PRIMELEN,
- PRIMELEN / 2, &randomstr);
- if (rval) {
- printf("R_GenerateDHParams error %x\n", rval);
- return (-1);
- }
-
- fprintf(str,
- "# Diffie-Hellman parameter file %s\n# %s",
- f2_dhparms, ctime(&tv.tv_sec));
- R_EncodePEMBlock(encoded_key, &temp,
- (u_char *)dh_params.prime,
- dh_params.primeLen);
- encoded_key[temp] = '\0';
- fprintf(str, "%d %s\n", dh_params.primeLen,
- encoded_key);
- R_EncodePEMBlock(encoded_key, &temp,
- (u_char *)dh_params.generator,
- dh_params.generatorLen);
- encoded_key[temp] = '\0';
- fprintf(str, "%d %s\n", dh_params.generatorLen,
- encoded_key);
- }
- if (str) fclose(str);
- cleanlinks(f1_dhparms, f2_dhparms, f3_dhparms);
- }
-#endif /* PUBKEY */
-
- return (0);
-}
diff --git a/contrib/ntp/util/ntp-keygen.c b/contrib/ntp/util/ntp-keygen.c
deleted file mode 100644
index 2d91652..0000000
--- a/contrib/ntp/util/ntp-keygen.c
+++ /dev/null
@@ -1,1998 +0,0 @@
-/*
- * 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 */
-#ifdef OPENSSL
-u_int modulus = PLEN; /* prime modulus size (bits) */
-#endif
-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 */
-#endif
- int md5key = 0; /* generate MD5 keys */
-#ifdef OPENSSL
- 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 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 */
- char hostbuf[MAXHOSTNAME + 1];
- 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;
-#ifdef OPENSSL
- trustname = hostbuf;
- passwd1 = hostbuf;
-#endif
-#ifndef SYS_WINNT
- gettimeofday(&tv, 0);
-#else
- gettimeofday(&tv);
-#endif
- epoch = tv.tv_sec;
- rval = 0;
- while ((temp = getopt(argc, argv,
-#ifdef OPENSSL
- "c:deGgHIi:Mm:nPp:q:S:s:TV:v:"
-#else
- "dM"
-#endif
- )) != -1) {
- switch(temp) {
-
-#ifdef OPENSSL
- /*
- * -c select public certificate type
- */
- case 'c':
- scheme = optarg;
- continue;
-#endif
-
- /*
- * -d debug
- */
- case 'd':
- debug++;
- continue;
-
-#ifdef OPENSSL
- /*
- * -e write identity keys
- */
- case 'e':
- iffsw++;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -G generate GQ parameters and keys
- */
- case 'G':
- gqpar++;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -g update GQ keys
- */
- case 'g':
- gqkey++;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -H generate host key (RSA)
- */
- case 'H':
- hostkey++;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -I generate IFF parameters
- */
- case 'I':
- iffkey++;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -i set issuer name
- */
- case 'i':
- trustname = optarg;
- continue;
-#endif
-
- /*
- * -M generate MD5 keys
- */
- case 'M':
- md5key++;
- continue;
-
-#ifdef OPENSSL
- /*
- * -m select modulus (256-2048)
- */
- case 'm':
- if (sscanf(optarg, "%d", &modulus) != 1)
- fprintf(stderr,
- "invalid option -m %s\n", optarg);
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -P generate PC private certificate
- */
- case 'P':
- exten = EXT_KEY_PRIVATE;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -p output private key password
- */
- case 'p':
- passwd2 = optarg;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -q input private key password
- */
- case 'q':
- passwd1 = optarg;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -S generate sign key (RSA or DSA)
- */
- case 'S':
- sign = optarg;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -s set subject name
- */
- case 's':
- hostname = optarg;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -T trusted certificate (TC scheme)
- */
- case 'T':
- exten = EXT_KEY_TRUST;
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -V <keys> generate MV parameters
- */
- case 'V':
- mvpar++;
- if (sscanf(optarg, "%d", &nkeys) != 1)
- fprintf(stderr,
- "invalid option -V %s\n", optarg);
- continue;
-#endif
-
-#ifdef OPENSSL
- /*
- * -v <key> update MV keys
- */
- case 'v':
- mvkey++;
- if (sscanf(optarg, "%d", &nkeys) != 1)
- fprintf(stderr,
- "invalid option -v %s\n", optarg);
- continue;
-#endif
-
- /*
- * 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);
-#endif
-
- /*
- * Generate new parameters and keys as requested. These replace
- * any values already generated.
- */
- if (md5key)
- gen_md5("MD5");
-#ifdef OPENSSL
- 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[15] = '\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, *pkey1; /* 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 = DSA_new();
- 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 = DSA_new();
- 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);
- pkey1 = EVP_PKEY_new();
- EVP_PKEY_set1_DSA(pkey1, sdsa);
- PEM_write_PrivateKey(str, pkey1, 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);
- EVP_PKEY_free(pkey1);
- }
-
- /*
- * 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(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;
- }
-}
-
-
-/*
- * 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);
-}
-#endif /* OPENSSL */
-
-
-/*
- * 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
deleted file mode 100644
index 51111be..0000000
--- a/contrib/ntp/util/ntptime.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * NTP test program
- *
- * This program tests to see if the NTP user interface routines
- * ntp_gettime() and ntp_adjtime() have been implemented in the kernel.
- * If so, each of these routines is called to display current timekeeping
- * data.
- *
- * For more information, see the README.kern file in the doc directory
- * of the xntp3 distribution.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
-#include "ntp_syscall.h"
-#include "ntp_stdlib.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#include <setjmp.h>
-
-#ifdef NTP_SYSCALLS_STD
-# ifndef SYS_DECOSF1
-# define BADCALL -1 /* this is supposed to be a bad syscall */
-# endif /* SYS_DECOSF1 */
-#endif
-
-#ifdef HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC
-#define tv_frac_sec tv_nsec
-#else
-#define tv_frac_sec tv_usec
-#endif
-
-
-#define TIMEX_MOD_BITS \
-"\20\1OFFSET\2FREQUENCY\3MAXERROR\4ESTERROR\5STATUS\6TIMECONST\
-\13PLL\14FLL\15MICRO\16NANO\17CLKB\20CLKA"
-
-#define TIMEX_STA_BITS \
-"\20\1PLL\2PPSFREQ\3PPSTIME\4FLL\5INS\6DEL\7UNSYNC\10FREQHOLD\
-\11PPSSIGNAL\12PPSJITTER\13PPSWANDER\14PPSERROR\15CLOCKERR\
-\16NANO\17MODE\20CLK"
-
-#define SCALE_FREQ 65536 /* frequency scale */
-
-
-/*
- * Function prototypes
- */
-char *sprintb P((u_int, const char *));
-const char *timex_state P((int));
-
-#ifdef SIGSYS
-void pll_trap P((int));
-
-static struct sigaction newsigsys; /* new sigaction status */
-static struct sigaction sigsys; /* current sigaction status */
-static sigjmp_buf env; /* environment var. for pll_trap() */
-#endif
-
-static volatile int pll_control; /* (0) daemon, (1) kernel loop */
-static volatile int status; /* most recent status bits */
-static volatile int flash; /* most recent ntp_adjtime() bits */
-char* progname;
-static char optargs[] = "MNT:cde:f:hm:o:rs:t:";
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- extern int ntp_optind;
- extern char *ntp_optarg;
-#ifdef SUBST_ADJTIMEX
- struct timex ntv;
-#else
- struct ntptimeval ntv;
-#endif
- struct timeval tv;
- struct timex ntx, _ntx;
- int times[20];
- double ftemp, gtemp, htemp;
- long time_frac; /* ntv.time.tv_frac_sec (us/ns) */
- l_fp ts;
- 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;
- volatile int rawtime = 0;
-
- memset((char *)&ntx, 0, sizeof(ntx));
- progname = argv[0];
- while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) {
-#ifdef MOD_MICRO
- case 'M':
- ntx.modes |= MOD_MICRO;
- break;
-#endif
-#ifdef MOD_NANO
- case 'N':
- ntx.modes |= MOD_NANO;
- break;
-#endif
-#ifdef NTP_API
-# if NTP_API > 3
- case 'T':
- ntx.modes = MOD_TAI;
- ntx.constant = atoi(ntp_optarg);
- break;
-# endif
-#endif
- case 'c':
- cost++;
- break;
- case 'e':
- ntx.modes |= MOD_ESTERROR;
- ntx.esterror = atoi(ntp_optarg);
- break;
- case 'f':
- ntx.modes |= MOD_FREQUENCY;
- ntx.freq = (long)(atof(ntp_optarg) * SCALE_FREQ);
- break;
- case 'm':
- ntx.modes |= MOD_MAXERROR;
- ntx.maxerror = atoi(ntp_optarg);
- break;
- case 'o':
- ntx.modes |= MOD_OFFSET;
- ntx.offset = atoi(ntp_optarg);
- break;
- case 'r':
- rawtime++;
- break;
- case 's':
- ntx.modes |= MOD_STATUS;
- ntx.status = atoi(ntp_optarg);
- if (ntx.status < 0 || ntx.status >= 0x100) errflg++;
- break;
- case 't':
- ntx.modes |= MOD_TIMECONST;
- ntx.constant = atoi(ntp_optarg);
- break;
- default:
- errflg++;
- }
- if (errflg || (ntp_optind != argc)) {
- (void) fprintf(stderr,
- "usage: %s [-%s]\n\n\
-%s%s%s\
--c display the time taken to call ntp_gettime (us)\n\
--e esterror estimate of the error (us)\n\
--f frequency Frequency error (-500 .. 500) (ppm)\n\
--h display this help info\n\
--m maxerror max possible error (us)\n\
--o offset current offset (ms)\n\
--r print the unix and NTP time raw\n\
--s status Set the status bits\n\
--t timeconstant log2 of PLL time constant (0 .. %d)\n",
- progname, optargs,
-#ifdef MOD_MICRO
-"-M switch to microsecond mode\n",
-#else
-"",
-#endif
-#ifdef MOD_NANO
-"-N switch to nanosecond mode\n",
-#else
-"",
-#endif
-#ifdef NTP_API
-# if NTP_API > 3
-"-T tai_offset set TAI offset\n",
-# else
-"",
-# endif
-#else
-"",
-#endif
- MAXTC);
- exit(2);
- }
-
-#ifdef SIGSYS
- /*
- * Test to make sure the sigaction() works in case of invalid
- * syscall codes.
- */
- newsigsys.sa_handler = pll_trap;
- newsigsys.sa_flags = 0;
- if (sigaction(SIGSYS, &newsigsys, &sigsys)) {
- perror("sigaction() fails to save SIGSYS trap");
- exit(1);
- }
-#endif /* SIGSYS */
-
-#ifdef BADCALL
- /*
- * Make sure the trapcatcher works.
- */
- pll_control = 1;
-#ifdef SIGSYS
- if (sigsetjmp(env, 1) == 0)
- {
-#endif
- status = syscall(BADCALL, &ntv); /* dummy parameter */
- if ((status < 0) && (errno == ENOSYS))
- --pll_control;
-#ifdef SIGSYS
- }
-#endif
- if (pll_control)
- printf("sigaction() failed to catch an invalid syscall\n");
-#endif /* BADCALL */
-
- if (cost) {
-#ifdef SIGSYS
- if (sigsetjmp(env, 1) == 0) {
-#endif
- for (c = 0; c < sizeof times / sizeof times[0]; c++) {
- status = ntp_gettime(&ntv);
- if ((status < 0) && (errno == ENOSYS))
- --pll_control;
- if (pll_control < 0)
- break;
- times[c] = ntv.time.tv_frac_sec;
- }
-#ifdef SIGSYS
- }
-#endif
- if (pll_control >= 0) {
- printf("[ us %06d:", times[0]);
- for (c = 1; c < sizeof times / sizeof times[0]; c++)
- printf(" %d", times[c] - times[c - 1]);
- printf(" ]\n");
- }
- }
-#ifdef SIGSYS
- if (sigsetjmp(env, 1) == 0) {
-#endif
- status = ntp_gettime(&ntv);
- if ((status < 0) && (errno == ENOSYS))
- --pll_control;
-#ifdef SIGSYS
- }
-#endif
- _ntx.modes = 0; /* Ensure nothing is set */
-#ifdef SIGSYS
- if (sigsetjmp(env, 1) == 0) {
-#endif
- status = ntp_adjtime(&_ntx);
- if ((status < 0) && (errno == ENOSYS))
- --pll_control;
- flash = _ntx.status;
-#ifdef SIGSYS
- }
-#endif
- if (pll_control < 0) {
- printf("NTP user interface routines are not configured in this kernel.\n");
- goto lexit;
- }
-
- /*
- * Fetch timekeeping data and display.
- */
- status = ntp_gettime(&ntv);
- if (status < 0)
- perror("ntp_gettime() call fails");
- else {
- printf("ntp_gettime() returns code %d (%s)\n",
- status, timex_state(status));
- time_frac = ntv.time.tv_frac_sec;
-#ifdef STA_NANO
- if (flash & STA_NANO) {
- ntv.time.tv_frac_sec /= 1000;
- ts_mask = 0xfffffffc; /* 1/2^30 */
- ts_roundbit = 0x00000002;
- fdigits = 9;
- }
-#endif
- tv.tv_sec = ntv.time.tv_sec;
- tv.tv_usec = ntv.time.tv_frac_sec;
- TVTOTS(&tv, &ts);
- ts.l_ui += JAN_1970;
- ts.l_uf += ts_roundbit;
- ts.l_uf &= ts_mask;
- printf(" time %s, (.%0*d),\n",
- prettydate(&ts), fdigits, (int) time_frac);
- printf(" maximum error %lu us, estimated error %lu us",
- (u_long)ntv.maxerror, (u_long)ntv.esterror);
- if (rawtime)
- printf(" ntptime=%x.%x unixtime=%x.%0*d %s",
- (unsigned int) ts.l_ui, (unsigned int) ts.l_uf,
- (int) ntv.time.tv_sec, fdigits, (int) time_frac,
- ctime((const time_t *) &ntv.time.tv_sec));
-#if NTP_API > 3
- printf(", TAI offset %ld\n", (long)ntv.tai);
-#else
- printf("\n");
-#endif /* NTP_API */
- }
- status = ntp_adjtime(&ntx);
- if (status < 0)
- perror((errno == EPERM) ?
- "Must be root to set kernel values\nntp_adjtime() call fails" :
- "ntp_adjtime() call fails");
- else {
- flash = ntx.status;
- printf("ntp_adjtime() returns code %d (%s)\n",
- status, timex_state(status));
- printf(" modes %s,\n", sprintb(ntx.modes, TIMEX_MOD_BITS));
- ftemp = (double)ntx.offset;
-#ifdef STA_NANO
- if (flash & STA_NANO)
- ftemp /= 1000.0;
-#endif
- printf(" offset %.3f", ftemp);
- ftemp = (double)ntx.freq / SCALE_FREQ;
- printf(" us, frequency %.3f ppm, interval %d s,\n",
- ftemp, 1 << ntx.shift);
- printf(" maximum error %lu us, estimated error %lu us,\n",
- (u_long)ntx.maxerror, (u_long)ntx.esterror);
- printf(" status %s,\n", sprintb((u_int)ntx.status, TIMEX_STA_BITS));
- ftemp = (double)ntx.tolerance / SCALE_FREQ;
- gtemp = (double)ntx.precision;
-#ifdef STA_NANO
- if (flash & STA_NANO)
- gtemp /= 1000.0;
-#endif
- printf(
- " time constant %lu, precision %.3f us, tolerance %.0f ppm,\n",
- (u_long)ntx.constant, gtemp, ftemp);
- if (ntx.shift == 0)
- exit (0);
- ftemp = (double)ntx.ppsfreq / SCALE_FREQ;
- gtemp = (double)ntx.stabil / SCALE_FREQ;
- htemp = (double)ntx.jitter;
-#ifdef STA_NANO
- if (flash & STA_NANO)
- htemp /= 1000.0;
-#endif
- printf(
- " pps frequency %.3f ppm, stability %.3f ppm, jitter %.3f us,\n",
- ftemp, gtemp, htemp);
- printf(" intervals %lu, jitter exceeded %lu, stability exceeded %lu, errors %lu.\n",
- (u_long)ntx.calcnt, (u_long)ntx.jitcnt,
- (u_long)ntx.stbcnt, (u_long)ntx.errcnt);
- return (0);
- }
-
- /*
- * Put things back together the way we found them.
- */
- lexit:
-#ifdef SIGSYS
- if (sigaction(SIGSYS, &sigsys, (struct sigaction *)NULL)) {
- perror("sigaction() fails to restore SIGSYS trap");
- exit(1);
- }
-#endif
- exit(0);
-}
-
-#ifdef SIGSYS
-/*
- * pll_trap - trap processor for undefined syscalls
- */
-void
-pll_trap(
- int arg
- )
-{
- pll_control--;
- siglongjmp(env, 1);
-}
-#endif
-
-/*
- * Print a value a la the %b format of the kernel's printf
- */
-char *
-sprintb(
- register u_int v,
- register const char *bits
- )
-{
- register char *cp;
- register int i, any = 0;
- register char c;
- static char buf[132];
-
- if (bits && *bits == 8)
- (void)sprintf(buf, "0%o", v);
- else
- (void)sprintf(buf, "0x%x", v);
- cp = buf + strlen(buf);
- bits++;
- if (bits) {
- *cp++ = ' ';
- *cp++ = '(';
- while ((i = *bits++) != 0) {
- if (v & (1 << (i-1))) {
- if (any)
- *cp++ = ',';
- any = 1;
- for (; (c = *bits) > 32; bits++)
- *cp++ = c;
- } else
- for (; *bits > 32; bits++)
- continue;
- }
- *cp++ = ')';
- }
- *cp = '\0';
- return (buf);
-}
-
-const char *timex_states[] = {
- "OK", "INS", "DEL", "OOP", "WAIT", "ERROR"
-};
-
-const char *
-timex_state(
- register int s
- )
-{
- static char buf[32];
-
- if (s >= 0 && s <= sizeof(timex_states) / sizeof(timex_states[0]))
- return (timex_states[s]);
- sprintf(buf, "TIME-#%d", s);
- return (buf);
-}
diff --git a/contrib/ntp/util/pps-api.c b/contrib/ntp/util/pps-api.c
deleted file mode 100644
index 60c98b8..0000000
--- a/contrib/ntp/util/pps-api.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-
-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/precision.c b/contrib/ntp/util/precision.c
deleted file mode 100644
index b1516b3..0000000
--- a/contrib/ntp/util/precision.c
+++ /dev/null
@@ -1,171 +0,0 @@
-#include "ntp_unixtime.h"
-
-#include <stdio.h>
-
-#define DEFAULT_SYS_PRECISION -99
-
-int default_get_resolution();
-int default_get_precision();
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- printf("log2(resolution) = %d, log2(precision) = %d\n",
- default_get_resolution(),
- default_get_precision());
- return 0;
-}
-
-/* Find the resolution of the system clock by watching how the current time
- * changes as we read it repeatedly.
- *
- * struct timeval is only good to 1us, which may cause problems as machines
- * get faster, but until then the logic goes:
- *
- * If a machine has resolution (i.e. accurate timing info) > 1us, then it will
- * probably use the "unused" low order bits as a counter (to force time to be
- * a strictly increaing variable), incrementing it each time any process
- * requests the time [[ or maybe time will stand still ? ]].
- *
- * SO: the logic goes:
- *
- * IF the difference from the last time is "small" (< MINSTEP)
- * THEN this machine is "counting" with the low order bits
- * ELIF this is not the first time round the loop
- * THEN this machine *WAS* counting, and has now stepped
- * ELSE this machine has resolution < time to read clock
- *
- * SO: if it exits on the first loop, assume "full accuracy" (1us)
- * otherwise, take the log2(observered difference, rounded UP)
- *
- * MINLOOPS > 1 ensures that even if there is a STEP between the initial call
- * and the first loop, it doesn't stop too early.
- * Making it even greater allows MINSTEP to be reduced, assuming that the
- * chance of MINSTEP-1 other processes getting in and calling gettimeofday
- * between this processes's calls.
- * Reducing MINSTEP may be necessary as this sets an upper bound for the time
- * to actually call gettimeofday.
- */
-
-#define DUSECS 1000000
-#define HUSECS (1024 * 1024)
-#define MINSTEP 5 /* some systems increment uS on each call */
-/* Don't use "1" as some *other* process may read too*/
-/*We assume no system actually *ANSWERS* in this time*/
-#define MAXSTEP 20000 /* maximum clock increment (us) */
-#define MINLOOPS 5 /* minimum number of step samples */
-#define MAXLOOPS HUSECS /* Assume precision < .1s ! */
-
-int
-default_get_resolution(void)
-{
- struct timeval tp;
- struct timezone tzp;
- long last;
- int i;
- long diff;
- long val;
- int minsteps = MINLOOPS; /* need at least this many steps */
-
- gettimeofday(&tp, &tzp);
- last = tp.tv_usec;
- for (i = - --minsteps; i< MAXLOOPS; i++) {
- gettimeofday(&tp, &tzp);
- diff = tp.tv_usec - last;
- if (diff < 0) diff += DUSECS;
- if (diff > MINSTEP) if (minsteps-- <= 0) break;
- last = tp.tv_usec;
- }
-
- printf("resolution = %ld usec after %d loop%s\n",
- diff, i, (i==1) ? "" : "s");
-
- diff = (diff *3)/2;
- if (i >= MAXLOOPS) {
- printf(
- " (Boy this machine is fast ! %d loops without a step)\n",
- MAXLOOPS);
- diff = 1; /* No STEP, so FAST machine */
- }
- if (i == 0) {
- printf(
- " (The resolution is less than the time to read the clock -- Assume 1us)\n");
- diff = 1; /* time to read clock >= resolution */
- }
- for (i=0, val=HUSECS; val>0; i--, val >>= 1) if (diff >= val) return i;
- printf(" (Oh dear -- that wasn't expected ! I'll guess !)\n");
- return DEFAULT_SYS_PRECISION /* Something's BUST, so lie ! */;
-}
-
-/* ===== Rest of this code lifted straight from xntpd/ntp_proto.c ! ===== */
-
-/*
- * 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.
- */
-int
-default_get_precision(void)
-{
- struct timeval tp;
- struct timezone tzp;
-#ifdef HAVE_GETCLOCK
- struct timespec ts;
-#endif
- long last;
- int i;
- long diff;
- long val;
- long usec;
-
- 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;
- }
- }
- printf("precision = %ld usec after %d loop%s\n",
- val, i, (i == 1) ? "" : "s");
- if (usec >= HUSECS) {
- printf(" (Boy this machine is fast ! usec was %ld)\n",
- usec);
- val = MINSTEP; /* val <= MINSTEP; fast machine */
- }
- diff = HUSECS;
- for (i = 0; diff > val; i--)
- diff >>= 1;
- return (i);
-}
diff --git a/contrib/ntp/util/sht.c b/contrib/ntp/util/sht.c
deleted file mode 100644
index b993de9..0000000
--- a/contrib/ntp/util/sht.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * sht.c - Testprogram for shared memory refclock
- * read/write shared memory segment; see usage
- */
-#ifndef SYS_WINNT
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <stdio.h>
-#include <time.h>
-#include <unistd.h>
-#include <stdlib.h>
-#else
-#include <windows.h>
-#include <time.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <iostream.h>
-#define sleep(x) Sleep(x*1000)
-#endif
-#include <assert.h>
-struct shmTime {
- int mode; /* 0 - if valid set
- * use values,
- * clear valid
- * 1 - if valid set
- * if count before and after read of values is equal,
- * use values
- * clear valid
- */
- int count;
- time_t clockTimeStampSec;
- int clockTimeStampUSec;
- time_t receiveTimeStampSec;
- int receiveTimeStampUSec;
- int leap;
- int precision;
- int nsamples;
- int valid;
-};
-
-struct shmTime *
-getShmTime (
- int unit
- )
-{
-#ifndef SYS_WINNT
- int shmid=shmget (0x4e545030+unit, sizeof (struct shmTime), IPC_CREAT|0777);
- if (shmid==-1) {
- perror ("shmget");
- exit (1);
- }
- else {
- struct shmTime *p=(struct shmTime *)shmat (shmid, 0, 0);
- if ((int)(long)p==-1) {
- perror ("shmat");
- p=0;
- }
- assert (p!=0);
- return p;
- }
-#else
- char buf[10];
- LPSECURITY_ATTRIBUTES psec=0;
- sprintf (buf,"NTP%d",unit);
- SECURITY_DESCRIPTOR sd;
- SECURITY_ATTRIBUTES sa;
- HANDLE shmid;
-
- assert (InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION));
- assert (SetSecurityDescriptorDacl(&sd,1,0,0));
- sa.nLength=sizeof (SECURITY_ATTRIBUTES);
- sa.lpSecurityDescriptor=&sd;
- sa.bInheritHandle=0;
- shmid=CreateFileMapping ((HANDLE)0xffffffff, 0, PAGE_READWRITE,
- psec, sizeof (struct shmTime),buf);
- if (!shmid) {
- shmid=CreateFileMapping ((HANDLE)0xffffffff, 0, PAGE_READWRITE,
- 0, sizeof (struct shmTime),buf);
- cout <<"CreateFileMapping with psec!=0 failed"<<endl;
- }
-
- if (!shmid) {
- char mbuf[1000];
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- 0, GetLastError (), 0, mbuf, sizeof (mbuf), 0);
- int x=GetLastError ();
- cout <<"CreateFileMapping "<<buf<<":"<<mbuf<<endl;
- exit (1);
- }
- else {
- struct shmTime *p=(struct shmTime *) MapViewOfFile (shmid,
- FILE_MAP_WRITE, 0, 0, sizeof (struct shmTime));
- if (p==0) {
- char mbuf[1000];
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- 0, GetLastError (), 0, mbuf, sizeof (mbuf), 0);
- cout <<"MapViewOfFile "<<buf<<":"<<mbuf<<endl;
- exit (1);
- }
- return p;
- }
- return 0;
-#endif
-}
-
-
-int
-main (
- int argc,
- char *argv[]
- )
-{
- volatile struct shmTime *p=getShmTime(2);
- if (argc<=1) {
- printf ("usage: %s r[c][l]|w|snnn\n",argv[0]);
- printf (" r read shared memory\n");
- printf (" c clear valid-flag\n");
- printf (" l loop (so, rcl will read and clear in a loop\n");
- printf (" w write shared memory with current time\n");
- printf (" snnnn set nsamples to nnn\n");
- printf (" lnnnn set leap to nnn\n");
- printf (" pnnnn set precision to -nnn\n");
- exit (0);
- }
- switch (argv[1][0]) {
- case 's': {
- p->nsamples=atoi(&argv[1][1]);
- }
- break;
- case 'l': {
- p->leap=atoi(&argv[1][1]);
- }
- break;
- case 'p': {
- p->precision=-atoi(&argv[1][1]);
- }
- break;
- case 'r': {
- char *ap=&argv[1][1];
- int clear=0;
- int loop=0;
- printf ("reader\n");
- while (*ap) {
- switch (*ap) {
- case 'l' : loop=1; break;
- case 'c' : clear=1; break;
- }
- ap++;
- }
- do {
- printf ("mode=%d, count=%d, clock=%d.%d, rec=%d.%d,\n",
- p->mode,p->count,p->clockTimeStampSec,p->clockTimeStampUSec,
- p->receiveTimeStampSec,p->receiveTimeStampUSec);
- printf (" leap=%d, precision=%d, nsamples=%d, valid=%d\n",
- p->leap, p->precision, p->nsamples, p->valid);
- if (!p->valid)
- printf ("***\n");
- if (clear) {
- p->valid=0;
- printf ("cleared\n");
- }
- if (loop)
- sleep (1);
- } while (loop);
- }
- break;
- case 'w': {
- printf ("writer\n");
- p->mode=0;
- if (!p->valid) {
- p->clockTimeStampSec=time(0)-20;
- p->clockTimeStampUSec=0;
- p->receiveTimeStampSec=time(0)-1;
- p->receiveTimeStampUSec=0;
- printf ("%d %d\n",p->clockTimeStampSec, p->receiveTimeStampSec);
- p->valid=1;
- }
- else {
- printf ("p->valid still set\n"); /* not an error! */
- }
- }
- break;
- }
-}
diff --git a/contrib/ntp/util/testrs6000.c b/contrib/ntp/util/testrs6000.c
deleted file mode 100644
index e4d939a..0000000
--- a/contrib/ntp/util/testrs6000.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Checks for the RS/6000 AIX adjtime() bug, in which if a negative
- * offset is given, the system gets messed up and never completes the
- * adjustment. If the problem is fixed, this program will print the
- * time, sit there for 10 seconds, and exit. If the problem isn't fixed,
- * the program will print an occasional "result=nnnnnn" (the residual
- * slew from adjtime()).
- *
- * Compile this with bsdcc and run it as root!
- */
-#include <signal.h>
-#include <sys/time.h>
-#include <time.h>
-#include <stdio.h>
-
-int timeout();
-struct timeval adjustment, result;
-
-int
-main (
- int argc,
- char *argv[]
- )
-{
- struct itimerval value, oldvalue;
- int i;
- time_t curtime;
-
- curtime = time(0);
- printf("Starting: %s", ctime(&curtime));
- value.it_interval.tv_sec = value.it_value.tv_sec = 1;
- value.it_interval.tv_usec = value.it_value.tv_usec = 0;
- adjustment.tv_sec = 0;
- adjustment.tv_usec = -2000;
- signal(SIGALRM, timeout);
- setitimer(ITIMER_REAL, &value, &oldvalue);
- for (i=0; i<10; i++) {
- pause();
- }
-}
-
-int
-timeout(
- int sig,
- int code,
- struct sigcontext *scp
- )
-{
- signal (SIGALRM, timeout);
- if (adjtime(&adjustment, &result))
- printf("adjtime call failed\n");
- if (result.tv_sec != 0 || result.tv_usec != 0) {
- printf("result.u = %d.%06.6d ", (int) result.tv_sec,
- (int) result.tv_usec);
- }
-}
diff --git a/contrib/ntp/util/tickadj.c b/contrib/ntp/util/tickadj.c
deleted file mode 100644
index 4a7f2c4..0000000
--- a/contrib/ntp/util/tickadj.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/*
- * tickadj - read, and possibly modify, the kernel `tick' and
- * `tickadj' variables, as well as `dosynctodr'. Note that
- * this operates on the running kernel only. I'd like to be
- * able to read and write the binary as well, but haven't
- * mastered this yet.
- *
- * HMS: The #includes here are different from those in xntpd/ntp_unixclock.c
- * These seem "worse".
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "ntp_types.h"
-#include "l_stdlib.h"
-
-#include <stdio.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#ifdef HAVE___ADJTIMEX /* Linux */
-
-#include <sys/timex.h>
-struct timex txc;
-
-#if 0
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int c, i;
- int quiet = 0;
- int errflg = 0;
- char *progname;
- extern int ntp_optind;
- extern char *ntp_optarg;
-
- progname = argv[0];
- if (argc==2 && argv[1][0] != '-') { /* old Linux format, for compatability */
- if ((i = atoi(argv[1])) > 0) {
- txc.time_tick = i;
- txc.modes = ADJ_TIMETICK;
- } else {
- fprintf(stderr, "Silly value for tick: %s\n", argv[1]);
- errflg++;
- }
- } else {
- while ((c = ntp_getopt(argc, argv, "a:qt:")) != EOF) {
- switch (c) {
- case 'a':
- if ((i=atoi(ntp_optarg)) > 0) {
- txc.tickadj = i;
- txc.modes |= ADJ_TICKADJ;
- } else {
- (void) fprintf(stderr,
- "%s: unlikely value for tickadj: %s\n",
- progname, ntp_optarg);
- errflg++;
- }
- break;
-
- case 'q':
- quiet = 1;
- break;
-
- case 't':
- if ((i=atoi(ntp_optarg)) > 0) {
- txc.time_tick = i;
- txc.modes |= ADJ_TIMETICK;
- } else {
- (void) fprintf(stderr,
- "%s: unlikely value for tick: %s\n",
- progname, ntp_optarg);
- errflg++;
- }
- break;
-
- default:
- fprintf(stderr,
- "Usage: %s [tick_value]\n-or- %s [ -q ] [ -t tick ] [ -a tickadj ]\n",
- progname, progname);
- errflg++;
- break;
- }
- }
- }
-
- if (!errflg) {
- if (__adjtimex(&txc) < 0)
- perror("adjtimex");
- else if (!quiet)
- printf("tick = %ld\ntick_adj = %d\n",
- txc.time_tick, txc.tickadj);
- }
-
- exit(errflg ? 1 : 0);
-}
-#else
-int
-main(
- int argc,
- char *argv[]
- )
-{
- if (argc > 2)
- {
- fprintf(stderr, "Usage: %s [tick_value]\n", argv[0]);
- exit(-1);
- }
- else if (argc == 2)
- {
-#ifdef ADJ_TIMETICK
- if ( (txc.time_tick = atoi(argv[1])) < 1 )
-#else
- if ( (txc.tick = atoi(argv[1])) < 1 )
-#endif
- {
- fprintf(stderr, "Silly value for tick: %s\n", argv[1]);
- exit(-1);
- }
-#ifdef ADJ_TIMETICK
- txc.modes = ADJ_TIMETICK;
-#else
-#ifdef MOD_OFFSET
- txc.modes = ADJ_TICK;
-#else
- txc.mode = ADJ_TICK;
-#endif
-#endif
- }
- else
- {
-#ifdef ADJ_TIMETICK
- txc.modes = 0;
-#else
-#ifdef MOD_OFFSET
- txc.modes = 0;
-#else
- txc.mode = 0;
-#endif
-#endif
- }
-
- if (__adjtimex(&txc) < 0)
- {
- perror("adjtimex");
- }
- else
- {
-#ifdef ADJ_TIMETICK
- printf("tick = %ld\ntick_adj = %ld\n", txc.time_tick, txc.tickadj);
-#else
- printf("tick = %ld\n", txc.tick);
-#endif
- }
-
- exit(0);
-}
-#endif
-
-#else /* not Linux... kmem tweaking: */
-
-#ifdef HAVE_SYS_FILE_H
-# include <sys/file.h>
-#endif
-#include <sys/stat.h>
-
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-#ifdef NLIST_STRUCT
-# include <nlist.h>
-#else /* not NLIST_STRUCT */ /* was defined(SYS_AUX3) || defined(SYS_AUX2) */
-# include <sys/resource.h>
-# include <sys/file.h>
-# include <a.out.h>
-# include <sys/var.h>
-#endif
-
-#include "ntp_io.h"
-#include "ntp_stdlib.h"
-
-#ifdef hz /* Was: RS6000 */
-# undef hz
-#endif /* hz */
-
-#ifdef HAVE_KVM_OPEN
-# include <kvm.h>
-#endif
-
-#ifdef SYS_VXWORKS
-/* vxWorks needs mode flag -casey*/
-#define open(name, flags) open(name, flags, 0777)
-#endif
-
-#ifndef L_SET /* Was: defined(SYS_PTX) || defined(SYS_IX86OSF1) */
-# define L_SET SEEK_SET
-#endif
-
-#ifndef HZ
-# define HZ DEFAULT_HZ
-#endif
-
-#define KMEM "/dev/kmem"
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-char *progname;
-volatile int debug;
-
-int dokmem = 1;
-int writetickadj = 0;
-int writeopttickadj = 0;
-int unsetdosync = 0;
-int writetick = 0;
-int quiet = 0;
-int setnoprintf = 0;
-
-const char *kmem = KMEM;
-const char *file = NULL;
-int fd = -1;
-
-static void getoffsets P((off_t *, off_t *, off_t *, off_t *));
-static int openfile P((const char *, int));
-static void writevar P((int, off_t, int));
-static void readvar P((int, off_t, int *));
-
-/*
- * main - parse arguments and handle options
- */
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int c;
- int errflg = 0;
- off_t tickadj_offset;
- off_t tick_offset;
- off_t dosync_offset;
- off_t noprintf_offset;
- int tickadj, ktickadj; /* HMS: Why isn't this u_long? */
- int tick, ktick; /* HMS: Why isn't this u_long? */
- int dosynctodr;
- int noprintf;
- int hz;
- int hz_int, hz_hundredths;
- int recommend_tickadj;
- long tmp;
-
- progname = argv[0];
- while ((c = ntp_getopt(argc, argv, "a:Adkpqst:")) != EOF)
- {
- switch (c)
- {
- case 'a':
- writetickadj = atoi(ntp_optarg);
- if (writetickadj <= 0)
- {
- (void) fprintf(stderr,
- "%s: unlikely value for tickadj: %s\n",
- progname, ntp_optarg);
- errflg++;
- }
-
-#if defined SCO5_CLOCK
- if (writetickadj % HZ)
- {
- writetickadj = (writetickadj / HZ) * HZ;
- (void) fprintf(stderr,
- "tickadj truncated to: %d\n", writetickadj);
- }
-#endif /* SCO5_CLOCK */
-
- break;
- case 'A':
- writeopttickadj = 1;
- break;
- case 'd':
- ++debug;
- break;
- case 'k':
- dokmem = 1;
- break;
- case 'p':
- setnoprintf = 1;
- break;
- case 'q':
- quiet = 1;
- break;
- case 's':
- unsetdosync = 1;
- break;
- case 't':
- writetick = atoi(ntp_optarg);
- if (writetick <= 0)
- {
- (void) fprintf(stderr,
- "%s: unlikely value for tick: %s\n",
- progname, ntp_optarg);
- errflg++;
- }
- break;
- default:
- errflg++;
- break;
- }
- }
- if (errflg || ntp_optind != argc)
- {
- (void) fprintf(stderr,
- "usage: %s [-Adkpqs] [-a newadj] [-t newtick]\n", progname);
- exit(2);
- }
-
- getoffsets(&tick_offset, &tickadj_offset, &dosync_offset, &noprintf_offset);
-
- if (debug)
- {
- (void) printf("tick offset = %lu\n", (unsigned long)tick_offset);
- (void) printf("tickadj offset = %lu\n", (unsigned long)tickadj_offset);
- (void) printf("dosynctodr offset = %lu\n", (unsigned long)dosync_offset);
- (void) printf("noprintf offset = %lu\n", (unsigned long)noprintf_offset);
- }
-
- if (writetick && (tick_offset == 0))
- {
- (void) fprintf(stderr,
- "No tick kernel variable\n");
- errflg++;
- }
-
- if (writeopttickadj && (tickadj_offset == 0))
- {
- (void) fprintf(stderr,
- "No tickadj kernel variable\n");
- errflg++;
- }
-
- if (unsetdosync && (dosync_offset == 0))
- {
- (void) fprintf(stderr,
- "No dosynctodr kernel variable\n");
- errflg++;
- }
-
- if (setnoprintf && (noprintf_offset == 0))
- {
- (void) fprintf(stderr,
- "No noprintf kernel variable\n");
- errflg++;
- }
-
- if (tick_offset != 0)
- {
- readvar(fd, tick_offset, &tick);
-#if defined(TICK_NANO) && defined(K_TICK_NAME)
- if (!quiet)
- (void) printf("KERNEL %s = %d nsec\n", K_TICK_NAME, tick);
-#endif /* TICK_NANO && K_TICK_NAME */
-
-#ifdef TICK_NANO
- tick /= 1000;
-#endif
- }
- else
- {
- tick = 0;
- }
-
- if (tickadj_offset != 0)
- {
- readvar(fd, tickadj_offset, &tickadj);
-
-#ifdef SCO5_CLOCK
- /* scale from nsec/sec to usec/tick */
- tickadj /= (1000L * HZ);
-#endif /*SCO5_CLOCK */
-
-#if defined(TICKADJ_NANO) && defined(K_TICKADJ_NAME)
- if (!quiet)
- (void) printf("KERNEL %s = %d nsec\n", K_TICKADJ_NAME, tickadj);
-#endif /* TICKADJ_NANO && K_TICKADJ_NAME */
-
-#ifdef TICKADJ_NANO
- tickadj += 999;
- tickadj /= 1000;
-#endif
- }
- else
- {
- tickadj = 0;
- }
-
- if (dosync_offset != 0)
- {
- readvar(fd, dosync_offset, &dosynctodr);
- }
-
- if (noprintf_offset != 0)
- {
- readvar(fd, noprintf_offset, &noprintf);
- }
-
- (void) close(fd);
-
- if (unsetdosync && dosync_offset == 0)
- {
- (void) fprintf(stderr,
- "%s: can't find %s in namelist\n",
- progname,
-#ifdef K_DOSYNCTODR_NAME
- K_DOSYNCTODR_NAME
-#else /* not K_DOSYNCTODR_NAME */
- "dosynctodr"
-#endif /* not K_DOSYNCTODR_NAME */
- );
- exit(1);
- }
-
- hz = HZ;
-#if defined(HAVE_SYSCONF) && defined(_SC_CLK_TCK)
- hz = (int) sysconf (_SC_CLK_TCK);
-#endif /* not HAVE_SYSCONF && _SC_CLK_TCK */
-#ifdef OVERRIDE_HZ
- hz = DEFAULT_HZ;
-#endif
- ktick = tick;
-#ifdef PRESET_TICK
- tick = PRESET_TICK;
-#endif /* PRESET_TICK */
-#ifdef TICKADJ_NANO
- tickadj /= 1000;
- if (tickadj == 0)
- tickadj = 1;
-#endif
- ktickadj = tickadj;
-#ifdef PRESET_TICKADJ
- tickadj = (PRESET_TICKADJ) ? PRESET_TICKADJ : 1;
-#endif /* PRESET_TICKADJ */
-
- if (!quiet)
- {
- if (tick_offset != 0)
- {
- (void) printf("KERNEL tick = %d usec (from %s kernel variable)\n",
- ktick,
-#ifdef K_TICK_NAME
- K_TICK_NAME
-#else
- "<this can't happen>"
-#endif
- );
- }
-#ifdef PRESET_TICK
- (void) printf("PRESET tick = %d usec\n", tick);
-#endif /* PRESET_TICK */
- if (tickadj_offset != 0)
- {
- (void) printf("KERNEL tickadj = %d usec (from %s kernel variable)\n",
- ktickadj,
-#ifdef K_TICKADJ_NAME
- K_TICKADJ_NAME
-#else
- "<this can't happen>"
-#endif
- );
- }
-#ifdef PRESET_TICKADJ
- (void) printf("PRESET tickadj = %d usec\n", tickadj);
-#endif /* PRESET_TICKADJ */
- if (dosync_offset != 0)
- {
- (void) printf("dosynctodr is %s\n", dosynctodr ? "on" : "off");
- }
- if (noprintf_offset != 0)
- {
- (void) printf("kernel level printf's: %s\n",
- noprintf ? "off" : "on");
- }
- }
-
- if (tick <= 0)
- {
- (void) fprintf(stderr, "%s: the value of tick is silly!\n",
- progname);
- exit(1);
- }
-
- hz_int = (int)(1000000L / (long)tick);
- hz_hundredths = (int)((100000000L / (long)tick) - ((long)hz_int * 100L));
- if (!quiet)
- {
- (void) printf("KERNEL hz = %d\n", hz);
- (void) printf("calculated hz = %d.%02d Hz\n", hz_int,
- hz_hundredths);
- }
-
-#if defined SCO5_CLOCK
- recommend_tickadj = 100;
-#else /* SCO5_CLOCK */
- tmp = (long) tick * 500L;
- recommend_tickadj = (int)(tmp / 1000000L);
- if (tmp % 1000000L > 0)
- {
- recommend_tickadj++;
- }
-
-#ifdef MIN_REC_TICKADJ
- if (recommend_tickadj < MIN_REC_TICKADJ)
- {
- recommend_tickadj = MIN_REC_TICKADJ;
- }
-#endif /* MIN_REC_TICKADJ */
-#endif /* SCO5_CLOCK */
-
-
- if ((!quiet) && (tickadj_offset != 0))
- {
- (void) printf("recommended value of tickadj = %d us\n",
- recommend_tickadj);
- }
-
- if ( writetickadj == 0
- && !writeopttickadj
- && !unsetdosync
- && writetick == 0
- && !setnoprintf)
- {
- exit(errflg ? 1 : 0);
- }
-
- if (writetickadj == 0 && writeopttickadj)
- {
- writetickadj = recommend_tickadj;
- }
-
- fd = openfile(file, O_WRONLY);
-
- if (setnoprintf && (noprintf_offset != 0))
- {
- if (!quiet)
- {
- (void) fprintf(stderr, "setting noprintf: ");
- (void) fflush(stderr);
- }
- writevar(fd, noprintf_offset, 1);
- if (!quiet)
- {
- (void) fprintf(stderr, "done!\n");
- }
- }
-
- if ((writetick > 0) && (tick_offset != 0))
- {
- if (!quiet)
- {
- (void) fprintf(stderr, "writing tick, value %d: ",
- writetick);
- (void) fflush(stderr);
- }
- writevar(fd, tick_offset, writetick);
- if (!quiet)
- {
- (void) fprintf(stderr, "done!\n");
- }
- }
-
- if ((writetickadj > 0) && (tickadj_offset != 0))
- {
- if (!quiet)
- {
- (void) fprintf(stderr, "writing tickadj, value %d: ",
- writetickadj);
- (void) fflush(stderr);
- }
-
-#ifdef SCO5_CLOCK
- /* scale from usec/tick to nsec/sec */
- writetickadj *= (1000L * HZ);
-#endif /* SCO5_CLOCK */
-
- writevar(fd, tickadj_offset, writetickadj);
- if (!quiet)
- {
- (void) fprintf(stderr, "done!\n");
- }
- }
-
- if (unsetdosync && (dosync_offset != 0))
- {
- if (!quiet)
- {
- (void) fprintf(stderr, "zeroing dosynctodr: ");
- (void) fflush(stderr);
- }
- writevar(fd, dosync_offset, 0);
- if (!quiet)
- {
- (void) fprintf(stderr, "done!\n");
- }
- }
- (void) close(fd);
- return(errflg ? 1 : 0);
-}
-
-/*
- * getoffsets - read the magic offsets from the specified file
- */
-static void
-getoffsets(
- off_t *tick_off,
- off_t *tickadj_off,
- off_t *dosync_off,
- off_t *noprintf_off
- )
-{
-
-#ifndef NOKMEM
-# ifndef HAVE_KVM_OPEN
- const char **kname;
-# endif
-#endif
-
-#ifndef NOKMEM
-# ifdef NLIST_NAME_UNION
-# define NL_B {{
-# define NL_E }}
-# else
-# define NL_B {
-# define NL_E }
-# endif
-#endif
-
-#define K_FILLER_NAME "DavidLetterman"
-
-#ifdef NLIST_EXTRA_INDIRECTION
- int i;
-#endif
-
-#ifndef NOKMEM
- static struct nlist nl[] =
- {
- NL_B
-#ifdef K_TICKADJ_NAME
-#define N_TICKADJ 0
- K_TICKADJ_NAME
-#else
- K_FILLER_NAME
-#endif
- NL_E,
- NL_B
-#ifdef K_TICK_NAME
-#define N_TICK 1
- K_TICK_NAME
-#else
- K_FILLER_NAME
-#endif
- NL_E,
- NL_B
-#ifdef K_DOSYNCTODR_NAME
-#define N_DOSYNC 2
- K_DOSYNCTODR_NAME
-#else
- K_FILLER_NAME
-#endif
- NL_E,
- NL_B
-#ifdef K_NOPRINTF_NAME
-#define N_NOPRINTF 3
- K_NOPRINTF_NAME
-#else
- K_FILLER_NAME
-#endif
- NL_E,
- NL_B "" NL_E,
- };
-
-#ifndef HAVE_KVM_OPEN
- static const char *kernels[] =
- {
-#ifdef HAVE_GETBOOTFILE
- NULL, /* *** SEE BELOW! *** */
-#endif
- "/kernel/unix",
- "/kernel",
- "/vmunix",
- "/unix",
- "/mach",
- "/hp-ux",
- "/386bsd",
- "/netbsd",
- "/stand/vmunix",
- "/bsd",
- NULL
- };
-#endif /* not HAVE_KVM_OPEN */
-
-#ifdef HAVE_KVM_OPEN
- /*
- * Solaris > 2.5 doesn't have a kernel file. Use the kvm_* interface
- * to read the kernel name list. -- stolcke 3/4/96
- */
- kvm_t *kvm_handle = kvm_open(NULL, NULL, NULL, O_RDONLY, progname);
-
- if (kvm_handle == NULL)
- {
- (void) fprintf(stderr,
- "%s: kvm_open failed\n",
- progname);
- exit(1);
- }
- if (kvm_nlist(kvm_handle, nl) == -1)
- {
- (void) fprintf(stderr,
- "%s: kvm_nlist failed\n",
- progname);
- exit(1);
- }
- kvm_close(kvm_handle);
-#else /* not HAVE_KVM_OPEN */
-#ifdef HAVE_GETBOOTFILE /* *** SEE HERE! *** */
- if (kernels[0] == NULL)
- {
- char * cp = (char *)getbootfile();
-
- if (cp)
- {
- kernels[0] = cp;
- }
- else
- {
- kernels[0] = "/Placeholder";
- }
- }
-#endif /* HAVE_GETBOOTFILE */
- for (kname = kernels; *kname != NULL; kname++)
- {
- struct stat stbuf;
-
- if (stat(*kname, &stbuf) == -1)
- {
- continue;
- }
- if (nlist(*kname, nl) >= 0)
- {
- break;
- }
- else
- {
- (void) fprintf(stderr,
- "%s: nlist didn't find needed symbols from <%s>: %s\n",
- progname, *kname, strerror(errno));
- }
- }
- if (*kname == NULL)
- {
- (void) fprintf(stderr,
- "%s: Couldn't find the kernel\n",
- progname);
- exit(1);
- }
-#endif /* HAVE_KVM_OPEN */
-
- if (dokmem)
- {
- file = kmem;
-
- fd = openfile(file, O_RDONLY);
-#ifdef NLIST_EXTRA_INDIRECTION
- /*
- * Go one more round of indirection.
- */
- for (i = 0; i < (sizeof(nl) / sizeof(struct nlist)); i++)
- {
- if ((nl[i].n_value) && (nl[i].n_sclass == 0x6b))
- {
- readvar(fd, nl[i].n_value, &nl[i].n_value);
- }
- }
-#endif /* NLIST_EXTRA_INDIRECTION */
- }
-#endif /* not NOKMEM */
-
- *tickadj_off = 0;
- *tick_off = 0;
- *dosync_off = 0;
- *noprintf_off = 0;
-
-#if defined(N_TICKADJ)
- *tickadj_off = nl[N_TICKADJ].n_value;
-#endif
-
-#if defined(N_TICK)
- *tick_off = nl[N_TICK].n_value;
-#endif
-
-#if defined(N_DOSYNC)
- *dosync_off = nl[N_DOSYNC].n_value;
-#endif
-
-#if defined(N_NOPRINTF)
- *noprintf_off = nl[N_NOPRINTF].n_value;
-#endif
- return;
-}
-
-#undef N_TICKADJ
-#undef N_TICK
-#undef N_DOSYNC
-#undef N_NOPRINTF
-
-
-/*
- * openfile - open the file, check for errors
- */
-static int
-openfile(
- const char *name,
- int mode
- )
-{
- int ifd;
-
- ifd = open(name, mode);
- if (ifd < 0)
- {
- (void) fprintf(stderr, "%s: open %s: ", progname, name);
- perror("");
- exit(1);
- }
- return ifd;
-}
-
-
-/*
- * writevar - write a variable into the file
- */
-static void
-writevar(
- int ofd,
- off_t off,
- int var
- )
-{
-
- if (lseek(ofd, off, L_SET) == -1)
- {
- (void) fprintf(stderr, "%s: lseek fails: ", progname);
- perror("");
- exit(1);
- }
- if (write(ofd, (char *)&var, sizeof(int)) != sizeof(int))
- {
- (void) fprintf(stderr, "%s: write fails: ", progname);
- perror("");
- exit(1);
- }
- return;
-}
-
-
-/*
- * readvar - read a variable from the file
- */
-static void
-readvar(
- int ifd,
- off_t off,
- int *var
- )
-{
- int i;
-
- if (lseek(ifd, off, L_SET) == -1)
- {
- (void) fprintf(stderr, "%s: lseek fails: ", progname);
- perror("");
- exit(1);
- }
- i = read(ifd, (char *)var, sizeof(int));
- if (i < 0)
- {
- (void) fprintf(stderr, "%s: read fails: ", progname);
- perror("");
- exit(1);
- }
- if (i != sizeof(int))
- {
- (void) fprintf(stderr, "%s: read expected %d, got %d\n",
- progname, (int)sizeof(int), i);
- exit(1);
- }
- return;
-}
-#endif /* not Linux */
diff --git a/contrib/ntp/util/timetrim.c b/contrib/ntp/util/timetrim.c
deleted file mode 100644
index 911ea28..0000000
--- a/contrib/ntp/util/timetrim.c
+++ /dev/null
@@ -1,116 +0,0 @@
-#if defined(sgi) || defined(_UNICOSMP)
-/*
- * timetrim.c
- *
- * "timetrim" allows setting and adjustment of the system clock frequency
- * trim parameter on Silicon Graphics machines. The trim value native
- * units are nanoseconds per second (10**-9), so a trim value of 1 makes
- * the system clock step ahead 1 nanosecond more per second than a value
- * of zero. Xntpd currently uses units of 2**-20 secs for its frequency
- * offset (drift) values; to convert to a timetrim value, multiply by
- * 1E9 / 2**20 (about 954).
- *
- * "timetrim" with no arguments just prints out the current kernel value.
- * With a numeric argument, the kernel value is set to the supplied value.
- * The "-i" flag causes the supplied value to be added to the kernel value.
- * The "-n" option causes all input and output to be in xntpd units rather
- * than timetrim native units.
- *
- * Note that there is a limit of +-3000000 (0.3%) on the timetrim value
- * which is (silently?) enforced by the kernel.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#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"
-#define SGITONTP(X) ((double)(X) * 1048576.0/1.0e9)
-#define NTPTOSGI(X) ((long)((X) * 1.0e9/1048576.0))
-
-int
-main(
- int argc,
- char *argv[]
- )
-{
- char *rem;
- int incremental = 0, ntpunits = 0;
- long timetrim;
- double value;
-
- while (--argc && **++argv == '-' && isalpha((int)argv[0][1])) {
- switch (argv[0][1]) {
- case 'i':
- incremental++;
- break;
- case 'n':
- ntpunits++;
- break;
- default:
- fprintf(stderr, USAGE);
- exit(1);
- }
- }
-
-#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)
- fprintf(stdout, "%0.5f\n", SGITONTP(timetrim));
- else
- fprintf(stdout, "%ld\n", timetrim);
- } else if (argc != 1) {
- fprintf(stderr, USAGE);
- exit(1);
- } else {
- value = strtod(argv[0], &rem);
- if (*rem != '\0') {
- fprintf(stderr, USAGE);
- exit(1);
- }
- if (ntpunits)
- value = NTPTOSGI(value);
- if (incremental)
- 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;
-}
-#endif
diff --git a/contrib/ntp/version b/contrib/ntp/version
deleted file mode 100644
index a4b697f..0000000
--- a/contrib/ntp/version
+++ /dev/null
@@ -1 +0,0 @@
-1.1161
OpenPOWER on IntegriCloud